Fix gdbserver build failure on arm-android.
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
1041a03c
JB
12015-05-14 Joel Brobecker <brobecker@adacore.com>
2
3 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4 * configure, config.in: Regenerate.
5 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6 Declare typedef.
7
c269dbdb
DB
82015-05-12 Don Breazeal <donb@codesourcery.com>
9
10 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
11 PTRACE_EVENT_VFORK_DONE.
12 (linux_low_ptrace_options, extended_event_reported): Add vfork
13 events.
14 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
15 and "vforkdone" for RSP 'T' Stop Reply Packet.
16 * server.h (report_vfork_events): Declare
17 global variable.
18
3a8a0396
DB
192015-05-12 Don Breazeal <donb@codesourcery.com>
20
21 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
22 (the_low_target) <new_fork>: Initialize new member.
23 * linux-arm-low.c (arm_new_fork): New function.
24 (the_low_target) <new_fork>: Initialize new member.
25 * linux-low.c (handle_extended_wait): Call new target function
26 new_fork.
27 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
28 * linux-mips-low.c (mips_add_watchpoint): New function
29 extracted from mips_insert_point.
30 (the_low_target) <new_fork>: Initialize new member.
31 (mips_linux_new_fork): New function.
32 (mips_insert_point): Call mips_add_watchpoint.
33 * linux-x86-low.c (x86_linux_new_fork): New function.
34 (the_low_target) <new_fork>: Initialize new member.
35
de0d863e
DB
362015-05-12 Don Breazeal <donb@codesourcery.com>
37
38 * linux-low.c (handle_extended_wait): Implement return value,
39 rename argument 'event_child' to 'event_lwp', handle
40 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
41 (linux_low_ptrace_options): New function.
42 (linux_low_filter_event): Call linux_low_ptrace_options,
43 use different argument fo linux_enable_event_reporting,
44 use return value from handle_extended_wait.
45 (extended_event_reported): New function.
46 (linux_wait_1): Call extended_event_reported and set
47 status to report fork events.
48 (linux_write_memory): Add pid to debug message.
49 (reset_lwp_ptrace_options_callback): New function.
50 (linux_handle_new_gdb_connection): New function.
51 (linux_target_ops): Initialize new structure member.
52 * linux-low.h (struct lwp_info) <waitstatus>: New member.
53 * lynx-low.c: Initialize new structure member.
54 * remote-utils.c (prepare_resume_reply): Implement stop reason
55 "fork" for "T" stop message.
56 * server.c (handle_query): Call handle_new_gdb_connection.
57 * server.h (report_fork_events): Declare global flag.
58 * target.h (struct target_ops) <handle_new_gdb_connection>:
59 New member.
60 (target_handle_new_gdb_connection): New macro.
61 * win32-low.c: Initialize new structure member.
62
ddcbc397
DB
632015-05-12 Don Breazeal <donb@codesourcery.com>
64
65 * mem-break.c (APPEND_TO_LIST): Define macro.
66 (clone_agent_expr): New function.
67 (clone_one_breakpoint): New function.
68 (clone_all_breakpoints): New function.
69 * mem-break.h: Declare new functions.
70
89245bc0
DB
712015-05-12 Don Breazeal <donb@codesourcery.com>
72
73 * linux-low.c (linux_supports_fork_events): New function.
74 (linux_supports_vfork_events): New function.
75 (linux_target_ops): Initialize new structure members.
76 (initialize_low): Call linux_check_ptrace_features.
77 * lynx-low.c (lynx_target_ops): Initialize new structure
78 members.
79 * server.c (report_fork_events, report_vfork_events):
80 New global flags.
81 (handle_query): Add new features to qSupported packet and
82 response.
83 (captured_main): Initialize new global variables.
84 * target.h (struct target_ops) <supports_fork_events>:
85 New member.
86 <supports_vfork_events>: New member.
87 (target_supports_fork_events): New macro.
88 (target_supports_vfork_events): New macro.
89 * win32-low.c (win32_target_ops): Initialize new structure
90 members.
91
835205d0
GB
922015-05-12 Gary Benson <gbenson@redhat.com>
93
94 * server.c (handle_qxfer_exec_file): Use current process
95 if annex is empty.
96
21e94bd9
SL
972015-05-08 Sandra Loosemore <sandra@codesourcery.com>
98
99 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
100 Remove HAVE_PTRACE_GETREGS conditionals.
101 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
102 instead of PTRACE_GETREGS and PTRACE_SETREGS.
103
45614f15
YQ
1042015-05-08 Yao Qi <yao.qi@linaro.org>
105
106 * linux-low.c (linux_supports_conditional_breakpoints): New
107 function.
108 (linux_target_ops): Install new target method.
109 * lynx-low.c (lynx_target_ops): Install NULL hook for
110 supports_conditional_breakpoints.
111 * nto-low.c (nto_target_ops): Likewise.
112 * spu-low.c (spu_target_ops): Likewise.
113 * win32-low.c (win32_target_ops): Likewise.
114 * server.c (handle_query): Check
115 target_supports_conditional_breakpoints.
116 * target.h (struct target_ops) <supports_conditional_breakpoints>:
117 New field.
118 (target_supports_conditional_breakpoints): New macro.
119
80ad801e
PA
1202015-05-06 Pedro Alves <palves@redhat.com>
121
122 PR server/18081
123 * server.c (start_inferior): If the process exits, mourn it.
124
819843c7
GB
1252015-04-21 Gary Benson <gbenson@redhat.com>
126
127 * hostio.c (fileio_open_flags_to_host): Factored out to
128 fileio_to_host_openflags in common/fileio.c. Single use
129 updated.
130
a2d5a9d7
MF
1312015-04-17 Max Filippov <jcmvbkbc@gmail.com>
132
133 * linux-xtensa-low.c (xtensa_fill_gregset)
134 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
135 XCHAL_HAVE_LOOP.
136
deb44829
MF
1372015-04-17 Max Filippov <jcmvbkbc@gmail.com>
138
139 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
140 (regs_info): Replace usrregs pointer with NULL.
141
e57f1de3
GB
1422015-04-17 Gary Benson <gbenson@redhat.com>
143
144 * target.h (struct target_ops) <pid_to_exec_file>: New field.
145 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
146 * server.c (handle_qxfer_exec_file): New function.
147 (qxfer_packets): Add exec-file entry.
148 (handle_query): Report qXfer:exec-file:read as supported packet.
149
62828379
RN
1502015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
151
152 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
153
b88bb450
GB
1542015-04-09 Gary Benson <gbenson@redhat.com>
155
156 * hostio-errno.c (errno_to_fileio_error): Remove function.
157 Update caller to use remote_fileio_to_fio_error.
158
c8f4bfdd
YQ
1592015-04-09 Yao Qi <yao.qi@linaro.org>
160
161 * linux-low.c (linux_insert_point): Call
162 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
163 (linux_remove_point): Call remove_memory_breakpoint if type is
164 raw_bkpt_type_sw.
165 * linux-x86-low.c (x86_insert_point): Don't call
166 insert_memory_breakpoint.
167 (x86_remove_point): Don't call remove_memory_breakpoint.
168
41f98f02
PA
1692015-04-01 Pedro Alves <palves@redhat.com>
170 Cleber Rosa <crosa@redhat.com>
171
172 * server.c (gdbserver_usage): Reorganize and extend the usage
173 message.
174
2bf6fb9d
PA
1752015-03-24 Pedro Alves <palves@redhat.com>
176
177 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
178 output. Also dump TRAP_TRACE.
179 (linux_low_filter_event): In debug output, distinguish a
180 resume_stop SIGSTOP from a delayed SIGSTOP.
181
369f6daa
GB
1822015-03-24 Gary Benson <gbenson@redhat.com>
183
184 * linux-x86-low.c (x86_linux_new_thread): Moved to
185 nat/x86-linux.c.
186 (x86_linux_prepare_to_resume): Likewise.
187
8e5d4070
GB
1882015-03-24 Gary Benson <gbenson@redhat.com>
189
190 * Makefile.in (x86-linux-dregs.o): New rule.
191 * configure.srv: Add x86-linux-dregs.o to relevant targets.
192 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
193 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
194 (x86_linux_dr_get): Likewise.
195 (x86_linux_dr_set): Likewise.
196 (update_debug_registers_callback): Likewise.
197 (x86_linux_dr_set_addr): Likewise.
198 (x86_linux_dr_get_addr): Likewise.
199 (x86_linux_dr_set_control): Likewise.
200 (x86_linux_dr_get_control): Likewise.
201 (x86_linux_dr_get_status): Likewise.
202 (x86_linux_update_debug_registers): Likewise.
203
2b95d440
GB
2042015-03-24 Gary Benson <gbenson@redhat.com>
205
206 * linux-x86-low.c (x86_linux_update_debug_registers):
207 New function, factored out from...
208 (x86_linux_prepare_to_resume): ...this.
209
14b0bc68
GB
2102015-03-24 Gary Benson <gbenson@redhat.com>
211
212 * linux-x86-low.c (x86_linux_dr_get): Update comments.
213 (x86_linux_dr_set): Likewise.
214 (update_debug_registers_callback): Likewise.
215 (x86_linux_dr_set_addr): Likewise.
216 (x86_linux_dr_get_addr): Likewise.
217 (x86_linux_dr_set_control): Likewise.
218 (x86_linux_dr_get_control): Likewise.
219 (x86_linux_dr_get_status): Likewise.
220 (x86_linux_prepare_to_resume): Likewise.
221
5dfe6ca8
GB
2222015-03-24 Gary Benson <gbenson@redhat.com>
223
224 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
225 Use perror_with_name. Pass string through gettext.
226 (x86_linux_dr_set): Likewise.
227
d33472ad
GB
2282015-03-24 Gary Benson <gbenson@redhat.com>
229
230 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
231 (x86_linux_dr_set_addr): ...this.
232 (x86_dr_low_get_addr): Rename to...
233 (x86_linux_dr_get_addr): ...this.
234 (x86_dr_low_set_control): Rename to...
235 (x86_linux_dr_set_control): ...this.
236 (x86_dr_low_get_control): Rename to...
237 (x86_linux_dr_get_control): ...this.
238 (x86_dr_low_get_status): Rename to...
239 (x86_linux_dr_get_status): ...this.
240 (x86_dr_low): Update with new function names.
241
4b134ca1
GB
2422015-03-24 Gary Benson <gbenson@redhat.com>
243
244 * Makefile.in (x86-linux.o): New rule.
245 * configure.srv: Add x86-linux.o to relevant targets.
246 * linux-low.c (lwp_set_arch_private_info): New function.
247 (lwp_arch_private_info): Likewise.
248 * linux-x86-low.c: Include nat/x86-linux.h.
249 (arch_lwp_info): Removed structure.
250 (update_debug_registers_callback):
251 Use lwp_set_debug_registers_changed.
252 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
253 and lwp_set_debug_registers_changed.
254 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
255
34c703da
GB
2562015-03-24 Gary Benson <gbenson@redhat.com>
257
258 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
259 * linux-arm-low.c (arm_new_thread): Likewise.
260 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
261 * linux-mips-low.c (mips_linux_new_thread): Likewise.
262 * linux-x86-low.c (x86_linux_new_thread): Likewise.
263 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
264
cff068da
GB
2652015-03-24 Gary Benson <gbenson@redhat.com>
266
267 * linux-low.c (ptid_of_lwp): New function.
268 (lwp_is_stopped): Likewise.
269 (lwp_stop_reason): Likewise.
270 * linux-x86-low.c (update_debug_registers_callback):
271 Use lwp_is_stopped.
272 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
273 lwp_stop_reason.
274
b2f7c7e8
GB
2752015-03-24 Gary Benson <gbenson@redhat.com>
276
277 * linux-low.h (linux_stop_lwp): Remove declaration.
278
6d4ee8c6
GB
2792015-03-24 Gary Benson <gbenson@redhat.com>
280
281 * linux-low.h: Include nat/linux-nat.h.
282 * linux-low.c (iterate_over_lwps_args): New structure.
283 (iterate_over_lwps_filter): New function.
284 (iterate_over_lwps): Likewise.
285 * linux-x86-low.c (update_debug_registers_callback):
286 Update signature to what iterate_over_lwps expects.
287 Remove PID check that iterate_over_lwps now performs.
288 (x86_dr_low_set_addr): Use iterate_over_lwps.
289 (x86_dr_low_set_control): Likewise.
290
70a0bb6b
GB
2912015-03-24 Gary Benson <gbenson@redhat.com>
292
293 * linux-x86-low.c (x86_debug_reg_state): New function.
294 (x86_linux_prepare_to_resume): Use the above.
295
7b669087
GB
2962015-03-24 Gary Benson <gbenson@redhat.com>
297
298 * linux-low.c (current_lwp_ptid): New function.
299 * linux-x86-low.c: Include nat/linux-nat.h.
300 (x86_dr_low_get_addr): Use current_lwp_ptid.
301 (x86_dr_low_get_control): Likewise.
302 (x86_dr_low_get_status): Likewise.
303
eef49a3d
PA
3042015-03-20 Pedro Alves <palves@redhat.com>
305
306 * tracepoint.c (cmd_qtstatus): Make "str" const.
307
b2333d22
PA
3082015-03-20 Pedro Alves <palves@redhat.com>
309
310 * server.c (handle_general_set): Make "req_str" const.
311
23f238d3
PA
3122015-03-19 Pedro Alves <palves@redhat.com>
313
314 * linux-low.c (linux_resume_one_lwp): Rename to ...
315 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
316 instead call perror_with_name.
317 (check_ptrace_stopped_lwp_gone): New function.
318 (linux_resume_one_lwp): Reimplement as wrapper around
319 linux_resume_one_lwp_throw that swallows errors if the LWP is
320 gone.
321
91baf43f
PA
3222015-03-19 Pedro Alves <palves@redhat.com>
323
324 * linux-low.c (count_events_callback, select_event_lwp_callback):
325 No longer check whether the thread has resume_stop as last resume
326 kind.
327
8bf3b159
PA
3282015-03-19 Pedro Alves <palves@redhat.com>
329
330 * linux-low.c (count_events_callback, select_event_lwp_callback):
331 Use the lwp's status_pending_p field, not the thread's.
332
b90fc188
PA
3332015-03-19 Pedro Alves <palves@redhat.com>
334
335 * linux-low.c (select_event_lwp_callback): Update comments to
336 no longer mention SIGTRAP.
337
464b0089
GB
3382015-03-18 Gary Benson <gbenson@redhat.com>
339
340 * server.c (handle_query): Do not report vFile:fstat as supported.
341
aa9e327f
GB
3422015-03-11 Gary Benson <gbenson@redhat.com>
343
344 * hostio.c (sys/types.h): New include.
345 (sys/stat.h): Likewise.
346 (common-remote-fileio.h): Likewise.
347 (handle_fstat): New function.
348 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 349
791c0056
GB
3502015-03-11 Gary Benson <gbenson@redhat.com>
351
352 * configure.ac (AC_CHECK_MEMBERS): Add checks for
353 struct stat.st_blocks and struct stat.st_blksize.
354 * configure: Regenerate.
355 * config.in: Likewise.
356 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
357 (OBS): Add common-remote-fileio.o.
358 (common-remote-fileio.o): New rule.
359
9a9df970
PA
3602015-03-09 Pedro Alves <palves@redhat.com>
361
362 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
363 'struct sockaddr' pointer in 'accept' call.
364
9eb1356e
PA
3652015-03-09 Pedro Alves <palves@redhat.com>
366
367 Revert:
368 2015-03-07 Pedro Alves <palves@redhat.com>
369 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
370 or <winsock2.h> here. Instead include "gdb_socket.h".
371 (remote_open): Use union gdb_sockaddr_u.
372 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
373 or <winsock2.h> here. Instead include "gdb_socket.h".
374 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
375 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
376 or <sys/un.h>.
377 (init_named_socket, gdb_agent_helper_thread): Use union
378 gdb_sockaddr_u.
379
aac331e4
PA
3802015-03-07 Pedro Alves <palves@redhat.com>
381
382 * configure.ac (build_warnings): Move
383 -Wdeclaration-after-statement to the C-specific set.
384 * configure: Regenerate.
385
366c75fc
PA
3862015-03-07 Pedro Alves <palves@redhat.com>
387
388 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
389 or <winsock2.h> here. Instead include "gdb_socket.h".
390 (remote_open): Use union gdb_sockaddr_u.
391 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
392 or <winsock2.h> here. Instead include "gdb_socket.h".
393 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
394 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
395 or <sys/un.h>.
396 (init_named_socket, gdb_agent_helper_thread): Use union
397 gdb_sockaddr_u.
398
492d29ea
PA
3992015-03-07 Pedro Alves <palves@redhat.com>
400
401 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
402 instead.
403
60a191ed
YQ
4042015-03-06 Yao Qi <yao.qi@linaro.org>
405
406 * linux-aarch64-low.c (aarch64_insert_point): Use
407 show_debug_regs as a boolean.
408 (aarch64_remove_point): Likewise.
409
f5771b1d
PA
4102015-03-05 Pedro Alves <palves@redhat.com>
411
412 * lynx-low.c (lynx_target_ops): Install NULL hooks for
413 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
414 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
415 * nto-low.c (nto_target_ops): Likewise.
416 * spu-low.c (spu_target_ops): Likewise.
417 * win32-low.c (win32_target_ops): Likewise.
418
3e572f71
PA
4192015-03-04 Pedro Alves <palves@redhat.com>
420
421 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
422 Decide whether a breakpoint triggered based on the SIGTRAP's
423 siginfo.si_code.
424 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
425 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
426 (linux_low_filter_event): Check for breakpoints before checking
427 watchpoints.
428 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
429 siginfo.si_code.
430 (linux_stopped_by_sw_breakpoint)
431 (linux_supports_stopped_by_sw_breakpoint)
432 (linux_stopped_by_hw_breakpoint)
433 (linux_supports_stopped_by_hw_breakpoint): New functions.
434 (linux_target_ops): Install new target methods.
435
1ec68e26
PA
4362015-03-04 Pedro Alves <palves@redhat.com>
437
438 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
439 * server.c (swbreak_feature, hwbreak_feature): New globals.
440 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
441 (captured_main): Clear swbreak_feature and hwbreak_feature.
442 * server.h (swbreak_feature, hwbreak_feature): Declare.
443 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
444 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
445 supports_stopped_by_hw_breakpoint>: New fields.
446 (target_supports_stopped_by_sw_breakpoint)
447 (target_stopped_by_sw_breakpoint)
448 (target_supports_stopped_by_hw_breakpoint)
449 (target_stopped_by_hw_breakpoint): Declare.
450
15c66dd6
PA
4512015-03-04 Pedro Alves <palves@redhat.com>
452
453 enum lwp_stop_reason -> enum target_stop_reason
454 * linux-low.c (check_stopped_by_breakpoint): Adjust.
455 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
456 (linux_wait_1, stuck_in_jump_pad_callback)
457 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
458 (linux_stopped_by_watchpoint):
459 * linux-low.h (enum lwp_stop_reason): Delete.
460 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
461 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
462
98fc70d6
YQ
4632015-03-04 Yao Qi <yao.qi@linaro.org>
464
465 * Makefile.in (SFILES): Add linux-aarch64-low.c.
466
dd2ac174
GB
4672015-03-03 Gary Benson <gbenson@redhat.com>
468
469 * hostio.c (handle_vFile): Fix prefix lengths.
470
d68e53f4
MM
4712015-03-03 Markus Metzger <markus.t.metzger@intel.com>
472
473 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
474 ptr_bits.
475
bf2d68ab
AA
4762015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
477
478 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
479 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
480 (clean): Add "rm -f" for above C files.
481 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
482 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
483 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
484 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
485 * linux-s390-low.c (HWCAP_S390_VX): New macro.
486 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
487 (init_registers_s390x_vx_linux64)
488 (init_registers_s390x_tevx_linux64)
489 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
490 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
491 declarations.
492 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
493 (s390_store_vxrs_high): New functions.
494 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
495 NT_S390_VXRS_HIGH.
496 (s390_arch_setup): Add logic for selecting one of the new target
497 descriptions. Activate the new vector regsets if applicable.
498 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
499 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
500 and init_registers_s390x_tevx_linux64.
501
c966a859
PA
5022015-03-01 Pedro Alves <palves@redhat.com>
503
504 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
505 parameter.
506
4180215b
PA
5072015-02-27 Pedro Alves <palves@redhat.com>
508
509 * linux-x86-low.c (u_debugreg_offset): New function.
510 (x86_linux_dr_get, x86_linux_dr_set): Use it.
511
749bab01
PA
5122015-02-27 Pedro Alves <palves@redhat.com>
513
514 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
515 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
516 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
517 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
518 (ps_lsetfpregs, ps_getpid)
519 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
520 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
521 (ps_lsetxregs, ps_plog): Declare.
522
3c14e5a3
PA
5232015-02-27 Pedro Alves <palves@redhat.com>
524
525 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
526 IP_AGENT_EXPORT_FUNC.
527 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
528 IP_AGENT_EXPORT_FUNC.
529 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
530 (IP_AGENT_EXPORT): Delete.
531 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
532 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
533 (gdb_trampoline_buffer_error, collecting, gdb_collect)
534 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
535 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
536 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
537 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
538 (traceframe_read_count, traceframe_write_count)
539 (traceframes_created, trace_state_variables, get_raw_reg)
540 (get_trace_state_variable_value, set_trace_state_variable_value)
541 (ust_loaded, helper_thread_id, cmd_buf): Use
542 IPA_SYM_EXPORTED_NAME.
543 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
544 (tracepoints) Use IP_AGENT_EXPORT_VAR.
545 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
546 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
547 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
548 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
549 EXTERN_C_PUSH/EXTERN_C_POP.
550 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
551 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
552 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
553 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
554 (traceframe_write_count, traceframe_read_count)
555 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
556 (about_to_request_buffer_space, get_trace_state_variable_value)
557 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
558 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
559 EXTERN_C_PUSH/EXTERN_C_POP.
560 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
561 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
562 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
563 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
564 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
565 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
566 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
567 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
568 Define.
569 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
570 (IP_AGENT_EXPORT_VAR_DECL): Define.
571 (tracing): Declare.
572 (gdb_agent_get_raw_reg): Declare.
573
fe978cb0
PA
5742015-02-27 Tom Tromey <tromey@redhat.com>
575 Pedro Alves <palves@redhat.com>
576
577 Rename symbols whose names are reserved C++ keywords throughout.
578
3bc3d82a
PA
5792015-02-27 Pedro Alves <palves@redhat.com>
580
581 * Makefile.in (COMPILER): New, get it from autoconf.
582 (CXX): Get from autoconf instead.
583 (COMPILE.pre): Use COMPILER.
584 (CC-LD): Rename to ...
585 (CC_LD): ... this. Use COMPILER.
586 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
587 (CXX_FOR_TARGET): Default to g++ instead of gcc.
588 * acinclude.m4: Include build-with-cxx.m4.
589 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
590 Disable -Werror by default if building in C++ mode.
591 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
592 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
593 the C++ compiler. Save/restore CXXFLAGS too.
594 * configure: Regenerate.
595
07697489
PA
5962015-02-27 Pedro Alves <palves@redhat.com>
597
598 * acinclude.m4: Include libiberty.m4.
599 * configure.ac: Call libiberty_INIT.
600 * config.in, configure: Regenerate.
601
9beb7c4e
PA
6022015-02-26 Pedro Alves <palves@redhat.com>
603
604 * linux-low.c (linux_wait_1): When incrementing the PC past a
605 program breakpoint always use the_low_target.breakpoint_len as
606 increment, rather than the maximum between that and
607 the_low_target.decr_pc_after_break.
608
8090aef2
PA
6092015-02-23 Pedro Alves <palves@redhat.com>
610
611 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
612 thread was doing a step-over; always adjust the PC if
613 we stepped over a permanent breakpoint.
614 (linux_wait_1): If we stepped over breakpoint that was on top of a
615 permanent breakpoint, manually advance the PC past it.
616
bc9540e8
PA
6172015-02-23 Pedro Alves <palves@redhat.com>
618
619 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
620 modes.
621 (x86_fill_gregset, x86_store_gregset): Use it when handling
622 $orig_eax.
623
2db9a427
PA
6242015-02-20 Pedro Alves <palves@redhat.com>
625
626 * thread-db.c: Include "nat/linux-procfs.h".
627 (thread_db_init): Skip listing new threads if the kernel supports
628 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
629
afa8d396
PA
6302015-02-20 Pedro Alves <palves@redhat.com>
631
632 * linux-low.c (status_pending_p_callback): Use ptid_match.
633
c9587f88
AT
6342015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
635
636 PR breakpoints/16812
637 * linux-low.c (wstatus_maybe_breakpoint): Remove.
638 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
639 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
640
b05ec7a5
AT
6412015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
642
643 PR breakpoints/15956
644 * tracepoint.c (cmd_qtinit): Add check for current_thread.
645
d33501a5
MM
6462015-02-09 Markus Metzger <markus.t.metzger@intel.com>
647
648 * linux-low.c (linux_low_btrace_conf): Print size.
649 * server.c (handle_btrace_conf_general_set): New.
650 (hanle_general_set): Call handle_btrace_conf_general_set.
651 (handle_query): Report Qbtrace-conf:bts:size as supported.
652
f4abbc16
MM
6532015-02-09 Markus Metzger <markus.t.metzger@intel.com>
654
655 * linux-low.c (linux_low_enable_btrace): Update parameters.
656 (linux_low_btrace_conf): New.
657 (linux_target_ops)<to_btrace_conf>: Initialize.
658 * server.c (current_btrace_conf): New.
659 (handle_btrace_enable): Rename to ...
660 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
661 to target_enable_btrace. Update comment. Update users.
662 (handle_qxfer_btrace_conf): New.
663 (qxfer_packets): Add btrace-conf entry.
664 (handle_query): Report qXfer:btrace-conf:read as supported packet.
665 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
666 (target_ops)<read_btrace_conf>: New.
667 (target_enable_btrace): Update parameters.
668 (target_read_btrace_conf): New.
669
043c3577
MM
6702015-02-09 Markus Metzger <markus.t.metzger@intel.com>
671
672 * server.c (handle_btrace_general_set): Remove call to
673 target_supports_btrace.
674 (supported_btrace_packets): New.
675 (handle_query): Call supported_btrace_packets.
676 * target.h: include btrace-common.h.
677 (btrace_target_info): Removed.
678 (supports_btrace, target_supports_btrace): Update parameters.
679
734b0e4b
MM
6802015-02-09 Markus Metzger <markus.t.metzger@intel.com>
681
682 * Makefile.in (SFILES): Add common/btrace-common.c.
683 (OBS): Add common/btrace-common.o.
684 (btrace-common.o): Add build rules.
685 * linux-low: Include btrace-common.h.
686 (linux_low_read_btrace): Use struct btrace_data. Call
687 btrace_data_init and btrace_data_fini.
688
d6c146e9
PA
6892015-02-06 Pedro Alves <palves@redhat.com>
690
691 * thread-db.c (find_new_threads_callback): Add debug output.
692
20ba1ce6
PA
6932015-02-04 Pedro Alves <palves@redhat.com>
694
695 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
696 (resume_stopped_resumed_lwps): New function.
697 (linux_wait_for_event_filtered): Use it.
698
8cc73a39
SDJ
6992015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
700
701 * Makefile.in (SFILES): Add linux-personality.c.
702 (linux-personality.o): New rule.
703 * configure.srv (srv_linux_obj): Add linux-personality.o to the
704 list of objects to be built.
705 * linux-low.c: Include nat/linux-personality.h.
706 (linux_create_inferior): Remove code to disable address space
707 randomization (moved to ../nat/linux-personality.c). Create
708 cleanup to disable address space randomization.
709
fb23d554
SDJ
7102015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
711
712 * Makefile.in (posix-strerror.o): New rule.
713 (mingw-strerror.o): Likewise.
714 * configure: Regenerated.
715 * configure.ac: Source file ../common/common.host. Initialize new
716 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
717
cdf43629
YQ
7182015-01-14 Yao Qi <yao@codesourcery.com>
719
720 * Makefile.in (SFILES): Add nat/ppc-linux.c.
721 (ppc-linux.o): New rule.
722 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
723 * configure.ac: AC_CHECK_FUNCS(getauxval).
724 * config.in: Re-generated.
725 * configure: Re-generated.
726 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
727 ppc64_64bit_inferior_p
728
514c5338
YQ
7292015-01-14 Yao Qi <yao@codesourcery.com>
730
731 * linux-ppc-low.c: Include "nat/ppc-linux.h".
732 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
733 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
734 (PT_ORIG_R3, PT_TRAP): Likewise.
735 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
736 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
737 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
738
3368c1e5
JB
7392015-01-10 Joel Brobecker <brobecker@adacore.com>
740
741 * i387-fp.c (i387_cache_to_xsave): In look over
742 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
743 zmmh_low_space field by use of zmmh_high_space.
744
582511be
PA
7452015-01-09 Pedro Alves <palves@redhat.com>
746
747 * linux-low.c (step_over_bkpt): Move higher up in the file.
748 (handle_extended_wait): Don't store the stop_pc here.
749 (get_stop_pc): Adjust comments and rename to ...
750 (check_stopped_by_breakpoint): ... this. Record whether the LWP
751 stopped for a software breakpoint or hardware breakpoint.
752 (thread_still_has_status_pending_p): New function.
753 (status_pending_p_callback): Use
754 thread_still_has_status_pending_p. If the event is no longer
755 interesting, resume the LWP.
756 (handle_tracepoints): Add assert.
757 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
758 (wstatus_maybe_breakpoint): New function.
759 (cancel_breakpoint): Delete function.
760 (check_stopped_by_watchpoint): New function, factored out from
761 linux_low_filter_event.
762 (lp_status_maybe_breakpoint): Delete function.
763 (linux_low_filter_event): Remove filter_ptid argument.
764 Leave thread group exits pending here. Store the LWP's stop PC.
765 Always leave events pending.
766 (linux_wait_for_event_filtered): Pull all events out of the
767 kernel, and leave them all pending.
768 (count_events_callback, select_event_lwp_callback): Consider all
769 events.
770 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
771 (select_event_lwp): Only give preference to the stepping LWP in
772 all-stop mode. Adjust comments.
773 (ignore_event): New function.
774 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
775 references to cancel_breakpoints. Adjust to renames. Also give
776 equal priority to all LWPs that have had events in non-stop mode.
777 If reporting a software breakpoint event, unadjust the LWP's PC.
778 (linux_wait): If linux_wait_1 returned an ignored event, retry.
779 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
780 Adjust.
781 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
782 (resume_status_pending_p): Use thread_still_has_status_pending_p.
783 (linux_stopped_by_watchpoint): Adjust.
784 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
785 * linux-low.h (enum lwp_stop_reason): New.
786 (struct lwp_info) <stop_pc>: Adjust comment.
787 <stopped_by_watchpoint>: Delete field.
788 <stop_reason>: New field.
789 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
790 * mem-break.c (software_breakpoint_inserted_here)
791 (hardware_breakpoint_inserted_here): New function.
792 * mem-break.h (software_breakpoint_inserted_here)
793 (hardware_breakpoint_inserted_here): Declare.
794 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
795 (cancel_breakpoints): Delete.
796 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
797 (upload_fast_traceframes): Remove references to
798 cancel_breakpoints.
799
a33e3959
PA
8002015-01-09 Pedro Alves <palves@redhat.com>
801
802 * thread-db.c (find_new_threads_callback): Ignore thread if the
803 kernel thread ID is -1.
804
8784d563
PA
8052015-01-09 Pedro Alves <palves@redhat.com>
806
807 * linux-low.c (linux_attach_fail_reason_string): Move to
808 nat/linux-ptrace.c, and rename.
809 (linux_attach_lwp): Update comment.
810 (attach_proc_task_lwp_callback): New function.
811 (linux_attach): Adjust to rename and use
812 linux_proc_attach_tgid_threads.
813 (linux_attach_fail_reason_string): Delete declaration.
814
76f2b779
JB
8152015-01-01 Joel Brobecker <brobecker@adacore.com>
816
817 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
818 * server.c (gdbserver_version): Likewise.
819
fafcc06a
SDJ
8202014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
821
822 * remote-utils.c: Include ctype.h.
823 (input_interrupt): Explicitly handle the case when the char
824 received is the NUL byte. Improve the printing of non-ASCII
825 characters.
826
beed38b8
JB
8272014-12-16 Joel Brobecker <brobecker@adacore.com>
828
829 * linux-low.c (linux_low_filter_event): Update call to
830 linux_enable_event_reporting following the addition of
831 a new parameter to that function.
832
bf330350
CU
8332014-12-16 Catalin Udma <catalin.udma@freescale.com>
834
835 PR server/17457
836 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
837 (AARCH64_FPCR_REGNO): Likewise.
838 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
839 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
840 (aarch64_store_fpregset): Likewise.
841
5227d625
JB
8422014-12-15 Joel Brobecker <brobecker@adacore.com>
843
844 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
845 Remove FIXME comment about assumption about N.
846
f93b65a0
JB
8472014-12-13 Joel Brobecker <brobecker@adacore.com>
848
849 * configure.ac: If large-file support is disabled in GDBserver,
850 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
851 * configure: Regenerate.
852
e5a9158d
AA
8532014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
854
855 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
856 warning upon ENODATA from ptrace.
857 * linux-s390-low.c (s390_store_tdb): New.
858 (s390_regsets): Add regset for NT_S390_TDB.
859
feea5f36
AA
8602014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
861
862 * linux-low.c (regsets_store_inferior_registers): Skip regsets
863 without a fill_function.
864 * linux-s390-low.c (s390_fill_last_break): Remove.
865 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
866 (s390_arch_setup): Use regset's size instead of fill_function for
867 loop end condition.
868
098dbe61
AA
8692014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
870
871 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
872 the regset's store function when ptrace returned an error.
873 * regcache.c (get_thread_regcache): Invalidate register cache
874 before fetching inferior's registers.
875
28eef672
AA
8762014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
877
878 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
879 while-loop as for-loop.
880 (regsets_store_inferior_registers): Likewise.
881
bdca27a2
YQ
8822014-11-28 Yao Qi <yao@codesourcery.com>
883
884 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
885 * config.in, configure: Re-generate.
886 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
887 is defined.
888
9c232dda
YQ
8892014-11-21 Yao Qi <yao@codesourcery.com>
890
891 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
892 (AC_CHECK_HEADERS): Remove malloc.h.
893 * configure: Re-generated.
894 * config.in: Re-generated.
895 * server.h: Don't include alloca.h and malloc.h.
896 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
897 Don't include malloc.h.
898
43968415
JB
8992014-11-17 Joel Brobecker <brobecker@adacore.com>
900
901 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
902 corresponding ERRNO check in same block.
903
40e91bc7
PA
9042014-11-12 Pedro Alves <palves@redhat.com>
905
906 * server.c (cont_thread): Update comment.
907 (start_inferior, attach_inferior): No longer clear cont_thread.
908 (handle_v_cont): No longer set cont_thread.
909 (captured_main): Clear cont_thread each time a GDB connects.
910
c2c118cf
PA
9112014-11-12 Pedro Alves <palves@redhat.com>
912
913 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
914 thread, and don't resume all threads if the Hc thread has exited.
915
78708b7c
PA
9162014-11-12 Pedro Alves <palves@redhat.com>
917
918 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
919 the process group instead of to a specific LWP.
920
a2abc7de
PA
9212014-10-15 Pedro Alves <palves@redhat.com>
922
923 PR server/17487
924 * win32-arm-low.c (arm_set_thread_context): Remove current_event
925 parameter.
926 (arm_set_thread_context): Delete.
927 (the_low_target): Adjust.
928 * win32-i386-low.c (debug_registers_changed)
929 (debug_registers_used): Delete.
930 (update_debug_registers_callback): New function.
931 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
932 needing to update their debug registers.
933 (win32_get_current_dr): New function.
934 (x86_dr_low_get_addr, x86_dr_low_get_control)
935 (x86_dr_low_get_status): Fetch the debug register from the thread
936 record's context.
937 (i386_initial_stuff): Adjust.
938 (i386_get_thread_context): Remove current_event parameter. Don't
939 clear debug_registers_changed nor copy DR values to
940 debug_reg_state.
941 (i386_set_thread_context): Delete.
942 (i386_prepare_to_resume): New function.
943 (i386_thread_added): Mark the thread as needing to update irs
944 debug registers.
945 (the_low_target): Remove i386_set_thread_context and install
946 i386_prepare_to_resume.
947 * win32-low.c (win32_get_thread_context): Adjust.
948 (win32_set_thread_context): Use SetThreadContext
949 directly.
950 (win32_prepare_to_resume): New function.
951 (win32_require_context): New function, factored out from ...
952 (thread_rec): ... this.
953 (continue_one_thread): Call win32_prepare_to_resume on each thread
954 we're about to continue.
955 (win32_resume): Call win32_prepare_to_resume on the event thread.
956 * win32-low.h (struct win32_thread_info)
957 <debug_registers_changed>: New field.
958 (struct win32_target_ops): Change prototype of set_thread_context,
959 delete set_thread_context and add prepare_to_resume.
960 (win32_require_context): New declaration.
961
a442d071
GB
9622014-10-08 Gary Benson <gbenson@redhat.com>
963
964 * server.h: Do not include common-exceptions.h.
965
6f1947e8
GB
9662014-10-08 Gary Benson <gbenson@redhat.com>
967
968 * server.h: Do not include cleanups.h.
969
63b434a4
JH
9702014-09-30 James Hogan <james.hogan@imgtec.com>
971
972 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
973 mips64-dsp-linux.c.
974
c4d9ceb6
YQ
9752014-09-23 Yao Qi <yao@codesourcery.com>
976
977 * linux-low.c (lp_status_maybe_breakpoint): New function.
978 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
979 (count_events_callback): Likewise.
980 (select_event_lwp_callback): Likewise.
981 (cancel_breakpoints_callback): Likewise.
982
89a5711c
DB
9832014-09-19 Don Breazeal <donb@codesourcery.com>
984
985 * linux-low.c (handle_extended_wait): Call
986 linux_ptrace_get_extended_event.
987 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
988 linux_is_extended_waitstatus.
989
bffc0964
JB
9902014-09-16 Joel Brobecker <brobecker@adacore.com>
991
992 * Makefile.in (CPPFLAGS): Define.
993 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
994 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
995
0bfdf32f
GB
9962014-09-16 Gary Benson <gbenson@redhat.com>
997
998 * inferiors.h (current_inferior): Renamed as...
999 (current_thread): New variable. All uses updated.
1000 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1001 (maybe_move_out_of_jump_pad): Likewise.
1002 (cancel_breakpoint): Likewise.
1003 (linux_low_filter_event): Likewise.
1004 (wait_for_sigstop): Likewise.
1005 (linux_resume_one_lwp): Likewise.
1006 (need_step_over_p): Likewise.
1007 (start_step_over): Likewise.
1008 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1009 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1010 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1011 and save_inferior as saved_thread.
1012 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1013 saved_thread.
1014 (regcache_invalidate_thread): Likewise.
1015 * remote-utils.c (prepare_resume_reply): Likewise.
1016 * thread-db.c (thread_db_get_tls_address): Likewise.
1017 (disable_thread_event_reporting): Likewise.
1018 (remove_thread_event_breakpoints): Likewise.
1019 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1020 as saved_thread.
1021 * target.h (set_desired_inferior): Renamed as...
1022 (set_desired_thread): New declaration. All uses updated.
1023 * server.c (myresume): Updated comment to reference thread instead
1024 of inferior.
1025 (handle_serial_event): Likewise.
1026 (handle_target_event): Likewise.
1027
361c8ade
GB
10282014-09-12 Tom Tromey <tromey@redhat.com>
1029 Gary Benson <gbenson@redhat.com>
1030
1031 * regcache.h: Include common-regcache.h.
1032 (regcache_read_pc): Don't declare.
1033 * regcache.c (get_thread_regcache_for_ptid): New function.
1034
bd9269f7
GB
10352014-09-11 Tom Tromey <tromey@redhat.com>
1036 Gary Benson <gbenson@redhat.com>
1037
1038 * symbol.c: New file.
1039 * Makefile.in (SFILES): Add symbol.c.
1040 (OBS): Add symbol.o.
1041
f8c1d06b
GB
10422014-09-11 Gary Benson <gbenson@redhat.com>
1043
1044 * target.c (target_stop_ptid, target_continue_ptid): New
1045 functions.
1046
721ec300
GB
10472014-09-11 Tom Tromey <tromey@redhat.com>
1048 Gary Benson <gbenson@redhat.com>
1049
1050 * target.h: Include target/target.h.
1051 * target.c (target_read_memory, target_read_uint32)
1052 (target_write_memory): New functions.
1053
c5e92cca
GB
10542014-09-11 Gary Benson <gbenson@redhat.com>
1055
1056 * server.h (debug_hw_points): Don't declare.
1057 * server.c (debug_hw_points): Don't define. Replace all uses
1058 with show_debug_regs.
1059 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1060 all uses with show_debug_regs.
1061
2e4bb98a
EBM
10622014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1063
1064 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1065 endianness into account.
1066 (ppc_supply_ptrace_register): Likewise.
1067
ac740bc7
JH
10682014-09-03 James Hogan <james.hogan@imgtec.com>
1069
1070 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1071 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1072
97ea6506
GB
10732014-09-03 Gary Benson <gbenson@redhat.com>
1074
1075 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1076 ALL_DEBUG_ADDRESS_REGISTERS.
1077
df7e5265
GB
10782014-09-02 Gary Benson <gbenson@redhat.com>
1079
1080 * i386-low.h: Renamed as...
1081 * x86-low.h: New file. All type, function and variable name
1082 prefixes changed from "i386_" to "x86_". All references updated.
1083 * i386-low.c: Renamed as...
1084 * x86-low.c: New file. All type, function and variable name
1085 prefixes changed from "i386_" to "x86_". All references updated.
1086
ed859da7
GB
10872014-09-02 Gary Benson <gbenson@redhat.com>
1088
1089 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1090 (x86_linux_new_thread): Likewise.
1091
860789c7
GB
10922014-08-29 Gary Benson <gbenson@redhat.com>
1093
1094 * server.h (setjmp.h): Do not include.
1095 (toplevel): Do not declare.
1096 (common-exceptions.h): Include.
1097 (cleanups.h): Likewise.
1098 * server.c (toplevel): Do not define.
1099 (exit_code): New static global.
1100 (detach_or_kill_for_exit_cleanup): New function.
1101 (main): New function. Original main renamed to...
1102 (captured_main): New function.
1103 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1104
ff55e1b5
GB
11052014-08-29 Gary Benson <gbenson@redhat.com>
1106
1107 * Makefile.in (SFILES): Add common/common-exceptions.c.
1108 (OBS): Add common-exceptions.o.
1109 (common-exceptions.o): New rule.
1110 * utils.c (prepare_to_throw_exception): New function.
1111
e9bcb658
GB
11122014-08-29 Gary Benson <gbenson@redhat.com>
1113
1114 * config.in: Regenerate.
1115 * configure: Likewise.
1116
e3180625
GB
11172014-08-29 Gary Benson <gbenson@redhat.com>
1118
1119 * Makefile.in (SFILES): Add common/cleanups.c.
1120 (OBS): cleanups.o.
1121 (cleanups.o): New rule.
1122
e3d6ba5d
GB
11232014-08-29 Gary Benson <gbenson@redhat.com>
1124
1125 * utils.c (internal_vwarning): New function.
1126
7096e886
GB
11272014-08-28 Gary Benson <gbenson@redhat.com>
1128
1129 * utils.h (fatal): Remove declaration.
1130 * utils.c (fatal): Remove function.
1131
14ce3192
GB
11322014-08-28 Gary Benson <gbenson@redhat.com>
1133
1134 * tracepoint.c (gdb_agent_init): Replace fatal with
1135 perror_with_name.
1136 (initialize_tracepoint): Likewise.
1137
50278d59
GB
11382014-08-28 Gary Benson <gbenson@redhat.com>
1139
1140 * remote-utils.c (remote_prepare): Replace fatal with error.
1141
aa96c426
GB
11422014-08-28 Gary Benson <gbenson@redhat.com>
1143
1144 * linux-low.c (linux_async): Replace fatal with warning.
1145 Tidy up and return.
1146 (linux_start_non_stop): Return -1 if linux_async failed.
1147
f7160e97
GB
11482014-08-28 Gary Benson <gbenson@redhat.com>
1149
1150 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1151 gdb_assert.
1152 (i386_dr_low_get_addr): Remove vague comment.
1153 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1154 gdb_assert.
1155
38e08fca
GB
11562014-08-28 Gary Benson <gbenson@redhat.com>
1157
1158 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1159 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1160 internal_error.
1161 (linux_resume_one_lwp): Likewise.
1162 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1163 gdb_assert.
1164 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1165 with internal_error.
1166 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1167 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1168 (find_register_by_name): Replace fatal with internal_error.
1169 (find_regno): Likewise.
1170 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1171 * thread-db.c (thread_db_create_event): Likewise.
1172 (thread_db_load_search): Likewise.
1173 (try_thread_db_load_1): Likewise.
1174 * tracepoint.c (get_jump_space_head): Replace fatal with
1175 internal_error.
1176 (claim_trampoline_space): Likewise.
1177 (have_fast_tracepoint_trampoline_buffer): Likewise.
1178 (cmd_qtstart): Likewise.
1179 (stop_tracing): Likewise.
1180 (fast_tracepoint_collecting): Likewise.
1181 (target_malloc): Likewise.
1182 (download_tracepoint): Likewise.
1183 (download_trace_state_variables): Replace check with gdb_assert.
1184 (upload_fast_traceframes): Replace fatal with internal_error.
1185
34abf635
GB
11862014-08-19 Tom Tromey <tromey@redhat.com>
1187 Gary Benson <gbenson@redhat.com>
1188
1189 * Makefile.in (SFILES): Add common/common-debug.c.
1190 (OBS): Add common-debug.o.
1191 (common-debug.o): New rule.
1192 * debug.h (debug_printf): Don't declare.
1193 * debug.c (debug_printf): Renamed and rewritten as...
1194 (debug_vprintf): New function.
1195
f6e94d78
GB
11962014-08-19 Gary Benson <gbenson@redhat.com>
1197
1198 * utils.h: Do not include print-utils.h.
1199
9239eeab
GB
12002014-08-19 Tom Tromey <tromey@redhat.com>
1201 Gary Benson <gbenson@redhat.com>
1202
1203 * server.h: Add static assertion.
1204 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1205
ef87c8bb
GB
12062014-08-19 Tom Tromey <tromey@redhat.com>
1207 Gary Benson <gbenson@redhat.com>
1208
1209 * Makefile.in (SFILES): Add common/errors.c.
1210 (OBS): Add errors.o.
1211 (IPA_OBS): Add errors-ipa.o.
1212 (errors.o): New rule.
1213 (errors-ipa.o): Likewise.
1214 * utils.h (perror_with_name, error, warning): Don't declare.
1215 * utils.c (warning): Renamed and rewritten as...
1216 (vwarning): New function.
1217 (error): Renamed and rewritten as...
1218 (verror): New function.
1219 (internal_error): Renamed and rewritten as...
1220 (internal_verror): New function.
1221
bb974a24
GB
12222014-08-07 Gary Benson <gbenson@redhat.com>
1223
1224 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1225 * configure: Regenerate.
1226 * config.in: Likewise.
1227 * server.h: Do not include errno.h.
1228 * event-loop.c: Likewise.
1229 * hostio-errno.c: Likewise.
1230 * linux-low.c: Likewise.
1231 * remote-utils.c: Likewise.
1232 * spu-low.c: Likewise.
1233 * utils.c: Likewise.
1234 * gdbreplay.c: Unconditionally include errno.h.
1235
6d3d12eb
GB
12362014-08-07 Gary Benson <gbenson@redhat.com>
1237
1238 * server.h: Do not include string.h.
1239 * event-loop.c: Likewise.
1240 * linux-low.c: Likewise.
1241 * regcache.c: Likewise.
1242 * remote-utils.c: Likewise.
1243 * spu-low.c: Likewise.
1244 * utils.c: Likewise.
1245
dccbb609
GB
12462014-08-07 Gary Benson <gbenson@redhat.com>
1247
1248 * server.h: Do not include gdb_assert.h.
1249
e76df0d0
GB
12502014-08-07 Gary Benson <gbenson@redhat.com>
1251
1252 * server.h: Do not include common-utils.h.
1253
4cb9c816
GB
12542014-08-07 Gary Benson <gbenson@redhat.com>
1255
1256 * server.h: Do not include ptid.h.
1257 * notif.h: Likewise.
1258
3995eeee
GB
12592014-08-07 Gary Benson <gbenson@redhat.com>
1260
1261 * server.h: Do not include gdb_locale.h.
1262
cb9f1a9b
GB
12632014-08-07 Gary Benson <gbenson@redhat.com>
1264
1265 * server.h: Do not include gdb/signals.h.
1266 * win32-low.c: Likewise.
1267
a5fceff8
GB
12682014-08-07 Gary Benson <gbenson@redhat.com>
1269
1270 * server.h: Do not include pathmax.h.
1271
b9391142
GB
12722014-08-07 Gary Benson <gbenson@redhat.com>
1273
1274 * server.h: Do not include libiberty.h.
1275 * linux-bfin-low.c: Likewise.
1276
0e443c87
GB
12772014-08-07 Gary Benson <gbenson@redhat.com>
1278
1279 * server.h: Do not include ansidecl.h.
1280
8ebb3f56
GB
12812014-08-07 Gary Benson <gbenson@redhat.com>
1282
1283 * linux-x86-low.c: Do not include stddef.h.
1284 * lynx-ppc-low.c: Likewise.
1285 * tracepoint.c: Likewise.
1286
8980bdf6
GB
12872014-08-07 Gary Benson <gbenson@redhat.com>
1288
1289 * server.h: Do not include stdarg.h.
1290 * nto-low.c: Likewise.
1291
d7096f71
GB
12922014-08-07 Gary Benson <gbenson@redhat.com>
1293
1294 * server.h: Do not include stdlib.h.
1295 * inferiors.c: Likewise.
1296 * linux-low.c: Likewise.
1297 * regcache.c: Likewise.
1298 * spu-low.c: Likewise.
1299 * tracepoint.c: Likewise.
1300 * utils.c: Likewise.
1301
d02f550d
GB
13022014-08-07 Gary Benson <gbenson@redhat.com>
1303
1304 * server.h: Do not include stdio.h.
1305 * linux-low.c: Likewise.
1306 * remote-utils.c: Likewise.
1307 * spu-low.c: Likewise.
1308 * utils.c: Likewise.
1309 * wincecompat.c: Likewise.
1310
87f6c4e3
GB
13112014-08-06 Gary Benson <gbenson@redhat.com>
1312
1313 * regcache.c (init_register_cache): Move conditionals inside if.
1314
7089dca4
GB
13152014-08-06 Gary Benson <gbenson@redhat.com>
1316
1317 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1318
462f517e
GB
13192014-07-31 Gary Benson <gbenson@redhat.com>
1320
1321 * ax.h: Do not include server.h.
1322 * gdbthread.h: Likewise.
1323 * lynx-low.h: Likewise.
1324 * notif.h: Likewise.
1325
976411d6
GB
13262014-07-30 Gary Benson <gbenson@redhat.com>
1327
1328 * server.h: Include common-defs.h.
1329 Do not include config.h or build-gnulib-gdbserver/config.h.
1330
d41f6d8e
GB
13312014-07-30 Gary Benson <gbenson@redhat.com>
1332
1333 * hostio-errno.c: Move server.h to top of includes list.
1334 * inferiors.c: Likewise.
1335 * linux-x86-low.c: Likewise.
1336 * notif.c: Include server.h.
1337
314c6a35
TT
13382014-07-24 Tom Tromey <tromey@redhat.com>
1339 Gary Benson <gbenson@redhat.com>
1340
1341 * server.h (CORE_ADDR): Now unsigned.
1342
69ff6be5
PA
13432014-07-16 Pedro Alves <palves@redhat.com>
1344
1345 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1346
ce9e3fe7
PA
13472014-07-15 Pedro Alves <palves@redhat.com>
1348
1349 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1350 copy.
1351
e76126e8
PA
13522014-07-11 Pedro Alves <palves@redhat.com>
1353
1354 * linux-low.c (kill_wait_lwp): New function, based on
1355 kill_one_lwp_callback, but use my_waitpid directly.
1356 (kill_one_lwp_callback, linux_kill): Use it.
1357
8e9db26e
PA
13582014-06-23 Pedro Alves <palves@redhat.com>
1359
1360 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1361 before setting DR0..DR3.
1362
698b3e08
GB
13632014-06-20 Gary Benson <gbenson@redhat.com>
1364
1365 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1366 * configure: Regenerated.
1367 * config.in: Likewise.
1368
125f8a3d
GB
13692014-06-20 Gary Benson <gbenson@redhat.com>
1370
1371 * Makefile.in (SFILES): Update locations for files moved
1372 from common to nat.
1373 (object file files): Reordered.
1374
42995dbd
GB
13752014-06-20 Gary Benson <gbenson@redhat.com>
1376
1377 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1378 (i386_dr_low_set_addr): Likewise.
1379 (i386_dr_low_get_addr): Likewise.
1380 (i386_dr_low_can_set_control): Likewise.
1381 (i386_dr_low_set_control): Likewise.
1382 (i386_dr_low_get_control): Likewise.
1383 (i386_dr_low_get_status): Likewise.
1384 (i386_get_debug_register_length): Likewise.
1385 * linux-x86-low.c (i386_dr_low_set_addr):
1386 Changed signature. Made static.
1387 (i386_dr_low_get_addr): Likewise.
1388 (i386_dr_low_set_control): Likewise.
1389 (i386_dr_low_get_control): Likewise.
1390 (i386_dr_low_get_status): Likewise.
1391 (i386_dr_low): New global variable.
1392 * win32-i386-low.c (i386_dr_low_set_addr):
1393 Changed signature. Made static.
1394 (i386_dr_low_get_addr): Likewise.
1395 (i386_dr_low_set_control): Likewise.
1396 (i386_dr_low_get_control): Likewise.
1397 (i386_dr_low_get_status): Likewise.
1398 (i386_dr_low): New global variable.
1399
e1d2394b
MS
14002014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1401
1402 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1403 * Makefile.in (AR, AR_FLAGS): Define.
1404 * configure: Regenerate.
1405
3a8ee006
GB
14062014-06-19 Gary Benson <gbenson@redhat.com>
1407
1408 * Makefile.in (i386-dregs.o): New rule.
1409 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1410 * i386-low.c (target.h): Remove include.
1411 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1412 (DR_CONTROL_SHIFT): Likewise.
1413 (DR_CONTROL_SIZE): Likewise.
1414 (DR_RW_EXECUTE): Likewise.
1415 (DR_RW_WRITE): Likewise.
1416 (DR_RW_READ): Likewise.
1417 (DR_RW_IORW): Likewise.
1418 (DR_LEN_1): Likewise.
1419 (DR_LEN_2): Likewise.
1420 (DR_LEN_4): Likewise.
1421 (DR_LEN_8): Likewise.
1422 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1423 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1424 (DR_ENABLE_SIZE): Likewise.
1425 (DR_LOCAL_SLOWDOWN): Likewise.
1426 (DR_GLOBAL_SLOWDOWN): Likewise.
1427 (DR_CONTROL_RESERVED): Likewise.
1428 (I386_DR_CONTROL_MASK): Likewise.
1429 (I386_DR_VACANT): Likewise.
1430 (I386_DR_LOCAL_ENABLE): Likewise.
1431 (I386_DR_GLOBAL_ENABLE): Likewise.
1432 (I386_DR_DISABLE): Likewise.
1433 (I386_DR_SET_RW_LEN): Likewise.
1434 (I386_DR_GET_RW_LEN): Likewise.
1435 (I386_DR_WATCH_HIT): Likewise.
1436 (i386_wp_op_t): Likewise.
1437 (i386_show_dr): Likewise.
1438 (i386_length_and_rw_bits): Likewise.
1439 (i386_insert_aligned_watchpoint): Likewise.
1440 (i386_remove_aligned_watchpoint): Likewise.
1441 (i386_handle_nonaligned_watchpoint): Likewise.
1442 i386_update_inferior_debug_regs(): Likewise.
1443 (i386_dr_insert_watchpoint): Likewise.
1444 (i386_dr_remove_watchpoint): Likewise.
1445 (i386_dr_region_ok_for_watchpoint): Likewise.
1446 (i386_dr_stopped_data_address): Likewise.
1447 (i386_dr_stopped_by_watchpoint): Likewise.
1448
8f26655c
GB
14492014-06-19 Gary Benson <gbenson@redhat.com>
1450
1451 * i386-low.c (i386_dr_show): Renamed to
1452 i386_show_dr and made static. All uses updated.
1453 (i386_dr_length_and_rw_bits): Renamed to
1454 i386_length_and_rw_bits and made static.
1455 All uses updated.
1456 (i386_dr_insert_aligned_watchpoint): Renamed to
1457 i386_insert_aligned_watchpoint and made static.
1458 All uses updated.
1459 (i386_dr_remove_aligned_watchpoint): Renamed to
1460 i386_remove_aligned_watchpoint and made static.
1461 All uses updated.
1462 (i386_dr_update_inferior_debug_regs): Renamed to
1463 i386_update_inferior_debug_regs and made static.
1464 All uses updated.
1465
b9228891
GB
14662014-06-18 Gary Benson <gbenson@redhat.com>
1467
5171def3
GB
1468 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1469 (i386_dr_low_can_set_control): Likewise.
1470 (i386_get_debug_register_length): Likewise.
1471 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1472 (i386_dr_low_can_set_control): Likewise.
1473 (i386_get_debug_register_length): Likewise.
1474
14752014-06-17 Gary Benson <gbenson@redhat.com>
1476
b9228891
GB
1477 * i386-low.h (i386-dregs.h): New include.
1478 (DR_FIRSTADDR): Now in i386-dregs.h.
1479 (DR_LASTADDR): Likewise.
1480 (DR_NADDR): Likewise.
1481 (DR_STATUS): Likewise.
1482 (DR_CONTROL): Likewise.
1483 (i386_debug_reg_state): Likewise.
1484 (i386_dr_insert_watchpoint): Likewise.
1485 (i386_dr_remove_watchpoint): Likewise.
1486 (i386_dr_region_ok_for_watchpoint): Likewise.
1487 (i386_dr_stopped_data_address): Likewise.
1488 (i386_dr_stopped_by_watchpoint): Likewise.
1489 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1490
4be83cc2
GB
14912014-06-18 Gary Benson <gbenson@redhat.com>
1492
1493 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1494 i386_dr_insert_watchpoint.
1495 (i386_low_remove_watchpoint): Renamed to
1496 i386_dr_remove_watchpoint.
1497 (i386_low_region_ok_for_watchpoint): Renamed to
1498 i386_dr_region_ok_for_watchpoint.
1499 (i386_low_stopped_data_address): Renamed to
1500 i386_dr_stopped_data_address.
1501 (i386_low_stopped_by_watchpoint): Renamed to
1502 i386_dr_stopped_by_watchpoint.
1503 * i386-low.c (i386_show_dr): Renamed to
1504 i386_dr_show and made nonstatic. All uses updated.
1505 (i386_length_and_rw_bits): Renamed to
1506 i386_dr_length_and_rw_bits and made nonstatic.
1507 All uses updated.
1508 (i386_insert_aligned_watchpoint): Renamed to
1509 i386_dr_insert_aligned_watchpoint and made nonstatic.
1510 All uses updated.
1511 (i386_remove_aligned_watchpoint): Renamed to
1512 i386_dr_remove_aligned_watchpoint and made nonstatic.
1513 All uses updated.
1514 (i386_update_inferior_debug_regs): Renamed to
1515 i386_dr_update_inferior_debug_regs and made nonstatic.
1516 All uses updated.
1517 (i386_low_insert_watchpoint): Renamed to
1518 i386_dr_insert_watchpoint. All uses updated.
1519 (i386_low_remove_watchpoint): Renamed to
1520 i386_dr_remove_watchpoint. All uses updated.
1521 (i386_low_region_ok_for_watchpoint): Renamed to
1522 i386_dr_region_ok_for_watchpoint. All uses updated.
1523 (i386_low_stopped_data_address): Renamed to
1524 i386_dr_stopped_data_address. All uses updated.
1525 (i386_low_stopped_by_watchpoint): Renamed to
1526 i386_dr_stopped_by_watchpoint. All uses updated.
1527
131aa0d4
GB
15282014-06-18 Gary Benson <gbenson@redhat.com>
1529
1530 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1531 (i386_dr_low_can_set_control): Likewise.
1532 (i386_insert_aligned_watchpoint): New check.
1533
d9305f7f
GB
15342014-06-18 Gary Benson <gbenson@redhat.com>
1535
1536 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1537 Renamed to state.
1538
e927c9fc
GB
15392014-06-18 Gary Benson <gbenson@redhat.com>
1540
1541 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1542 instead of fatal and error.
1543 (i386_handle_nonaligned_watchpoint): Likewise.
1544
1b6d4134
GB
15452014-06-18 Gary Benson <gbenson@redhat.com>
1546
1547 * i386-low.c (i386_get_debug_register_length): New macro.
1548 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1549 (i386_show_dr): Use debug_printf instead of fprintf. Use
1550 phex to format values.
1551
6e62758f
GB
15522014-06-18 Gary Benson <gbenson@redhat.com>
1553
1554 * i386-low.h: Comment changes.
1555 * i386-low.c: Likewise.
1556
fc6e2f03
GB
15572014-06-18 Gary Benson <gbenson@redhat.com>
1558
1559 * i386-low.c: Whitespace changes.
1560
f9d1eeed
TT
15612014-06-12 Tom Tromey <tromey@redhat.com>
1562
1563 * utils.c (freeargv): Remove.
1564
0b04e523
TT
15652014-06-12 Tom Tromey <tromey@redhat.com>
1566
1567 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1568 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1569 (parse_debug_format_options): Likewise.
1570 (gdbserver_usage): Likewise.
1571 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1572 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1573 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1574 against libiberty.
1575 ($(LIBGNU)): Depend on libiberty.
1576 (all-lib): Recurse into all subdirs.
1577 (install-only): Invoke "install" target in subdirs.
1578 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1579 targets.
1580 * configure: Rebuild.
1581 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1582 for vasprintf, vsnprintf, or gettimeofday.
1583 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1584 srv_tgtobj.
1585
270c9937
JB
15862014-06-05 Joel Brobecker <brobecker@adacore.com>
1587
1588 * development.sh: Delete.
1589 * Makefile.in (config.status): Adjust dependency on development.sh.
1590 * configure.ac: Adjust development.sh source call.
1591 * configure: Regenerate.
1592
0a261ed8
PA
15932014-06-02 Pedro Alves <palves@redhat.com>
1594
1595 * ax.c (gdb_free_agent_expr): New function.
1596 * ax.h (gdb_free_agent_expr): New declaration.
1597 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1598 list.
1599 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1600 static.
1601 (clear_breakpoint_conditions_and_commands): New function.
1602 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1603 (clear_breakpoint_conditions_and_commands): New declaration.
1604
e9dae05e
RR
16052014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1606
1607 * linux-aarch64-low.c (asm/ptrace.h): Include.
1608
5876f503
JK
16092014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1610
1611 Fix TLS access for -static -pthread.
1612 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1613 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1614 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1615
802e8e6d
PA
16162014-05-20 Pedro Alves <palves@redhat.com>
1617
1618 * linux-aarch64-low.c (aarch64_insert_point)
1619 (aarch64_remove_point): No longer check whether the type is
1620 supported here. Adjust to new interface.
1621 (the_low_target): Install aarch64_supports_z_point_type as
1622 supports_z_point_type method.
1623 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1624 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1625 instead of a Z packet char. Adjust.
1626 (arm_supports_z_point_type): New function.
1627 (arm_insert_point, arm_remove_point): Adjust to new interface.
1628 (the_low_target): Install arm_supports_z_point_type.
1629 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1630 (cris_insert_point, cris_remove_point): Adjust to new interface.
1631 Don't check whether the type is supported here.
1632 (the_low_target): Install cris_supports_z_point_type.
1633 * linux-low.c (linux_supports_z_point_type): New function.
1634 (linux_insert_point, linux_remove_point): Adjust to new interface.
1635 * linux-low.h (struct linux_target_ops) <insert_point,
1636 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1637 raw_breakpoint pointer parameter.
1638 <supports_z_point_type>: New method.
1639 * linux-mips-low.c (mips_supports_z_point_type): New function.
1640 (mips_insert_point, mips_remove_point): Adjust to new interface.
1641 Use mips_supports_z_point_type.
1642 (the_low_target): Install mips_supports_z_point_type.
1643 * linux-ppc-low.c (the_low_target): Install NULL as
1644 supports_z_point_type method.
1645 * linux-s390-low.c (the_low_target): Install NULL as
1646 supports_z_point_type method.
1647 * linux-sparc-low.c (the_low_target): Install NULL as
1648 supports_z_point_type method.
1649 * linux-x86-low.c (x86_supports_z_point_type): New function.
1650 (x86_insert_point): Adjust to new insert_point interface. Use
1651 insert_memory_breakpoint. Adjust to new
1652 i386_low_insert_watchpoint interface.
1653 (x86_remove_point): Adjust to remove_point interface. Use
1654 remove_memory_breakpoint. Adjust to new
1655 i386_low_remove_watchpoint interface.
1656 (the_low_target): Install x86_supports_z_point_type.
1657 * lynx-low.c (lynx_target_ops): Install NULL as
1658 supports_z_point_type callback.
1659 * nto-low.c (nto_supports_z_point_type): New.
1660 (nto_insert_point, nto_remove_point): Adjust to new interface.
1661 (nto_target_ops): Install nto_supports_z_point_type.
1662 * mem-break.c: Adjust intro comment.
1663 (struct raw_breakpoint) <raw_type, size>: New fields.
1664 <inserted>: Update comment.
1665 <shlib_disabled>: Delete field.
1666 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1667 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1668 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1669 (raw_bkpt_type_to_target_hw_bp_type): New function.
1670 (find_enabled_raw_code_breakpoint_at): New function.
1671 (find_raw_breakpoint_at): New type and size parameters. Use them.
1672 (insert_memory_breakpoint): New function, based off
1673 set_raw_breakpoint_at.
1674 (remove_memory_breakpoint): New function.
1675 (set_raw_breakpoint_at): Reimplement.
1676 (set_breakpoint): New, based on set_breakpoint_at.
1677 (set_breakpoint_at): Reimplement.
1678 (delete_raw_breakpoint): Go through the_target->remove_point
1679 instead of assuming memory breakpoints.
1680 (find_gdb_breakpoint_at): Delete.
1681 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1682 (find_gdb_breakpoint): New function.
1683 (set_gdb_breakpoint_at): Delete.
1684 (z_type_supported): New function.
1685 (set_gdb_breakpoint_1): New function, loosely based off
1686 set_gdb_breakpoint_at.
1687 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1688 (delete_gdb_breakpoint_at): Delete.
1689 (delete_gdb_breakpoint_1): New function, loosely based off
1690 delete_gdb_breakpoint_at.
1691 (delete_gdb_breakpoint): New function.
1692 (clear_gdb_breakpoint_conditions): Rename to ...
1693 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1694 breakpoint.
1695 (add_condition_to_breakpoint): Make static.
1696 (add_breakpoint_condition): Take a struct breakpoint pointer
1697 instead of an address. Adjust.
1698 (gdb_condition_true_at_breakpoint): Rename to ...
1699 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1700 z_type parameter.
1701 (gdb_condition_true_at_breakpoint): Reimplement.
1702 (add_breakpoint_commands): Take a struct breakpoint pointer
1703 instead of an address. Adjust.
1704 (gdb_no_commands_at_breakpoint): Rename to ...
1705 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1706 parameter. Return true if no breakpoint was found. Change debug
1707 output.
1708 (gdb_no_commands_at_breakpoint): Reimplement.
1709 (run_breakpoint_commands): Rename to ...
1710 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1711 and change return type to boolean.
1712 (run_breakpoint_commands): New function.
1713 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1714 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1715 breakpoint. Go through the_target->remove_point instead of
1716 assuming memory breakpoint.
1717 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1718 software and hardware breakpoints.
1719 (reinsert_raw_breakpoint): Go through the_target->insert_point
1720 instead of assuming memory breakpoint.
1721 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1722 software and hardware breakpoints.
1723 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1724 Check both software and hardware breakpoints.
1725 (validate_inserted_breakpoint): Assert the breakpoint is a
1726 software breakpoint. Set the inserted flag to -1 instead of
1727 setting shlib_disabled.
1728 (delete_disabled_breakpoints): Adjust.
1729 (validate_breakpoints): Only validate software breakpoints.
1730 Adjust to inserted flag change.
1731 (check_mem_read, check_mem_write): Skip breakpoint types other
1732 than software breakpoints. Adjust to inserted flag change.
1733 * mem-break.h (enum raw_bkpt_type): New enum.
1734 (raw_breakpoint, struct process_info): Forward declare.
1735 (Z_packet_to_target_hw_bp_type): Delete declaration.
1736 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1737 (set_gdb_breakpoint, delete_gdb_breakpoint)
1738 (clear_breakpoint_conditions): New declarations.
1739 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1740 (breakpoint_inserted_here): Update comment.
1741 (add_breakpoint_condition, add_breakpoint_commands): Replace
1742 address parameter with a breakpoint pointer parameter.
1743 (gdb_breakpoint_here): Update comment.
1744 (delete_gdb_breakpoint_at): Delete.
1745 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1746 * server.c (process_point_options): Take a struct breakpoint
1747 pointer instead of an address. Adjust.
1748 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1749 delete_gdb_breakpoint.
1750 * spu-low.c (spu_target_ops): Install NULL as
1751 supports_z_point_type method.
1752 * target.h: Include mem-break.h.
1753 (struct target_ops) <prepare_to_access_memory>: Update comment.
1754 <supports_z_point_type>: New field.
1755 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1756 instead of a char. Also take a raw breakpoint pointer.
1757 * win32-arm-low.c (the_low_target): Install NULL as
1758 supports_z_point_type.
1759 * win32-i386-low.c (i386_supports_z_point_type): New function.
1760 (i386_insert_point, i386_remove_point): Adjust to new interface.
1761 (the_low_target): Install i386_supports_z_point_type.
1762 * win32-low.c (win32_supports_z_point_type): New function.
1763 (win32_insert_point, win32_remove_point): Adjust to new interface.
1764 (win32_target_ops): Install win32_supports_z_point_type.
1765 * win32-low.h (struct win32_target_ops):
1766 <supports_z_point_type>: New method.
1767 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1768 instead of a char. Also take a raw breakpoint pointer.
1769
932539e3
PA
17702014-05-20 Pedro Alves <palves@redhat.com>
1771
1772 * mem-break.h: Include break-common.h.
1773 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1774 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1775 (Z_packet_to_target_hw_bp_type): New declaration.
1776 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1777 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1778 (Z_PACKET_ACCESS_WP): Delete macros.
1779 (Z_packet_to_hw_type): Delete function.
1780 * i386-low.h: Don't include break-common.h here.
1781 (Z_packet_to_hw_type): Delete declaration.
1782 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1783 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1784 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1785 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1786 * linux-aarch64-low.c: Don't include break-common.h here.
1787 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1788 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1789 (Z_packet_to_target_hw_bp_type): Delete function.
1790 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1791 function.
1792 (mips_insert_point, mips_remove_point): Use
1793 Z_packet_to_target_hw_bp_type.
1794
4ff0d3d8
PA
17952014-05-20 Pedro Alves <palves@redhat.com>
1796
1797 * linux-aarch64-low.c: Include break-common.h.
1798 (enum target_point_type): Delete.
1799 (Z_packet_to_point_type): Rename to ...
1800 (Z_packet_to_target_hw_bp_type): ... this, and return a
1801 target_hw_bp_type instead.
1802 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1803 instead of an enum target_point_type.
1804 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1805 breakpoint type.
1806 (aarch64_dr_state_insert_one_point)
1807 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1808 (aarch64_handle_aligned_watchpoint)
1809 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1810 Take an enum target_hw_bp_type instead of an enum
1811 target_point_type.
1812 (aarch64_supports_z_point_type): New function.
1813 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1814 use Z_packet_to_target_hw_bp_type.
1815
786dc519
JB
18162014-05-20 Joel Brobecker <brobecker@adacore.com>
1817
1818 * configure.ac: Only use -Werror by default when DEVELOPMENT
1819 is true.
1820 * configure: Regenerate.
1821
9e0aa64f
JK
18222014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1823
1824 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1825 * linux-x86-low.c (X86_64_USER_REGS): New.
1826 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1827
2b577b92
YQ
18282014-04-28 Yao Qi <yao@codesourcery.com>
1829
1830 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1831 name.
1832
94611da2
PA
18332014-04-25 Pedro Alves <palves@redhat.com>
1834
1835 PR server/16255
1836 * linux-low.c (linux_attach_fail_reason_string): New function.
1837 (linux_attach_lwp): Delete.
1838 (linux_attach_lwp_1): Rename to ...
1839 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1840 argument. Remove "initial" parameter. Return int instead of
1841 void. Don't error or warn here.
1842 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1843 failure to attach to the tgid. Call warning when failing to
1844 attach to an lwp.
1845 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1846 argument. Remove "initial" parameter. Return int instead of
1847 void. Don't error or warn here.
1848 (linux_attach_fail_reason_string): New declaration.
1849 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1850 interface change. Use linux_attach_fail_reason_string.
1851
01f9f808
MS
18522014-04-24 Michael Sturm <michael.sturm@mintel.com>
1853 Walfred Tedeschi <walfred.tedeschi@intel.com>
1854
1855 * Makefile.in: Added rules to handle new files
1856 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1857 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1858 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1859 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1860 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1861 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1862 x32-avx512-linux.o.
1863 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1864 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1865 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1866 i386/x32-avx512.xml.
1867 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1868 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1869 i386/x32-avx512-linux.xml.
1870 * i387-fp.c (num_avx512_k_registers): New constant for number
1871 of K registers.
1872 (num_avx512_zmmh_low_registers): New constant for number of
1873 lower ZMM registers (0-15).
1874 (num_avx512_zmmh_high_registers): New constant for number of
1875 higher ZMM registers (16-31).
1876 (num_avx512_ymmh_registers): New contant for number of higher
1877 YMM registers (ymm16-31 added by avx521 on x86_64).
1878 (num_avx512_xmm_registers): New constant for number of higher
1879 XMM registers (xmm16-31 added by AVX512 on x86_64).
1880 (struct i387_xsave): Add space for AVX512 registers.
1881 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1882 Add code to handle AVX512 registers.
1883 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1884 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1885 prototypei from generated file.
1886 (tdesc_amd64_avx512_linux): Likewise.
1887 (init_registers_x32_avx512_linux): Likewise.
1888 (tdesc_x32_avx512_linux): Likewise.
1889 (init_registers_i386_avx512_linux): Likewise.
1890 (tdesc_i386_avx512_linux): Likewise.
1891 (x86_64_regmap): Add AVX512 registers.
1892 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1893 mask.
1894 (initialize_low_arch): Add code to initialize AVX512 registers.
1895
51aa91f9
PA
18962014-04-23 Pedro Alves <palves@redhat.com>
1897
1898 * mem-break.c (find_gdb_breakpoint_at): Make static.
1899 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1900
a4165e94
PA
19012014-04-23 Pedro Alves <palves@redhat.com>
1902
1903 * i386-low.c: Don't include break-common.h here.
1904 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1905 prototype to take target_hw_bp_type as argument instead of a Z
1906 packet char.
1907 * i386-low.h: Include break-common.h here.
1908 (Z_packet_to_hw_type): Declare.
1909 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1910 prototypes.
1911 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1912 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1913 (x86_remove_point): Convert the packet number to a
1914 target_hw_bp_type before calling i386_low_remove_watchpoint.
1915 * win32-i386-low.c (i386_insert_point): Convert the packet number
1916 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1917 (i386_remove_point): Convert the packet number to a
1918 target_hw_bp_type before calling i386_low_remove_watchpoint.
1919
b8acf843
PA
19202014-04-23 Pedro Alves <palves@redhat.com>
1921
1922 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1923
d708bcd1
PA
19242014-04-10 Pedro Alves <palves@redhat.com>
1925
1926 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1927 Check if the condition or command is NULL before checking if the
1928 breakpoint is known. On success, return true.
1929 * mem-break.h (add_breakpoint_condition): Document return.
1930 (add_breakpoint_commands): Add describing comment.
1931 * server.c (skip_to_semicolon): New function.
1932 (process_point_options): Use it.
1933
2eec7d5b
PA
19342014-04-09 Pedro Alves <palves@redhat.com>
1935
1936 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1937 to lwpid_of.
1938
fa96cb38
PA
19392014-02-27 Pedro Alves <palves@redhat.com>
1940
1941 PR 12702
1942 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1943 macros.
1944 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1945 output.
1946 (last_thread_of_process_p): Take a PID argument instead of a
1947 thread pointer.
1948 (linux_wait_for_lwp): Delete.
1949 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1950 functions.
1951 (linux_low_filter_event): New function, party factored out from
1952 linux_wait_for_event.
1953 (linux_wait_for_event): Rename to ...
1954 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1955 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1956 sigsuspend. Check for zombie leaders.
1957 (linux_wait_for_event): Reimplement as wrapper around
1958 linux_wait_for_event_filtered.
1959 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1960 a normal or signal exit is seen, it's the whole process exiting.
1961 (wait_for_sigstop): No longer a for_each_inferior callback.
1962 Rewrite on top of linux_wait_for_event_filtered.
1963 (stop_all_lwps): Call wait_for_sigstop directly.
1964 * server.c (resume, handle_target_event): Handle
1965 TARGET_WAITKIND_NO_RESUMED.
1966
d763de10
JB
19672014-02-26 Joel Brobecker <brobecker@adacore.com>
1968
1969 * win32-low.c (psapi_get_dll_name,
1970 * win32_CreateToolhelp32Snapshot): Delete.
1971 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1972 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1973 Delete.
1974 (handle_load_dll): Add function description.
1975 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1976
850a0f76
JB
19772014-02-26 Joel Brobecker <brobecker@adacore.com>
1978
1979 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1980 Add comment.
1981 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1982 base address when calling win32_add_one_solib.
1983 (handle_load_dll): Delete local variable load_addr.
1984 Remove 0x1000 offset applied to DLL base address when calling
1985 win32_add_one_solib.
1986 (handle_unload_dll): Add comment.
1987
f25b3fc3
JB
19882014-02-26 Joel Brobecker <brobecker@adacore.com>
1989
1990 * win32-low.c (win32_add_all_dlls): Renames
1991 win32_ensure_ntdll_loaded. Rewrite function documentation.
1992 Adjust implementation to always load all DLLs.
1993 Add 0x1000 offset to DLL base address when calling
1994 win32_add_one_solib.
1995 (child_initialization_done): New static global.
1996 (do_initial_child_stuff): Set child_initialization_done to
1997 zero during child initialization, and 1 after. Replace call
1998 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1999 Add comment.
2000 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2001 (handle_unload_dll): Add function documentation.
2002 (get_child_debug_event): Ignore load and unload DLL events
2003 during child initialization.
2004
d86d4aaf
DE
20052014-02-20 Doug Evans <dje@google.com>
2006
3bc32da3 2007 Remove global all_lwps.
d86d4aaf
DE
2008 * inferiors.h (ptid_of): Move here from linux-low.h.
2009 (pid_of, lwpid_of): Ditto.
2010 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2011 parameter is a struct thread_info * now.
2012 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2013 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2014 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2015 directly.
2016 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2017 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2018 * linux-arm-low.c (update_registers_callback): Update, "entry"
2019 parameter is a struct thread_info * now.
2020 Fetch lwpid from current_inferior directly.
2021 (arm_insert_point): Pass &all_threads to find_inferior instead of
2022 &all_lwps.
2023 (arm_remove_point): Ditto.
2024 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2025 (arm_prepare_to_resume): Fetch pid from thread.
2026 (arm_read_description): Fetch lwpid from current_inferior directly.
2027 * linux-low.c (all_lwps): Delete.
2028 (delete_lwp): Delete call to remove_inferior.
2029 (handle_extended_wait): Fetch lwpid from thread.
2030 (add_lwp): Don't set lwp->entry.id. Remove call to
2031 add_inferior_to_list.
2032 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2033 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2034 (kill_one_lwp_callback): Ditto.
2035 (linux_kill): Don't dereference NULL pointer.
2036 Fetch ptid,lwpid from thread.
2037 (get_detach_signal): Fetch ptid from thread.
2038 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2039 Simplify call to regcache_invalidate_thread.
2040 (delete_lwp_callback): Update, "entry" parameter is a
2041 struct thread_info * now. Fetch pid from thread.
2042 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2043 (status_pending_p_callback): Update, "entry" parameter is a
2044 struct thread_info * now. Fetch ptid from thread.
2045 (find_lwp_pid): Update, "entry" parameter is a
2046 struct thread_info * now.
2047 (linux_wait_for_lwp): Fetch pid from thread.
2048 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2049 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2050 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2051 (dequeue_one_deferred_signal): Ditto.
2052 (cancel_breakpoint): Fetch ptid from current_inferior.
2053 (linux_wait_for_event): Pass &all_threads to find_inferior,
2054 not &all_lwps. Fetch ptid, lwpid from thread.
2055 (count_events_callback): Update, "entry" parameter is a
2056 struct thread_info * now.
2057 (select_singlestep_lwp_callback): Ditto.
2058 (select_event_lwp_callback): Ditto.
2059 (cancel_breakpoints_callback): Ditto.
2060 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2061 not &all_lwps.
2062 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2063 (unsuspend_one_lwp): Update, "entry" parameter is a
2064 struct thread_info * now.
2065 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2066 not &all_lwps.
2067 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2068 Fetch lwpid from thread, not lwp.
2069 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2070 Pass &all_threads to find_inferior, not &all_lwps.
2071 (send_sigstop): Fetch lwpid from thread, not lwp.
2072 (send_sigstop_callback): Update, "entry" parameter is a
2073 struct thread_info * now.
2074 (suspend_and_send_sigstop_callback): Ditto.
2075 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2076 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2077 struct thread_info * now.
2078 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2079 from thread, lwp.
2080 (lwp_running): Update, "entry" parameter is a
2081 struct thread_info * now.
2082 (stop_all_lwps): Fetch ptid from thread.
2083 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2084 (linux_resume_one_lwp): Fetch lwpid from thread.
2085 (linux_set_resume_request): Update, "entry" parameter is a
2086 struct thread_info * now. Fetch pid, lwpid from thread.
2087 (resume_status_pending_p): Update, "entry" parameter is a
2088 struct thread_info * now.
2089 (need_step_over_p): Ditto. Fetch lwpid from thread.
2090 (start_step_over): Fetch lwpid from thread.
2091 (linux_resume_one_thread): Update, "entry" parameter is a
2092 struct thread_info * now. Fetch lwpid from thread.
2093 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2094 (proceed_one_lwp): Update, "entry" parameter is a
2095 struct thread_info * now. Fetch lwpid from thread.
2096 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2097 struct thread_info * now.
2098 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2099 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2100 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2101 directly.
2102 (regsets_store_inferior_registers): Ditto.
2103 (fetch_register, store_register): Ditto.
2104 (linux_read_memory, linux_write_memory): Ditto.
2105 (linux_request_interrupt): Ditto.
2106 (linux_read_auxv): Ditto.
2107 (linux_xfer_siginfo): Ditto.
2108 (linux_qxfer_spu): Ditto.
2109 (linux_qxfer_libraries_svr4): Ditto.
2110 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2111 moved to inferiors.h.
2112 (get_lwp): Delete.
2113 (get_thread_lwp): Update.
2114 (struct lwp_info): Delete member "entry". Simplify comment for
2115 member "thread".
2116 (all_lwps): Delete.
2117 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2118 current_inferior directly.
2119 (update_watch_registers_callback): Update, "entry" parameter is a
2120 struct thread_info * now. Fetch pid from thread.
2121 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2122 (mips_insert_point): Fetch lwpid from current_inferior.
2123 Pass &all_threads to find_inferior, not &all_lwps.
2124 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2125 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2126 directly.
2127 (mips_stopped_data_address): Ditto.
2128 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2129 directly.
2130 * linux-tile-low.c (tile_arch_setup): Ditto.
2131 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2132 (update_debug_registers_callback): Update, "entry" parameter is a
2133 struct thread_info * now. Fetch pid from thread.
2134 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2135 Pass &all_threads to find_inferior, not &all_lwps.
2136 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2137 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2138 Pass &all_threads to find_inferior, not &all_lwps.
2139 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2140 (i386_dr_low_get_status): Ditto.
2141 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2142 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2143 (x86_linux_read_description): Ditto.
2144 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2145
3b8361aa
DE
21462014-02-20 Doug Evans <dje@google.com>
2147
2148 * inferiors.c (get_first_inferior): Fix buglet.
2149
f7667f0d
DE
21502014-02-19 Doug Evans <dje@google.com>
2151
2152 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2153 * inferiors.c (add_thread): Change result type to struct thread_info *.
2154 All callers updated.
2155 (add_lwp): Call add_thread here instead of in callers.
2156 All callers updated.
2157 * linux-low.h (get_lwp_thread): Rewrite.
2158 (struct lwp_info): New member "thread".
2159
b3312d80
DE
21602014-02-19 Doug Evans <dje@google.com>
2161
2162 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2163 All callers updated.
2164
ecc6f45c
DE
21652014-02-19 Doug Evans <dje@google.com>
2166
2167 * inferiors.c (add_thread): Fix whitespace.
2168
649ebbca
DE
21692014-02-19 Doug Evans <dje@google.com>
2170
2171 * dll.c (clear_dlls): Replace accessing list implemention details
2172 with API function.
2173 * gdbthread.h (get_first_thread): Declare.
2174 * inferiors.c (for_each_inferior_with_data): New function.
2175 (get_first_thread): New function.
2176 (find_thread_ptid): Simplify.
2177 (get_first_inferior): New function.
2178 (clear_list): Delete.
2179 (one_inferior_p): New function.
2180 (clear_inferior_list): New function.
2181 (clear_inferiors): Update.
2182 * inferiors.h (for_each_inferior_with_data): Declare.
2183 (clear_inferior_list): Declare.
2184 (one_inferior_p): Declare.
2185 (get_first_inferior): Declare.
2186 * linux-low.c (linux_wait_for_event): Replace accessing list
2187 implemention details with API function.
2188 * server.c (target_running): Ditto.
2189 (accumulate_file_name_length): New function.
2190 (emit_dll_description): New function.
2191 (handle_qxfer_libraries): Replace accessing list implemention
2192 details with API function.
2193 (handle_qxfer_threads_worker): New function.
2194 (handle_qxfer_threads_proper): Replace accessing list implemention
2195 details with API function.
2196 (handle_query): Ditto.
2197 (visit_actioned_threads_callback_ftype): New typedef.
2198 (visit_actioned_threads_data): New struct.
2199 (visit_actioned_threads): Rewrite to be find_inferior callback.
2200 (resume): Call find_inferior.
2201 (handle_status): Replace accessing list implemention
2202 details with API function.
2203 (process_serial_event): Replace accessing list implemention details
2204 with API function.
2205 * target.c (set_desired_inferior): Replace accessing list implemention
2206 details with API function.
2207 * tracepoint.c (same_process_p): New function.
2208 (gdb_agent_about_to_close): Replace accessing list implemention
2209 details with API function.
2210 * win32-low.c (child_delete_thread): Replace accessing list
2211 implemention details with API function.
2212 (match_dll_by_basename): New function.
2213 (dll_is_loaded_by_basename): New function.
2214 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2215 details call to dll_is_loaded_by_basename.
2216
80894984
DE
22172014-02-19 Doug Evans <dje@google.com>
2218
2219 * dll.h (struct dll_info): Add comment.
2220 * gdbthread.h (struct thread_info): Add comment.
2221 (current_ptid): Simplify.
2222 * inferiors.c (add_process): Update.
2223 (remove_process): Update.
2224 * inferiors.h (struct process_info): Rename member "head" to "entry".
2225 * linux-low.c (delete_lwp): Update.
2226 (add_lwp): Update.
2227 (last_thread_of_process_p): Update.
2228 (kill_one_lwp_callback, linux_kill): Update.
2229 (status_pending_p_callback): Update.
2230 (wait_for_sigstop): Update. Simplify read of ptid.
2231 (start_step_over): Update.
2232 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2233 (get_lwp_thread): Update.
2234 (struct lwp_info): Rename member "head" to "entry".
2235 * regcache.h (inferior_list_entry): Delete.
2236 * server.c (kill_inferior_callback): Update.
2237 (detach_or_kill_inferior_callback): Update.
2238 (print_started_pid): Update.
2239 (print_attached_pid): Update.
2240 (process_serial_event): Simplify read of ptid.
2241 * thread-db.c (thread_db_create_event): Update.
2242 (thread_db_get_tls_address): Update.
2243 * win32-low.c (current_inferior_ptid): Simplify.
2244
46917d26
TT
22452014-02-19 Tom Tromey <tromey@redhat.com>
2246
2247 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2248 argument.
2249 (target_supports_btrace): Update.
2250
0759a81e
YQ
22512014-02-14 Yao Qi <yao@codesourcery.com>
2252
2253 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2254 (rsp-low-ipa.o): New target.
2255
a7191e8b
TT
22562014-02-12 Tom Tromey <tromey@redhat.com>
2257
2258 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2259 convert_ascii_to_int.
2260 * regcache.c (registers_to_string): Likewise.
2261 * remote-utils.c (decode_M_packet): Likewise.
2262 * server.c (process_serial_event): Likewise.
2263
ff0e980e
TT
22642014-02-12 Tom Tromey <tromey@redhat.com>
2265
2266 * server.c (handle_query, handle_v_run): Use hex2bin, not
2267 unhexify.
2268 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2269
e9371aff
TT
22702014-02-12 Tom Tromey <tromey@redhat.com>
2271
2272 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2273 convert_int_to_ascii.
2274 * regcache.c (registers_to_string, collect_register_as_string):
2275 Likewise.
2276 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2277 Likewise.
2278 * server.c (process_serial_event): Likewise.
2279 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2280 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2281
971dc0b8
TT
22822014-02-12 Tom Tromey <tromey@redhat.com>
2283
2284 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2285 bin2hex, not hexify.
2286 * tracepoint.c (cmd_qtstatus): Likewise.
2287
0a822afb
TT
22882014-02-12 Tom Tromey <tromey@redhat.com>
2289
2290 * remote-utils.c (monitor_output): Pass explicit length to
2291 hexify.
2292
9c3d6531
TT
22932014-02-12 Tom Tromey <tromey@redhat.com>
2294
2295 * tracepoint.c: Include rsp-low.h.
2296 * server.c: Include rsp-low.h.
2297 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2298 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2299 declare.
2300 * remote-utils.c: Include rsp-low.h.
2301 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2302 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2303 (convert_int_to_ascii, convert_ascii_to_int): Move to
2304 common/rsp-low.c.
2305 * regcache.c: Include rsp-low.h.
2306 * ax.c: Include rsp-low.h.
2307 * Makefile.in (SFILES): Add common/rsp-low.c.
2308 (OBS): Add rsp-low.o.
2309 (rsp-low.o): New target.
2310
01fd3ea5
TT
23112014-02-12 Tom Tromey <tromey@redhat.com>
2312
2313 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2314 Include print-utils.h.
2315 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2316 (plongest, thirty_two, phex_nz): Remove.
2317 * Makefile.in (SFILES): Add common/print-utils.c.
2318 (OBS): Add print-utils.o.
2319 (print-utils-ipa.o): New target.
2320 (print-utils.o): New target.
2321 (IPA_OBJS): Add print-utils-ipa.o.
2322
e99dc820
TT
23232014-02-06 Tom Tromey <tromey@redhat.com>
2324
2325 * Makefile.in (SFILES): Fix indentation.
2326
ee1e2d4f
DE
23272014-02-05 Doug Evans <dje@google.com>
2328
2329 * linux-low.c (linux_wait_for_event): Improve comment.
2330 (linux_wait_1): Keep current_inferior in sync with event_child.
2331
f5a02773
DE
23322014-01-22 Doug Evans <dje@google.com>
2333
2334 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2335
87ce2a04
DE
23362014-01-22 Doug Evans <dje@google.com>
2337
2338 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2339 * configure: Regenerate.
2340 * config.in: Regenerate.
2341 * Makefile.in (SFILES): Add debug.c.
2342 (OBS): Add debug.o.
2343 * debug.c: New file.
2344 * debug.h: New file.
2345 * linux-aarch64-low.c (*): Update all debugging printfs to use
2346 debug_printf instead of fprintf.
2347 * linux-arm-low.c (*): Ditto.
2348 * linux-cris-low.c (*): Ditto.
2349 * linux-crisv32-low.c (*): Ditto.
2350 * linux-m32r-low.c (*): Ditto.
2351 * linux-sparc-low.c (*): Ditto.
2352 * linux-x86.c (*): Ditto.
2353 * linux-low.c (*): Ditto.
2354 (linux_wait_1): Add calls to debug_enter, debug_exit.
2355 (linux_wait): Remove redundant debugging printf.
2356 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2357 (linux_resume, unstop_all_lwps): Ditto.
2358 * mem-break.c (*): Update all debugging printfs to use
2359 debug_printf instead of fprintf.
2360 * remote-utils.c (*): Ditto.
2361 * thread-db.c (*): Ditto.
2362 * server.c #include <ctype.h>, "gdb_vecs.h".
2363 (debug_threads): Moved to debug.c.
2364 (*): Update all debugging printfs to use debug_printf instead of
2365 fprintf.
2366 (start_inferior): Replace call to fflush with call to debug_flush.
2367 (monitor_show_help): Mention set debug-format.
2368 (parse_debug_format_options): New function.
2369 (handle_monitor_command): Handle "monitor set debug-format".
2370 (gdbserver_usage): Mention --debug-format.
2371 (main): Parse --debug-format.
2372 * server.h (debug_threads): Declaration moved to debug.h.
2373 #include "debug.h".
2374 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2375 trace_debug_1 that uses debug_printf.
2376 (tracepoint_look_up_symbols): Update all debugging printfs to use
2377 debug_printf instead of fprintf.
2378
e671835b
BS
23792014-01-20 Baruch Siach <baruch@tkos.co.il>
2380
2381 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2382 sys/ptrace.h.
2383
b5737fa9
PA
23842014-01-17 Pedro Alves <palves@redhat.com>
2385
ea38d2a9 2386 PR build/16445
c7faa97a
PA
2387 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2388 defined after including gdb_proc_service.h.
b5737fa9 2389
40ed484e
DE
23902014-01-16 Doug Evans <dje@google.com>
2391
2392 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2393 (match_dll): Use it.
2394
969c39fb
MM
23952014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2396
2397 * target.h (target_ops) <read_btrace>: Change parameters and
2398 return type to allow error reporting.
2399 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2400 trace reading errors on.
2401 * linux-low.c (linux_low_read_btrace): Pass trace reading
2402 errors on.
2403 (linux_low_disable_btrace): New.
2404
ab7f45ba
DE
24052014-01-15 Doug Evans <dje@google.com>
2406
2407 * inferiors.c (thread_id_to_gdb_id): Delete.
2408 * inferiors.h (thread_id_to_gdb_id): Delete.
2409
66af0f44
EZ
24102014-01-13 Eli Zaretskii <eliz@gnu.org>
2411
2412 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2413 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2414 versions.
2415
9939e131
PA
24162014-01-08 Pedro Alves <palves@redhat.com>
2417
2418 * server.c (handle_status): Don't discard previous queued stop
2419 replies or thread's pending status here.
2420 (main) <disconnection>: Do it here instead.
2421
b7ea362b
PA
24222014-01-08 Pedro Alves <palves@redhat.com>
2423
2424 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2425 * server.c (visit_actioned_threads, handle_pending_status): New
2426 function.
2427 (handle_v_cont): Factor out parts to ...
2428 (resume): ... this new function. If in all-stop, and a thread
2429 being resumed has a pending status, report it without actually
2430 resuming.
2431 (myresume): Adjust to use the new 'resume' function.
2432 (clear_pending_status_callback, set_pending_status_callback)
2433 (find_status_pending_thread_callback): New functions.
2434 (handle_status): Handle the case of multiple threads having
2435 interesting statuses to report. Report threads' real last signal
2436 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2437 with an interesting thread to report the status for, instead of
2438 always reporting the status of the first thread.
2439
28498c42
JB
24402014-01-01 Joel Brobecker <brobecker@adacore.com>
2441
2442 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2443 * gdbreplay.c (gdbreplay_version): Likewise.
2444
f45c82da
YZ
24452013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2446
2447 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2448 iov.iov_len with the real length in use.
2449
379a5e2d
JB
24502013-12-13 Joel Brobecker <brobecker@adacore.com>
2451
2452 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2453 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2454 for all targets that use win32-low.c.
2455 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2456 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2457
4210d83e
PA
24582013-12-13 Pedro Alves <palves@redhat.com>
2459
2460 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2461 if equal to TARGET_WAITKIND_LOADED.
2462 * win32-low.c (cached_status): New static global.
2463 (win32_wait): Add declaration.
2464 (do_initial_child_stuff): Flush all initial pending debug events
2465 up to the initial breakpoint.
2466 (win32_wait): If CACHED_STATUS was set, return that instead
2467 of doing a real wait. Remove the code resuming the execution
2468 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2469 during the initial phase. Also remove the code changing
2470 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2471 TARGET_WAITKIND_STOPPED.
2472
e7f0d979
YQ
24732013-12-11 Yao Qi <yao@codesourcery.com>
2474
2475 * notif.c (handle_notif_ack): Return 0 if no notification
2476 matches.
2477
ebcf782c
DE
24782013-11-20 Doug Evans <dje@google.com>
2479
2480 * linux-low.c (linux_set_resume_request): Fix comment.
2481
20ad9378
DE
24822013-11-20 Doug Evans <dje@google.com>
2483
2484 * linux-low.c (resume_status_pending_p): Tweak comment.
2485
a196ebeb
WT
24862013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2487
2488 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2489 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2490 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2491 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2492 (srv_amd64_regobj): Add amd64-mpx.o.
2493 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2494 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2495 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2496 * i387-fp.c (num_pl_bnd_register) Added constant.
2497 (num_pl_bnd_cfg_registers) Added constant.
2498 (struct i387_xsave) Added reserved area and MPX fields.
2499 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2500 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2501 function.
2502 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2503 (init_registers_amd64_mpx_linux): Declare new function.
2504 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2505 (x86_64_regmap): Add MPX registers.
2506 (x86_linux_read_description): Add MPX case.
2507 (initialize_low_arch): Initialize MPX targets.
2508
0080a2f6
TT
25092013-11-18 Tom Tromey <tromey@redhat.com>
2510
2511 * configure: Rebuild.
2512 * configure.ac: Don't check for stdlib.h.
2513 * gdbreplay.c: Unconditionally include stdlib.h.
2514
2978b111
TT
25152013-11-18 Tom Tromey <tromey@redhat.com>
2516
2517 * config.in: Rebuild.
2518 * configure: Rebuild.
2519 * configure.ac: Don't use AC_HEADER_DIRENT.
2520
a3d08894
TT
25212013-11-18 Tom Tromey <tromey@redhat.com>
2522
2523 * server.h: Don't check HAVE_STRING_H.
2524 * gdbreplay.c: Don't check HAVE_STRING_H.
2525 * configure: Rebuild.
2526
0a5dd17d
TT
25272013-11-18 Tom Tromey <tromey@redhat.com>
2528
2529 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2530 LIBGNU.
2531
1bd2f0ba
TT
25322013-11-08 Tom Tromey <tromey@redhat.com>
2533
2534 * configure, config.in: Rebuild.
2535 * configure.ac: Remove unused configury.
2536
3266f10b
TT
25372013-11-08 Tom Tromey <tromey@redhat.com>
2538
2539 * acinclude.m4: Include common.m4, codeset.m4.
2540 * configure, config.in: Rebuild.
2541 * configure.ac: Use GDB_AC_COMMON.
2542
6682d959
AA
25432013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2544
2545 * linux-s390-low.c (HWCAP_S390_TE): New define.
2546 (s390_arch_setup): Consider the TE field in the HWCAP for
2547 determining 'have_regset_tdb'.
2548
fd0a4d76
SDJ
25492013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2550
2551 PR gdb/16014
2552 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2553 call to sizeof.
2554
1a3d890b
PA
25552013-10-02 Pedro Alves <palves@redhat.com>
2556
2557 * server.c (process_serial_event): Don't output "GDBserver
2558 exiting" if GDB is connected through stdio.
2559 * target.c (mywait): Likewise, be silent if GDB is connected
2560 through stdio.
2561
97ad4581
JB
25622013-10-01 Joel Brobecker <brobecker@adacore.com>
2563
2564 * lynx-low.c (lynx_add_threads_after_attach): New function.
2565 (lynx_attach): Remove call to add_thread. Add call to
2566 lynx_add_threads_after_attach instead.
2567
5b4e221c
MF
25682013-09-28 Mike Frysinger <vapier@gentoo.org>
2569
2570 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2571 * config.in, configure: Regenerated.
2572
ee47b2f8
YQ
25732013-09-18 Yao Qi <yao@codesourcery.com>
2574
2575 PR server/15959
2576 * server.c (start_inferior): Clear 'resume_info'.
2577
d6707650 25782013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2579
d6707650
JW
2580 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2581 for each register.
2582
9243dd0e 25832013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2584
9243dd0e
JW
2585 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2586 linux-tile-low.o to srv_tgtobj.
2587
c623a6ef
WN
25882013-09-16 Will Newton <will.newton@linaro.org>
2589
2590 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2591 out regs.
2592
fb71d39e
PA
25932013-09-06 Pedro Alves <palves@redhat.com>
2594
2595 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2596 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2597 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2598 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2599 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2600 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2601
8e7e9910
PA
26022013-09-06 Pedro Alves <palves@redhat.com>
2603
2604 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2605 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2606
7c3a12ca
PA
26072013-09-06 Pedro Alves <palves@redhat.com>
2608
2609 * linux-amd64-ipa.c: Include tracepoint.h.
2610 * linux-i386-ipa.c: Include tracepoint.h.
2611
8eb3d7b6
RW
26122013-09-06 Ricard Wanderlof <ricardw@axis.com>
2613
2614 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2615 (ps_get_thread_area): New function.
2616
eddddb9d
RW
26172013-09-06 Ricard Wanderlof <ricardw@axis.com>
2618
2619 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2620 (initialize_low_arch): Call init_registers_crisv32 rather than
2621 init_register_crisv32.
2622
533b0600
PA
26232013-09-05 Pedro Alves <palves@redhat.com>
2624
2625 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2626 to ...
2627 * hostio.h: ... this new file.
2628 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2629 win32-low.c: Include hostio.h.
2630
0ce3d3b5
PA
26312013-09-05 Pedro Alves <palves@redhat.com>
2632
2633 * server.h (gdb_client_data, handler_func, callback_handler_func)
2634 (delete_file_handler, add_file_handler, append_callback_event)
2635 (delete_callback_event, start_event_loop, initialize_event_loop):
2636 Move to event-loop.h and include it.
2637 * event-loop.h: New file.
2638
799cdc37
PA
26392013-09-05 Pedro Alves <palves@redhat.com>
2640
2641 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2642 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2643 (loaded_dll, unloaded_dll): Move to ...
2644 * dll.h: ... this new file.
2645 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2646
6a6bbd9d
PA
26472013-09-05 Pedro Alves <palves@redhat.com>
2648
2649 * server.h (current_process, get_thread_process, all_processes)
2650 (add_inferior_to_list, for_each_inferior, current_inferior)
2651 (remove_inferior, add_process, remove_process, find_process_pid)
2652 (have_started_inferiors_p, have_attached_inferiors_p)
2653 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2654 (clear_inferiors, find_inferior, find_inferior_id)
2655 (inferior_target_data, set_inferior_target_data)
2656 (inferior_regcache_data, set_inferior_regcache_data): Move to
2657 inferiors.h, and include it.
2658 * inferiors.h: New file.
2659
f699aaba
PA
26602013-09-05 Pedro Alves <palves@redhat.com>
2661
2662 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2663 Move ...
2664 * ax.h: ... here.
2665
c144c7a0
PA
26662013-09-05 Pedro Alves <palves@redhat.com>
2667
2668 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2669 tracepoint.h.
2670 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2671 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2672 (handle_tracepoint_general_set, handle_tracepoint_query)
2673 (tracepoint_finished_step, tracepoint_was_hit)
2674 (release_while_stepping_state_list, current_traceframe)
2675 (in_readonly_region, traceframe_read_mem)
2676 (fetch_traceframe_registers, traceframe_read_sdata)
2677 (traceframe_read_info, struct fast_tpoint_collect_status)
2678 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2679 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2680 (supply_fast_tracepoint_registers)
2681 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2682 (ipa_tdesc, claim_trampoline_space)
2683 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2684 (agent_mem_read, agent_get_trace_state_variable_value)
2685 (agent_set_trace_state_variable_value, agent_tsv_read)
2686 (agent_mem_read_string, get_raw_reg_func_addr)
2687 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2688 * tracepoint.h: ... this new file.
2689
ff42e6ab
PA
26902013-09-05 Pedro Alves <palves@redhat.com>
2691
2692 * server.h (perror_with_name, error, fatal, warning, paddress)
2693 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2694 include it.
2695 * utils.h: New file.
2696
541af0f4
PA
26972013-09-05 Pedro Alves <palves@redhat.com>
2698
2699 * server.h (remote_debug, noack_mode, transport_is_reliable)
2700 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2701 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2702 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2703 (write_enn, initialize_async_io, enable_async_io)
2704 (disable_async_io, check_remote_input_interrupt_request)
2705 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2706 (dead_thread_notify, prepare_resume_reply)
2707 (decode_address_to_semicolon, decode_address, decode_m_packet)
2708 (decode_M_packet, decode_X_packet, decode_xfer_write)
2709 (decode_search_memory_packet, unhexify, hexify)
2710 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2711 (look_up_one_symbol, relocate_instruction)
2712 (monitor_output): Move to remote-utils.h, and include it.
2713 * remote-utils.h: New file.
2714
eebdf26b
PA
27152013-09-05 Pedro Alves <palves@redhat.com>
2716
2717 * server.h (_): Delete.
2718
3aafd2ff
PA
27192013-09-02 Pedro Alves <palves@redhat.com>
2720
2721 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2722 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2723 allocated.
2724 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2725
cee83bcb
PM
27262013-09-02 Pierre Muller <muller@sourceware.org>
2727
2728 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2729 or WriteProcessMemory complete successfully and handle
2730 ERROR_PARTIAL_COPY error.
2731
9a13b2fa
PA
27322013-09-02 Pedro Alves <palves@redhat.com>
2733
2734 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2735 error instead of EIO.
2736
602e3198
JK
27372013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2738
2739 PR server/15604
2740 * linux-low.c: Include filestuff.h.
2741 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2742 * lynx-low.c: Include filestuff.h.
2743 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2744 * server.c: Include filestuff.h.
2745 (main): Call notice_open_fds.
2746 * spu-low.c: Include filestuff.h.
2747 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2748
96d7229d
LM
27492013-08-22 Luis Machado <lgustavo@codesourcery.com>
2750
2751 * Makefile.in: Explain why ../target and ../nat are not
2752 listed as include file search paths.
2753 (linux-waitpid.o): New object file rule.
2754 * configure.srv (srv_native_linux_obj): New variable.
2755 Replace all occurrences of linux native object files with
2756 $srv_native_linux_obj.
2757 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2758 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2759 (linux_enable_event_reporting): Remove declaration.
2760 (my_waitpid): Moved to common/linux-waitpid.c.
2761 (linux_wait_for_event): Pass ptid when calling
2762 linux_enable_event_reporting.
2763 (linux_supports_tracefork_flag): Remove.
2764 (linux_enable_event_reporting): Likewise.
2765 (linux_tracefork_grandchild): Remove.
2766 (STACK_SIZE): Moved to common/linux-ptrace.c.
2767 (linux_tracefork_child): Remove.
2768 (linux_test_for_tracefork): Remove.
2769 (linux_look_up_symbols): Call linux_supports_traceclone.
2770 (initialize_low): Remove call to linux_test_for_tracefork.
2771 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2772 common/linux-ptrace.h.
2773 (PTRACE_TYPE_ARG4): Likewise.
2774 Include linux-ptrace.h.
2775
32940073
PA
27762013-08-21 Pedro Alves <palves@redhat.com>
2777
2778 * config.in: Renegerate.
2779
33b60d58 27802013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2781
33b60d58
LM
2782 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2783 (SFILES): Remove $(srcdir)/common/target-common.c and
2784 add $(srcdir)/target/waitstatus.c.
2785 (OBS): Remove target-common.o and add waitstatus.o.
2786 (server_h): Remove $(srcdir)/../common/target-common.h and
2787 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2788 and $(srcdir)/../target/waitstatus.h.
2789 (target-common.o): Remove.
2790 (waitstatus.o): New target object file.
2791 * target.h: Do not include target-common.h and
2792 include target/resume.h, target/wait.h and
2793 target/waitstatus.h.
2794
b8e1b30e
LM
27952013-08-13 Luis Machado <lgustavo@codesourcery.com>
2796
2797 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2798 to PTRACE_TYPE_ARG3.
2799 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2800 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2801 PTRACE_TYPE_ARG4.
2802 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2803 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2804
7a60ad40
YQ
28052013-07-27 Jie Zhang <jie@codesourcery.com>
2806 Daniel Jacobowitz <dan@codesourcery.com>
2807 Yao Qi <yao@codesourcery.com>
2808
2809 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2810 (mips-linux-watch.o): New rule.
2811 (mips_linux_watch_h): New variable.
2812 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2813 srv_tgtobj.
2814 * linux-mips-low.c: Include mips-linux-watch.h.
2815 (struct arch_process_info, struct arch_lwp_info): New.
2816 (update_watch_registers_callback): New function.
2817 (mips_linux_new_process, mips_linux_new_thread) New functions.
2818 (mips_linux_prepare_to_resume, mips_insert_point): New
2819 functions.
2820 (mips_remove_point, mips_stopped_by_watchpoint): New
2821 functions.
2822 (rsp_bp_type_to_target_hw_bp_type): New function.
2823 (mips_stopped_data_address): New function.
2824 (the_low_target): Add watchpoint support functions.
2825
de6f69ad
YQ
28262013-07-27 Yao Qi <yao@codesourcery.com>
2827
2828 * i386-low.c: Include break-common.h.
2829 (enum target_hw_bp_type): Remove.
2830
3360c0bf
LM
28312013-07-24 Luis Machado <lgustavo@codesourcery.com>
2832
2833 * Makefile.in (SFILES): /common/target-common.c.
2834 (OBS): Add target-common.o.
2835 (server_h): Add $(srcdir)/../common/target-common.h.
2836 (target-common.o): New target.
2837 * server.c (queue_stop_reply_callback): Free
2838 status string after use.
2839 * target.c (target_waitstatus_to_string): Remove.
2840 * target.h: Include target-common.h.
2841 (resume_kind): Likewise.
2842 (target_waitkind): Likewise.
2843 (target_waitstatus): Likewise.
2844 (TARGET_WNOHANG): Likewise.
2845
bd885420
YQ
28462013-07-04 Yao Qi <yao@codesourcery.com>
2847
2848 * Makefile.in (host_alias): Use @host_noncanonical@.
2849 (target_alias): Use @target_noncanonical@.
2850 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2851 ACX_NONCANONICAL_HOST.
2852 * configure: Regenerated.
2853
2854 Revert:
2855 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2856
2857 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2858 * configure: Rebuild.
2859 * Makefile.in (version_host, version_target): Get from configure.
2860 (version.c): Use $(version_host) and $(version_target).
2861
17ef446e
PA
28622013-07-03 Pedro Alves <palves@redhat.com>
2863
2864 * Makefile.in (config.status): Depend on development.sh.
2865 * acinclude.m4: Include libmcheck.m4.
2866 * configure: Regenerate.
2867
7a9a7487
MG
28682013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2869
2870 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2871 attribute inside the parentheses.
2872 (winapi_DebugSetProcessKillOnExit): Ditto.
2873 (winapi_DebugBreakProcess): Ditto.
2874 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 2875
49b64de6
MG
28762013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2877
2878 * notif.h (notif_event): Add a dummy member to avoid compiler
2879 errors.
2880
d5749ee7
PA
28812013-07-01 Pedro Alves <palves@redhat.com>
2882
2883 * hostio.c (HOSTIO_PATH_MAX): Define.
2884 (require_filename, handle_open, handle_unlink, handle_readlink):
2885 Use it.
2886
d8d2a3ee
PA
28872013-07-01 Pedro Alves <palves@redhat.com>
2888
2889 * server.h: Include "pathmax.h".
2890 * linux-low.c: Don't include sys/param.h.
2891 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2892 MAXPATHLEN.
2893 * win32-low.c: Don't include sys/param.h.
2894 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2895
bc7dea8d
PA
28962013-07-01 Pedro Alves <palves@redhat.com>
2897
2898 * event-loop.c: Don't check HAVE_UNISTD_H before including
2899 <unistd.h>.
2900 * gdbreplay.c: Likewise.
2901 * remote-utils.c: Likewise.
2902 * server.c: Likewise.
2903 * configure.ac: Don't check for unistd.h.
2904 * configure: Regenerate.
2905
d6c2da54
TT
29062013-06-28 Tom Tromey <tromey@redhat.com>
2907
2908 * Makefile.in (version.c): Use version.in, not
2909 common/version.in.
2910
257b6bec
MG
29112013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2912
2913 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2914 * configure: Rebuild.
2915 * Makefile.in (version_host, version_target): Get from configure.
2916 (version.c): Use $(version_host) and $(version_target).
2917
86ebe149
DK
29182013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2919
2920 Fix trace-status to output user name without trailing colon.
2921 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2922
f30aa5af
DK
29232013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2924
2925 Fix trace-status to output proper start-time and stop-time.
2926 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2927 output start time and stop time in hex as gdb expects.
2928
28a93511
YQ
29292013-06-26 Pedro Alves <pedro@codesourcery.com>
2930
2931 * tracepoint.c (build_traceframe_info_xml): Output trace state
2932 variables present in the trace buffer.
2933
01208463
TT
29342013-06-24 Tom Tromey <tromey@redhat.com>
2935
2936 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2937 create-version.sh.
2938 (version.o): Remove.
2939 * gdbreplay.c: Include version.h.
2940 (version, host_name): Don't declare.
2941 * server.h: Include version.h.
2942 (version, host_name): Don't declare.
2943
760256f9
PA
29442013-06-12 Pedro Alves <palves@redhat.com>
2945
2946 * linux-x86-low.c (linux_is_elf64): Delete global.
2947 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2948 with local linux_pid_exe_is_elf_64_file use.
2949
030031ee
PA
29502013-06-11 Pedro Alves <palves@redhat.com>
2951
2952 * linux-low.c (regset_disabled, disable_regset): New functions.
2953 (regsets_fetch_inferior_registers)
2954 (regsets_store_inferior_registers): Use them.
2955 (initialize_regsets_info); Don't allocate the disabled_regsets
2956 array here.
2957 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2958 comment.
2959
5da6eb0a
PA
29602013-06-11 Pedro Alves <palves@redhat.com>
2961
2962 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2963 xmalloc.
2964
7e5aaa09
PA
29652013-06-11 Pedro Alves <palves@redhat.com>
2966
2967 * linux-x86-low.c (initialize_low_arch): Call
2968 init_registers_x32_avx_linux.
2969
d878444c
JK
29702013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2971
2972 Fix compatibility with Android Bionic.
2973 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2974 it is not empty.
2975
3aee8918
PA
29762013-06-07 Pedro Alves <palves@redhat.com>
2977
5f2b57b5 2978 PR server/14823
3aee8918
PA
2979 * Makefile.in (OBS): Add tdesc.o.
2980 (IPA_OBJS): Add tdesc-ipa.o.
2981 (tdesc-ipa.o): New rule.
2982 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2983 interface.
2984 * linux-low.c (new_inferior): Delete.
2985 (disabled_regsets, num_regsets): Delete.
2986 (linux_add_process): Adjust to set the new per-process
2987 new_inferior flag.
2988 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2989 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2990 was a stop. When calling arch_setup, switch the current inferior
2991 to the thread that got an event.
2992 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2993 (regsets_fetch_inferior_registers)
2994 (regsets_store_inferior_registers): New regsets_info parameter.
2995 Adjust to use it.
2996 (linux_register_in_regsets): New regs_info parameter. Adjust to
2997 use it.
2998 (register_addr, fetch_register, store_register): New usrregs_info
2999 parameter. Adjust to use it.
3000 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3001 parameter regs_info. Adjust to use it.
3002 (linux_fetch_registers): Get the current inferior's regs_info, and
3003 adjust to use it.
3004 (linux_store_registers): Ditto.
3005 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3006 (initialize_low): Don't initialize the target_regsets here. Call
3007 initialize_low_arch.
3008 * linux-low.h (target_regsets): Delete declaration.
3009 (struct regsets_info): New.
3010 (struct usrregs_info): New.
3011 (struct regs_info): New.
3012 (struct process_info_private) <new_inferior>: New field.
3013 (struct linux_target_ops): Delete the num_regs, regmap, and
3014 regset_bitmap fields. New field regs_info.
3015 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3016 * i387-fp.c (num_xmm_registers): Delete.
3017 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3018 calls to new interface.
3019 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3020 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3021 Infer the number of xmm registers from the regcache's target
3022 description.
3023 * i387-fp.h (num_xmm_registers): Delete.
3024 * inferiors.c (add_thread): Don't install the thread's regcache
3025 here.
3026 * proc-service.c (gregset_info): Fetch the current inferior's
3027 regs_info. Adjust to use it.
3028 * regcache.c: Include tdesc.h.
3029 (register_bytes, reg_defs, num_registers)
3030 (gdbserver_expedite_regs): Delete.
3031 (get_thread_regcache): If the thread doesn't have a regcache yet,
3032 create one, instead of aborting gdbserver.
3033 (regcache_invalidate_one): Rename to ...
3034 (regcache_invalidate_thread): ... this.
3035 (regcache_invalidate_one): New.
3036 (regcache_invalidate): Only invalidate registers of the current
3037 process.
3038 (init_register_cache): Add target_desc parameter, and use it.
3039 (new_register_cache): Ditto. Assert the target description has a
3040 non zero registers_size.
3041 (regcache_cpy): Add assertions. Adjust.
3042 (realloc_register_cache, set_register_cache): Delete.
3043 (registers_to_string, registers_from_string): Adjust.
3044 (find_register_by_name, find_regno, find_register_by_number)
3045 (register_cache_size): Add target_desc parameter, and use it.
3046 (free_register_cache_thread, free_register_cache_thread_one)
3047 (regcache_release, register_cache_size): New.
3048 (register_size): Add target_desc parameter, and use it.
3049 (register_data, supply_register, supply_register_zeroed)
3050 (supply_regblock, supply_register_by_name, collect_register)
3051 (collect_register_as_string, collect_register_by_name): Adjust.
3052 * regcache.h (struct target_desc): Forward declare.
3053 (struct regcache) <tdesc>: New field.
3054 (init_register_cache, new_register_cache): Add target_desc
3055 parameter.
3056 (regcache_invalidate_thread): Declare.
3057 (regcache_invalidate_one): Delete declaration.
3058 (regcache_release): Declare.
3059 (find_register_by_number, register_cache_size, register_size)
3060 (find_regno): Add target_desc parameter.
3061 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3062 declarations.
3063 * remote-utils.c: Include tdesc.h.
3064 (outreg, prepare_resume_reply): Adjust.
3065 * server.c: Include tdesc.h.
3066 (gdbserver_xmltarget): Delete declaration.
3067 (get_features_xml, process_serial_event): Adjust.
3068 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3069 declare.
3070 (struct process_info) <tdesc>: New field.
3071 (ipa_tdesc): Declare.
3072 * tdesc.c: New file.
3073 * tdesc.h: New file.
3074 * tracepoint.c: Include tdesc.h.
3075 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3076 (get_context_regcache): Adjust to pass ipa_tdesc down.
3077 (do_action_at_tracepoint): Adjust to get the register cache size
3078 from the context regcache's description.
3079 (traceframe_walk_blocks): Adjust to get the register cache size
3080 from the current trace frame's description.
3081 (traceframe_get_pc): Adjust to get current trace frame's
3082 description and pass it down.
3083 (gdb_collect): Adjust to get the register cache size from the
3084 IPA's description.
3085 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3086 (gdbserver_xmltarget): Delete.
3087 (initialize_low_tracepoint): Set the ipa's target description.
3088 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3089 (initialize_low_tracepoint): Set the ipa's target description.
3090 * linux-x86-low.c: Include tdesc.h.
3091 [__x86_64__] (is_64bit_tdesc): New.
3092 (ps_get_thread_area, x86_get_thread_area): Use it.
3093 (i386_cannot_store_register): Rename to ...
3094 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3095 (i386_cannot_fetch_register): Rename to ...
3096 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3097 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3098 to new interface.
3099 (target_regsets): Rename to ...
3100 (x86_regsets): ... this.
3101 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3102 interface.
3103 (x86_siginfo_fixup): Use is_64bit_tdesc.
3104 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3105 (tdesc_x32_avx_linux, tdesc_x32_linux)
3106 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3107 Declare.
3108 (x86_linux_update_xmltarget): Delete.
3109 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3110 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3111 (AMD64_LINUX_USER64_CS): New.
3112 (x86_linux_read_description): New, based on
3113 x86_linux_update_xmltarget.
3114 (same_process_callback): New.
3115 (x86_arch_setup_process_callback): New.
3116 (x86_linux_update_xmltarget): New.
3117 (x86_regsets_info): New.
3118 (amd64_linux_regs_info): New.
3119 (i386_linux_usrregs_info): New.
3120 (i386_linux_regs_info): New.
3121 (x86_linux_regs_info): New.
3122 (x86_arch_setup): Reimplement.
3123 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3124 (x86_emit_ops): Ditto.
3125 (the_low_target): Adjust. Install x86_linux_regs_info,
3126 x86_cannot_fetch_register, and x86_cannot_store_register.
3127 (initialize_low_arch): New.
3128 * linux-ia64-low.c (tdesc_ia64): Declare.
3129 (ia64_fetch_register): Adjust.
3130 (ia64_usrregs_info, regs_info): New globals.
3131 (ia64_regs_info): New function.
3132 (the_low_target): Adjust.
3133 (initialize_low_arch): New function.
3134 * linux-sparc-low.c (tdesc_sparc64): Declare.
3135 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3136 Adjust.
3137 (sparc_arch_setup): New function.
3138 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3139 (the_low_target): Adjust.
3140 (initialize_low_arch): New function.
3141 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3142 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3143 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3144 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3145 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3146 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3147 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3148 (tdesc_powerpc_isa205_vsx64l): Declare.
3149 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3150 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3151 (ppc_set_pc, ppc_get_hwcap): Adjust.
3152 (ppc_usrregs_info): Forward declare.
3153 (!__powerpc64__) ppc_regmap_adjusted: New global.
3154 (ppc_arch_setup): Adjust to the current process'es target
3155 description.
3156 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3157 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3158 (ppc_store_evrregset): Adjust.
3159 (target_regsets): Rename to ...
3160 (ppc_regsets): ... this, and make static.
3161 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3162 (ppc_regs_info): New function.
3163 (the_low_target): Adjust.
3164 (initialize_low_arch): New function.
3165 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3166 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3167 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3168 (tdesc_s390x_linux64v2): Declare.
3169 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3170 (s390_fill_gregset, s390_store_last_break): Adjust.
3171 (target_regsets): Rename to ...
3172 (s390_regsets): ... this, and make static.
3173 (s390_get_pc, s390_set_pc): Adjust.
3174 (s390_get_hwcap): New target_desc parameter, and use it.
3175 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3176 (s390_arch_setup): Adjust to set the current process'es target
3177 description. Don't adjust the regmap.
3178 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3179 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3180 (regs_info_3264): New globals.
3181 (s390_regs_info): New function.
3182 (the_low_target): Adjust.
3183 (initialize_low_arch): New function.
3184 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3185 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3186 [__mips64] (init_registers_mips_linux)
3187 (init_registers_mips_dsp_linux): Delete defines.
3188 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3189 (have_dsp): New global.
3190 (mips_read_description): New, based on mips_arch_setup.
3191 (mips_arch_setup): Reimplement.
3192 (get_usrregs_info): New function.
3193 (mips_cannot_fetch_register, mips_cannot_store_register)
3194 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3195 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3196 (target_regsets): Rename to ...
3197 (mips_regsets): ... this, and make static.
3198 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3199 (dsp_regs_info, regs_info): New globals.
3200 (mips_regs_info): New function.
3201 (the_low_target): Adjust.
3202 (initialize_low_arch): New function.
3203 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3204 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3205 Declare.
3206 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3207 (arm_read_description): New, with bits factored from
3208 arm_arch_setup.
3209 (arm_arch_setup): Reimplement.
3210 (target_regsets): Rename to ...
3211 (arm_regsets): ... this, and make static.
3212 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3213 (arm_regs_info): New function.
3214 (the_low_target): Adjust.
3215 (initialize_low_arch): New function.
3216 * linux-m68k-low.c (tdesc_m68k): Declare.
3217 (target_regsets): Rename to ...
3218 (m68k_regsets): ... this, and make static.
3219 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3220 (m68k_regs_info): New function.
3221 (m68k_arch_setup): New function.
3222 (the_low_target): Adjust.
3223 (initialize_low_arch): New function.
3224 * linux-sh-low.c (tdesc_sharch): Declare.
3225 (target_regsets): Rename to ...
3226 (sh_regsets): ... this, and make static.
3227 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3228 (sh_regs_info, sh_arch_setup): New functions.
3229 (the_low_target): Adjust.
3230 (initialize_low_arch): New function.
3231 * linux-bfin-low.c (tdesc_bfin): Declare.
3232 (bfin_arch_setup): New function.
3233 (bfin_usrregs_info, regs_info): New globals.
3234 (bfin_regs_info): New function.
3235 (the_low_target): Adjust.
3236 (initialize_low_arch): New function.
3237 * linux-cris-low.c (tdesc_cris): Declare.
3238 (cris_arch_setup): New function.
3239 (cris_usrregs_info, regs_info): New globals.
3240 (cris_regs_info): New function.
3241 (the_low_target): Adjust.
3242 (initialize_low_arch): New function.
3243 * linux-cris-low.c (tdesc_crisv32): Declare.
3244 (cris_arch_setup): New function.
3245 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3246 (cris_regs_info): New function.
3247 (the_low_target): Adjust.
3248 (initialize_low_arch): New function.
3249 * linux-m32r-low.c (tdesc_m32r): Declare.
3250 (m32r_arch_setup): New function.
3251 (m32r_usrregs_info, regs_info): New globals.
3252 (m32r_regs_info): Adjust.
3253 (initialize_low_arch): New function.
3254 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3255 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3256 (tic6x_usrregs_info): Forward declare.
3257 (tic6x_read_description): New function, based on ...
3258 (tic6x_arch_setup): ... this. Reimplement.
3259 (target_regsets): Rename to ...
3260 (tic6x_regsets): ... this, and make static.
3261 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3262 (tic6x_regs_info): New function.
3263 (the_low_target): Adjust.
3264 (initialize_low_arch): New function.
3265 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3266 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3267 (target_regsets): Rename to ...
3268 (xtensa_regsets): ... this, and make static.
3269 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3270 globals.
3271 (xtensa_arch_setup, xtensa_regs_info): New functions.
3272 (the_low_target): Adjust.
3273 (initialize_low_arch): New function.
3274 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3275 (nios2_arch_setup): Set the current process'es tdesc.
3276 (target_regsets): Rename to ...
3277 (nios2_regsets): ... this.
3278 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3279 (nios2_regs_info): New function.
3280 (the_low_target): Adjust.
3281 (initialize_low_arch): New function.
a261b8f5
PA
3282 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3283 (aarch64_arch_setup): Set the current process'es tdesc.
3284 (target_regsets): Rename to ...
3285 (aarch64_regsets): ... this.
3286 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3287 (aarch64_regs_info): New function.
3288 (the_low_target): Adjust.
3289 (initialize_low_arch): New function.
3aee8918
PA
3290 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3291 globals.
3292 (target_regsets): Rename to ...
3293 (tile_regsets): ... this.
3294 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3295 (tile_regs_info): New function.
3296 (tile_arch_setup): Set the current process'es tdesc.
3297 (the_low_target): Adjust.
3298 (initialize_low_arch): New function.
3299 * spu-low.c (tdesc_spu): Declare.
3300 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3301 * win32-arm-low.c (tdesc_arm): Declare.
3302 (arm_arch_setup): New function.
3303 (the_low_target): Install arm_arch_setup instead of
3304 init_registers_arm.
3305 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3306 (init_windows_x86): Rename to ...
3307 (i386_arch_setup): ... this. Set `win32_tdesc'.
3308 (the_low_target): Adjust.
3309 * win32-low.c (win32_tdesc): New global.
3310 (child_add_thread): Don't create the thread cache here.
3311 (do_initial_child_stuff): Set the new process'es tdesc.
3312 * win32-low.h (struct target_desc): Forward declare.
3313 (win32_tdesc): Declare.
3314 * lynx-i386-low.c (tdesc_i386): Declare global.
3315 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3316 * lynx-low.c (lynx_tdesc): New global.
3317 (lynx_add_process): Set the new process'es tdesc.
3318 * lynx-low.h (struct target_desc): Forward declare.
3319 (lynx_tdesc): Declare global.
3320 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3321 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3322 * nto-low.c (nto_tdesc): New global.
3323 (do_attach): Set the new process'es tdesc.
3324 * nto-low.h (struct target_desc): Forward declare.
3325 (nto_tdesc): Declare.
3326 * nto-x86-low.c (tdesc_i386): Declare.
3327 (nto_x86_arch_setup): Set `nto_tdesc'.
3328
b1fbec62
GB
33292013-06-04 Gary Benson <gbenson@redhat.com>
3330
3331 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3332 to qSupported response when appropriate.
3333 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3334 with nonzero-length annex.
3335 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3336 arguments supplied in annex.
3337
d1ec4ce7
DE
33382013-05-31 Doug Evans <dje@google.com>
3339
ac44adcb 3340 PR server/15594
d1ec4ce7
DE
3341 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3342 64 bits in 64-cross-32 environment.
3343
9b25f2d3
PA
33442013-05-28 Pedro Alves <palves@redhat.com>
3345
3346 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3347 (aarch64-without-fpu.c): Delete rule.
3348 * configure.srv (aarch64*-*-linux*): Remove references to
3349 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3350 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3351 declaration.
3352
6740dc9c
PA
33532013-05-24 Pedro Alves <palves@redhat.com>
3354
3355 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3356 instead of strchr/decode_address. Error if the range isn't split
3357 with a ','. Don't assume there's be a ':' in the action.
3358
c2d6af84
PA
33592013-05-23 Yao Qi <yao@codesourcery.com>
3360 Pedro Alves <palves@redhat.com>
3361
3362 * linux-low.c (lwp_in_step_range): New function.
3363 (linux_wait_1): If the thread was range stepping and stopped
3364 outside the stepping range, report the stop to GDB. Otherwise,
3365 continue stepping. Add range stepping debug output.
3366 (linux_set_resume_request): Copy the step range from the resume
3367 request to the lwp.
3368 (linux_supports_range_stepping): New.
3369 (linux_target_ops) <supports_range_stepping>: Set to
3370 linux_supports_range_stepping.
3371 * linux-low.h (struct linux_target_ops)
3372 <supports_range_stepping>: New field.
3373 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3374 * linux-x86-low.c (x86_supports_range_stepping): New.
3375 (the_low_target) <supports_range_stepping>: Set to
3376 x86_supports_range_stepping.
3377 * server.c (handle_v_cont): Handle 'r' action.
3378 (handle_v_requests): Append ";r" if the target supports range
3379 stepping.
3380 * target.h (struct thread_resume) <step_range_start,
3381 step_range_end>: New fields.
3382 (struct target_ops) <supports_range_stepping>:
3383 New field.
3384 (target_supports_range_stepping): New macro.
3385
58794e1a
JB
33862013-05-17 Joel Brobecker <brobecker@adacore.com>
3387
3388 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3389 confusion in comment.
3390
d631c5a7
JB
33912013-05-17 Joel Brobecker <brobecker@adacore.com>
3392
3393 * lynx-low.c (struct process_info_private): New type.
3394 (lynx_add_process): New function.
3395 (lynx_create_inferior, lynx_attach): Replace calls to
3396 add_process by calls to lynx_add_process.
3397 (lynx_resume): If PTID is null, then try using
3398 current_process()->private->last_wait_event_ptid.
3399 Add comments.
3400 (lynx_clear_inferiors): Delete. The contents of that function
3401 has been inlined in lynx_mourn;
3402 (lynx_wait_1): Save the ptid in the process's private data.
3403 (lynx_mourn): Free the process' private data. Replace call
3404 to lynx_clear_inferiors by call to clear_inferiors.
3405
96f7a20f
YQ
34062013-05-17 Yao Qi <yao@codesourcery.com>
3407
3408 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3409 the right place.
3410
db0dfaa0
LM
34112013-05-16 Luis Machado <lgustavo@codesourcery.com>
3412
3413 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3414 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3415 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3416 PT_TEXT_END_ADDR guards. Update comments.
3417 (linux_target_op) <read_offsets>: Conditionally define to
3418 linux_read_offsets if the target is UCLIBC and if it defines
3419 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3420
68f5f838
SL
34212013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3422 Andrew Jenner <andrew@codesourcery.com>
3423
3424 * Makefile.in (SFILES): Add linux-nios2-low.c.
3425 (clean): Add action to delete nios2-linux.c.
3426 (nios2-linux.c): New rule.
3427 * configure.srv: Add nios2*-*-linux*.
3428 * linux-nios2-low.c: New.
3429
1ebff1fd
HAQ
34302013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3431
3432 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3433
f6150862
HZ
34342013-04-25 Hui Zhu <hui@codesourcery.com>
3435
3436 PR gdb/15186
f6150862
HZ
3437 * ax.c (ax_printf): Add fflush.
3438
614c279d
TT
34392013-04-22 Tom Tromey <tromey@redhat.com>
3440
3441 * Makefile.in (SFILES): Add filestuff.c.
3442 (OBS): Add filestuff.o.
3443 (filestuff.o): New target.
3444 * config.in, configure: Rebuild.
3445 * configure.ac: Check for fdwalk, pipe2.
3446
7d4e5717
PA
34472013-04-17 Pedro Alves <palves@redhat.com>
3448
3449 * configure.ac (USE_THREAD_DB): Delete variable.
3450 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3451 Don't AC_SUBST USE_THREAD_DB.
3452 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3453 * config.in, configure: Regenerate.
3454
d5c93e41
PA
34552013-04-16 Pedro Alves <palves@redhat.com>
3456
3457 * linux-low.h (struct lwp_info) <thread_known>: Move under
3458 the USE_THREAD_DB #ifdef.
3459
04f5fe89
PA
34602013-04-16 Pedro Alves <palves@redhat.com>
3461
3462 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3463 (linux-low.o): Delete rule.
3464 * linux-low.h: Always include "gdb_thread_db.h" instead of
3465 conditionally including thread_db.h.
3466 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3467 HAVE_THREAD_DB_H.
3468
480b27bf
JK
34692013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3470
3471 * Makefile.in (install-only): Fix make install regression.
3472
43662968
JK
34732013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3474
3475 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3476 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3477 installation.
3478 * gdbserver.1: Remove.
3479
3e74e146
PA
34802013-03-22 Pedro Alves <palves@redhat.com>
3481
3482 * linux-low.c (handle_extended_wait): Don't call
3483 linux_enable_event_reporting.
3484
a8347a2a
TT
34852013-03-15 Tony Theodore <tonyt@logyst.com>
3486
3487 PR build/9098:
3488 * Makefile.in (SHELL): Use @SHELL@.
3489
eeb56fa7
SDJ
34902013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3491
3492 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3493 compiler warning.
3494
4fa7e2ff
JB
34952013-03-13 Joel Brobecker <brobecker@adacore.com>
3496
3497 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3498 Remove extraneous NULL element.
3499
8ddb1965
YQ
35002013-03-13 Yao Qi <yao@codesourcery.com>
3501
3502 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3503 'V' block in trace frame.
3504
9accd112
MM
35052013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3506
3507 * target.h (struct target_ops): Add btrace ops.
3508 (target_supports_btrace): New macro.
3509 (target_enable_btrace): New macro.
3510 (target_disable_btrace): New macro.
3511 (target_read_btrace): New macro.
3512 * gdbthread.h (struct thread_info): Add btrace field.
3513 * server.c: Include btrace-common.h.
3514 (handle_btrace_general_set): New function.
3515 (handle_btrace_enable): New function.
3516 (handle_btrace_disable): New function.
3517 (handle_general_set): Call handle_btrace_general_set.
3518 (handle_qxfer_btrace): New function.
3519 (struct qxfer qxfer_packets[]): Add btrace entry.
3520 * inferiors.c (remove_thread): Disable btrace.
3521 * linux-low: Include linux-btrace.h.
3522 (linux_low_enable_btrace): New function.
3523 (linux_low_read_btrace): New function.
3524 (linux_target_ops): Add btrace ops.
3525 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3526 Add srv_linux_btrace=yes.
3527 (x86_64-*-linux*): Add linux-btrace.o.
3528 Add srv_linux_btrace=yes.
3529 * configure.ac: Define HAVE_LINUX_BTRACE.
3530 * config.in: Regenerated.
3531 * configure: Regenerated.
3532
5cc22e4c
MM
35332013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3534
3535 * server.c (handle_qxfer): Preserve error message if -3 is
3536 returned.
3537 (qxfer): Document the -3 return value.
3538
7c97f91e
MM
35392013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3540
3541 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3542 (linux_btrace_h): New variable.
3543 (linux-btrace.o): New rule.
3544
be9a119c 35452013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3546 Hafiz Abid Qadeer <abidh@codesourcery.com>
3547
3548 * tracepoint.c (trace_buffer_size): New global.
3549 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3550 (init_trace_buffer): Change to one-argument function. Allocate
3551 trace buffer memory.
3552 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3553 handle QTBuffer:size packet.
3554 (cmd_bigqtbuffer_size): New function.
3555 (initialize_tracepoint): Call init_trace_buffer with
3556 DEFAULT_TRACE_BUFFER_SIZE.
3557 * server.c (handle_query): Add QTBuffer:size in the
3558 supported packets.
3559
e64f7499
YQ
35602013-03-07 Yao Qi <yao@codesourcery.com>
3561
3562 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3563 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3564 of -1.
3565 (cmd_qtsp): Adjust condition. Do post increment.
3566 Set cur_action and cur_step_action back to 0.
3567
f0ae6fc3
PA
35682013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3569
3570 PR server/15236
3571 * linux-low.c (linux_write_memory): Return early success if LEN is
3572 zero.
3573
b5b0b0af
CV
35742013-03-05 Corinna Vinschen <vinschen@redhat.de>
3575
334ad4a8 3576 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3577
589bc927
TT
35782013-02-28 Tom Tromey <tromey@redhat.com>
3579
3580 * configure.ac: Invoke AC_SYS_LARGEFILE.
3581 * configure, config.in: Rebuild.
3582
dfe07582
CV
35832013-02-28 Corinna Vinschen <vinschen@redhat.com>
3584
3585 * win32-low.c: Throughout, fix format strings and casts of
3586 printf-like functions to avoid type related warnings on all
3587 platforms.
3588 (get_child_debug_event): Print dwDebugEventCode as hex since
3589 that's how it's usually documented.
3590
736cd585
YQ
35912013-02-28 Yao Qi <yao@codesourcery.com>
3592
3593 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3594 pulongest.
3595
e1f58301
JW
35962013-02-27 Jiong Wang <jiwang@tilera.com>
3597
3598 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3599 (reg-tilegx32.c): New rule.
3600 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3601 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3602 different register info initializer according to elf class.
3603 (init_registers_tilgx32): New function. The tilegx32 register info
3604 initializer.
3605 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3606 (tile_store_gregset): Likewise.
3607
d171ca78
YQ
36082013-02-27 Yao Qi <yao@codesourcery.com>
3609
3610 * server.c (process_point_options): Print debug message when
3611 debug_threads is true.
3612
282bbdf3
YQ
36132013-02-26 Yao Qi <yao@codesourcery.com>
3614
3615 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3616
aca22551
PA
36172013-02-19 Pedro Alves <palves@redhat.com>
3618 Kai Tietz <ktietz@redhat.com>
3619
3620 PR gdb/15161
3621
3622 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3623 instead of strtoul to extract address from packet.
3624 (process_serial_event) <'z'>: Likewise.
3625
4f3cee1c
YQ
36262013-02-18 Yao Qi <yao@codesourcery.com>
3627
3628 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3629
8e1d55a3
PA
36302013-02-14 Pedro Alves <palves@redhat.com>
3631
3632 Plug memory leak.
3633
3634 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3635 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3636
458820da
PA
36372013-02-14 Pedro Alves <palves@redhat.com>
3638
3639 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3640
baea0dae
PA
36412013-02-14 Pedro Alves <palves@redhat.com>
3642
3643 * tracepoint.c (save_string): Delete.
3644 (add_tracepoint_action): Use savestring instead of save_string.
3645
0b1afbb3
PA
36462013-02-12 Pedro Alves <palves@redhat.com>
3647
3648 * linux-xtensa-low.c: Ditto.
3649 * xtensa-xtregs.c: Ditto.
3650
8a4ac37e
PA
36512013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3652
3653 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3654 thread_db.
3655
148de6bb
MS
36562013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3657
3658 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3659 aarch64_num_wp_regs and aarch64_num_bp_regs to
3660 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3661
55fac6e0
MS
36622013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3663
3664 * linux-aarch64-low.c (ps_get_thread_area): Replace
3665 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3666
176eb98c
MS
36672013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3668 Marcus Shawcroft <marcus.shawcroft@arm.com>
3669 Nigel Stephens <nigel.stephens@arm.com>
3670 Yufeng Zhang <yufeng.zhang@arm.com>
3671
3672 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3673 (aarch64.c, aarch64-without-fpu.c): New targets.
3674 * configure.srv (aarch64*-*-linux*): New.
3675 * linux-aarch64-low.c: New file.
3676
56f7af9c
MS
36772013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3678
43aaf8b6 3679 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3680 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3681 (dequeue_one_deferred_signal, linux_resume_one_thread)
3682 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3683 (linux_tracefork_grandchild, linux_test_for_tracefork)
3684 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3685 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3686 where the argument is 0.
3687
60f662b0
YQ
36882013-01-25 Yao Qi <yao@codesourcery.com>
3689
3690 * event-loop.c: Include "queue.h".
3691 (gdb_event_p): New typedef.
3692 (struct gdb_event) <next_event>: Remove.
3693 (event_queue): Change to QUEUE(gdb_event_p).
3694 (async_queue_event): Remove.
3695 (gdb_event_xfree): New.
3696 (initialize_event_loop): New.
3697 (process_event): Use API from QUEUE.
3698 (wait_for_event): Likewise.
3699 * server.c (main): Call initialize_event_loop.
3700 * server.h (initialize_event_loop): Declare.
3701
5ae4861a
YQ
37022013-01-18 Yao Qi <yao@codesourcery.com>
3703
3704 * ax.h (struct eval_agent_expr_context): New.
3705 (gdb_eval_agent_expr): Update declaration.
3706 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3707 TFRAME. Add new argument CTX.
3708 * server.h (struct eval_agent_expr_context): Declare.
3709 (agent_mem_read, agent_tsv_read): Update declaration.
3710 (agent_mem_read_string): Likewise.
3711 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3712 (add_traceframe_block): Add new argument TPOINT.
3713 Increase TPOINT->traceframe_usage.
3714 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3715 eval_tracepoint_agent_expr.
3716 (condition_true_at_tracepoint): Likewise.
3717 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3718 (agent_mem_read_string, agent_tsv_read): Likewise.
3719
85e00e85
YQ
37202013-01-16 Yao Qi <yao@codesourcery.com>
3721
3722 * linux-low.c (linux_resume_one_lwp): Don't check
3723 'lwp->bp_reinsert != 0'.
3724
4039cf45
JB
37252013-01-07 Joel Brobecker <brobecker@adacore.com>
3726 Pedro Alves <palves@redhat.com>
3727
3728 * lynx-low.c (ptrace_request_to_str): Define a temporary
3729 macro and use it to simplify this function's implementation.
3730
9044dee2
JB
37312013-01-07 Joel Brobecker <brobecker@adacore.com>
3732
3733 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3734 sets errno.
3735
e6352c8f
JB
37362013-01-07 Joel Brobecker <brobecker@adacore.com>
3737
3738 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3739
50681a27
JB
37402013-01-07 Joel Brobecker <brobecker@adacore.com>
3741
3742 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3743
3f6e77ef
JB
37442013-01-07 Joel Brobecker <brobecker@adacore.com>
3745
3746 * lynx-low.c (lynx_resume): Use the resume_info parameter
3747 to determine the ptid for the lynx_ptrace call, unless
3748 it is equal to minus_one_ptid, in which case we use the
3749 ptid of the current_inferior.
3750 (lynx_wait_1): After having received a thread create/exit
3751 event, resume the inferior's execution using the signaling
3752 thread's ptid, rather than the old ptid.
3753
7fda33ae
JB
37542013-01-07 Joel Brobecker <brobecker@adacore.com>
3755
3756 * lynx-low.c (lynx_resume): Delete variable ret.
3757
b9786c74
JB
37582013-01-01 Joel Brobecker <brobecker@adacore.com>
3759
3760 * gdbreplay.c (gdbreplay_version): Update copyright year.
3761 * server.c (gdbserver_version): Likewise.
3762
8b93d60f
JB
37632012-12-17 Joel Brobecker <brobecker@adacore.com>
3764
3765 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3766 new thread.
3767
037335a7
JB
37682012-12-17 Joel Brobecker <brobecker@adacore.com>
3769
3770 * lynx-low.c (ptrace_request_to_str): Add handling for
3771 PTRACE_GETTRACESIG.
3772
52d4cbd8
JB
37732012-12-17 Joel Brobecker <brobecker@adacore.com>
3774
3775 * lynx-low.c (lynx_attach): Delete variable new_process.
3776
ab8f6ca9
JB
37772012-12-17 Joel Brobecker <brobecker@adacore.com>
3778
3779 * lynx-low.c (lynx_create_inferior): Delete variable
3780 new_process.
3781
78cbc024
JB
37822012-12-17 Joel Brobecker <brobecker@adacore.com>
3783
3784 * lynx-low.c (ptrace_request_to_str): Do not handle
3785 PTRACE_GETTHREADLIST if this macro does not exist.
3786
14a00470
YQ
37872012-12-15 Yao Qi <yao@codesourcery.com>
3788
3789 * Makefile.in (OBS): Add notif.o.
3790 * notif.c, notif.h: New.
3791 * server.c: Include "notif.h".
3792 (struct vstop_notif) <next>: Remove.
3793 <base>: New field.
3794 (queue_stop_reply): Update.
3795 (push_event, send_next_stop_reply): Remove.
3796 (discard_queued_stop_replies): Update.
3797 (notif_stop): New variable.
3798 (handle_v_stopped): Remove.
3799 (handle_v_requests): Don't call handle_v_stopped. Call
3800 handle_ack_notif instead.
3801 (queue_stop_reply_callback): Call notif_event_enque instead
3802 of queue_stop_reply.
3803 (handle_status): Don't call send_next_stop_reply, call
3804 notif_write_event instead.
3805 (kill_inferior_callback): Likewise.
3806 (detach_or_kill_inferior_callback): Likewise.
3807 (main): Call initialize_notif.
3808 (process_serial_event): Call QUEUE_is_empty.
3809 (handle_target_event): Call notif_push instead of push event.
3810 * server.h (push_event): Remove declaration.
3811
61c125b9
TT
38122012-12-10 Tom Tromey <tromey@redhat.com>
3813
3814 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3815 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3816 macros.
3817 (.c.o): Rewrite.
3818 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3819 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3820 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3821 (amd64-linux-ipa.o, ax.o): Rewrite.
3822 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3823 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3824 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3825 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3826 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3827 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3828 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3829 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3830 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3831 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3832 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3833 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3834 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3835 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3836 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3837 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3838 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3839 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3840 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3841 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3842 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3843 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3844 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3845 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3846 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3847 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3848 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3849 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3850 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3851 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3852 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3853 (reg-tilegx.o): Remove.
3854 (all_object_files): New macro.
3855 Include .deps files.
3856 * aclocal.m4, configure: Rebuild.
3857 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3858 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3859 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3860
e90e9ad9
TT
38612012-12-05 Tom Tromey <tromey@redhat.com>
3862
3863 PR gdb/14917:
3864 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3865
02d403bf 38662012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
3867
3868 * configure.ac: Check for linux/perf_event.h.
3869 * config.in: Regenerated.
3870 * configure: Regenerated.
3871
0270a750
PA
38722012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3873
3874 * hostio.c (handle_readlink): Decrease buffer size
3875 parameter passed to readlink by one byte.
3876
8c29b58e
YQ
38772012-11-26 Yao Qi <yao@codesourcery.com>
3878
3879 * configure.ac (build_warnings): Append '-Wempty-body'.
3880 * configure: Regenerated.
3881 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3882 body.
3883
8bdce1ff
PM
38842012-11-15 Pierre Muller <muller@sourceware.org>
3885
3886 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3887 * config.in: Regenerate.
3888 * configure: Regenerate.
3889 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3890 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3891 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3892 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3893 header.
3894 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3895 instead of <sys/wait.h> header.
3896 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3897
02d403bf 38982012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
3899
3900 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3901 (various make rules): Remove -DGDBSERVER
3902
fbd5db48
YQ
39032012-11-09 Yao Qi <yao@codesourcery.com>
3904
3905 * spu-low.c (current_ptid): Move it to ..
3906 * gdbthread.h: ... here. New.
3907 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3908 * server.c (myresume, process_serial_event): Likewise.
3909 * thread-db.c (thread_db_find_new_threads): Likewise.
3910 * tracepoint.c (run_inferior_command): Likewise.
3911
b3dc46ff
AB
39122012-10-01 Andrew Burgess <aburgess@broadcom.com>
3913
3914 * server.c (handle_search_memory_1): Include access length in
3915 warning message.
3916
07c04788
HPN
39172012-09-05 Michael Brandt <michael.brandt@axis.com>
3918
3919 * linux-crisv32-low.c: Fix compile errors.
3920
918d227b
YQ
39212012-09-04 Yao Qi <yao@codesourcery.com>
3922
3923 * tracepoint.c (cmd_qtsv): Adjust debug message.
3924 Don't check CUR_TPOINT.
3925
18c1b81a
YQ
39262012-08-28 Yao Qi <yao@codesourcery.com>
3927
3928 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3929 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3930 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3931 Remove declarations of xmalloc, xreallloc, xstrdup and
3932 freeargv.
3933 * Makefile.in (libiberty_h): New.
3934 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3935 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3936
dc82f37b
YQ
39372012-08-23 Yao Qi <yao@codesourcery.com>
3938
3939 * server.h: Remove declaration of 'xsnprintf'.
3940
406b1477
KS
39412012-08-22 Keith Seitz <keiths@redhat.com>
3942
3943 * server.h: Include build-gnulib-gbserver/config.h.
3944 * gdbreplay.c: Likewise.
3945
e6712ff1
DE
39462012-08-08 Doug Evans <dje@google.com>
3947
3948 * Makefile.in (SFILES): Add gdb_vecs.c.
3949 (OBS): Add gdb_vecs.o.
3950 (gdb_vecs_h, host_defs_h): New variables.
3951 (thread-db.o): Add $(gdb_vecs_h) dependency.
3952 (gdb_vecs.o): New rule.
3953 * thread-db.c: #include "gdb_vecs.h".
3954 (thread_db_load_search): Use a vector to iterate over path elements.
3955 Handle text appearing after "$pdir".
3956
3957 * configure.ac: Add check for strstr.
3958 * config.in: Regenerate.
3959 * configure: Regenerate.
3960
7c3270ae
UW
39612012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3962
3963 * hostio.c (handle_pread): If pread fails, fall back to attempting
3964 lseek/read.
3965 (handle_pwrite): Likewise for pwrite.
3966
b62e2b27
UW
39672012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3968
3969 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3970 between unsupported TYPE and unimplementable ADDR/LEN combination.
3971 (arm_insert_point): Act on new return value.
3972
78a99e91
PA
39732012-07-31 Pedro Alves <palves@redhat.com>
3974
3975 * server.c (process_point_options): Only skip tokens if we find
3976 one that is unrecognized. Don't treat 'X' specially while
3977 skipping unrecognized tokens.
3978
fcf303ab
UW
39792012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3980
3981 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3982 to 4-byte-align HW breakpoint addresses for Thumb.
3983
7255706c
YQ
39842012-07-27 Yao Qi <yao@codesourcery.com>
3985
3986 PR remote/14161.
3987
3988 * server.h: Declare gdb_agent_about_to_close.
3989 * target.c (kill_inferior): Include "agent.h".
3990 New. Send command 'kill'.
3991 * target.h (kill_inferior): Removed macro.
3992 * tracepoint.c (gdb_agent_about_to_close): New.
3993 (gdb_agent_helper_thread): Handle command 'close'.
3994 Wait endlessly until the inferior stops.
3995 Install gdb_agent_remove_socket to atexit hook.
3996 (agent_socket_name): New static variable.
3997 (gdb_agent_socket_init): Replace local variable 'name' with
3998 'agent_socket_name'.
3999 (gdb_agent_remove_socket): New.
4000
5a3f286f
YQ
40012012-07-27 Yao Qi <yao@codesourcery.com>
4002
4003 * server.c (process_point_options): Stop at 'X' when parsing.
4004
961bd387
ME
40052012-07-19 Michael Eager <eager@eagercon.com>
4006
a261b8f5 4007 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
4008 to hw_execute.
4009 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4010 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4011 hardware breakpoint.
4012
aa7c7447
JK
40132012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4014
4015 * gdbserver/linux-low.c (initialize_low): Call
4016 linux_ptrace_init_warnings.
4017
7f216e7c
DE
40182012-07-02 Doug Evans <dje@google.com>
4019
4020 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4021 pointer to int.
4022
d3ce09f5
SS
40232012-07-02 Stan Shebs <stan@codesourcery.com>
4024
4025 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4026 (ax.o): Add it to build rule.
4027 (ax-ipa.o): Ditto.
4028 (OBS): Add format.o.
4029 (IPA_OBS): Add format.o.
4030 * server.c (handle_query): Claim support for breakpoint commands.
4031 (process_point_options): Add command case.
4032 (process_serial_event): Leave running if there are printfs in
4033 effect.
4034 * mem-break.h (any_persistent_commands): Declare.
4035 (add_breakpoint_commands): Declare.
4036 (gdb_no_commands_at_breakpoint): Declare.
4037 (run_breakpoint_commands): Declare.
4038 * mem-break.c (struct point_command_list): New struct.
4039 (struct breakpoint): New field command_list.
4040 (any_persistent_commands): New function.
4041 (add_commands_to_breakpoint): New function.
4042 (add_breakpoint_commands): New function.
4043 (gdb_no_commands_at_breakpoint): New function.
4044 (run_breakpoint_commands): New function.
4045 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4046 locally.
4047 * ax.c: Include format.h.
4048 (ax_printf): New function.
4049 (gdb_eval_agent_expr): Add printf opcode.
4050
2f8f6aed
YQ
40512012-06-13 Yao Qi <yao@codesourcery.com>
4052
4053 * server.c (start_inferior): Remove duplicated writes to fields
4054 'last_resume_kind' and 'last_status' of 'current_inferior'.
4055
0c9070b3
YQ
40562012-06-12 Yao Qi <yao@codesourcery.com>
4057 Pedro Alves <palves@redhat.com>
4058
4059 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4060 comment.
4061 * server.c (handle_v_cont): Extend comment.
4062
c52daf70
YQ
40632012-06-11 Yao Qi <yao@codesourcery.com>
4064
4065 * linux-low.c (linux_attach): Add 'static'.
4066
d38bbb0a
YQ
40672012-06-06 Yao Qi <yao@codesourcery.com>
4068
4069 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4070
89dc0afd
JK
40712012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4072
4073 Fix gcc -flto compilation warning.
4074 * server.c (main): Make variable multi_mode and attach volatile.
4075
75f62ce7
TJB
40762012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4077
4078 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4079 if the platform doesn't know about it.
4080
65f479b6
PA
40812012-05-30 Jeff Kenton <jkenton@tilera.com>
4082
4083 * Makefile.in (SFILES): Add linux-tile-low.c.
4084 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4085 * configure.srv: Handle tilegx-*-linux*.
4086 * linux-tile-low.c: New file.
4087
0c5bf5a9
JK
40882012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4089
4090 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4091
a493e3e2
PA
40922012-05-24 Pedro Alves <palves@redhat.com>
4093
4094 PR gdb/7205
4095
43aaf8b6 4096 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4097
2ea28649
PA
40982012-05-24 Pedro Alves <palves@redhat.com>
4099
4100 PR gdb/7205
4101
4102 Replace target_signal with gdb_signal throughout.
4103
8d409d16
MR
41042012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4105
4106 * linux-low.c (linux_store_registers): Avoid the copying sequence
4107 when no data has been retrieved by ptrace.
4108
23512c01
MGD
41092012-05-22 Will Deacon <will.deacon@arm.com>
4110
4111 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4112 Include asm/ptrace.h.
4113 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4114 already defined.
4115
4934b29e
MR
41162012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4117
4118 * linux-low.c (linux_store_registers): Don't re-retrieve data
4119 with ptrace that has already been obtained from /proc. Always
4120 copy any data retrieved with ptrace to the buffer supplied.
4121
bde24c0a
PA
41222012-05-11 Yao Qi <yao@codesourcery.com>
4123 Pedro Alves <palves@redhat.com>
4124
4125 * linux-low.c (enum stopping_threads_kind): New.
4126 (stopping_threads): Change type to `enum stopping_threads_kind'.
4127 (handle_extended_wait): If stopping and suspending threads, leave
4128 the new_lwp suspended too.
4129 (linux_wait_for_event): Adjust.
4130 (stop_all_lwps): Set `stopping_threads' to
4131 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4132 whether we're suspending threads or just stopping them. Assert no
4133 recursion happens.
4134
623b6bdf
YQ
41352012-04-29 Yao Qi <yao@codesourcery.com>
4136
4137 * server.h: Move some code to ...
4138 * gdbthread.h: ... here. New.
4139 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4140 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4141 (nto-low.o, win32-low.o): Likewise.
4142 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4143 * regcache.c, remote-utils.c, server.c: Likewise.
4144 * target.c, tracepoint.c, win32-low.c: Likewise.
4145
f15f9948
TJB
41462012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4147
4148 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4149 (PTRACE_ARG4_TYPE): Likewise.
4150 (PTRACE_XFER_TYPE): Likewise.
4151 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4152 ptrace to PTRACE_ARG3_TYPE.
4153 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4154 (PTRACE_ARG4_TYPE): Likewise.
4155 (PTRACE_XFER_TYPE): Likewise.
4156 (linux_detach_one_lwp): Cast fourth argument of
4157 ptrace to long then PTRACE_ARG4_TYPE.
4158 (regsets_fetch_inferior_registers): Cast third argument of
4159 ptrace to long then PTRACE_ARG3_TYPE.
4160 (regsets_store_inferior_registers): Likewise.
4161
38ea300a
PA
41622012-04-20 Pedro Alves <palves@redhat.com>
4163
4164 * configure: Regenerate.
4165
c971b7fa
PA
41662012-04-19 Pedro Alves <palves@redhat.com>
4167
43aaf8b6 4168 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4169 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4170 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4171 (all, install-only, uninstall, clean-info, all-lib, clean): No
4172 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4173 (maintainer-clean realclean distclean): Use subdir_do.
4174 (subdir_do): New.
4175 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4176 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4177 * acinclude.m4: Include acx_configure_dir.m4.
4178 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4179 calls. Call AC_PROG_RANLIB. Configure gnulib using
4180 ACX_CONFIGURE_DIR.
4181 (GNULIB): New.
4182 (GNULIB_STDINT_H): Adjust.
4183 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4184 * gdbreplay.c: Include build-gnulib/config.h.
4185 * server.h: Likewise.
4186 * aclocal.m4: Regenerate.
4187 * config.in: Regenerate.
4188 * configure: Regenerate.
c971b7fa 4189
809277f8
PA
41902012-04-19 Pedro Alves <palves@redhat.com>
4191
4192 * Makefile.in (LIBGNU, INCGNU): Adjust.
4193 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4194 (all, install-only, uninstall, clean-info, all-lib, clean)
4195 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4196 * configure.ac: Adjust AC_OUTPUT output.
4197 * aclocal.m4: Regenerate.
4198 * configure: Regenerate.
4199
fd9bb8b8
PA
42002012-04-19 Pedro Alves <palves@redhat.com>
4201
4202 * Makefile.in (generated_files): New.
4203 (server_h): Remove the explicit dependency on config.h, and depend
4204 on $generated_files.
4205
1c298c66
PA
42062012-04-19 Pedro Alves <palves@redhat.com>
4207
4208 * Makefile.in (INCGNU): Add -Ignulib.
4209
57c4b50b
PA
42102012-04-19 Pedro Alves <palves@redhat.com>
4211
4212 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4213 (INCGNU): ... this, and spell out -I here.
4214 (GNULIB_LIB): Rename to ...
4215 (LIBGNU): ... this.
4216 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4217
1030e047
PA
42182012-04-19 Pedro Alves <palves@redhat.com>
4219
4220 * config.in: Regenerate.
4221
447d4319
PA
42222012-04-19 Pedro Alves <palves@redhat.com>
4223
4224 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4225 * server.h (memmem): Remove declaration.
4226 * config.in: Regenerate.
4227 * configure: Regenerate.
4228
aad9eab9
YQ
42292012-04-19 Yao Qi <yao@codesourcery.com>
4230
4231 * Makefile.in (SFILES): Add common/vec.c.
4232 (OBS): Add vec.o.
4233 (vec.o): New rule.
4234
3e10640f
YQ
42352012-04-19 Yao Qi <yao@codesourcery.com>
4236
4237 * remote-utils.c (prepare_resume_reply): Replace with macro
4238 target_core_of_thread.
4239 * server.c (handle_qxfer_threads_proper): Likewise.
4240 * target.h (traget_core_of_thread): New macro.
4241
71622373
PA
42422012-04-18 Pedro Alves <palves@redhat.com>
4243
4244 * aclocal.m4: Regenerate.
4245 * configure: Regenerate.
4246
80d26939
YQ
42472012-04-16 Yao Qi <yao@codesourcery.com>
4248
4249 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4250 duplicated on address.
4251
42476b70
YQ
42522012-04-16 Yao Qi <yao@codesourcery.com>
4253
4254 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4255 (struct tracepoint_action_ops) <send>: New field.
4256 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4257 (agent_expr_send, x_tracepoint_action_send): New.
4258 (l_tracepoint_action_send): New.
4259 (cmd_qtdp): Download and install tracepoint
4260 according to `use_agent'.
4261 (run_inferior_command): Add one more parameter `len'.
4262 Update callers.
4263 (tracepoint_send_agent): New.
4264 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4265
7bc83639
YQ
42662012-04-16 Yao Qi <yao@codesourcery.com>
4267
4268 * tracepoint.c (download_tracepoints): Moved to ...
4269 (cmd_qtstart): ... here.
4270
5f18041e
YQ
42712012-04-14 Yao Qi <yao@codesourcery.com>
4272
4273 * tracepoint.c: Include inttypes.h.
4274 (struct collect_memory_action): Use sized types.
4275 (struct tracepoint): Likewise.
4276 (cmd_qtdp, stop_tracing): Update print specifiers.
4277 (cmd_qtp, response_tracepoint): Likewise.
4278 (collect_data_at_tracepoint): Likewise.
4279 (collect_data_at_step): Likewise.
4280
55a8c076
YQ
42812012-04-14 Yao Qi <yao@codesourcery.com>
4282
4283 Import gnulib module inttypes.
4284 * aclocal.m4, config.in, configure: Regenerated.
4285
dc750257
YQ
42862012-04-14 Yao Qi <yao@codesourcery.com>
4287
4288 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4289 Makefile and config.status at last.
4290
0ab5faf9
YQ
42912012-04-13 Yao Qi <yao@codesourcery.com>
4292
4293 * tracepoint.c: Include stdint.h unconditionally.
4294
18f5fd81
TJB
42952012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4296
4297 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4298 on BFD_HAVE_SYS_PROCFS_TYPE.
4299 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4300 * configure: Regenerate.
4301 * config.in: Likewise.
4302
4d47af5c
L
43032012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4304
4305 * Makefile.in (clean): Also remove x32.c x32-linux.c
4306 x32-avx.c x32-avx-linux.c.
4307 (x32.o): New target.
4308 (x32.c): Likewise.
4309 (x32-linux.o): Likewise.
4310 (x32-linux.c): Likewise.
4311 (x32-avx.o): Likewise.
4312 (x32-avx.c): Likewise.
4313 (x32-avx-linux.o): Likewise.
4314 (x32-avx-linux.c): Likewise.
4315
4316 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4317 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4318 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4319 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4320 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4321 i386/x32-avx-linux.xml.
4322
4323 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4324 (init_registers_x32_avx_linux): Likwise.
4325 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4326 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4327
ecedbe58
PA
43282012-04-13 Pedro Alves <palves@redhat.com>
4329
4330 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4331 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4332 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4333 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4334 the sub-make.
4335
c92b5177
L
43362012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4337
4338 * linux-x86-low.c (compat_x32_clock_t): New.
4339 (compat_x32_siginfo_t): Likewise.
4340 (compat_x32_siginfo_from_siginfo): Likewise.
4341 (siginfo_from_compat_x32_siginfo): Likewise.
4342 (linux_is_elf64): Likewise.
4343 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4344 and siginfo_from_compat_x32_siginfo for x32.
4345 (x86_arch_setup): Set linux_is_elf64.
4346
214d508e
L
43472012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4348
4349 PR gdb/13969
4350 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4351 e_machine field.
4352 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4353 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4354 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4355 compatible with process.
4356
c9a1864a
YQ
43572012-04-12 Yao Qi <yao@codesourcery.com>
4358
4359 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4360 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4361 (install-only, install-info, clean): Handle sub dir gnulib.
4362 (all-lib, am--refresh): New targets.
4363 (memmem.o): Remove target.
4364 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4365 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4366 (AC_REPLACE_FUNCS): Remove memmem.
4367 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4368 (AC_OUTPUT): Generate Makefile in gnulib/.
4369 * aclocal.m4, config.in, configure: Regenerated.
4370
367ba2c2
MR
43712012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4372
4373 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4374
9d236627
PA
43752012-04-05 Pedro Alves <palves@redhat.com>
4376
4377 -Werror=strict-aliasing
4378
4379 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4380 pointer.
4381
111217b3
PA
43822012-04-04 Pedro Alves <palves@redhat.com>
4383
4384 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4385 (sparc_store_gregset_from_stack, sparc_store_gregset)
4386 (sparc_breakpoint_at): Fix formatting.
4387
8365dcf5
TJB
43882012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4389
4390 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4391 are available.
4392 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4393 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4394 * config.in: Regenerate.
4395 * configure: Likewise.
4396
689cc2ae
PA
43972012-03-29 Pedro Alves <palves@redhat.com>
4398
4399 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4400 Correct ptrace arguments.
4401
c14dfd32
PA
44022012-03-28 Pedro Alves <palves@redhat.com>
4403
4404 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4405 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4406 (IA64_FR1_REGNUM): New defines.
4407 (ia64_fetch_register): New.
4408 (the_low_target): Install it.
4409 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4410 field.
4411 * linux-low.c (linux_fetch_registers): Try the
4412 the_low_target.fetch_register hook first.
4413
4414 * linux-arm-low.c (the_low_target): Adjust.
4415 * linux-bfin-low.c (the_low_target): Adjust.
4416 * linux-cris-low.c (the_low_target): Adjust.
4417 * linux-crisv32-low.c (the_low_target): Adjust.
4418 * linux-m32r-low.c (the_low_target): Adjust.
4419 * linux-m68k-low.c (the_low_target): Adjust.
4420 * linux-mips-low.c (the_low_target): Adjust.
4421 * linux-ppc-low.c (the_low_target): Adjust.
4422 * linux-s390-low.c (the_low_target): Adjust.
4423 * linux-sh-low.c (the_low_target): Adjust.
4424 * linux-sparc-low.c (the_low_target): Adjust.
4425 * linux-tic6x-low.c (the_low_target): Adjust.
4426 * linux-x86-low.c (the_low_target): Adjust.
4427 * linux-xtensa-low.c (the_low_target): Adjust.
4428
63c88e13
PA
44292012-03-26 Pedro Alves <palves@redhat.com>
4430
4431 * server.c (handle_qxfer_libraries): Don't bail early if
4432 the_target->qxfer_libraries_svr4 is not NULL.
4433
fb723180
PA
44342012-03-26 Pedro Alves <palves@redhat.com>
4435
4436 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4437
0afae3cf
PA
44382012-03-23 Pedro Alves <palves@redhat.com>
4439
4440 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4441 "library-list-svr4" element's start tag when the the DSO list is
4442 empty.
4443
485f1ee4
PA
44442012-03-23 Pedro Alves <palves@redhat.com>
4445
4446 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4447 a variable whose type size is the same as the inferior's pointer
4448 size.
4449
a5362b9a
TS
44502012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4451
4452 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4453 struct siginfo.
4454 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4455 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4456 * linux-low.h: Include <signal.h>.
4457 (struct siginfo): Remove forward declaration.
4458 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4459 struct siginfo.
4460
d226c142
MF
44612012-03-21 Mike Frysinger <vapier@gentoo.org>
4462
4463 * .gitignore: Ignore more files.
4464
122f36ef
PA
44652012-03-19 Pedro Alves <palves@redhat.com>
4466 Jan Kratochvil <jan.kratochvil@redhat.com>
4467
4468 * server.c (cont_thread, general_thread): Add describing comments.
4469 (start_inferior): Clear `cont_thread'.
4470 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4471 of a process.
4472
fc3e5175
YQ
44732012-03-15 Yao Qi <yao@codesourcery.com>
4474
4475 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4476 handling to ...
4477 (cmd_qtdp): ... here.
4478
8d0d92cd
YQ
44792012-03-15 Yao Qi <yao@codesourcery.com>
4480
4481 * tracepoint.c (struct tracepoint_action_ops): New.
4482 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4483 (m_tracepoint_action_download): New.
4484 (r_tracepoint_action_download): New.
4485 (x_tracepoint_action_download): New.
4486 (l_tracepoint_action_download): New.
4487 (add_tracepoint_action): Install `action->ops' according type.
4488 (download_tracepoint_1): Move code `download' function pointer
4489 of various tracepoint_action_ops.
4490
87b0bb13
JK
44912012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4492
4493 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4494 linux_ptrace_attach_warnings.
4495
5f572dec
JK
44962012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4497
4498 * Makefile.in (linux-ptrace.o): New.
4499 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4500 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4501 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4502 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4503 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4504 of these targets.
4505 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4506
f4647387
YQ
45072012-03-08 Yao Qi <yao@codesourcery.com>
4508 Pedro Alves <palves@redhat.com>
4509
4510 Fix PR server/13392.
4511 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4512 offset of JMP insn.
4513 * tracepoint.c (remove_tracepoint): New.
4514 (cmd_qtdp): Call remove_tracepoint when failed to install.
4515
9b224c5e
PA
45162012-03-07 Pedro Alves <palves@redhat.com>
4517
4518 * linux-low.c (get_detach_signal): New.
4519 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4520 Pass on pending signals to PTRACE_DETACH. Check the result of the
4521 ptrace call.
4522 * server.c (program_signals, program_signals_p): New.
4523 (handle_general_set): Handle QProgramSignals.
4524 * server.h (program_signals, program_signals_p): Declare.
4525
e237a7e2
JK
45262012-03-05 Pedro Alves <palves@redhat.com>
4527 Jan Kratochvil <jan.kratochvil@redhat.com>
4528
4529 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4530 New comment why.
4531
5808517f
YQ
45322012-03-03 Yao Qi <yao@codesourcery.com>
4533
4534 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4535 agent_look_up_symbols.
4536
58b4daa5
YQ
45372012-03-03 Yao Qi <yao@codesourcery.com>
4538
4539 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4540 (linux-x86-low.o): Likewise.
4541 * server.h: Remove in_process_agent_loaded.
4542 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4543 common/agent.c.
4544 Update callers.
4545
8ffcbaaf
YQ
45462012-03-03 Yao Qi <yao@codesourcery.com>
4547
4548 * tracepoint.c (gdb_agent_capability): New global.
4549 (in_process_agent_loaded_ust): Renamed to
4550 `in_process_agent_supports_ust'.
4551 Update callers.
4552 (in_process_agent_supports_ust): Call agent_capability_check.
4553 (clear_installed_tracepoints): Assert that agent supports
4554 agent.
4555
d1feda86
YQ
45562012-03-03 Yao Qi <yao@codesourcery.com>
4557
4558 * linux-low.c (linux_supports_agent): New.
4559 (linux_target_ops): Initialize field `supports_agent' with
4560 linux_supports_agent.
4561 * target.h (struct target_ops) <supports_agent>: New.
4562 (target_supports_agent): New macro.
4563 * server.c (handle_general_set): Handle packet 'QAgent'.
4564 (handle_query): Send `QAgent+'.
4565 * Makefile.in (server.o): Depends on agent.h.
4566
2fa291ac
YQ
45672012-03-03 Yao Qi <yao@codesourcery.com>
4568
4569 * Makefile.in (OBS): Add agent.o.
4570 Add new rule for agent.o.
4571 Track dependence of tracepoint.c on agent.h.
4572 * tracepoint.c (run_inferior_command_1):
4573 (run_inferior_command): Call agent_run_command.
4574 (gdb_ust_connect_sync_socket): Deleted. Move it to
4575 common/agent.c.
4576 (resume_thread, stop_thread): Likewise.
4577 (gdb_ust_socket_init): Renamed to ...
4578 (gdb_agent_socket_init): ... New.
4579 (gdb_ust_thread): Renamed to ...
4580 (gdb_agent_helper_thread): ... New.
4581 (gdb_ust_init): Move some code to ...
4582 (gdb_agent_init): ... here. New.
4583 [HAVE_UST]: Call gdb_ust_init.
4584 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4585 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4586 * config.in, configure: Regenerated.
4587
05044653
PA
45882012-03-02 Pedro Alves <palves@redhat.com>
4589
4590 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4591 * linux-low.c (struct simple_pid_list): New.
4592 (stopped_pids): New a struct simple_pid_list pointer.
4593 (add_to_pid_list, pull_pid_from_list): New.
4594 (handle_extended_wait): Don't assume the first signal new children
4595 report is SIGSTOP. Adjust call to pull_pid_from_list.
4596 (linux_wait_for_lwp): Adjust.
4597
8d00225b
YQ
45982012-03-02 Yao Qi <yao@codesourcery.com>
4599
4600 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4601 debug log.
4602
19560ba5
YQ
46032012-03-02 Yao Qi <yao@codesourcery.com>
4604
4605 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4606 `stop_pc' and `tpoint'. Update caller.
4607
1faeff08
MR
46082012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4609
4610 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4611 * linux-low.c (use_linux_regsets): New macro.
4612 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4613 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4614 (linux_register_in_regsets): New function.
4615 (usr_fetch_inferior_registers): Skip registers covered by
4616 regsets.
4617 (usr_store_inferior_registers): Likewise.
4618 (usr_fetch_inferior_registers): New macro.
4619 (usr_store_inferior_registers): Likewise.
4620 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4621 (linux_store_registers): Likewise.
4622 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4623 prototype.
4624 (init_registers_mips64_dsp_linux): Likewise.
4625 (init_registers_mips_linux): New macro.
4626 (init_registers_mips_dsp_linux): Likewise.
4627 (mips_dsp_num_regs): Likewise.
4628 (DSP_BASE, DSP_CONTROL): New fallback macros.
4629 (mips_base_regs): New macro.
4630 (mips_regmap): Use it. Fix the size.
4631 (mips_dsp_regmap): New variable.
4632 (mips_dsp_regset_bitmap): Likewise.
4633 (mips_arch_setup): New function.
4634 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4635 than mips_regmap.
4636 (mips_cannot_store_register): Likewise.
4637 (the_low_target): Update .arch_setup, .num_regs and .regmap
4638 initializers. Add .regset_bitmap initializer.
4639 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4640 initializer.
4641 * linux-bfin-low.c (the_low_target): Likewise.
4642 * linux-cris-low.c (the_low_target): Likewise.
4643 * linux-crisv32-low.c (the_low_target): Likewise.
4644 * linux-ia64-low.c (the_low_target): Likewise.
4645 * linux-m32r-low.c (the_low_target): Likewise.
4646 * linux-m68k-low.c (the_low_target): Likewise.
4647 * linux-ppc-low.c (the_low_target): Likewise.
4648 * linux-s390-low.c (the_low_target): Likewise.
4649 * linux-sh-low.c (the_low_target): Likewise.
4650 * linux-sparc-low.c (the_low_target): Likewise.
4651 * linux-tic6x-low.c (the_low_target): Likewise.
4652 * linux-x86-low.c (the_low_target): Likewise.
4653 * linux-xtensa-low.c (the_low_target): Likewise.
4654 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4655 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4656 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4657 srv_xmlfiles.
4658 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4659 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4660
c03e6ccc
YQ
46612012-02-29 Yao Qi <yao@codesourcery.com>
4662 Pedro Alves <palves@redhat.com>
4663
4664 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4665 `step_over_finished' is true.
4666
644cebc9
PA
46672012-02-27 Pedro Alves <palves@redhat.com>
4668
4669 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4670 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4671
c14d7ab2
PA
46722012-02-27 Pedro Alves <palves@redhat.com>
4673
4674 PR server/9684
4675 * linux-low.c (pid_is_stopped): New.
4676 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4677
412c89dd
LM
46782012-02-25 Luis Machado <lgustavo@codesourcery.com>
4679
4680 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4681 of conditions.
4682
b745defe
MR
46832012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4684
4685 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4686
9f3a5c85
LM
46872012-02-24 Luis Machado <lgustavo@codesourcery>
4688
4689 * server.c (handle_query): Advertise support for target-side
4690 breakpoint condition evaluation.
4691 (process_point_options): New function.
4692 (process_serial_event): When inserting a breakpoint, check for
4693 a target-side condition that should be evaluated.
4694
4695 * mem-break.c: Include regcache.h and ax.h.
4696 (point_cond_list_t): New data structure.
4697 (breakpoint) <cond_list>: New field.
4698 (find_gdb_breakpoint_at): Make non-static.
4699 (delete_gdb_breakpoint_at): Clear any target-side
4700 conditions.
4701 (clear_gdb_breakpoint_conditions): New function.
4702 (add_condition_to_breakpoint): Likewise.
4703 (add_breakpoint_condition): Likewise.
4704 (gdb_condition_true_at_breakpoint): Likewise.
4705 (gdb_breakpoint_here): Return result directly instead
4706 of going through a local variable.
4707
4708 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4709 (clear_gdb_breakpoint_conditions): Likewise.
4710 (add_breakpoint_condition): Likewise.
4711 (gdb_condition_true_at_breakpoint): Likewise.
4712
4713 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4714 (need_step_over_p): Take target-side breakpoint condition into
4715 consideration.
4716
5e1dc496
LM
47172012-02-24 Luis Machado <lgustavo@codesourcery>
4718
4719 * server.h: Include tracepoint.h.
4720 (agent_mem_read, agent_get_trace_state_variable_value,
4721 agent_set_trace_state_variable_value,
4722 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4723 get_set_tsv_func_addr): New prototypes.
4724
4725 * ax.h: New include file.
4726 * ax.c: New source file.
4727
4728 * tracepoint.c: Include ax.h.
4729 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4730 agent_expr, eval_result_type): Move to ax.h.
4731 (parse_agent_expr): Rename to ...
4732 (gdb_parse_agent_expr): ... this, make it non-static and move
4733 to ax.h.
4734 (unparse_agent_expr) Rename to ...
4735 (gdb_unparse_agent_expr): ... this, make it non-static and move
4736 to ax.h.
4737 (eval_agent_expr): Rename to ...
4738 (eval_tracepoint_agent_expr): ... this.
4739 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4740 forward declarations.
4741 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4742 (agent_get_trace_state_variable_value): New function.
4743 (agent_set_trace_state_variable_value): New function.
4744 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4745 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4746 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4747 (condition_true_at_tracepoint): Likewise.
4748 (parse_agent_expr): Rename to ...
4749 (gdb_parse_agent_expr): ... this and move to ax.c.
4750 (unparse_agent_expr): Rename to ...
4751 (gdb_unparse_agent_expr): ... this and move to ax.c.
4752 (gdb_agent_op_name): Move to ax.c.
4753 (eval_agent_expr): Rename to ...
4754 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4755 and move to ax.c.
4756 (eval_tracepoint_agent_expr): New function.
4757 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4758 non-static.
5e1dc496
LM
4759 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4760 ax.c.
4761 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4762 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4763 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4764 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4765 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4766 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4767 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4768 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4769 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4770 (compile_bytecodes): Remove forward declaration.
4771 (is_goto_target): Move to ax.c.
4772 (compile_bytecodes): Move to ax.c and call
4773 agent_get_trace_state_variable_value (...) and
4774 agent_set_trace_state_variable_value (...).
4775
4776 * Makefile.in: Update ax.c and IPA dependencies.
4777
277e4e52
PA
47782012-02-24 Pedro Alves <palves@redhat.com>
4779
4780 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4781 (cmd_bigqtbuffer_circular): ... this. Only handle
4782 'QTBuffer:circular:'.
4783 (handle_tracepoint_general_set): Adjust.
4784
bf4c19f7
YQ
47852012-02-16 Yao Qi <yao@codesourcery.com>
4786
4787 * inferiors.c: Move code to ...
4788 * dll.c: .... here. New.
4789 * server.h: Declare clear_dlls.
4790 * Makefile.in (SFILES): Add dll.c.
4791 (OBS): Add dll.o
4792 (dll.o): New rule.
4793
d73f2619
YQ
47942012-02-11 Yao Qi <yao@codesourcery.com>
4795
4796 * server.c: (handle_monitor_command): Add a new parameter
4797 `own_buf'.
4798 (handle_query): Update caller.
4799
f8255c2a
JB
48002012-02-09 Joel Brobecker <brobecker@adacore.com>
4801
4802 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4803 * configure, config.in: Regenerate.
4804 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4805 is not defined.
4806
da84f473
PA
48072012-02-02 Pedro Alves <palves@redhat.com>
4808
4809 Try SIGKILL first, then PTRACE_KILL.
4810 * linux-low.c (linux_kill_one_lwp): New.
4811 (linux_kill_one_lwp): Rename to ...
4812 (kill_one_lwp_callback): ... this. Use the new
4813 linux_kill_one_lwp.
4814
e886a173
PA
48152012-02-02 Pedro Alves <palves@redhat.com>
4816
4817 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4818 inferior.
4819
be07f1a2
PA
48202012-01-27 Pedro Alves <palves@redhat.com>
4821
4822 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4823 (elf_64_file_p): Make static.
4824 (linux_pid_exe_is_elf_64_file): New.
4825 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4826 Delete declarations.
4827 (linux_pid_exe_is_elf_64_file): Declare.
4828 * linux-x86-low.c (x86_arch_setup): Use
4829 linux_pid_exe_is_elf_64_file.
4830
d8301ad1
JK
48312012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4832
4833 * linux-low.c (linux_wait_for_event_1): Rename to ...
4834 (linux_wait_for_event): ... here and merge it with former
4835 linux_wait_for_event - new variable wait_ptid, use it.
4836 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4837
01b17894
PA
48382012-01-23 Pedro Alves <palves@redhat.com>
4839
4840 * server.c (main): Avoid yet another case of infinite loop while
4841 detaching/killing after a longjmp.
4842
e825046f
JK
48432012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4844
4845 Code cleanup.
4846 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4847
b9e7b9c3
UW
48482012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4849
4850 * hostio.c (handle_readlink): New function.
4851 (handle_vFile): Call it to handle "vFile:readlink" packets.
4852
901f9912
UW
48532012-01-20 Pedro Alves <palves@redhat.com>
4854 Ulrich Weigand <ulrich.weigand@linaro.org>
4855
4856 * server.c (handle_v_requests): Only support vAttach and vRun to
4857 start multiple processes when in extended protocol mode.
4858
fc1ab1a0
PA
48592012-01-17 Pedro Alves <palves@redhat.com>
4860
4861 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4862 memalign plus mprotect to allocate the scratch buffer.
4863
7d5d4e98
PA
48642012-01-13 Pedro Alves <palves@redhat.com>
4865
4866 * server.c (attach_inferior): Clear `cont_thread'.
4867
f128d5e9
PA
48682012-01-13 Pedro Alves <palves@redhat.com>
4869
4870 * server.c (main): Avoid infinite loop while detaching/killing
4871 after a longjmp.
4872
06db92f0
DE
48732012-01-09 Doug Evans <dje@google.com>
4874
4875 * server.c (start_inferior): Set last_ptid in --wrapper case.
4876
32d92999
YQ
48772012-01-06 Yao Qi <yao@codesourcery.com>
4878
4879 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4880 defined.
4881 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4882
5e0a92a9
YQ
48832012-01-04 Yao Qi <yao@codesourcery.com>
4884
4885 * tracepoint.c (cmd_qtdp): Print debug message
4886 for static tracepoint.
4887
ae639e8c
YQ
48882012-01-04 Yao Qi <yao@codesourcery.com>
4889
4890 * tracepoint.c (trace_vdebug): Differentiate debug message
4891 between gdbserver and IPA.
4892
f72429c5
YQ
48932012-01-03 Yao Qi <yao@codesourcery.com>
4894
4895 * tracepoint.c (tracepoint_was_hit): Don't collect for
4896 static tracepoint.
4897
12c3e59c
JB
48982012-01-02 Joel Brobecker <brobecker@adacore.com>
4899
4900 * terminal.h: Reformat copyright header.
4901
67827812
JB
49022012-01-02 Joel Brobecker <brobecker@adacore.com>
4903
4904 * server.c (gdbserver_version): Update copyright year.
4905 * gdbreplay.c (gdbreplay_version): Likewise.
4906
3e52c33d
JK
49072011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4908
4909 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4910
4911 Revert:
4912 2011-12-18 Hui Zhu <teawater@gmail.com>
4913 * linux-low.c (linux_create_inferior): Save return value to ret.
4914
66f1260e
HZ
49152011-12-18 Hui Zhu <teawater@gmail.com>
4916
4917 * linux-low.c (linux_create_inferior): Save return value to ret.
4918
e77616d7
DE
49192011-12-16 Doug Evans <dje@google.com>
4920
e7b06c57
DE
4921 * linux-low.c (linux_create_inferior): If stdio connection,
4922 redirect stdin from /dev/null, stdout to stderr.
4923 * remote-utils.c (remote_is_stdio): New static global.
4924 (remote_connection_is_stdio): New function.
4925 (remote_prepare): Handle stdio connection.
4926 (remote_open): Ditto.
4927 (remote_close): Don't close stdin for stdio connections.
4928 (read_prim,write_prim): New functions. Replace all calls to
4929 read/write to these.
4930 * server.c (main): Watch for "-" argument. Move call to
4931 remote_prepare before start_inferior.
4932 * server.h (STDIO_CONNECTION_NAME): New macro.
4933 (remote_connection_is_stdio): Declare.
4934
e77616d7
DE
4935 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4936 in debugging output.
4937
82067193
YQ
49382011-12-15 Yao Qi <yao@codesourcery.com>
4939
4940 * tracepoint.c: Include sys/syscall.h.
4941 (gdb_ust_thread): Remove preprocessor conditional.
4942
82bfbe7e
PA
49432011-12-14 Pedro Alves <pedro@codesourcery.com>
4944
4945 * linux-low.c (linux_detach_one_lwp): Call
4946 the_low_target.prepare_to_resume before detaching.
4947
712c6575
YQ
49482011-12-14 Yao Qi <yao@codesourcery.com>
4949
4950 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4951 of write.
4952
d54d1edf
YQ
49532011-12-14 Yao Qi <yao@codesourcery.com>
4954
4955 * i386-low.c (i386_low_stopped_data_address): Initialize local
4956 variable `control'.
4957
6210a125
PA
49582011-12-13 Pedro Alves <pedro@codesourcery.com>
4959
4960 PR remote/13492
4961
4962 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4963 DR_CONTROL unless necessary. Extend comments.
4964 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4965 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4966
2ece8244
YQ
49672011-12-13 Yao Qi <yao@codesourcery.com>
4968
4969 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4970 macros.
4971 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4972
784867a5
JK
49732011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4974
4975 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4976 Print new debug message for such case.
4977
6bf36717
JK
49782011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4979
4980 Fix overlapping memcpy.
4981 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4982 the read_inferior_memory transfer.
4983 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4984 write_inferior_memory transfer.
4985 (set_fast_tracepoint_jump): New variable buf. Use it for the
4986 read_inferior_memory and write_inferior_memory transfers.
4987 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4988 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4989 Use it for the write_inferior_memory transfer.
4990 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4991 buffers.
4992
50275556
MR
49932011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4994
4995 * linux-low.c (fetch_register, store_register): Make code
4996 consistent, fix formatting.
4997
7325beb4
MR
49982011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4999
5000 * linux-low.c (usr_store_inferior_registers): Factor out code
5001 to handle individual registers into...
5002 (store_register): ... this new function.
5003
c642a434
UW
50042011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5005
5006 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5007 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5008 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5009 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5010 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5011 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5012 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5013 (srv_xmlfiles): Add new XML files.
5014
5015 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5016 and <sys/uio.h>.
5017 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5018 (init_registers_s390_linux32v1): Add prototype.
5019 (init_registers_s390_linux32v2): Likewise.
5020 (init_registers_s390_linux64v1): Likewise.
5021 (init_registers_s390_linux64v2): Likewise.
5022 (init_registers_s390x_linux64v1): Likewise.
5023 (init_registers_s390x_linux64v2): Likewise.
5024 (s390_num_regs): Increment to 52.
5025 (s390_regmap): Add orig_r2 register.
5026 (s390_num_regs_3264): Increment to 68.
5027 (s390_regmap_3264): Add orig_r2 register.
5028 (s390_collect_ptrace_register): Handle orig_r2 register.
5029 (s390_supply_ptrace_register): Likewise.
5030 (s390_fill_last_break): New function.
5031 (s390_store_last_break): Likewise.
5032 (s390_fill_system_call): New function.
5033 (s390_store_system_call): Likewise.
5034 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5035 register sets.
5036 (s390_check_regset): New function.
5037 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5038 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5039 Update target_regsets for available register sets.
5040
2268b414
JK
50412011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5042 Jan Kratochvil <jan.kratochvil@redhat.com>
5043
5044 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5045 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5046 New.
5047 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5048 * linux-low.h (struct process_info_private): New member r_debug.
5049 * server.c (handle_qxfer_libraries): Call
5050 the_target->qxfer_libraries_svr4.
5051 (handle_qxfer_libraries_svr4): New function.
5052 (qxfer_packets): New entry "libraries-svr4".
5053 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5054 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5055 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5056 PACKET_qXfer_libraries_svr4.
5057
d6db1fab
UW
50582011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5059
5060 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5061 PSW address/mask between 8-byte and 16-byte formats.
5062 (s390_supply_ptrace_register): Likewise.
5063 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5064 basic addressing mode bit.
5065
242f5f1c
SS
50662011-11-24 Stan Shebs <stan@codesourcery.com>
5067
5068 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5069
f196051f
SS
50702011-11-17 Stan Shebs <stan@codesourcery.com>
5071
5072 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5073 (tracing_start_time): New global.
5074 (tracing_stop_time): New global.
5075 (tracing_user_name): New global.
5076 (tracing_notes): New global.
5077 (tracing_stop_note): New global.
5078 (cmd_qtstart): Set traceframe_usage, start_time.
5079 (stop_tracing): Set stop_time.
5080 (cmd_qtstatus): Report additional status.
5081 (cmd_qtp): New function.
5082 (handle_tracepoint_query): Call it.
5083 (cmd_qtnotes): New function.
5084 (handle_tracepoint_general_set): Call it.
5085 (get_timestamp): Rename from tsv_get_timestamp.
5086
405f8e94
SS
50872011-11-14 Stan Shebs <stan@codesourcery.com>
5088 Kwok Cheung Yeung <kcy@codesourcery.com>
5089
5090 * linux-x86-low.c (small_jump_insn): New.
5091 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5092 trampoline and error message, build a trampoline and issue a small
5093 jump instruction to it.
5094 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5095 trampoline and error message.
5096 (x86_get_min_fast_tracepoint_insn_len): New.
5097 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5098 * linux-low.h (struct linux_target_ops): Add arguments to
5099 install_fast_tracepoint_jump_pad operation, add new operation.
5100 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5101 arguments.
5102 (linux_get_min_fast_tracepoint_insn_len): New function.
5103 (linux_target_op): Add new operation.
5104 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5105 (gdb_trampoline_buffer_end): Ditto.
5106 (gdb_trampoline_buffer_error): Ditto.
5107 (struct ipa_sym_addresses): Add fields for new IPA variables.
5108 (symbol_list): Add entries for new IPA variables.
5109 (struct tracepoint): Add fields to hold the address range of the
5110 trampoline used by the tracepoint.
5111 (trampoline_buffer_head): New static variable.
5112 (trampoline_buffer_tail): Ditto.
5113 (claim_trampoline_space): New function.
5114 (have_fast_tracepoint_trampoline_buffer): New function.
5115 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5116 structure.
5117 (install_fast_tracepoint): Ditto, also add error buffer argument.
5118 (cmd_qtminftpilen): New function.
5119 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5120 (fast_tracepoint_from_trampoline_address): New function.
5121 (fast_tracepoint_collecting): Handle trampoline as part of jump
5122 pad space.
5123 (set_trampoline_buffer_space): New function.
5124 (initialize_tracepoint): Initialize new IPA variables.
5125 * target.h (struct target_ops): Add arguments to
5126 install_fast_tracepoint_jump_pad operation, add new
5127 get_min_fast_tracepoint_insn_len operation.
5128 (target_get_min_fast_tracepoint_insn_len): New.
5129 (install_fast_tracepoint_jump_pad): Add arguments.
5130 * server.h (IPA_BUFSIZ): Define.
5131 * linux-i386-ipa.c: Include extra header files.
5132 (initialize_fast_tracepoint_trampoline_buffer): New function.
5133 (initialize_low_tracepoint): Call it.
5134 * server.h (set_trampoline_buffer_space): Declare.
5135 (claim_trampoline_space): Ditto.
5136 (have_fast_tracepoint_trampoline_buffer): Ditto.
5137
1e4d1764
YQ
51382011-11-14 Yao Qi <yao@codesourcery.com>
5139
5140 * server.c (handle_query): Handle InstallInTrace for qSupported.
5141 * tracepoint.c (add_tracepoint): Sort list.
5142 (install_tracepoint, download_tracepoint): New.
5143 (cmd_qtdp): Call them to install and download tracepoints.
5144 (sort_tracepoints): Removed.
5145 (cmd_qtstart): Update.
5146
5c73ff4e
YQ
51472011-11-14 Yao Qi <yao@codesourcery.com>
5148
5149 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5150 * mem-break.h: Declare.
5151 * tracepoint.c (cmd_qtstart): Move some code to ...
5152 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5153 New.
5154 (download_tracepoints): Move some code to ...
5155 (download_tracepoint_1): ... here. New.
5156
86a30030
YQ
51572011-11-08 Yao Qi <yao@codesourcery.com>
5158
5159 * remote-utils.c (relocate_instruction): A comment fix.
5160
8d26e50c
JB
51612011-11-07 Joel Brobecker <brobecker@adacore.com>
5162
5163 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5164 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5165 dr_status_mirror and dr_control_mirror from debug_reg_state.
5166 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5167 (i386_initial_stuff): Remove use of deleted globals.
5168 (i386_get_thread_context, i386_set_thread_context,
5169 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5170 from debug_reg_state.
5171
a59306a3
YQ
51722011-11-05 Yao Qi <yao@codesourcery.com>
5173
5174 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5175 address as TPOINT's.
5176
3065dfb6
SS
51772011-11-02 Stan Shebs <stan@codesourcery.com>
5178
5179 * tracepoint.c (agent_mem_read_string): New function.
5180 (eval_agent_expr): Call it for tracenz.
5181 * server.c (handle_query): Report support for tracenz.
5182
fd0d8c7c
YQ
51832011-11-02 Yao Qi <yao@codesourcery.com>
5184
5185 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5186
609086b1
YQ
51872011-11-02 Yao Qi <yao@codesourcery.com>
5188
5189 * target.h: Fix a typo in comment.
5190
b9fd1791
PA
51912011-10-31 Pedro Alves <pedro@codesourcery.com>
5192
5193 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5194 clobber the breakpoints' shadows with fast tracepoint jumps.
5195 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5196 * target.c (write_inferior_memory): Also pass MYADDR down to
5197 check_mem_write.
5198
03583c20
UW
51992011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5200
5201 * configure.ac: Check support for personality routine.
5202 * configure: Regenerate.
5203 * config.in: Likewise.
5204 * linux-low.c: Include <sys/personality.h>.
5205 Define ADDR_NO_RANDOMIZE if necessary.
5206 (linux_create_inferior): Disable address space randomization when
5207 forking inferior, if requested.
5208 (linux_supports_disable_randomization): New function.
5209 (linux_target_ops): Install it.
5210 * server.h (disable_randomization): Declare.
5211 * server.c (disable_randomization): New global variable.
5212 (handle_general_set): Handle QDisableRandomization.
5213 (handle_query): Likewise for qSupported.
5214 (main): Support --disable-randomization and --no-disable-randomization
5215 command line arguments.
5216 * target.h (struct target_ops): Add supports_disable_randomization.
5217 (target_supports_disable_randomization): New macro.
5218
723b724b
MF
52192011-09-29 Mike Frysinger <vapier@gentoo.org>
5220
5221 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5222 ifdef check.
5223 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5224 [!PT_GETDSBT] (target_loadmap): New definition.
5225 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5226 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5227 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5228 and PT_GETDSBT to LINUX_LOADMAP.
5229 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5230 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5231
55329a5c 52322011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5233
5234 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5235 (arm_linux_hwbp_cap): New static variable.
5236 (arm_linux_get_hwbp_cap): Replace by ...
5237 (arm_linux_init_hwbp_cap): ... this new function.
5238 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5239 (arm_linux_get_hw_watchpoint_count): Likewise.
5240 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5241 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5242 (arm_prepare_to_resume): Use perror_with_name instead of error.
5243
55329a5c 52442011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5245
5246 * linux-arm-low.c: Include <signal.h>.
5247 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5248 (struct arm_linux_hwbp_cap): New data type.
5249 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5250 (struct arm_linux_hw_breakpoint): New data type.
5251 (MAX_BPTS, MAX_WPTS): Define.
5252 (struct arch_process_info, struct arch_lwp_info): New data types.
5253 (arm_linux_get_hwbp_cap): New function.
5254 (arm_linux_get_hw_breakpoint_count): Likewise.
5255 (arm_linux_get_hw_watchpoint_count): Likewise.
5256 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5257 (arm_hwbp_control_initialize): Likewise.
5258 (arm_hwbp_control_is_enabled): Likewise.
5259 (arm_hwbp_control_is_initialized): Likewise.
5260 (arm_hwbp_control_disable): Likewise.
5261 (arm_linux_hw_breakpoint_equal): Likewise.
5262 (arm_linux_hw_point_initialize): Likewise.
5263 (struct update_registers_data): New data structure.
5264 (update_registers_callback: New function.
5265 (arm_insert_point): Likewise.
5266 (arm_remove_point): Likewise.
5267 (arm_stopped_by_watchpoint): Likewise.
5268 (arm_stopped_data_address): Likewise.
5269 (arm_new_process): Likewise.
5270 (arm_new_thread): Likewise.
5271 (arm_prepare_to_resume): Likewise.
5272 (the_low_target): Register arm_insert_point, arm_remove_point,
5273 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5274 arm_new_thread, and arm_prepare_to_resume.
5275
6b9801d4
SS
52762011-09-15 Stan Shebs <stan@codesourcery.com>
5277
5278 * server.h (struct emit_ops): Add compare-goto fields.
5279 * tracepoint.c (gdb_agent_op_sizes): New table.
5280 (emit_eq_goto): New function.
5281 (emit_ne_goto): New function.
5282 (emit_lt_goto): New function.
5283 (emit_le_goto): New function.
5284 (emit_gt_goto): New function.
5285 (emit_ge_goto): New function.
5286 (is_goto_target): New function.
5287 (compile_bytecodes): Recognize special cases of compare-goto
5288 combinations and call specialized emitters for them.
5289 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5290 (amd64_emit_ne_goto): New function.
5291 (amd64_emit_lt_goto): New function.
5292 (amd64_emit_le_goto): New function.
5293 (amd64_emit_gt_goto): New function.
5294 (amd64_emit_ge_goto): New function.
5295 (amd64_emit_ops): Add the new functions.
5296 (i386_emit_eq_goto): New function.
5297 (i386_emit_ne_goto): New function.
5298 (i386_emit_lt_goto): New function.
5299 (i386_emit_le_goto): New function.
5300 (i386_emit_gt_goto): New function.
5301 (i386_emit_ge_goto): New function.
5302 (i386_emit_ops): Add the new functions.
5303
bf15cbda
SS
53042011-09-08 Stan Shebs <stan@codesourcery.com>
5305
5306 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5307 (i386_emit_epilogue): Restore %ebx.
5308
943ca1dd
JZ
53092011-08-31 Jie Zhang <jzhang918@gmail.com>
5310
5311 * server.c (step_thread): Remove definition.
5312 (process_serial_event): Don't handle Hs.
5313 * server.h (step_thread): Remove declaration.
5314 * target.c (set_desired_inferior): Remove use of step_thread.
5315
e3deef73
LM
53162011-08-24 Luis Machado <lgustavo@codesourcery.com>
5317
5318 * linux-low.c: Include linux-procfs.h.
5319 (linux_attach_lwp_1): Update comments.
5320 (linux_attach): Scan for existing threads when attaching to a
5321 process that is the tgid.
5322 * Makefile.in: Update dependencies.
5323
13da1c97
LM
53242011-08-24 Luis Machado <lgustavo@codesourcery.com>
5325
5326 * configure.srv: Add linux-procfs.o dependencies.
5327
881127c9
YQ
53282011-08-14 Yao Qi <yao@codesourcery.com>
5329
5330 * target.h (struct target_ops): Fix indent.
5331 * win32-low.c (win32_target_ops): Fix comment.
5332
58dbd541
YQ
53332011-08-14 Andrew Jenner <andrew@codesourcery.com>
5334 Yao Qi <yao@codesourcery.com>
5335
5336 * Makefile.in (clean): Remove tic6x-*.c files.
5337 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5338 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5339 (tic6x-c64xp-linux.c): Likewise.
5340 * configure.srv: Add support for tic6x-*-uclinux.
5341 * linux-tic6x-low.c: New.
5342 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5343
78d85199
YQ
53442011-08-14 Andrew Stubbs <ams@codesourcery.com>
5345 Yao Qi <yao@codesourcery.com>
5346
5347 * target.h (struct target_ops): Add read_loadmap.
5348 * linux-low.c (struct target_loadseg): New type.
5349 (struct target_loadmap): New type.
5350 (linux_read_loadmap): New function.
5351 (linux_target_ops): Add linux_read_loadmap.
5352 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5353 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5354 to NULL.
78d85199 5355
a959a88d
EZ
53562011-08-05 Eli Zaretskii <eliz@gnu.org>
5357
5358 * win32-low.c: Include <stdint.h>.
5359
1ced966e
PA
53602011-07-22 Pedro Alves <pedro@codesourcery.com>
5361
5362 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5363 to the inferior here.
5364 (i386_remove_aligned_watchpoint): Ditto.
5365 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5366 fit part of the watchpoint in the debug registers.
5367 (i386_update_inferior_debug_regs): New.
5368 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5369 registers, and only update the inferior on success.
5370 (i386_low_remove_watchpoint): Ditto.
5371
d26e3629
KY
53722011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5373
5374 * linux-low.c (compare_ints, unique, list_threads, show_process,
5375 linux_core_of_thread): Delete.
5376 (linux_target_ops): Change linux_core_of_thread to
5377 linux_common_core_of_thread.
5378 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5379 * utils.c (malloc_failure): Change type of argument.
5380 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5381 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5382 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5383 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5384 (IPA_OBJS): Add common-utils-ipa.o.
5385 (ptid_h, linux_osdata_h): New macros.
5386 (server_h): Add common/common-utils.h, common/xml-utils.h,
5387 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5388 common/ptid.h.
5389 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5390 ptid.o, buffer.o): New rules.
5391 (linux-low.o): Add common/linux-osdata.h as a dependency.
5392 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5393 * configure.ac: Add AC_HEADER_DIRENT check.
5394 * config.in: Regenerate.
5395 * configure: Regenerate.
5396 * remote-utils.c (xml_escape_text): Delete.
5397 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5398 buffer_xml_printf): Move to common/buffer.c.
5399 * server.c (main): Remove call to initialize_inferiors.
5400 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5401 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5402 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5403 internal_error, gdb_assert, gdb_assert_fail): Delete.
5404 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5405 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5406 common/buffer.h.
5407 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5408 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5409 initialize_inferiors): Delete.
5410
2275a1a7
PA
54112011-07-20 Pedro Alves <pedro@codesourcery.com>
5412
5413 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5414 symbol error.
5415
0a5b1e09
PA
54162011-05-31 Pedro Alves <pedro@codesourcery.com>
5417
5418 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5419 assertion.
5420 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5421
6938fd34
YQ
54222011-05-26 Yao Qi <yao@codesourcery.com>
5423
5424 * Makefile.in (thread-db.o): Track dependence to
5425 common/gdb_thread_db.h.
5426 * thread-db.c: include gdb_thread_db.h from right place.
5427
b481f9e0
TT
54282011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5429
5430 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5431 __FILE__ and __LINE__ to internal_error.
5432
98a5dd13
DE
54332011-05-13 Doug Evans <dje@google.com>
5434
5435 * thread-db.c (try_thread_db_load_from_sdir): New function.
5436 (try_thread_db_load_from_dir): New function.
5437 (thread_db_load_search): Handle $sdir, ignore $pdir.
5438 Remove trying of system directories if search of
5439 libthread-db-search-path fails, that is now done via $sdir.
5440
d248b706
KY
54412011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5442
5443 * server.c (handle_query): Add EnableDisableTracepoints to the list
5444 of supported features.
43aaf8b6 5445 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5446 tracepoints.
43aaf8b6
PA
5447 (cmd_qtenable_disable): New.
5448 (cmd_qtstart): Install tracepoints even if disabled.
5449 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5450 receiving a QTEnable or QTDisable packet.
5451 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5452 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5453 tracepoints.
5454 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5455
84e578fb
DE
54562011-05-10 Doug Evans <dje@google.com>
5457
5458 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5459
71f55dd8
DE
54602011-05-04 Doug Evans <dje@google.com>
5461
5462 * linux-low.c (linux_join): Skip process lookup.
5463 * spu-low.c (spu_join): Ditto.
5464 * server.c (join_inferiors_callback): Delete.
5465 (process_serial_event): For 'D' packet (detach) call join_inferior
5466 directly.
5467
4d393d60
JM
54682011-05-04 Joseph Myers <joseph@codesourcery.com>
5469
5470 * README: Don't mention xscale*-*-linux*.
5471 * configure.srv (xscale*-*-linux*): Don't handle target.
5472
b00ad6ff
NF
54732011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5474
5475 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5476 casting pointers.
5477 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5478 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5479 (i386_emit_void_call_2): Likewise.
5480
af96c192
YQ
54812011-04-26 Yao Qi <yao@codesourcery.com>
5482
43aaf8b6
PA
5483 * linux-low.c: Move common macros to linux-ptrace.h.
5484 Include linux-ptrace.h.
af96c192
YQ
5485 * Makefile.in (linux_ptrace_h): New.
5486 (linux-low.o): Depends on linux-ptrace.h.
5487
03f2bd59
JK
54882011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5489
5490 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5491 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5492 (remote_prepare): New function with most of the TCP code from ...
5493 (remote_open): ... here. Detect PORT here unconditionally. Move also
5494 setting transport_is_reliable.
5495 * server.c (run_once): New variable.
5496 (gdbserver_usage): Document it.
5497 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5498 the first run if RUN_ONCE.
5499 * server.h (run_once, remote_prepare): New declarations.
5500
7a9dd1b2
TT
55012011-04-19 Tom Tromey <tromey@redhat.com>
5502
5503 * win32-low.c (handle_load_dll): Remove duplicate "the".
5504
81239425
PM
55052011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5506
5507 Remove support for old Cygwin 1.5 versions.
5508 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5509 function to avoid warning.
5510 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5511 warning.
5512
9e0627f1
PM
55132011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5514
5515 * gdbserver/server.h (Macro _): Define it if not available.
5516
588eebee
MS
55172011-03-14 Michael Snyder <msnyder@vmware.com>
5518
348af9f7 5519 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5520
43f70d4c
JB
55212011-03-10 Joel Brobecker <brobecker@adacore.com>
5522
5523 * Makefile.in (maintainer-clean realclean distclean): Remove
5524 "make ... subdir_do" command.
5525
348af9f7
MS
55262011-03-10 Michael Snyder <msnyder@vmware.com>
5527
5528 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5529
5530 * server.c (handle_v_run): Free alloced buffer on early return.
5531
e637a4f5
YQ
55322011-03-09 Yao Qi <yao@codesourcery.com>
5533
5534 Revert:
5535 2011-03-04 Yao Qi <yao@codesourcery.com>
5536
5537 * Makefile.in: Remove GNU make feature --directory.
5538
5539 2011-03-05 Yao Qi <yao@codesourcery.com>
5540
5541 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5542 (subdir_do): New make target. Copied from gdb/Makefile.
5543 (maintainer-clean, realclean, distclean, clean): Call corresponding
5544 make targets in common/Makefile.
5545
5546 2011-02-11 Yao Qi <yao@codesourcery.com>
5547
5548 * configure.ac: Call AC_PROG_RANLIB.
5549 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5550 * configure: Regenerate.
5551
e6edda56
JK
55522011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5553
5554 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5555
e5141119
JB
55562011-03-06 Yao Qi <yao@codesourcery.com>
5557
5558 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5559
64794aa4
JB
55602011-03-05 Yao Qi <yao@codesourcery.com>
5561
5562 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5563 (subdir_do): New make target. Copied from gdb/Makefile.
5564 (maintainer-clean, realclean, distclean, clean): Call corresponding
5565 make targets in common/Makefile.
5566
7a762829
YQ
55672011-03-04 Yao Qi <yao@codesourcery.com>
5568
5569 * Makefile.in: Remove GNU make feature --directory.
5570
348af9f7
MS
55712011-03-04 Michael Snyder <msnyder@vmware.com>
5572
5573 * server.c (queue_stop_reply): Call xmalloc not malloc.
5574
55752011-03-02 Michael Snyder <msnyder@vmware.com>
5576
5577 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5578
9f72fee2
MS
55792011-02-28 Michael Snyder <msnyder@vmware.com>
5580
588eebee
MS
5581 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5582 (cmd_qtframe): Ditto.
5583 (cmd_qtbuffer): Ditto.
5584 (cmd_bigqtbuffer): Ditto.
5585
9f72fee2
MS
5586 * utils.c (decimal2str): Initialize 'width' to nine, then
5587 don't mess with it.
5588
8040bd49
UW
55892011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5590
5591 * hostio.c (require_data): Free *data, not data.
5592
7e52cbd0
JK
55932011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5594
5595 * hostio.c (require_data): Use free, not xfree.
5596
9130f83e
MS
55972011-02-27 Michael Snyder <msnyder@vmware.com>
5598
4b812f4e
MS
5599 * server.c (handle_query): Discard unused value.
5600
9130f83e
MS
5601 * hostio.c (require_data): Free malloc memory before returning
5602 error.
5603
69d37113
MS
56042011-02-26 Michael Snyder <msnyder@vmware.com>
5605
5606 * linux-low.c (list_threads): Call closedir for dirent.
5607
35f5825a
MS
56082011-02-27 Michael Snyder <msnyder@vmware.com>
5609
2a589cef
MS
5610 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5611 a case statement falls through.
5612
0adea5f7
MS
5613 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5614
35f5825a
MS
5615 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5616 in comparison.
5617
238f1c74
MS
56182011-02-26 Michael Snyder <msnyder@vmware.com>
5619
5620 * utils.c (decimal2str): Eliminate dead code and dead param.
5621 (pulongest): Drop dead param from call to decimal2str.
5622 (plongest): Ditto.
5623
633ff500
JB
56242011-02-24 Joel Brobecker <brobecker@adacore.com>
5625
5626 Revert the following patch (not approved yet):
5627 2011-02-21 Hui Zhu <teawater@gmail.com>
5628 * tracepoint.c (tp_printf): New function.
5629 (eval_agent_expr): Handle gdb_agent_op_printf.
5630
f9c6ff72
HZ
56312011-02-21 Hui Zhu <teawater@gmail.com>
5632
5633 * tracepoint.c (tp_printf): New function.
5634 (eval_agent_expr): Handle gdb_agent_op_printf.
5635
94d5e490
TT
56362011-02-18 Tom Tromey <tromey@redhat.com>
5637
5638 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5639 (tracepoint.o): Likewise.
5640 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5641 (gdb_agent_op_names): Likewise.
5642
c7f96d2b
TT
56432011-02-18 Tom Tromey <tromey@redhat.com>
5644
5645 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5646 gdb_agent_op_rot>: New constants.
5647 (gdb_agent_op_names): Add pick and roll.
5648 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5649 cases.
5650
0feedb2c
JK
56512011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5652
5653 * aclocal.m4: Regenerated with aclocal-1.11.1.
5654
b3b9301e
PA
56552011-02-14 Pedro Alves <pedro@codesourcery.com>
5656
5657 * server.c (handle_qxfer_traceframe_info): New.
5658 (qxfer_packets): Register "traceframe-info".
5659 (handle_query): Report support for qXfer:traceframe-info:read+.
5660 * tracepoint.c (match_blocktype): New.
5661 (traceframe_find_block_type): Rename to ...
5662 (traceframe_walk_blocks): ... this. Add callback filter argument,
5663 and use it.
5664 (traceframe_find_block_type): New, reimplemented on top of
5665 traceframe_walk_blocks.
5666 (build_traceframe_info_xml): New.
5667 (traceframe_read_info): New.
5668 * server.h (traceframe_read_info): Declare.
5669
4f3e6fb7
YQ
56702011-02-11 Yao Qi <yao@codesourcery.com>
5671
5672 * configure.ac: Call AC_PROG_RANLIB.
5673 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5674 * configure: Regenerate.
5675
764880b7
PA
56762011-02-07 Pedro Alves <pedro@codesourcery.com>
5677
5678 * server.c (gdb_read_memory): Change return semantics to allow
5679 partial transfers.
5680 (handle_search_memory_1): Adjust.
5681 (process_serial_event) <'m' packet>: Handle partial transfers.
5682 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5683
1c79eb8a
PA
56842011-01-28 Pedro Alves <pedro@codesourcery.com>
5685
5686 * regcache.c (init_register_cache): Initialize
5687 regcache->register_status.
5688 (free_register_cache): Release regcache->register_status.
5689 (regcache_cpy): Copy register_status.
5690 (registers_to_string): Print 'x's for unavailable registers.
5691 (supply_register): Mark the register's status valid or
5692 unavailable, depending on whether a buffer was passed in or not.
5693 (supply_register_zeroed): New.
5694 (supply_regblock): Mark the registers' status valid or
5695 unavailable, depending on whether a buffer was passed in or not.
5696 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5697 (struct regcache): New `register_status' field.
5698 (supply_register_zeroed): Declare.
5699 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5700 supply_register_zeroed, rather than passing a NULL buffer to
5701 supply_register.
5702 * tracepoint.c (fetch_traceframe_registers): Update comment.
5703
85724a0e
PA
57042011-01-28 Pedro Alves <pedro@codesourcery.com>
5705
5706 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5707 buffer explicit.
5708
d08aafef
PA
57092011-01-25 Pedro Alves <pedro@codesourcery.com>
5710
5711 * server.h (decode_xfer_write): Change prototype.
5712 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5713 and don't extract the annex here.
5714 * server.c (decode_xfer_read): Remove `annex' parameter,
5715 and don't extract the annex here.
5716 (decode_xfer): New.
5717 (struct qxfer): New.
5718 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5719 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5720 (handle_qxfer_statictrace): New functions, abstracted out from
5721 handle_query, and made to use the struct qxfer interface.
5722 (handle_threads_qxfer_proper): Rename to ...
5723 (handle_qxfer_threads_proper): ... this.
5724 (handle_threads_qxfer): Rename to ...
5725 (handle_qxfer_threads): ... this. Adjust.
5726 (qxfer_packets): New array.
5727 (handle_qxfer): New function.
5728 (handle_query): Use handle_qxfer.
5729
493e2a69
MS
57302011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5731
5732 * gdbreplay.c: Shorten lines of >= 80 columns.
5733 * linux-low.c: Ditto.
5734 * linux-ppc-low.c: Ditto.
5735 * linux-s390-low.c: Ditto.
5736 * linux-sparc-low.c: Ditto.
5737 * linux-x86-low.c: Ditto.
5738 * linux-xtensa-low.c: Ditto.
5739 * mem-break.c: Ditto.
5740 * nto-low.c: Ditto.
5741 * regcache.h: Ditto.
5742 * remote-utils.c: Ditto.
5743 * server.c: Ditto.
5744 * server.h: Ditto.
5745 * thread-db.c: Ditto.
5746 * tracepoint.c: Ditto.
5747 * utils.c: Ditto.
5748 * win32-low.h: Ditto.
5749
44944448
JB
57502011-01-05 Joel Brobecker <brobecker@adacore.com>
5751
5752 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5753 update.
5754
71ce852c
JB
57552011-01-01 Joel Brobecker <brobecker@adacore.com>
5756
5757 * server.c (gdbserver_version): Update copyright year in version
5758 output.
5759 * gdbreplay.c (gdbreplay_version): Ditto.
5760
eb826dc6
MF
57612010-12-29 Jie Zhang <jie.zhang@analog.com>
5762
5763 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5764 * linux-bfin-low.c: New file.
5765 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5766 PT_DATA_ADDR for BFIN targets.
5767 * Makefile.in (SFILES): Add linux-bfin-low.c.
5768 (clean): Remove reg-bfin.c.
5769 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5770 * README: Mention supported Blackfin targets.
5771
39ab222a
MF
57722010-12-23 Mike Frysinger <vapier@gentoo.org>
5773
5774 * .gitignore: New file.
5775
a1f2ce7d
MF
57762010-11-16 Mike Frysinger <vapier@gentoo.org>
5777
5778 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5779
f474844c
JZ
57802010-10-22 Jie Zhang <jie@codesourcery.com>
5781
5782 * Makefile.in: Add FLAGS_TO_PASS variable.
5783 (install): Remove dependency of install-only and recursively
5784 invoke make for install-only.
5785
f1048712
DE
57862010-10-04 Doug Evans <dje@google.com>
5787
5788 * Makefile.in (uninstall): Use $(DESTDIR).
5789
b53a1623
PA
57902010-09-24 Pedro Alves <pedro@codesourcery.com>
5791
e6ee044d
PA
5792 PR gdb/11842
5793
b53a1623
PA
5794 * linux-x86-low.c (compat_siginfo_from_siginfo)
5795 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5796 si_code is < 0. Check for si_code == SI_TIMER before checking for
5797 si_code < 0.
5798
fa1bd1e4
JB
57992010-09-13 Joel Brobecker <brobecker@adacore.com>
5800
5801 * lynx-i386-low.c: New file.
5802 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5803
47fac8f8
JB
58042010-09-13 Joel Brobecker <brobecker@adacore.com>
5805
5806 * lynx-low.c (ptrace_request_to_str): Remove handling for
5807 request values that have been removed in LynxOS 5.x.
5808
1adfc54d
JB
58092010-09-13 Joel Brobecker <brobecker@adacore.com>
5810
5811 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5812 <ptrace.h>
5813
c2a66c29
NS
58142010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5815
5816 * configure.ac: Add --enable-inprocess-agent option.
5817 * configure: Rebuilt.
5818
32fcada3
YQ
58192010-09-06 Yao Qi <yao@codesourcery.com>
5820
5821 * linux-low.c (linux_kill): Remove unused variable.
5822 (linux_stabilize_threads): Likewise.
5823 * server.c (start_inferior): Likewise.
5824 (queue_stop_reply_callback): Likewise.
5825 * tracepoint.c (do_action_at_tracepoint): Likewise.
5826
0cccb683
YQ
58272010-09-06 Yao Qi <yao@codesourcery.com>
5828
5829 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5830 on return.
5831
423ec54c
JK
58322010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5833
5834 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5835
12ac6819
PA
58362010-09-06 Pedro Alves <pedro@codesourcery.com>
5837
5838 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5839 "$(IPA_DEPFILES)".
5840
8ed54b31
JB
58412010-09-01 Joel Brobecker <brobecker@adacore.com>
5842
5843 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5844 gdbserver/lynx-ppc-low.c: New files.
5845 * Makefile.in (lynx_low_h): New variable.
5846 (lynx-low.o, lynx-ppc-low.o): New rules.
5847 * configure.ac: On LynxOS, link with -lnetinet.
5848 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5849 * configure: regenerate.
5850
bb0116a4
JB
58512010-09-01 Joel Brobecker <brobecker@adacore.com>
5852
5853 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5854 * configure.ac: Add check for vasprintf and vsnprintf.
5855 * configure, config.in: Regenerate.
5856 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5857
a778ab81 58582010-09-01 Joel Brobecker <brobecker@adacore.com>
5859
5860 * gdbreplay.c: Move include of alloca.h up, next to include of
5861 malloc.h.
5862 * server.h: Add include of malloc.h.
5863 * mem-break.c: Remove include of malloc.h.
5864 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5865
8b034a19 58662010-09-01 Joel Brobecker <brobecker@adacore.com>
5867
5868 * Makefile.in (memmem.o): Build with -Wno-error.
5869
58702010-09-01 Joel Brobecker <brobecker@adacore.com>
5871
5872 * utils.c (xsnprintf): Make non-static.
5873 * server.h: Add xsnprintf declaration.
5874 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5875 replace calls to snprintf by calls to xsnprintf throughout.
5876
58772010-09-01 Joel Brobecker <brobecker@adacore.com>
5878
5879 * configure.ac: Add configure check for alloca.
5880 * configure, config.in: Regenerate.
5881 * server.h: Include alloca.h if it exists.
5882 * gdbreplay.c: Include alloca.h if it exists.
5883
1a981360
PA
58842010-08-28 Pedro Alves <pedro@codesourcery.com>
5885
5886 * linux-low.c (__SIGRTMIN): Define if not already defined.
5887 (linux_create_inferior): Check for __ANDROID__ rather than
5888 __SIGRTMIN.
5889 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5890 are already deferred.
5891 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5892 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5893 stopped and already has a pending signal to report.
5894 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5895 a pending signal to report or is moving out of a jump pad.
5896 (linux_init_signals): Check for __ANDROID__ rather than
5897 __SIGRTMIN.
5898
b4d51a55
PA
58992010-08-28 Pedro Alves <pedro@codesourcery.com>
5900
5901 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5902 debug_threads check. Avoid a linear search when not doing debug
5903 output.
5904
ec48365d
PA
59052010-08-27 Pedro Alves <pedro@codesourcery.com>
5906
5907 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5908 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5909 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5910 (process_event): Change local fd's type to gdb_fildes_t.
5911 (create_file_handler): Adjust prototype.
5912 (delete_file_handler): Adjust prototype.
5913 (handle_file_event): Adjust prototype. Use pfildes.
5914 (create_file_event): Adjsut prototype.
5915 * remote-utils.c (remote_desc, listen_desc): Change type to
5916 gdb_fildes_t.
5917 * server.h: New gdb_fildes_t typedef.
5918 [USE_WIN32API]: Include winsock2.h.
5919 (delete_file_handler, add_file_handler): Adjust prototypes.
5920 (pfildes): Declare.
5921 * utils.c (pfildes): New.
5922
854d88f0
PA
59232010-08-27 Pedro Alves <pedro@codesourcery.com>
5924
5925 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5926 * configure: Regenerate.
5927
0146f85b
PA
59282010-08-27 Pedro Alves <pedro@codesourcery.com>
5929
5930 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5931 (linux_done_accessing_memory): ... this.
5932 (linux_target_ops): Adjust.
5933 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5934 * nto-low.c (nto_target_ops): Adjust comment.
5935 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5936 * spu-low.c (spu_target_ops): Adjust comment.
5937 * target.h (target_ops): Rename unprepare_to_access_memory field
5938 to done_accessing_memory.
5939 (unprepare_to_access_memory): Rename to ...
5940 (done_accessing_memory): ... this.
5941
90d74c30
PA
59422010-08-26 Pedro Alves <pedro@codesourcery.com>
5943
5944 * linux-low.c (linux_prepare_to_access_memory): New.
5945 (linux_unprepare_to_access_memory): New.
5946 (linux_target_ops): Install them.
5947 * server.c (read_memory): Rename to ...
5948 (gdb_read_memory): ... this. Use
5949 prepare_to_access_memory/prepare_to_access_memory.
5950 (write_memory): Rename to ...
5951 (gdb_write_memory): ... this. Use
5952 prepare_to_access_memory/prepare_to_access_memory.
5953 (handle_search_memory_1): Adjust.
5954 (process_serial_event): Adjust.
5955 * target.h (struct target_ops): New fields
5956 prepare_to_access_memory and unprepare_to_access_memory.
5957 (prepare_to_access_memory, unprepare_to_access_memory): New.
5958 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5959 prepare_to_access_memory/prepare_to_access_memory.
5960 * nto-low.c (nto_target_ops): Adjust.
5961 * spu-low.c (spu_target_ops): Adjust.
5962 * win32-low.c (win32_target_ops): Adjust.
5963
fd467969
PA
59642010-08-26 Pedro Alves <pedro@codesourcery.com>
5965
5966 * Makefile.in (WARN_CFLAGS): Get it from configure.
5967 (WERROR_CFLAGS): New.
5968 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5969 * configure.ac: Introduce --enable-werror, which adds -Werror to
5970 the compiler command line. Enabled by default. Disable with
5971 --disable-werror. Add -Wdeclaration-after-statement
5972 Wpointer-arith and -Wformat-nonliteral to warning flags.
5973 * configure: Regenerate.
5974
331e2f5f
PA
59752010-08-26 Pedro Alves <pedro@codesourcery.com>
5976
5977 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5978
e581f2b4
PA
59792010-08-26 Pedro Alves <pedro@codesourcery.com>
5980
5981 * gdbreplay.c (remote_error): New.
5982 (gdbchar): New.
5983 (expect): Use gdbchar. Check for error reading from GDB.
5984 Clarify sync error output.
5985 (play): Check for errors writing to GDB.
5986 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5987 * remote-utils.c (getpkt): Check for errors writing to the remote
5988 descriptor.
5989
3c11dd79
PA
59902010-08-25 Pedro Alves <pedro@codesourcery.com>
5991
5992 * linux-low.c (linux_wait_1): Move non-debugging code out of
5993 `debug_threads' control.
5994
d20a8ad9
PA
59952010-08-25 Pedro Alves <pedro@codesourcery.com>
5996
5997 * linux-low.c (linux_wait_1): Don't set last_status here.
5998 * server.c (push_event, queue_stop_reply_callback): Assert we're
5999 not pushing a TARGET_WAITKIND_IGNORE event.
6000 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6001 (myresume, handle_target_event): Set the thread's last_resume_kind
6002 and last_status from the target returned status.
6003
964e4306
PA
60042010-08-25 Pedro Alves <pedro@codesourcery.com>
6005
6006 PR threads/10729
6007
6008 * linux-x86-low.c (update_debug_registers_callback): New.
6009 (i386_dr_low_set_addr): Use it.
6010 (i386_dr_low_get_addr): New.
6011 (i386_dr_low_set_control): Use update_debug_registers_callback.
6012 (i386_dr_low_get_control): New.
6013 (i386_dr_low_get_status): Adjust.
6014 * linux-low.c (linux_stop_lwp): New.
6015 * linux-low.h (linux_stop_lwp): Declare.
6016
6017 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6018 argument instead of a i386_debug_reg_state.
6019 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6020 a i386_debug_reg_state.
6021 (i386_insert_aligned_watchpoint): Adjust.
6022 (i386_remove_aligned_watchpoint): Adjust.
6023 (i386_low_stopped_data_address): Read the debug registers from the
6024 inferior instead of from the mirrors.
6025 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6026 (i386_dr_low_get_addr): Declare.
6027 (i386_dr_low_get_control): Declare.
6028 (i386_dr_low_get_status): Change prototype.
6029
6030 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6031 (i386_dr_low_get_addr): New.
6032 (i386_dr_low_get_control): New.
6033 (i386_dr_low_get_status): Adjust prototype. Return
6034 dr_status_mirror.
6035 (i386_initial_stuff): Clear dr_status_mirror and
6036 dr_control_mirror.
6037 (i386_get_thread_context): Adjust.
6038 (i386_set_thread_context): Adjust.
6039 (i386_thread_added): Adjust.
6040
5f21a75b
PA
60412010-08-24 Pedro Alves <pedro@codesourcery.com>
6042
6043 * linux-low.h (linux_thread_area): Delete declaration.
6044
3e4c1235
TS
60452010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6046
6047 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6048 after its termination.
6049
1971b033
PA
60502010-08-09 Pedro Alves <pedro@codesourcery.com>
6051
6052 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6053 (gdb_wants_all_stopped): Delete.
6054 (linux_wait_1): Don't call them.
6055 * server.c (handle_v_cont): Tag all threads as want-stopped.
6056 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6057 stopped as "client-wants-stopped".
6058
310444ac
PA
60592010-07-31 Pedro Alves <pedro@codesourcery.com>
6060
6061 * Makefile.in (signals_h): New.
6062 (server_h): Depend on it.
6063 (server.o): Don't depend on $(signals_def).
6064 (signals.o): Depend on $(signals_def).
6065
a19cae16
JK
60662010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6067
6068 * Makefile.in (signals_def): New.
6069 (server_h): Append include/gdb/signals.h and signals_def.
6070 (server.o): Append signals_def.
6071
30d50328
JK
60722010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6073
6074 * server.c (handle_target_event): Use target_signal_to_host for
6075 resume_info.sig initialization.
6076 * target.h (struct thread_resume) <sig>: New comment.
6077
5c3216e2
OS
60782010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6079
c6f46ca0
OS
6080 * server.c (handle_query): strcpy() the returned string from paddress()
6081 instead of sprintf().
5c3216e2
OS
6082 * utils.c (paddress): Return phex_nz().
6083
6bd31874
JB
60842010-07-07 Joel Brobecker <brobecker@adacore.com>
6085
6086 * server.c (handle_v_cont): Call mourn_inferior if process
6087 just exited.
6088 (myresume): Likewise.
6089
0fb4aa4b
PA
60902010-07-01 Pedro Alves <pedro@codesourcery.com>
6091
6092 Static tracepoints, and integration with UST.
6093
6094 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6095 * mem-break.c (uninsert_all_breakpoints)
6096 (reinsert_all_breakpoints): New.
6097 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6098 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6099 (gdb_agent_ust_loaded, helper_thread_id)
6100 (gdb_agent_helper_thread_id): New macros.
6101 (struct ipa_sym_addresses): Add addr_ust_loaded,
6102 addr_helper_thread_id, addr_cmd_buf.
6103 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6104 (in_process_agent_loaded_ust): New.
6105 (write_e_ust_not_loaded): New.
6106 (maybe_write_ipa_ust_not_loaded): New.
6107 (struct collect_static_trace_data_action): New.
6108 (enum tracepoint_type) <static_tracepoint>: New.
6109 (struct tracepoint) <handle>: Mention static tracepoints.
6110 (struct static_tracepoint_ctx): New.
6111 (CMD_BUF_SIZE): New.
6112 (add_tracepoint_action): Handle static tracepoint actions.
6113 (unprobe_marker_at): New.
6114 (clear_installed_tracepoints): Handle static tracepoints.
6115 (cmd_qtdp): Handle static tracepoints.
6116 (probe_marker_at): New.
6117 (cmd_qtstart): Handle static tracepoints.
6118 (response_tracepoint): Handle static tracepoints.
6119 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6120 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6121 (get_context_regcache): Handle static tracepoints.
6122 (do_action_at_tracepoint): Handle static tracepoint actions.
6123 (traceframe_find_block_type): Handle static trace data blocks.
6124 (traceframe_read_sdata): New.
6125 (download_tracepoints): Download static tracepoint actions.
6126 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6127 (GDB_PROBE_NAME): New.
6128 (ust_ops): New.
6129 (GET_UST_SYM): New.
6130 (USTF): New.
6131 (dlsym_ust): New.
6132 (ust_marker_to_static_tracepoint): New.
6133 (gdb_probe): New.
6134 (collect_ust_data_at_tracepoint): New.
6135 (gdb_ust_probe): New.
6136 (UNIX_PATH_MAX, SOCK_DIR): New.
6137 (gdb_ust_connect_sync_socket): New.
6138 (resume_thread, stop_thread): New.
6139 (run_inferior_command): New.
6140 (init_named_socket): New.
6141 (gdb_ust_socket_init): New.
6142 (cstr_to_hexstr): New.
6143 (next_st): New.
6144 (first_marker, next_marker): New.
6145 (response_ust_marker): New.
6146 (cmd_qtfstm, cmd_qtsstm): New.
6147 (unprobe_marker_at, probe_marker_at): New.
6148 (cmd_qtstmat, gdb_ust_thread): New.
6149 (gdb_ust_init): New.
6150 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6151 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6152 (ST_REGENTRY): New.
6153 (x86_64_st_collect_regmap): New.
6154 (X86_64_NUM_ST_COLLECT_GREGS): New.
6155 (AMD64_RIP_REGNUM): New.
6156 (supply_static_tracepoint_registers): New.
6157 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6158 (ST_REGENTRY): New.
6159 (i386_st_collect_regmap): New.
6160 (i386_NUM_ST_COLLECT_GREGS): New.
6161 (supply_static_tracepoint_registers): New.
6162 * server.c (handle_query): Handle qXfer:statictrace:read.
6163 <qSupported>: Report support for StaticTracepoints, and
6164 qXfer:statictrace:read features.
6165 * server.h (traceframe_read_sdata)
6166 (supply_static_tracepoint_registers): Declare.
6167 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6168 (unpack_varlen_hex): Include in IPA build.
6169 * Makefile.in (ustlibs, ustinc): New.
6170 (IPA_OBJS): Add remote-utils-ipa.o.
6171 ($(IPA_LIB)): Link -ldl and -lpthread.
6172 (UST_CFLAGS): New.
6173 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6174 * config.in, configure: Regenerate.
6175
9e4344e5
PA
61762010-06-20 Ian Lance Taylor <iant@google.com>
6177 Pedro Alves <pedro@codesourcery.com>
6178
6179 * linux-x86-low.c (always_true): Delete.
6180 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6181 trying to fool the compiler with always_true.
6182
c6beb2cb
PA
61832010-06-20 Pedro Alves <pedro@codesourcery.com>
6184
6185 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6186 conditions in gdbserver.
6187
d2ed6730
UW
61882010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6189
6190 * spu-low.c (spu_read_memory): Wrap around local store limit.
6191 (spu_write_memory): Likewise.
6192
4e29fb54
PA
61932010-06-15 Pedro Alves <pedro@codesourcery.com>
6194
6195 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6196 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6197 LONGEST uses.
6198 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6199 uses.
6200 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6201 uses with LONGEST uses.
6202
6a271cae
PA
62032010-06-14 Stan Shebs <stan@codesourcery.com>
6204 Pedro Alves <pedro@codesourcery.com>
6205
6206 Bytecode compiler.
6207
6208 * linux-x86-low.c: Include limits.h.
6209 (add_insns): New.
6210 (always_true): New.
6211 (EMIT_ASM): New.
6212 (EMIT_ASM32): New.
6213 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6214 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6215 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6216 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6217 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6218 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6219 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6220 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6221 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6222 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6223 (amd64_emit_void_call_2): New.
6224 (amd64_emit_ops): New.
6225 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6226 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6227 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6228 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6229 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6230 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6231 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6232 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6233 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6234 (i386_emit_stack_adjust, i386_emit_int_call_1)
6235 (i386_emit_void_call_2): New.
6236 (i386_emit_ops): New.
6237 (x86_emit_ops): New.
6238 (the_low_target): Install x86_emit_ops.
6239 * server.h (struct emit_ops): New.
6240 (get_raw_reg_func_addr): Declare.
6241 (current_insn_ptr, emit_error): Declare.
6242 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6243 (set_trace_state_variable_value): New defines.
6244 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6245 addr_get_trace_state_variable_value and
6246 addr_set_trace_state_variable_value.
6247 (symbol_list): New fields for get_raw_reg,
6248 get_trace_state_variable_value and set_trace_state_variable_value.
6249 (condfn): New typedef.
6250 (struct tracepoint): New field `compiled_cond'.
6251 (do_action_at_tracepoint): Clear compiled_cond.
6252 (get_trace_state_variable_value, set_trace_state_variable_value):
6253 Export in the IPA.
6254 (condition_true_at_tracepoint): If there's a compiled condition,
6255 run that.
6256 (current_insn_ptr, emit_error): New globals.
6257 (struct bytecode_address): New.
6258 (get_raw_reg_func_addr): New.
6259 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6260 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6261 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6262 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6263 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6264 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6265 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6266 (compile_tracepoint_condition, compile_bytecodes): New.
6267 * target.h (emit_ops): Forward declare.
6268 (struct target_ops): New field emit_ops.
6269 (target_emit_ops): New.
6270 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6271 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6272 * linux-low.c (linux_emit_ops): New.
6273 (linux_target_ops): Install it.
6274 * linux-low.h (struct linux_target_ops): New field emit_ops.
6275
92b72907
UW
62762010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6277
6278 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6279 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6280
fa593d66
PA
62812010-06-01 Pedro Alves <pedro@codesourcery.com>
6282 Stan Shebs <stan@codesourcery.com>
6283
6284 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6285 (all): Depend on $(extra_libraries).
6286 (install-only): Install the IPA.
6287 (IPA_OBJS, IPA_LIB): New.
6288 (clean): Remove the IPA lib.
6289 (IPAGENT_CFLAGS): New.
6290 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6291 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6292 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6293 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6294 * configure.ac: Check for atomic builtins support in the compiler.
6295 (IPA_DEPFILES, extra_libraries): Define.
6296 * configure.srv (ipa_obj): Add description.
6297 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6298 (i[34567]86-*-linux*): Set ipa_obj.
6299 (x86_64-*-linux*): Set ipa_obj.
6300 * linux-low.c (stabilizing_threads): New.
6301 (supports_fast_tracepoints): New.
6302 (linux_detach): Stabilize threads before detaching.
6303 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6304 the lwp is either not stabilizing, or is moving out of a jump pad.
6305 (linux_fast_tracepoint_collecting): New.
6306 (maybe_move_out_of_jump_pad): New.
6307 (enqueue_one_deferred_signal): New.
6308 (dequeue_one_deferred_signal): New.
6309 (linux_wait_for_event_1): If moving out of a jump pad, defer
6310 pending signals to later.
6311 (linux_stabilize_threads): New.
6312 (linux_wait_1): Check if threads need moving out of jump pads, and
6313 do it if so.
6314 (stuck_in_jump_pad_callback): New.
6315 (move_out_of_jump_pad_callback): New.
6316 (lwp_running): New.
6317 (linux_resume_one_lwp): Handle moving out of jump pads.
6318 (linux_set_resume_request): Dequeue deferred signals.
6319 (need_step_over_p): Also step over fast tracepoint jumps.
6320 (start_step_over): Also uninsert fast tracepoint jumps.
6321 (finish_step_over): Also reinsert fast tracepoint jumps.
6322 (linux_install_fast_tracepoint_jump): New.
6323 (linux_target_ops): Install linux_stabilize_threads and
6324 linux_install_fast_tracepoint_jump_pad.
6325 * linux-low.h (linux_target_ops) <get_thread_area,
6326 install_fast_tracepoint_jump_pad>: New fields.
6327 (struct lwp_info) <collecting_fast_tracepoint,
6328 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6329 (linux_get_thread_area): Declare.
6330 * linux-x86-low.c (jump_insn): New.
6331 (x86_get_thread_area): New.
6332 (append_insns): New.
6333 (push_opcode): New.
6334 (amd64_install_fast_tracepoint_jump_pad): New.
6335 (i386_install_fast_tracepoint_jump_pad): New.
6336 (x86_install_fast_tracepoint_jump_pad): New.
6337 (the_low_target): Install x86_get_thread_area and
6338 x86_install_fast_tracepoint_jump_pad.
6339 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6340 (struct fast_tracepoint_jump): New.
6341 (fast_tracepoint_jump_insn): New.
6342 (fast_tracepoint_jump_shadow): New.
6343 (find_fast_tracepoint_jump_at): New.
6344 (fast_tracepoint_jump_here): New.
6345 (delete_fast_tracepoint_jump): New.
6346 (set_fast_tracepoint_jump): New.
6347 (uninsert_fast_tracepoint_jumps_at): New.
6348 (reinsert_fast_tracepoint_jumps_at): New.
6349 (set_breakpoint_at): Use write_inferior_memory.
6350 (uninsert_raw_breakpoint): Use write_inferior_memory.
6351 (check_mem_read): Mask out fast tracepoint jumps.
6352 (check_mem_write): Mask out fast tracepoint jumps.
6353 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6354 (set_fast_tracepoint_jump): Declare.
6355 (delete_fast_tracepoint_jump)
6356 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6357 (reinsert_fast_tracepoint_jumps_at): Declare.
6358 * regcache.c: Don't compile many functions when building the
6359 in-process agent library.
6360 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6361 the register buffer in the heap.
6362 (free_register_cache): If the register buffer isn't owned by the
6363 regcache, don't free it.
6364 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6365 pre-existing register caches.
6366 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6367 type.
6368 (convert_ascii_to_int): : Constify `from' parameter type.
6369 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6370 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6371 the needed buffer in-place.
6372 (relocate_instruction): New.
6373 * server.c (handle_query) <qSymbols>: If the target supports
6374 tracepoints, give it a chance of looking up symbols. Report
6375 support for fast tracepoints.
6376 (handle_status): Stabilize threads.
6377 (process_serial_event): Adjust.
6378 * server.h (struct fast_tracepoint_jump): Forward declare.
6379 (struct process_info) <fast_tracepoint_jumps>: New field.
6380 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6381 (decode_X_packet, decode_M_packet): Adjust.
6382 (relocate_instruction): Declare.
6383 (in_process_agent_loaded): Declare.
6384 (tracepoint_look_up_symbols): Declare.
6385 (struct fast_tpoint_collect_status): Declare.
6386 (fast_tracepoint_collecting): Declare.
6387 (force_unlock_trace_buffer): Declare.
6388 (handle_tracepoint_bkpts): Declare.
6389 (initialize_low_tracepoint)
6390 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6391 * target.h (struct target_ops) <stabilize_threads,
6392 install_fast_tracepoint_jump_pad>: New fields.
6393 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6394 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6395 [HAVE_STDINT_H]: Include stdint.h.
6396 (trace_debug_1): Rename to ...
6397 (trace_vdebug): ... this.
6398 (trace_debug): Rename to ...
6399 (trace_debug_1): ... this. Add `level' parameter.
6400 (trace_debug): New.
6401 (ATTR_USED, ATTR_NOINLINE): New.
6402 (IP_AGENT_EXPORT): New.
6403 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6404 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6405 (about_to_request_buffer_space, trace_buffer_is_full)
6406 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6407 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6408 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6409 (traceframe_write_count, traceframes_created)
6410 (trace_state_variables)
6411 New renaming defines.
6412 (struct ipa_sym_addresses): New.
6413 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6414 (symbol_list): New.
6415 (ipa_sym_addrs): New.
6416 (all_tracepoint_symbols_looked_up): New.
6417 (in_process_agent_loaded): New.
6418 (write_e_ipa_not_loaded): New.
6419 (maybe_write_ipa_not_loaded): New.
6420 (tracepoint_look_up_symbols): New.
6421 (debug_threads) [IN_PROCESS_AGENT]: New.
6422 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6423 (UNKNOWN_SIDE_EFFECTS): New.
6424 (stop_tracing): New.
6425 (flush_trace_buffer): New.
6426 (stop_tracing_bkpt): New.
6427 (flush_trace_buffer_bkpt): New.
6428 (read_inferior_integer): New.
6429 (read_inferior_uinteger): New.
6430 (read_inferior_data_pointer): New.
6431 (write_inferior_data_pointer): New.
6432 (write_inferior_integer): New.
6433 (write_inferior_uinteger): New.
6434 (struct collect_static_trace_data_action): Delete.
6435 (enum tracepoint_type): New.
6436 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6437 <actions_str, step_actions, step_actions_str>: Only include in
6438 GDBserver.
fa593d66
PA
6439 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6440 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6441 (tracepoints): Use IP_AGENT_EXPORT.
6442 (last_tracepoint): Don't include in the IPA.
6443 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6444 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6445 (alloced_trace_state_variables): New.
6446 (trace_state_variables): Use IP_AGENT_EXPORT.
6447 (traceframe_t): Delete unused variable.
6448 (circular_trace_buffer): Don't include in the IPA.
6449 (trace_buffer_start): Delete.
6450 (struct trace_buffer_control): New.
6451 (trace_buffer_free): Delete.
6452 (struct ipa_trace_buffer_control): New.
6453 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6454 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6455 New.
6456 (trace_buffer_ctrl): New.
6457 (TRACE_BUFFER_CTRL_CURR): New.
6458 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6459 Reimplement as macros.
6460 (trace_buffer_wrap): Delete.
6461 (traceframe_write_count, traceframe_read_count)
6462 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6463 (struct tracepoint_hit_ctx) <type>: New field.
6464 (struct fast_tracepoint_ctx): New.
6465 (memory_barrier): New.
6466 (cmpxchg): New.
6467 (record_tracepoint_error): Update atomically in the IPA.
6468 (clear_inferior_trace_buffer): New.
6469 (about_to_request_buffer_space): New.
6470 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6471 updating the same buffer.
6472 (add_tracepoint): Default the tracepoint's type to trap
6473 tracepoint, and orig_size to -1.
6474 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6475 internal variables.
6476 (create_trace_state_variable): New parameter `gdb'. Handle it.
6477 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6478 (cmd_qtdp): Handle fast tracepoints.
6479 (cmd_qtdv): Adjust.
6480 (max_jump_pad_size): New.
6481 (gdb_jump_pad_head): New.
6482 (get_jump_space_head): New.
6483 (claim_jump_space): New.
6484 (sort_tracepoints): New.
6485 (MAX_JUMP_SIZE): New.
6486 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6487 IPA.
6488 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6489 support. Upload fast traceframes, and delete internal IPA
6490 breakpoints.
6491 (stop_tracing_handler): New.
6492 (flush_trace_buffer_handler): New.
6493 (cmd_qtstop): Upload fast tracepoints.
6494 (response_tracepoint): Handle fast tracepoints.
6495 (tracepoint_finished_step): Upload fast traceframes. Set the
6496 tracepoint hit context's tracepoint type.
6497 (handle_tracepoint_bkpts): New.
6498 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6499 type. Add comment about fast tracepoints.
6500 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6501 non-existing action_str field.
6502 (get_context_regcache): Handle fast tracepoints.
6503 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6504 to the regcache.
6505 (fast_tracepoint_from_jump_pad_address): New.
6506 (fast_tracepoint_from_ipa_tpoint_address): New.
6507 (collecting_t): New.
6508 (force_unlock_trace_buffer): New.
6509 (fast_tracepoint_collecting): New.
6510 (collecting): New.
6511 (gdb_collect): New.
6512 (write_inferior_data_ptr): New.
6513 (target_tp_heap): New.
6514 (target_malloc): New.
6515 (download_agent_expr): New.
6516 (UALIGN): New.
6517 (download_tracepoints): New.
6518 (download_trace_state_variables): New.
6519 (upload_fast_traceframes): New.
6520 (IPA_FIRST_TRACEFRAME): New.
6521 (IPA_NEXT_TRACEFRAME_1): New.
6522 (IPA_NEXT_TRACEFRAME): New.
6523 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6524 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6525 (gdb_jump_pad_buffer_end): New.
6526 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6527 (initialize_tracepoint): Adjust.
6528 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6529 buffer. Initialize the low module.
6530 * utils.c (PREFIX, TOOLNAME): New.
6531 (malloc_failure): Use PREFIX.
6532 (error): In the IPA, an error causes an exit.
6533 (fatal, warning): Use PREFIX.
6534 (internal_error): Use TOOLNAME.
6535 (NUMCELLS): Increase to 10.
6536 * configure, config.in: Regenerate.
6537
d149dd1d
PA
65382010-06-01 Pedro Alves <pedro@codesourcery.com>
6539
6540 * server.c (handle_query) <qSupported>: Do two passes over the
6541 qSupported string to avoid nesting strtok.
6542
f6528abd
JK
65432010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6544
6545 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6546 (CDEPS): New.
6547 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6548 -Wl,--dynamic-list.
6549 * configure: Regenerate.
6550 * proc-service.list: New.
6551
ca2a87a0
JK
65522010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6553
6554 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6555 New comment.
6556
363a6e9f
OS
65572010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6558
6559 * gdbreplay.c (remote_open): Check error return from socket() call by
6560 its equality to -1 not by it being negative.
6561 * remote-utils.c (remote_open): Likewise.
6562
d23b6cb1
PA
65632010-05-23 Pedro Alves <pedro@codesourcery.com>
6564
6565 * config.h: Regenerate.
6566
28d3cf85
MK
65672010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6568
6569 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6570 doesn't provide PTRACE_GET_THREAD_AREA.
6571
fea36a59
MK
65722010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6573
6574 * linux-m68k-low.c: Include <asm/ptrace.h>
6575 (ps_get_thread_area): Implement.
6576
24b066ba
DE
65772010-05-03 Doug Evans <dje@google.com>
6578
6579 * event-loop.c (struct callback_event): New struct.
6580 (callback_list): New global.
6581 (append_callback_event, delete_callback_event): New functions.
6582 (process_callback): New function.
6583 (start_event_loop): Call it.
6584 * remote-utils.c (NOT_SCHEDULED): Define.
6585 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6586 moved out of readchar.
6587 (readchar): Rewrite. Call reschedule before returning.
6588 (reset_readchar): New function.
6589 (remote_close): Call it.
6590 (process_remaining, reschedule): New functions.
6591 * server.h (callback_handler_func): New typedef.
6592 (append_callback_event, delete_callback_event): Declare.
6593
9836d6ea
PA
65942010-05-03 Pedro Alves <pedro@codesourcery.com>
6595
6596 * proc-service.c (ps_pglobal_lookup): Use
6597 thread_db_look_up_one_symbol.
6598 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6599 parameter. Use it instead of all_symbols_looked_up.
6600 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6601 field.
6602 (all_symbols_looked_up): Don't declare.
6603 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6604 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6605 field.
6606 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6607 Set all_symbols_looked_up here.
6608 (thread_db_look_up_one_symbol): New.
6609 (thread_db_get_tls_address): Adjust.
6610 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6611 thread_db object on the heap, and tentatively set it in the
6612 process structure.
6613 (thread_db_init): Don't set all_symbols_looked_up here.
6614 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6615
7984d532
PA
66162010-05-03 Pedro Alves <pedro@codesourcery.com>
6617
6618 * linux-low.c (linux_kill, linux_detach): Adjust.
6619 (status_pending_p_callback): Remove redundant statement. Check
6620 for !TARGET_WAITIKIND_IGNORE, instead of
6621 TARGET_WAITKIND_STOPPED.
6622 (handle_tracepoints): Make sure LWP is locked. Adjust.
6623 (linux_wait_for_event_1): Adjust.
6624 (linux_cancel_breakpoints): New.
6625 (unsuspend_one_lwp): New.
6626 (unsuspend_all_lwps): New.
6627 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6628 (send_sigstop_callback): Change return type to int, add new
6629 `except' parameter and handle it.
6630 (suspend_and_send_sigstop_callback): New.
6631 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6632 pass them down. If SUSPEND, also increment the lwp's suspend
6633 count.
6634 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6635 (need_step_over_p): Don't consider suspended LWPs.
6636 (start_step_over): Adjust.
6637 (proceed_one_lwp): Change return type to int, add new `except'
6638 parameter and handle it.
6639 (unsuspend_and_proceed_one_lwp): New.
6640 (proceed_all_lwps): Use find_inferior instead of
6641 for_each_inferior.
6642 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6643 also decrement the suspend count of LWPs. Pass `except' down,
6644 instead of hacking its suspend count.
6645 (linux_pause_all): Add `freeze' parameter. Adjust.
6646 (linux_unpause_all): New.
6647 (linux_target_ops): Install linux_unpause_all.
6648 * server.c (handle_status): Adjust.
6649 * target.h (struct target_ops): New fields `unpause_all' and
6650 `cancel_breakpoints'. Add new parameter to `pause_all'.
6651 (pause_all): Add new `freeze' parameter.
6652 (unpause_all): New.
6653 (cancel_breakpoints): New.
6654 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6655 cancel breakpoints.
6656 (cmd_qtstart): Pause threads.
6657 (stop_tracing): Pause threads, and cancel breakpoints.
6658 * win32-low.c (win32_target_ops): Adjust.
6659
e471f25b
PA
66602010-05-03 Pedro Alves <pedro@codesourcery.com>
6661
6662 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6663 the inferior right away from here...
6664 (linux_wait_1): ... to here, and adjust to check the thread's
6665 last_resume_kind instead of the lwp's step or stop_expected flags.
6666
1915ef4f
PA
66672010-05-02 Pedro Alves <pedro@codesourcery.com>
6668
6669 * README: Use consistent `GDB' and `GDBserver' spellings.
6670
f9e39928
PA
66712010-05-02 Pedro Alves <pedro@codesourcery.com>
6672
6673 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6674 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6675 (linux_detach_one_lwp): Assume the lwp is stopped.
6676 (any_thread_of): Delete.
6677 (linux_detach): Stop all lwps here. Don't blindly delete all
6678 breakpoints.
6679 (delete_lwp_callback): New.
6680 (linux_mourn): Delete all lwps of the process that is gone.
6681 (linux_wait_1): Don't delete the last lwp of the process here.
6682 * mem-break.h (mark_breakpoints_out): Declare.
6683 * mem-break.c (mark_breakpoints_out): New.
6684 (free_all_breakpoints): Use it.
6685 * server.c (handle_target_event): If the process is gone, mark
6686 breakpoints out.
6687 * thread-db.c (struct thread_db) <create_bp>: New field.
6688 (thread_db_enable_reporting): Fix prototype. Store a thread event
6689 breakpoint reference in the thread_db struct.
6690 (thread_db_load_search): Clear the thread_db object.
6691 (try_thread_db_load_1): Ditto.
6692 (switch_to_process): New.
6693 (disable_thread_event_reporting): Use it.
6694 (remove_thread_event_breakpoints): New.
6695 (thread_db_detach, thread_db_mourn): Use it.
6696
1e7fc18c
PA
66972010-05-01 Pedro Alves <pedro@codesourcery.com>
6698
6699 * linux-low.c (linux_enable_event_reporting): New.
6700 (linux_wait_for_event_1, handle_extended_wait): Use it.
6701
02fc4de7
PA
67022010-04-30 Pedro Alves <pedro@codesourcery.com>
6703
6704 * linux-low.c (linux_kill_one_lwp, linux_kill)
6705 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6706 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6707 SIGSTOP even if the LWP is stopped.
6708 (send_sigstop_callback): New.
6709 (stop_all_lwps): Use send_sigstop_callback instead.
6710 (linux_resume_one_thread): Adjust.
6711 (proceed_one_lwp): Still proceed an LWP that the client has
6712 requested to stop, if we haven't reported it as stopped yet. Make
6713 sure that LWPs the client want stopped, have a pending SIGSTOP.
6714
bc3b5632
DE
67152010-04-26 Doug Evans <dje@google.com>
6716
ae1ada35
DE
6717 * server.c (handle_general_set): Make static.
6718
bc3b5632
DE
6719 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6720 Print received char after testing for error/eof instead of before.
6721 (input_interrupt): Tweak comment.
6722
65730243
DE
67232010-04-23 Doug Evans <dje@google.com>
6724
6725 * server.c (start_inferior): Print inferior argv if --debug.
6726
a8ae7dc0
AR
67272010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6728
6729 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6730 * nto-x86-low.c: Include server.h
6731
1c07cc19
PM
67322010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6733
6734 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6735 be consistent with other sources of this directory.
6736 (init_registers_amd64): Correct name of source file of this function
6737 in the comment.
6738
e0a61e09
PM
67392010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6740
6741 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6742 64-bit executables.
6743
54709339
PM
67442010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6745
6746 * win32-i386-low.c: Add 64-bit support.
6747 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6748 (init_registers_amd64): Declare.
6749 (mappings): Add 64-bit version of array.
6750 (init_windows_x86): New function.
6751 (the_low_target): Change init_arch field to init_windows_x86.
6752
e8f0053d
PM
67532010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6754
6755 * win32-low.c: Adapt to support also 64-bit architecture.
6756 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6757 (get_image_name): Use SIZE_T type for local variable `done'.
6758 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6759 (toolhelp_get_dll_name): Idem.
6760 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6761 Use uintptr_t typecast to avoid warning.
6762 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6763 (handle_exception): Use phex_nz to avoid warning.
6764 (win32_wait): Remove unused local variable `process'.
6765
c481e77e
PM
67662010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6767
6768 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6769 `amd64-avx.o'.
6770
12ea4b69
PM
67712010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6772
6773 * configure.ac: Use `ws2_32' library for srv_mingw.
6774 * configure: Regenerate.
6775 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6776 * remote-utils.c: Likewise.
6777
f6d1620c
L
67782010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6779
6780 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6781 if __x86_64__ is defined.
6782
8e642873
PM
67832010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6784
6785 * configure: Regenerate.
6786
711e434b
PM
67872010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6788
6789 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6790 * target.h (target_ops): New get_tib_address field.
6791 * win32-low.h (win32_thread_info): Add thread_local_base field.
6792 * win32-low.c (child_add_thread): Add tlb argument.
6793 Set thread_local_base field to TLB.
6794 (get_child_debug_event): Adapt to child_add_thread change.
6795 (win32_get_tib_address): New function.
6796 (win32_target_ops): Set get_tib_address field to
6797 win32_get_tib_address.
6798 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6799
505106cd
PA
68002010-04-12 Pedro Alves <pedro@codesourcery.com>
6801
505106cd
PA
6802 * linux-low.c (linux_mourn): Also remove the process.
6803 * server.c (handle_target_event): Don't remove the process here.
6804 * nto-low.c (nto_mourn): New.
6805 (nto_target_ops): Install it.
6806 * spu-low.c (spu_mourn): New.
6807 (spu_target_ops): Install it.
6808 * win32-low.c (win32_mourn): New.
6809 (win32_target_ops): Install it.
6810
e8470a06
PA
68112010-04-12 Pedro Alves <pedro@codesourcery.com>
6812
6813 * server.h (buffer_xml_printf): Remove redundant `;'.
6814
45ba0d02
PA
68152010-04-12 Pedro Alves <pedro@codesourcery.com>
6816
6817 * regcache.c (set_register_cache): Invalidate regcaches before
6818 changing the register cache layout.
6819 (regcache_invalidate_one): Allow a NULL regcache.
6820 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6821 regcaches before changing the register cache layout or the target
6822 regsets.
6823
59e04013
L
68242010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6825
6826 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6827 variable warning on Linux/x86-64.
6828
8336d594
PA
68292010-04-11 Pedro Alves <pedro@codesourcery.com>
6830
6831 GDBserver disconnected tracing support.
6832
6833 * linux-low.c (linux_remove_process): Delete.
6834 (add_lwp): Don't set last_resume_kind here.
6835 (linux_kill): Use `mourn'.
6836 (linux_detach): Use `thread_db_detach', and `mourn'.
6837 (linux_mourn): New.
6838 (linux_attach_lwp_1): Adjust comment.
6839 (linux_attach): last_resume_kind moved the thread_info; adjust.
6840 (status_pending_p_callback): Adjust.
6841 (linux_wait_for_event_1): Adjust.
6842 (count_events_callback, select_singlestep_lwp_callback)
6843 (select_event_lwp_callback, cancel_breakpoints_callback)
6844 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6845 (proceed_one_lwp): Adjust.
6846 (linux_async): Add debug output.
6847 (linux_thread_stopped): New.
6848 (linux_pause_all): New.
6849 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6850 linux_pause_all.
6851 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6852 (thread_db_free): Delete declaration.
6853 (thread_db_detach, thread_db_mourn): Declare.
6854 * thread-db.c (thread_db_init): Use thread_db_mourn.
6855 (thread_db_free): Delete, split in two.
6856 (disable_thread_event_reporting): New.
6857 (thread_db_detach): New.
6858 (thread_db_mourn): New.
6859
6860 * server.h (struct thread_info) <last_resume_kind>: New field.
6861 <attached>: Add comment.
6862 <gdb_detached>: New field.
6863 (handler_func): Change return type to int.
6864 (handle_serial_event, handle_target_event): Ditto.
6865 (gdb_connected): Declare.
6866 (tracing): Delete.
6867 (disconnected_tracing): Declare.
6868 (stop_tracing): Declare.
6869
6870 * server.c (handle_query) <qSupported>: Report support for
6871 disconnected tracing.
6872 (queue_stop_reply_callback): Account for running threads.
6873 (gdb_wants_thread_stopped): New.
6874 (gdb_wants_all_threads_stopped): New.
6875 (gdb_reattached_process): New.
6876 (handle_status): Clear the `gdb_detached' flag of all processes.
6877 In all-stop, stop all threads.
6878 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6879 (process_serial_event): If the remote connection breaks, or if an
6880 exit was forced with "monitor exit", force an event loop exit.
6881 Handle disconnected tracing on detach.
6882 (handle_serial_event): Adjust.
6883 (handle_target_event): If GDB isn't connected, forward events back
6884 to the inferior, unless the last process exited, in which case,
6885 exit gdbserver. Adjust interface.
6886
6887 * remote-utils.c (remote_open): Don't block in accept. Instead
6888 register an event loop source on the listen socket file
6889 descriptor. Refactor bits into ...
6890 (listen_desc): ... this new global.
6891 (gdb_connected): ... this new function.
6892 (enable_async_notification): ... this new function.
6893 (handle_accept_event): ... this new function.
6894 (remote_close): Clear remote_desc.
6895
6896 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6897
6898 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6899 New fields.
6900 (mourn_inferior): Define.
6901 (target_process_qsupported): Avoid the dangling else problem.
6902 (thread_stopped): Define.
6903 (pause_all): Define.
6904 (target_waitstatus_to_string): Declare.
6905 * target.c (target_waitstatus_to_string): New.
6906
6907 * tracepoint.c (tracing): Make extern.
6908 (disconnected_tracing): New.
6909 (stop_tracing): Make extern. Handle tracing stops due to GDB
6910 disconnecting.
6911 (cmd_qtdisconnected): New.
6912 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6913 (handle_tracepoint_general_set): Handle QTDisconnected.
6914
6915 * event-loop.c (event_handler_func): Change return type to int.
6916 (process_event): Bail out if the event handler wants the event
6917 loop to stop.
6918 (handle_file_event): Ditto.
6919 (start_event_loop): Bail out if the event handler wants the event
6920 loop to stop.
6921
6922 * nto-low.c (nto_target_ops): Adjust.
6923 * spu-low.c (spu_wait): Don't remove the process here.
6924 (spu_target_ops): Adjust.
6925 * win32-low.c (win32_wait): Don't remove the process here.
6926 (win32_target_ops): Adjust.
6927
5d267c4c
PA
69282010-04-11 Pedro Alves <pedro@codesourcery.com>
6929
6930 * regcache.c (realloc_register_cache): Invalidate inferior's
6931 regcache before recreating it.
6932
623ccd72
PA
69332010-04-09 Pedro Alves <pedro@codesourcery.com>
6934
6935 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6936
219f2f23
PA
69372010-04-09 Stan Shebs <stan@codesourcery.com>
6938 Pedro Alves <pedro@codesourcery.com>
6939
6940 * server.h (LONGEST): New.
6941 (struct thread_info) <while_stepping>: New field.
6942 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6943 Declare.
6944 (initialize_tracepoint, handle_tracepoint_general_set)
6945 (handle_tracepoint_query, tracepoint_finished_step)
6946 (tracepoint_was_hit, release_while_stepping_state_list):
6947 (current_traceframe): Declare.
6948 * server.c (handle_general_set): Handle tracepoint packets.
6949 (read_memory): New.
6950 (write_memory): New.
6951 (handle_search_memory_1): Use read_memory.
6952 (handle_query): Report support for conditional tracepoints, trace
6953 state variables, and tracepoint sources. Handle tracepoint
6954 queries.
6955 (main): Initialize the tracepoints module.
6956 (process_serial_event): Handle traceframe reads/writes.
6957
6958 * linux-low.c (handle_tracepoints): New.
6959 (linux_wait_1): Call it.
6960 (linux_resume_one_lwp): Handle while-stepping.
6961 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6962 (linux_target_ops): Install them.
6963 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6964 New field.
6965 * linux-x86-low.c (x86_supports_tracepoints): New.
6966 (the_low_target). Install it.
6967
6968 * mem-break.h (delete_breakpoint): Declare.
6969 * mem-break.c (delete_breakpoint): Make external.
6970
6971 * target.h (struct target_ops): Add `supports_tracepoints',
6972 `read_pc', and `write_pc' fields.
6973 (target_supports_tracepoints): Define.
6974 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6975 (phex_nz): New.
6976
6977 * regcache.h (struct regcache) <registers_owned>: New field.
6978 (init_register_cache, regcache_cpy): Declare.
6979 (regcache_read_pc, regcache_write_pc): Declare.
6980 (register_cache_size): Declare.
6981 (supply_regblock): Declare.
6982 * regcache.c (init_register_cache): New.
6983 (new_register_cache): Use it.
6984 (regcache_cpy): New.
6985 (register_cache_size): New.
6986 (supply_regblock): New.
6987 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 6988
219f2f23
PA
6989 * tracepoint.c: New.
6990
6991 * Makefile.in (OBS): Add tracepoint.o.
6992 (tracepoint.o): New rule.
6993
3a13a53b
L
69942010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6995
6996 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6997 (i386-mmx.o): New.
6998 (i386-mmx.c): Likewise.
6999 (i386-mmx-linux.o): Likewise.
7000 (i386-mmx-linux.c): Likewise.
7001
7002 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7003 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7004 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7005 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7006
7007 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7008 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7009 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7010
1570b33e
L
70112010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7012
7013 * Makefile.in (clean): Updated.
7014 (i386-avx.o): New.
7015 (i386-avx.c): Likewise.
7016 (i386-avx-linux.o): Likewise.
7017 (i386-avx-linux.c): Likewise.
7018 (amd64-avx.o): Likewise.
7019 (amd64-avx.c): Likewise.
7020 (amd64-avx-linux.o): Likewise.
7021 (amd64-avx-linux.c): Likewise.
7022
7023 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7024 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7025 (srv_amd64_regobj): Add amd64-avx.o.
7026 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7027 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7028 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7029 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7030 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7031 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7032 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7033
7034 * i387-fp.c: Include "i386-xstate.h".
7035 (i387_xsave): New.
7036 (i387_cache_to_xsave): Likewise.
7037 (i387_xsave_to_cache): Likewise.
7038 (x86_xcr0): Likewise.
7039
7040 * i387-fp.h (i387_cache_to_xsave): Likewise.
7041 (i387_xsave_to_cache): Likewise.
7042 (x86_xcr0): Likewise.
7043
7044 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7045 * linux-crisv32-low.c (target_regsets): Likewise.
7046 * linux-m68k-low.c (target_regsets): Likewise.
7047 * linux-mips-low.c (target_regsets): Likewise.
7048 * linux-ppc-low.c (target_regsets): Likewise.
7049 * linux-s390-low.c (target_regsets): Likewise.
7050 * linux-sh-low.c (target_regsets): Likewise.
7051 * linux-sparc-low.c (target_regsets): Likewise.
7052 * linux-xtensa-low.c (target_regsets): Likewise.
7053
7054 * linux-low.c: Include <sys/uio.h>.
7055 (regsets_fetch_inferior_registers): Support nt_type.
7056 (regsets_store_inferior_registers): Likewise.
7057 (linux_process_qsupported): New.
7058 (linux_target_ops): Add linux_process_qsupported.
7059
7060 * linux-low.h (regset_info): Add nt_type.
7061 (linux_target_ops): Add process_qsupported.
7062
7063 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7064 and <sys/uio.h>.
7065 (init_registers_i386_avx_linux): New.
7066 (init_registers_amd64_avx_linux): Likewise.
7067 (xmltarget_i386_linux_no_xml): Likewise.
7068 (xmltarget_amd64_linux_no_xml): Likewise.
7069 (PTRACE_GETREGSET): Likewise.
7070 (PTRACE_SETREGSET): Likewise.
7071 (x86_fill_xstateregset): Likewise.
7072 (x86_store_xstateregset): Likewise.
7073 (use_xml): Likewise.
7074 (x86_linux_update_xmltarget): Likewise.
7075 (x86_linux_process_qsupported): Likewise.
7076 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7077 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7078 init_registers_i386_linux here. Call
7079 x86_linux_update_xmltarget.
7080 (the_low_target): Add x86_linux_process_qsupported.
7081
7082 * server.c (handle_query): Call target_process_qsupported.
7083
7084 * target.h (target_ops): Add process_qsupported.
7085 (target_process_qsupported): New.
7086
fc7238bb
PA
70872010-04-03 Pedro Alves <pedro@codesourcery.com>
7088
7089 * inferiors.c (add_thread): Set last_status kind to
7090 TARGET_WAITKIND_IGNORE.
7091 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7092 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7093 (linux_wait_1): Move `thread' local definition to block that uses
7094 it. Don't NULL initialize `event_child'.
7095 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7096 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7097 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7098
bdabb078
PA
70992010-04-01 Pedro Alves <pedro@codesourcery.com>
7100
7101 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7102 an extended waitstatus, or by a watchpoint.
7103 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7104 thread was stepping or has been stopped by a watchpoint.
7105
d3bbe7a0
PA
71062010-04-01 Pedro Alves <pedro@codesourcery.com>
7107
7108 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7109 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7110 of another, then delete the previous, and validate all
7111 breakpoints.
7112 (validate_inserted_breakpoint): New.
7113 (delete_disabled_breakpoints): New.
7114 (validate_breakpoints): New.
7115 (check_mem_read): Validate breakpoints before trusting their
7116 shadow. Delete disabled breakpoints.
7117 (check_mem_write): Validate breakpoints before trusting they
7118 should be inserted. Delete disabled breakpoints.
7119 * mem-break.h (validate_breakpoints):
7120 * server.c (handle_query): Validate breakpoints when we see a
7121 qSymbol query.
7122
8b07ae33
PA
71232010-04-01 Pedro Alves <pedro@codesourcery.com>
7124
7125 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7126 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7127 if we could tell there's a GDB breakpoint at stop_pc.
7128 (need_step_over_p): Don't do a step over if we find a GDB
7129 breakpoint at the resume PC.
7130
7131 * mem-break.c (struct raw_breakpoint): New.
7132 (enum bkpt_type): New type `gdb_breakpoint'.
7133 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7134 fields. New field `raw'.
7135 (find_raw_breakpoint_at): New.
7136 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7137 breakpoint instead.
7138 (set_breakpoint_at): Adjust.
7139 (delete_raw_breakpoint): New.
7140 (release_breakpoint): New.
7141 (delete_breakpoint): Rename to...
7142 (delete_breakpoint_1): ... this. Add proc parameter. Use
7143 release_breakpoint. Return ENOENT.
7144 (delete_breakpoint): Reimplement.
7145 (find_breakpoint_at): Delete.
7146 (find_gdb_breakpoint_at): New.
7147 (delete_breakpoint_at): Delete.
7148 (set_gdb_breakpoint_at): New.
7149 (delete_gdb_breakpoint_at): New.
7150 (gdb_breakpoint_here): New.
7151 (set_reinsert_breakpoint): Use release_breakpoint.
7152 (uninsert_breakpoint): Rename to ...
7153 (uninsert_raw_breakpoint): ... this.
7154 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7155 (reinsert_raw_breakpoint): Change parameter type to
7156 raw_breakpoint.
7157 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7158 instead.
7159 (check_breakpoints): Adjust. Use release_breakpoint.
7160 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7161 (breakpoint_inserted_here): Ditto.
7162 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7163 Don't trust the breakpoint's shadow if it is not inserted.
7164 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7165 (delete_all_breakpoints): Adjust.
7166 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7167 use delete_breakpoint_1.
7168
7169 * mem-break.h (breakpoints_supported): Delete declaration.
7170 (set_gdb_breakpoint_at): Declare.
7171 (gdb_breakpoint_here): Declare.
7172 (delete_breakpoint_at): Delete.
7173 (delete_gdb_breakpoint_at): Declare.
7174
7175 * server.h (struct raw_breakpoint): Forward declare.
7176 (struct process_info): New field `raw_breakpoints'.
7177
7178 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7179 breakpoints.
7180
6bf5e0ba
PA
71812010-03-24 Pedro Alves <pedro@codesourcery.com>
7182
7183 * linux-low.c (status_pending_p_callback): Fix comment.
7184 (linux_wait_for_event_1): Move most of the internal breakpoint
7185 handling from here...
7186 (linux_wait_1): ... to here.
7187 (count_events_callback): New.
7188 (select_singlestep_lwp_callback): New.
7189 (select_event_lwp_callback): New.
7190 (cancel_breakpoints_callback): New.
7191 (select_event_lwp): New.
7192 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7193 priority to all LWPs that have had events that should be reported
7194 to the client. Cancel breakpoints when about to reporting the
7195 event to the client, not while stopping lwps. No longer cancel
7196 finished single-steps here.
7197 (cancel_finished_single_step): Delete.
7198 (cancel_finished_single_steps): Delete.
7199
414a389f
PA
72002010-03-24 Pedro Alves <pedro@codesourcery.com>
7201
7202 * mem-break.c (enum bkpt_type): New.
7203 (struct breakpoint): New field `type'.
7204 (set_breakpoint_at): Change return type to struct breakpoint
7205 pointer. Set type to `other_breakpoint' by default.
7206 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7207 in the breakpoint list.
7208 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7209 (reinsert_breakpoint): Rename to ...
7210 (reinsert_raw_breakpoint): ... this.
7211 (reinsert_breakpoints_at): Adjust.
7212 * mem-break.h (struct breakpoint): Declare.
7213 (set_breakpoint_at): Change return type to struct breakpoint
7214 pointer.
7215
2280c721
PA
72162010-03-24 Pedro Alves <pedro@codesourcery.com>
7217
7218 * server.c (handle_query): Assign, not compare.
7219
d50171e4
PA
72202010-03-24 Pedro Alves <pedro@codesourcery.com>
7221
7222 Teach linux gdbserver to step-over-breakpoints.
7223
7224 * linux-low.c (can_hardware_single_step): New.
7225 (supports_breakpoints): New.
7226 (handle_extended_wait): If stopping threads, read the stop pc of
7227 the new cloned LWP.
7228 (get_pc): New.
7229 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7230 low target doesn't support retrieving the PC.
7231 (add_lwp): Set last_resume_kind to resume_continue.
7232 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7233 (linux_attach): Don't clear stop_expected. Set the lwp's
7234 last_resume_kind to resume_stop.
7235 (linux_detach_one_lwp): Don't check for removed breakpoints.
7236 (check_removed_breakpoint): Delete.
7237 (status_pending_p): Rename to ...
7238 (status_pending_p_callback): ... this. Don't check for removed
7239 breakpoints. Don't consider threads that are stopped from GDB's
7240 perspective.
7241 (linux_wait_for_lwp): Always read the stop_pc here.
7242 (cancel_breakpoint): New.
7243 (step_over_bkpt): New global.
7244 (linux_wait_for_event_1): Implement stepping over breakpoints.
7245 (gdb_wants_lwp_stopped): New.
7246 (gdb_wants_all_stopped): New.
7247 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7248 single-step traps here. Store the thread's last reported target
7249 wait status.
7250 (send_sigstop): Don't clear stop_expected. Always set it,
7251 instead.
7252 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7253 (cancel_finished_single_step): New.
7254 (cancel_finished_single_steps): New.
7255 (wait_for_sigstop): Don't cancel finished single-step traps here.
7256 (linux_resume_one_lwp): Don't check for removed breakpoints.
7257 Don't set `step' on non-hardware step archs.
7258 (linux_set_resume_request): Ignore resume_stop requests if already
7259 stopping or stopped. Set the lwp's last_resume_kind.
7260 (resume_status_pending_p): Don't check for removed breakpoints.
7261 (need_step_over_p): New.
7262 (start_step_over): New.
7263 (finish_step_over): New.
7264 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7265 requests. Clear the thread's last reported target waitstatus.
7266 Don't use the `suspended' flag. Don't consider pending breakpoints.
7267 (linux_resume): Start a step-over if necessary.
7268 (proceed_one_lwp): New.
7269 (proceed_all_lwps): New.
7270 (unstop_all_lwps): New.
7271 * linux-low.h (struct lwp_info): Rewrite comment for the
7272 `suspended' flag. Add the `stop_pc' field. Delete the
7273 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7274 Add `'last_resume_kind' and `need_step_over' fields.
7275 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7276 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7277 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7278 (set_raw_breakpoint_at): New.
7279 (set_breakpoint_at): Rewrite to use it.
7280 (reinsert_breakpoint_handler): Delete.
7281 (set_reinsert_breakpoint): New.
7282 (reinsert_breakpoint_by_bp): Delete.
7283 (delete_reinsert_breakpoints): New.
7284 (uninsert_breakpoint): Rewrite.
7285 (uninsert_breakpoints_at): New.
7286 (reinsert_breakpoint): Rewrite.
7287 (reinsert_breakpoints_at): New.
7288 (check_breakpoints): Rewrite.
7289 (breakpoint_here): New.
7290 (breakpoint_inserted_here): New.
7291 (check_mem_read): Adjust.
7292 * mem-break.h (breakpoints_supported, breakpoint_here)
7293 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7294 (reinsert_breakpoint_by_bp): Delete declaration.
7295 (delete_reinsert_breakpoints): Declare.
7296 (reinsert_breakpoint): Delete declaration.
7297 (reinsert_breakpoints_at): Declare.
7298 (uninsert_breakpoint): Delete declaration.
7299 (uninsert_breakpoints_at): Declare.
7300 (check_breakpoints): Adjust prototype.
7301 * server.h: Adjust include order.
7302 (struct thread_info): Declare here. Add a `last_status' field.
7303
30ba68cb
MS
73042010-03-23 Michael Snyder <msnyder@vmware.com>
7305
7306 * server.c (crc32): New function.
7307 (handle_query): Add handling for 'qCRC:' request.
7308
b9a881c2
PA
73092010-03-23 Pedro Alves <pedro@codesourcery.com>
7310
7311 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7312 lwp had been stopped by a watchpoint.
7313
e92d13d5
PA
73142010-03-16 Pedro Alves <pedro@codesourcery.com>
7315
7316 * server.h (internal_error): Declare.
7317 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7318 * utils.c (internal_error): New function.
7319
64daa791
AS
73202010-03-15 Andreas Schwab <schwab@redhat.com>
7321
7322 * configure.srv: Fix typo setting srv_regobj.
7323
f52cd8cd
PA
73242010-03-15 Pedro Alves <pedro@codesourcery.com>
7325
7326 * linux-low.c (fetch_register): Avoid passing a non string literal
7327 format to `error'.
7328 (usr_store_inferior_registers): Ditto.
7329
93ae6fdc
PA
73302010-03-14 Pedro Alves <pedro@codesourcery.com>
7331
7332 * linux-low.c (linux_write_memory): Bail out early if peeking
7333 memory failed.
7334
c3adc08c
PA
73352010-03-14 Pedro Alves <pedro@codesourcery.com>
7336
7337 * linux-low.h (struct lwp_info): New fields
7338 `stopped_by_watchpoint' and `stopped_data_address'.
7339 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7340 here, and cache them in the lwp object.
7341 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7342 directly.
7343 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7344 field.
7345 (linux_stopped_by_watchpoint): Rewrite.
7346 (linux_stopped_data_address): Rewrite.
7347
bce522a2
PA
73482010-03-06 Simo Melenius <simo.melenius@iki.fi>
7349
7350 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7351 switching the current inferior, not before.
7352
90884b2b
L
73532010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7354
7355 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7356 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7357 i386-linux.c and amd64-linux.c.
7358 (reg-i386.o): Removed.
7359 (reg-i386.c): Likewise.
7360 (reg-i386-linux.o): Likewise.
7361 (reg-i386-linux.c): Likewise.
7362 (reg-x86-64.o): Likewise.
7363 (reg-x86-64.c): Likewise.
7364 (reg-x86-64-linux.o): Likewise.
7365 (reg-x86-64-linux.c): Likewise.
7366 (i386.o): New.
7367 (i386.c): Likewise.
7368 (i386-linux.o): Likewise.
7369 (i386-linux.c): Likewise.
7370 (amd64.o): Likewise.
7371 (amd64.c): Likewise.
7372 (amd64-linux.o): Likewise.
7373 (amd64-linux.c): Likewise.
7374
7375 * configure.srv (srv_i386_regobj): New.
7376 (srv_i386_linux_regobj): Likewise.
7377 (srv_amd64_regobj): Likewise.
7378 (srv_amd64_linux_regobj): Likewise.
7379 (srv_i386_32bit_xmlfiles): Likewise.
7380 (srv_i386_64bit_xmlfiles): Likewise.
7381 (srv_i386_xmlfiles): Likewise.
7382 (srv_amd64_xmlfiles): Likewise.
7383 (srv_i386_linux_xmlfiles): Likewise.
7384 (srv_amd64_linux_xmlfiles): Likewise.
7385 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7386 srv_xmlfiles to $srv_i386_xmlfiles.
7387 (i[34567]86-*-mingw32ce*): Likewise.
7388 (i[34567]86-*-mingw*): Likewise.
7389 (i[34567]86-*-nto*): Likewise.
7390 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7391 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7392 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7393 (x86_64-*-linux*): Likewise.
7394
7395 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7396 (init_registers_amd64_linux): New.
7397 (x86_arch_setup): Replace init_registers_x86_64_linux with
7398 init_registers_amd64_linux.
7399
193f13e6
MK
74002010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7401
7402 * configure.ac: Check for libdl. If it is not available link against
7403 static libthread_db.
7404 * configure: Regenerate.
7405
85d721b8
PA
74062010-02-22 Pedro Alves <pedro@codesourcery.com>
7407
7408 PR9605
7409
7410 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7411 handing a read watchpoint.
7412 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7413
6076632b
DE
74142010-02-12 Doug Evans <dje@google.com>
7415
7416 * linux-low.c (linux_supports_tracefork_flag): Document.
7417 (linux_look_up_symbols): Add comment.
7418
3327ccf7
L
74192010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7420
7421 * regcache.c (supply_register): Clear regcache if buf is NULL.
7422
0718675c 74232010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7424 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7425
7426 * inferiors.c (find_inferior): Add function documentation.
7427 (unloaded_dll): Handle the case where the unloaded dll has not
7428 been previously registered in the dll list.
7429
177321bd
DJ
74302010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7431
7432 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7433 (thumb2_breakpoint): New.
7434 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7435
2b009048
DJ
74362010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7437
7438 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7439 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7440 breakpoints.
7441
3be029c7
PA
74422010-01-21 Pedro Alves <pedro@codesourcery.com>
7443
7444 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7445
18f5de3b
JK
74462010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7447
7448 * linux-s390-low.c (s390_collect_ptrace_register)
7449 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7450
3743bb4f
DE
74512010-01-21 Doug Evans <dje@google.com>
7452
14ce3065
DE
7453 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7454 (PTRACE_ARG4_TYPE): New macro.
7455 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7456 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7457 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7458 (usr_store_inferior_registers): Ditto.
7459 (linux_read_memory, linux_write_memory): Ditto.
7460 (linux_test_for_tracefork): Ditto.
7461
3743bb4f
DE
7462 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7463 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7464
8b315be5
PA
74652010-01-21 Pedro Alves <pedro@codesourcery.com>
7466
7467 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7468 target.
7469
85492558
PA
74702010-01-21 Pedro Alves <pedro@codesourcery.com>
7471
7472 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7473 prototype to take a regcache. Adjust.
7474
442ea881
PA
74752010-01-20 Pedro Alves <pedro@codesourcery.com>
7476
7477 * regcache.h (struct thread_info): Forward declare.
7478 (struct regcache): New.
7479 (new_register_cache): Adjust prototype.
7480 (get_thread_regcache): Declare.
7481 (free_register_cache): Adjust prototype.
7482 (registers_to_string, registers_from_string): Ditto.
7483 (supply_register, supply_register_by_name, collect_register)
7484 (collect_register_as_string, collect_register_by_name): Ditto.
7485 * regcache.c (struct inferior_regcache_data): Delete.
7486 (get_regcache): Rename to ...
7487 (get_thread_regcache): ... this. Adjust. Switch inferior before
7488 fetching registers.
7489 (regcache_invalidate_one): Adjust.
7490 (regcache_invalidate): Fix prototype.
7491 (new_register_cache): Return the new register cache.
7492 (free_register_cache): Change prototype.
7493 (realloc_register_cache): Adjust.
7494 (registers_to_string): Change prototype to take a regcache. Adjust.
7495 (registers_from_string): Ditto.
7496 (register_data): Ditto.
7497 (supply_register): Ditto.
7498 (supply_register_by_name): Ditto.
7499 (collect_register): Ditto.
7500 (collect_register_as_string): Ditto.
7501 (collect_register_by_name): Ditto.
7502 * server.c (process_serial_event): Adjust.
7503 * linux-low.h (regset_fill_func, regset_store_func): Change
7504 prototype.
7505 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7506 Change prototype.
7507 * linux-low.c (get_stop_pc): Adjust.
7508 (check_removed_breakpoint): Adjust.
7509 (linux_wait_for_event): Adjust.
7510 (linux_resume_one_lwp): Adjust.
7511 (fetch_register): Add regcache parameter. Adjust.
7512 (usr_store_inferior_registers): Ditto.
7513 (regsets_fetch_inferior_registers): Ditto.
7514 (regsets_store_inferior_registers): Ditto.
7515 (linux_fetch_registers, linux_store_registers): Ditto.
7516 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7517 regcache. Adjust.
43aaf8b6
PA
7518 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7519 Ditto.
442ea881
PA
7520 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7521 prototype to take a regcache.
7522 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7523 * remote-utils.c (convert_ascii_to_int, outreg)
7524 (prepare_resume_reply): Change prototype to take a regcache.
7525 Adjust.
7526 * target.h (struct target_ops) <fetch_registers, store_registers>:
7527 Change prototype to take a regcache.
7528 (fetch_inferior_registers, store_inferior_registers): Change
7529 prototype to take a regcache. Adjust.
7530 * proc-service.c (ps_lgetregs): Adjust.
7531 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7532 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7533 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7534 take a regcache. Adjust.
7535 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7536 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7537 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7538 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7539 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7540 (cris_cannot_fetch_register):
7541 (cris_breakpoint_at): Change prototype to take a regcache.
7542 Adjust.
7543 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7544 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7545 to take a regcache. Adjust.
7546 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7547 Adjust.
7548 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7549 take a regcache. Adjust.
7550 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7551 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7552 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7553 * linux-mips-low.c (mips_get_pc):
7554 (mips_set_pc): Change prototype to take a regcache. Adjust.
7555 (mips_reinsert_addr): Adjust.
7556 (mips_collect_register): Change prototype to take a regcache.
7557 Adjust.
7558 (mips_supply_register):
7559 (mips_collect_register_32bit, mips_supply_register_32bit)
7560 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7561 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7562 * linux-ppc-low.c (ppc_supply_ptrace_register)
7563 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7564 (parse_spufs_run): Adjust.
7565 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7566 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7567 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7568 take a regcache. Adjust.
7569 * linux-s390-low.c (s390_collect_ptrace_register)
7570 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7571 (s390_set_pc): Change prototype to take a regcache. Adjust.
7572 (s390_arch_setup): Adjust.
7573 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7574 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7575 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7576 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7577 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7578 regcache. Adjust.
7579 (sparc_breakpoint_at): Adjust.
7580 * linux-xtensa-low.c (xtensa_fill_gregset):
7581 (xtensa_store_gregset):
7582 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7583 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7584 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7585 prototype to take a regcache. Adjust.
7586 * win32-arm-low.c (arm_fetch_inferior_register)
7587 (arm_store_inferior_register): Change prototype to take a
7588 regcache. Adjust.
7589 * win32-i386-low.c (i386_fetch_inferior_register)
7590 (i386_store_inferior_register): Change prototype to take a
7591 regcache. Adjust.
7592 * win32-low.c (child_fetch_inferior_registers)
7593 (child_store_inferior_registers): Change prototype to take a
7594 regcache. Adjust.
7595 (win32_wait): Adjust.
7596 (win32_fetch_inferior_registers): Change prototype to take a
7597 regcache. Adjust.
7598 (win32_store_inferior_registers): Adjust.
7599 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7600 store_inferior_register>: Change prototype to take a regcache.
7601
60c3d7b0
DE
76022010-01-20 Doug Evans <dje@google.com>
7603
7604 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7605 #ifdef.
7606 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7607 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7608
dc146f7c
VP
76092010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7610
7611 * linux-low.c (linux_core_of_thread): New.
7612 (compare_ints, show_process, list_threads): New.
7613 (linux_qxfer_osdata): Report threads and cores.
7614 (linux_target_op): Register linux_core_of_thread.
7615 * remote-utils.c (prepare_resume_reply): Report the core.
7616 (buffer_xml_printf): Support %d specifier.
7617 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7618 New.
7619 (handle_query): Handle qXfer:threads. Announce availability
7620 thereof.
7621 * target.h (struct target_ops): New field core_of_thread.
7622
7803799a
UW
76232010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7624
7625 * Makefile.in (clean): Remove new generated files.
7626 (reg-s390.o, reg-s390.c): Remove rules.
7627 (reg-s390x.o, reg-s390x.c): Likewise.
7628 (s390-linux32.o, s390-linux32.c): Add rules.
7629 (s390-linux64.o, s390-linux64.c): Likewise.
7630 (s390x-linux64.o, s390x-linux64.c): Likewise.
7631 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7632 * linux-s390-low.c: Include <elf.h>.
7633 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7634 (init_registers_s390): Remove prototype.
7635 (init_registers_s390x): Likewise.
7636 (init_registers_s390_linux32): Add prototype.
7637 (init_registers_s390_linux64): Likewise.
7638 (init_registers_s390x_linux64): Likewise.
7639 (s390_num_regs_3264): New define.
7640 (s390_regmap_3264): New global variable.
7641 (s390_cannot_fetch_register): Remove obsolete check.
7642 (s390_cannot_store_register): Likewise.
7643 (s390_collect_ptrace_register): Handle upper/lower register halves.
7644 (s390_supply_ptrace_register): Likewise.
7645 (s390_fill_gregset): Update to register number changes.
7646 (s390_get_hwcap): New routine.
7647 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7648 Install appropriate regmap and register set.
7649
6e7ffa39
JB
76502010-01-01 Joel Brobecker <brobecker@adacore.com>
7651
7652 * server.c (gdbserver_version): Update copyright year to 2010.
7653 * gdbreplay.c (gdbreplay_version): Likewise.
7654
957f3f49
DE
76552009-12-28 Doug Evans <dje@google.com>
7656
7657 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7658 elf/external.h. Include <elf.h> instead but only if necessary.
7659
ca5c370d
PA
76602009-12-28 Pedro Alves <pedro@codesourcery.com>
7661
7662 * linux-low.c (linux_remove_process): Remove `detaching'
7663 parameter. Don't release/detach from thread_db here.
7664 (linux_kill): Release/detach from thread_db here, ...
7665 (linux_detach): ... and here, before actually detaching.
7666 (linux_wait_1): ... and here, when a process exits.
7667 * thread-db.c (any_thread_of): New.
7668 (thread_db_free): Switch the current inferior to a thread of the
7669 passed in process.
7670
4ee62156
DE
76712009-12-21 Doug Evans <dje@google.com>
7672
d90e6a88
DE
7673 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7674
c5f62d5f
DE
7675 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7676 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7677 warning ifndef __NR_tkill. Move setting of errno there too.
7678 Delete unnecessary resetting of errno after syscall.
7679 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7680
10e86dd7
DE
7681 * configure.ac: Check for dladdr.
7682 * config.in: Regenerate.
7683 * configure: Regenerate.
7684 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7685 (try_thread_db_load): Update.
7686
4ee62156
DE
7687 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7688
00f515da
DE
76892009-12-18 Doug Evans <dje@google.com>
7690
e9464885
DE
7691 * event-loop.c: Include unistd.h if it exists.
7692
07d4f67e
DE
7693 * linux-low.c (my_waitpid): Move definition away from being in
7694 between linux_tracefork_child/linux_test_for_tracefork.
7695
00f515da
DE
7696 * gdb_proc_service.h (psaddr_t): Fix type.
7697 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7698 signature to match glibc.
7699
1de1badb
DE
77002009-12-16 Doug Evans <dje@google.com>
7701
7702 * linux-low.c (linux_read_memory): Fix argument to read.
7703
aeeb81d1
PA
77042009-11-26 Pedro Alves <pedro@codesourcery.com>
7705
7706 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7707 events, don't leave current_inferior pointing at null.
7708
10357975
PA
77092009-11-26 Pedro Alves <pedro@codesourcery.com>
7710
7711 * win32-low.c (LOG): Delete.
7712 (OUTMSG): Output to stderr.
7713 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7714 on compile time LOG macro.
7715 (win32_wait): Fix debug output.
7716
cf6e3471
PA
77172009-11-26 Pedro Alves <pedro@codesourcery.com>
7718
7719 * win32-low.c (win32_add_one_solib): If the dll name is
7720 "ntdll.dll", prepend the system directory to the dll path.
7721
0c85e18e
MK
77222009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7723
7724 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7725
9ac544ce 77262009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7727 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7728
7729 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7730 * configure.ac: Check for __mcoldfire__ and set
7731 gdb_cv_m68k_is_coldfire.
7732 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7733 reg-cf.o and reg-m68k.o.
7734 * configure: Regenerated.
7735
fd7dd3e6
PA
77362009-11-16 Pedro Alves <pedro@codesourcery.com>
7737
7738 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7739 Pass it to thread_db_free.
7740 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7741 proper `detaching' argument to linux_remove_process.
7742 * linux-low.h (thread_db_free): Add `detaching' parameter.
7743 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7744 to thread_db_free.
7745 (thread_db_free): Add `detaching' parameter. Only
7746 call td_ta_clear_event if detaching from process.
7747
75aa492e
MK
77482009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7749
7750 * thread-db.c (thread_db_free): Fix typo.
7751
21e1bee4
PP
77522009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7753
7754 PR gdb/10838
7755 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7756
8838b45e
NS
77572009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7758
7759 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7760 with an i686 compiler.
7761 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7762 needed.
7763 * configure: Rebuilt.
7764
8a35fb51
SL
77652009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7766
7767 PR gdb/10783
7768
7769 * server.c (handle_search_memory_1): Correct read_addr initialization
7770 in loop for searching subsequent chunks.
7771
96f15937
PP
77722009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7773
7774 * configure.ac: New --with-libthread-db option.
7775 * thread-db.c: Allow direct dependence on libthread_db.
7776 (thread_db_free): Adjust.
7777 * config.in: Regenerate.
7778 * configure: Likewise.
889bf7c5 7779
5f7d1694
PP
77802009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7781
7782 PR gdb/10757
7783 * thread-db.c (attach_thread): New function.
7784 (maybe_attach_thread): Return success/failure.
7785 (find_new_threads_callback): Adjust.
889bf7c5
PA
7786 (thread_db_find_new_threads): Loop until no new threads.
7787
88e3b899
PA
77882009-10-13 Pedro Alves <pedro@codesourcery.com>
7789
7790 * proc-service.c (ps_lgetregs): Formatting.
7791
cdbfd419
PP
77922009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7793
7794 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7795 * configure.ac: Adjust.
7796 * linux-low.h (struct process_info_private): Move members to struct
7797 thread_db.
7798 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7799 * linux-low.c (linux_remove_process): Adjust.
7800 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7801 * server.c (handle_query): Move code ...
7802 (handle_monitor_command): ... here. New function.
7803 * target.h (struct target_ops): New member.
7804 * thread-db.c (struct thread_db): New.
7805 (libthread_db_search_path): New variable.
7806 (thread_db_create_event, thread_db_enable_reporting)
7807 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7808 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7809 (try_thread_db_load_1, dladdr_to_soname): New functions.
7810 (try_thread_db_load, thread_db_load_search): New functions.
7811 (thread_db_init): Search for libthread_db.
7812 (thread_db_free): New function.
7813 (thread_db_handle_monitor_command): Likewise.
7814 * config.in: Regenerate.
7815 * configure: Regenerate.
889bf7c5 7816
4168d2d6
UW
78172009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7818
7819 * spu-low.c (spu_kill): Wait for inferior to terminate.
7820 Call clear_inferiors.
7821 (spu_detach): Call clear_inferiors.
7822
81ecdfbb
RW
78232009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7824
7825 * aclocal.m4: Regenerate.
7826 * config.in: Likewise.
7827 * configure: Likewise.
7828
0b9ff2c0
UW
78292009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7830
7831 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7832 (parse_spufs_run): New function.
7833 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7834 (ppc_breakpoint_at): Handle SPU breakpoints.
7835
efcbbd14
UW
78362009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7837
7838 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7839 (SPUFS_MAGIC): Define.
7840 (spu_enumerate_spu_ids): New function.
7841 (linux_qxfer_spu): New function.
7842 (linux_target_ops): Install linux_qxfer_spu.
7843
f4d9bade
UW
78442009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7845
7846 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7847 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7848 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7849 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7850 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7851 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7852 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7853 (init_registers_powerpc_cell32l): Add prototype.
7854 (init_registers_powerpc_cell64l): Likewise.
7855 (ppc_arch_setup): Detect Cell/B.E. architecture.
7856
96e946ca
RW
78572009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7858
7859 * Makefile.in (datarootdir): New variable.
7860
58d6951d
DJ
78612009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7862
7863 * linux-low.c (linux_write_memory): Update debugging output.
7864 * Makefile.in (clean): Add new descriptions.
7865 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7866 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7867 * configure.srv: Add new files for arm*-*-linux*.
7868 * linux-arm-low.c: Add new declarations.
7869 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7870 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7871 (HWCAP_VFPv3D16): New.
7872 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7873 instead of __IWMMXT__.
7874 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7875 (arm_arch_setup): New.
7876 (target_regsets): Remove #ifdef. Add VFP regset.
7877 (the_low_target): Use arm_arch_setup.
7878
12b42a12
DJ
78792009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7880
7881 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7882 the main thread again.
7883
ac8c974e
AR
78842009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7885
7886 Adding Neutrino gdbserver.
7887 * configure: Regenerated.
7888 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7889 * configure.srv (i[34567]86-*-nto*): New target.
7890 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7891 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7892 (nto_comctrl) [__QNX__]: New function.
7893 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7894
4424e0c3 78952009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
7896
7897 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7898 srv_tgtobj.
7899
912cf4ba
PA
79002009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7901 Pedro Alves <pedro@codesourcery.com>
7902
7903 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7904 don't support CONTEXT_EXTENDED_REGISTERS.
7905 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7906 (the_low_target): Install them.
7907 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7908 failing with ERROR_PIPE_NOT_CONNECTED.
7909
aa5ca48f
DE
79102009-06-30 Doug Evans <dje@google.com>
7911 Pierre Muller <muller@ics.u-strasbg.fr>
7912
7913 Add h/w watchpoint support to x86-linux, win32-i386.
7914 * Makefile.in (SFILES): Add i386-low.c
7915 (i386_low_h): Define.
7916 (i386-low.o): Add dependencies.
7917 (linux-x86-low.o): Add i386-low.h dependency.
7918 (win32-i386-low.o): Ditto.
7919 * i386-low.c: New file.
7920 * i386-low.h: New file.
7921 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7922 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7923 * linux-low.c (linux_add_process): Initialize arch_private.
7924 (linux_remove_process): Free arch_private.
7925 (add_lwp): Initialize arch_private.
7926 (delete_lwp): Free arch_private.
7927 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7928 provided.
7929 * linux-low.h (process_info_private): New member arch_private.
7930 (lwp_info): New member arch_private.
7931 (linux_target_ops): New members new_process, new_thread,
7932 prepare_to_resume.
7933 (ptid_of): New macro.
7934 * linux-x86-low.c: Include stddef.h, i386-low.h.
7935 (arch_process_info): New struct.
7936 (arch_lwp_info): New struct.
7937 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7938 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7939 (i386_dr_low_get_status): New function.
7940 (x86_insert_point, x86_remove_point): New functions.
7941 (x86_stopped_by_watchpoint): New function.
7942 (x86_stopped_data_address): New function.
7943 (x86_linux_new_process, x86_linux_new_thread): New functions.
7944 (x86_linux_prepare_to_resume): New function.
7945 (the_low_target): Add entries for insert_point, remove_point,
7946 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7947 prepare_to_resume.
7948 * server.c (debug_hw_points): New global.
7949 (monitor_show_help): Document set debug-hw-points.
7950 (handle_query): Process "set debug-hw-points".
7951 * server.h (debug_hw_points): Declare.
7952 (paddress): Declare.
7953 * utils.c (NUMCELLS, CELLSIZE): New macros.
7954 (get_sell, xsnprintf, paddress): New functions.
7955 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7956 remove_point, stopped_by_watchpoint, stopped_data_address.
7957 * win32-i386-low.c: Include i386-low.h.
7958 (debug_reg_state): Replaces dr.
7959 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7960 (i386_dr_low_get_status): New function.
7961 (i386_insert_point, i386_remove_point): New functions.
7962 (i386_stopped_by_watchpoint): New function.
7963 (i386_stopped_data_address): New function.
7964 (i386_initial_stuff): Update.
7965 (get_thread_context,set_thread_context,i386_thread_added): Update.
7966 (the_low_target): Add entries for insert_point,
7967 remove_point, stopped_by_watchpoint, stopped_data_address.
7968 * win32-low.c (win32_insert_watchpoint): New function.
7969 (win32_remove_watchpoint): New function.
7970 (win32_stopped_by_watchpoint): New function.
7971 (win32_stopped_data_address): New function.
7972 (win32_target_ops): Add entries for insert_watchpoint,
7973 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7974 * win32-low.h (win32_target_ops): New members insert_point,
7975 remove_point, stopped_by_watchpoint, stopped_data_address.
7976
d993e290
PA
79772009-06-25 Pedro Alves <pedro@codesourcery.com>
7978
7979 * server.c (process_serial_event): Re-return unsupported, not
7980 error, if the type isn't recognized. Re-allow supporting only
7981 insert or remove packets. Also call require_running for
7982 breakpoints. Add missing break statement to default case. Tidy.
7983 * target.h (struct target_ops): Rename insert_watchpoint to
7984 insert_point, and remove_watchpoint to remove_point.
7985
7986 * linux-low.h (struct linux_target_ops): Likewise.
7987 * linux-low.c (linux_insert_watchpoint): Rename to ...
7988 (linux_insert_point): ... this. Adjust.
7989 (linux_remove_watchpoint): Rename to ...
7990 (linux_remove_point): ... this. Adjust.
7991 (linux_target_ops): Adjust.
7992 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7993 (cris_insert_point): ... this.
7994 (cris_remove_watchpoint): Rename to ...
7995 (cris_remove_point): ... this.
7996 (the_low_target): Adjust.
7997
0f54c268
PM
79982009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7999
8000 * server.c (handle_v_kill): Pass signal_pid to
8001 kill_inferior if multi_process is zero.
8002
c6314022
AR
80032009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8004
8005 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8006 * target.h (target_ops): Comment for *_watchpoint to make it clear
8007 the functions can get types '0' and '1'.
8008
4463ce24
AR
80092009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8010
8011 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8012 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8013 * regcache.c (get_regcache): Likewise.
8014 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8015 * win32-low.c (child_fetch_inferior_registers): Remove check for
8016 regno 0.
8017
cf8fd78b
PA
80182009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8019 Pedro Alves <pedro@codesourcery.com>
8020
8021 * target.h (struct target_ops) <supports_multi_process>: New
8022 callback.
8023 (target_supports_multi_process): New.
8024 * server.c (handle_query): Even if GDB reports support, only
8025 enable multi-process if the target also supports it. Report
8026 multi-process support only if the target backend supports it.
8027 * linux-low.c (linux_supports_multi_process): New function.
8028 (linux_target_ops): Install it as target_supports_multi_process
8029 callback.
8030
47c0c975
DE
80312009-05-24 Doug Evans <dje@google.com>
8032
e09875d4
DE
8033 Global renaming of find_thread_pid to find_thread_ptid.
8034 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8035 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8036 All callers updated.
8037
e27d73f6
DE
8038 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8039 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8040 directly.
8041
47c0c975
DE
8042 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8043 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8044 (linux_resume_one_lwp): Ditto.
8045
2acc282a
DE
80462009-05-23 Doug Evans <dje@google.com>
8047
8048 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8049 from struct inferior_list_entry * to struct lwp_info *.
8050 All callers updated.
8051
9f1036c1
DE
80522009-05-13 Doug Evans <dje@google.com>
8053
8054 * linux-x86-low.c: Don't include assert.h.
8055 (x86_siginfo_fixup): Use fatal, not assert.
8056 (x86_arch_setup): Fix comment.
8057
d0722149
DE
80582009-05-12 Doug Evans <dje@google.com>
8059
8060 Biarch support for i386/amd64 gdbserver.
8061 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8062 Add linux-x86-low.c.
8063 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8064 (linux-x86-low.o): Add.
8065 * linux-x86-64-low.c: Delete.
8066 * linux-i386-low.c: Delete.
8067 * linux-x86-low.c: New file.
8068 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8069 linux-x86-low.o.
8070 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8071 linux-x86-low.o.
8072 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8073 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8074 (linux_child_pid_to_exec_file): New function.
8075 (elf_64_header_p, elf_64_file_p): New functions.
8076 (siginfo_fixup): New function.
8077 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8078 give target a chance to convert layout.
8079 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8080 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8081
fdeb2a12
DE
80822009-05-07 Doug Evans <dje@google.com>
8083
8084 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8085 (regsets_store_inferior_registers): Ditto.
8086
a6dbe5df
PA
80872009-05-06 Pedro Alves <pedro@codesourcery.com>
8088
8089 PR server/10048
8090
8091 * linux-low.c (must_set_ptrace_flags): Delete.
8092 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8093 of the global.
8094 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8095 `lwp->must_set_ptrace_flags' instead.
ba42693b 8096 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8097 (linux_wait_1): ... not here.
8098
5091eb23
DE
80992009-04-30 Doug Evans <dje@google.com>
8100
9f767825
DE
8101 * inferiors.c (started_inferior_callback): New function.
8102 (attached_inferior_callback): New function.
8103 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8104 * server.c (print_started_pid, print_attached_pid): New functions.
8105 (detach_or_kill_for_exit): New function.
8106 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8107 * server.h (have_started_inferiors_p): Declare.
8108 (have_attached_inferiors_p): Declare.
8109
5091eb23
DE
8110 * inferiors.c (remove_process): Fix memory leak, free process.
8111 * linux-low.c (linux_remove_process): New function.
8112 (linux_kill): Call it instead of remove_process.
8113 (linux_detach, linux_wait_1): Ditto.
8114
155c8968
PA
81152009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8116
8117 * configure.srv: Add x86 Windows CE target.
8118
7fe519cb
UW
81192009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8120
8121 * inferiors.c (get_thread_process): Make global.
8122 * server.h (get_thread_process): Add prototype.
8123 * thread-db.c (find_one_thread): Use get_thread_process
8124 instead of current_process.
8125 (thread_db_get_tls_address): Do not crash if called when
8126 thread layer is not yet initialized.
8127
5472f405
UW
81282009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8129
8130 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8131 * spu-low.c (current_tid): Rename to ...
8132 (current_ptid): ... this.
8133 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8134 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8135 ptid_get_lwp (current_ptid) instead of current_tid.
8136 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8137 instead of current_tid. Use find_process_pid to verify pid
8138 argument is valid. Pass proper argument to remove_process.
8139 (spu_thread_alive): Compare current_ptid instead of current_tid.
8140 (spu_resume): Likewise.
8141
55ac2b99
PA
81422009-04-02 Pedro Alves <pedro@codesourcery.com>
8143
8144 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8145 variable.
8146
95954743
PA
81472009-04-01 Pedro Alves <pedro@codesourcery.com>
8148
8149 Implement the multiprocess extensions, and add linux multiprocess
8150 support.
8151
8152 * server.h (ULONGEST): Declare.
8153 (struct ptid, ptid_t): New.
8154 (minus_one_ptid, null_ptid): Declare.
8155 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8156 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8157 (struct inferior_list_entry): Change `id' type from unsigned from
8158 to ptid_t.
8159 (struct sym_cache, struct breakpoint, struct
8160 process_info_private): Forward declare.
8161 (struct process_info): Declare.
8162 (current_process): Declare.
8163 (all_processes): Declare.
8164 (initialize_inferiors): Declare.
8165 (add_thread): Adjust to use ptid_t.
8166 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8167 (add_process, remove_process, find_thread_pid): Declare.
8168 (find_inferior_id): Adjust to use ptid_t.
8169 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8170 (multi_process): Declare.
8171 (push_event): Adjust to use ptid_t.
8172 (read_ptid, write_ptid): Declare.
8173 (prepare_resume_reply): Adjust to use ptid_t.
8174 (clear_symbol_cache): Declare.
8175 * inferiors.c (all_processes): New.
8176 (null_ptid, minus_one_ptid): New.
8177 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8178 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8179 (add_thread): Change unsigned long to ptid. Remove gdb_id
8180 parameter. Adjust.
8181 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8182 (gdb_id_to_thread): Rename to ...
8183 (find_thread_pid): ... this. Change unsigned long to ptid.
8184 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8185 (loaded_dll, pull_pid_from_list): Adjust.
8186 (add_process, remove_process, find_process_pid)
8187 (get_thread_process, current_process, initialize_inferiors): New.
8188 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8189 (struct target_waitstatus) <related_pid>: Ditto.
8190 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8191 return type to int.
8192 (struct target_ops) <join>: Add `pid' argument.
8193 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8194 (struct target_ops) <wait>: Add `ptid' field. Change return type
8195 to ptid.
8196 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8197 (mywait): Add `ptid' argument. Change return type to ptid_t.
8198 (target_pid_to_str): Declare.
8199 * target.c (set_desired_inferior): Adjust to use ptids.
8200 (mywait): Add new `ptid' argument. Adjust.
8201 (target_pid_to_str): New.
8202 * mem-break.h (free_all_breakpoints): Declare.
8203 * mem-break.c (breakpoints): Delelete.
8204 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8205 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8206 to use per-process breakpoint list.
8207 (free_all_breakpoints): New.
8208 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8209 (symbol_cache, all_symbols_looked_up): Delete.
8210 (hexchars): New.
8211 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8212 read_ptid): New.
8213 (prepare_resume_reply): Change ptid argument's type from unsigned
8214 long to ptid_t. Adjust. Implement W;process and X;process.
8215 (free_sym_cache, clear_symbol_cache): New.
8216 (look_up_one_symbol): Adjust to per-process symbol cache. *
8217 * server.c (cont_thread, general_thread, step_thread): Change type
8218 to ptid_t.
8219 (attached): Delete.
8220 (multi_process): New.
8221 (last_ptid): Change type to ptid_t.
8222 (struct vstop_notif) <ptid>: Change type to ptid_t.
8223 (queue_stop_reply, push_event): Change `ptid' argument's type to
8224 ptid_t.
8225 (discard_queued_stop_replies): Add `pid' argument.
8226 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8227 changes. Don't reference the `attached' global.
8228 (attach_inferior): Adjust to mywait interface changes.
8229 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8230 features. Handle and report "multiprocess+". Handle
8231 "qAttached:PID".
8232 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8233 changes.
8234 (handle_v_kill): New.
8235 (handle_v_stopped): Adjust to use target_pid_to_str.
8236 (handle_v_requests): Allow multiple attaches and runs when
8237 multiprocess extensions are in effect. Handle "vKill".
8238 (myresume): Adjust to use ptids.
8239 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8240 (handle_status): Adjust to discard_queued_stop_replies interface
8241 change.
8242 (first_thread_of, kill_inferior_callback)
8243 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8244 (main): Call initialize_inferiors. Adjust to use ptids, killing
8245 and detaching from all inferiors. Handle multiprocess packet
8246 variants.
8247 * linux-low.h: Include gdb_proc_service.h.
8248 (struct process_info_private): New.
8249 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8250 <lwpid_of>: Use ptid_get_lwp.
8251 (get_lwp_thread): Adjust.
8252 (struct lwp_info): Add `dead' member.
8253 (find_lwp_pid): Declare.
8254 * linux-low.c (thread_db_active): Delete.
8255 (new_inferior): Adjust comment.
8256 (inferior_pid): Delete.
8257 (linux_add_process): New.
8258 (handle_extended_wait): Adjust.
8259 (add_lwp): Change unsigned long to ptid.
8260 (linux_create_inferior): Add process to processes table. Adjust
8261 to use ptids. Don't set new_inferior here.
8262 (linux_attach_lwp): Rename to ...
8263 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8264 it. Adjust to use ptids.
8265 (linux_attach_lwp): New.
8266 (linux_attach): Add process to processes table. Don't set
8267 new_inferior here.
8268 (struct counter): New.
8269 (second_thread_of_pid_p, last_thread_of_process_p): New.
8270 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8271 multiple processes.
8272 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8273 processes. Remove process from process table.
8274 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8275 to multiple processes.
8276 (any_thread_of): New.
8277 (linux_detach): Add `pid' argument, and handle it. Remove process
8278 from processes table.
8279 (linux_join): Add `pid' argument. Handle it.
8280 (linux_thread_alive): Change unsighed long argument to ptid_t.
8281 Consider dead lwps as not being alive.
8282 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8283 threads we're not interested in.
8284 (same_lwp, find_lwp_pid): New.
8285 (linux_wait_for_lwp): Change `pid' argument's type from int to
8286 ptid_t. Adjust.
8287 (linux_wait_for_event): Rename to ...
8288 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8289 from int to ptid_t. Adjust.
8290 (linux_wait_for_event): New.
8291 (linux_wait_1): Add `ptid' argument. Change return type to
8292 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8293 that exit from the process table.
8294 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8295 Adjust.
8296 (mark_lwp_dead): New.
8297 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8298 stopping all threads, mark its main lwp as dead.
8299 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8300 ptids.
8301 (fetch_register, usr_store_inferior_registers)
8302 (regsets_fetch_inferior_registers)
8303 (regsets_store_inferior_registers, linux_read_memory)
8304 (linux_write_memory): Inline `inferior_pid'.
8305 (linux_look_up_symbols): Adjust to use per-process
8306 `thread_db_active'.
8307 (linux_request_interrupt): Adjust to use ptids.
8308 (linux_read_auxv): Inline `inferior_pid'.
8309 (initialize_low): Don't reference thread_db_active.
8310 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8311 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8312 (ps_getpid): Return the pid of the current inferior.
8313 * thread-db.c (proc_handle, thread_agent): Delete.
8314 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8315 per-process data.
8316 (find_one_thread): Change argument type to ptid_t. Adjust to
8317 per-process data.
8318 (maybe_attach_thread): Adjust to per-process data and ptids.
8319 (thread_db_find_new_threads): Ditto.
8320 (thread_db_init): Ditto.
8321 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8322 processes table. Adjust to use ptids.
8323 (spu_kill, spu_detach): Adjust interface. Remove process from
8324 processes table.
8325 (spu_join, spu_thread_alive): Adjust interface.
8326 (spu_wait): Adjust interface. Remove process from processes
8327 table. Adjust to use ptids.
8328 * win32-low.c (current_inferior_tid): Delete.
8329 (current_inferior_ptid): New.
8330 (debug_event_ptid): New.
8331 (thread_rec): Take a ptid. Adjust.
8332 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8333 (child_delete_thread): Ditto.
8334 (do_initial_child_stuff): Add `attached' argument. Add process to
8335 processes table.
8336 (child_fetch_inferior_registers, child_store_inferior_registers):
8337 Adjust.
8338 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8339 (win32_attach): Pass 1 to do_initial_child_stuff.
8340 (win32_kill): Adjust interface. Remove process from processes
8341 table.
8342 (win32_detach): Ditto.
8343 (win32_join): Adjust interface.
8344 (win32_thread_alive): Take a ptid.
8345 (win32_resume): Adjust to use ptids.
8346 (get_child_debug_event): Ditto.
8347 (win32_wait): Adjust interface. Remove exiting process from
8348 processes table.
8349
bd99dc85
PA
83502009-04-01 Pedro Alves <pedro@codesourcery.com>
8351
8352 Non-stop mode support.
8353
8354 * server.h (non_stop): Declare.
8355 (gdb_client_data, handler_func): Declare.
8356 (delete_file_handler, add_file_handler, start_event_loop):
8357 Declare.
8358 (handle_serial_event, handle_target_event, push_event)
8359 (putpkt_notif): Declare.
8360 * target.h (enum resume_kind): New.
8361 (struct thread_resume): Replace `step' field by `kind' field.
8362 (TARGET_WNOHANG): Define.
8363 (struct target_ops) <wait>: Add `options' argument.
8364 <supports_non_stop, async, start_non_stop>: New fields.
8365 (target_supports_non_stop, target_async): New.
8366 (start_non_stop): Declare.
8367 (mywait): Add `options' argument.
8368 * target.c (mywait): Add `options' argument. Print child exit
8369 notifications here.
8370 (start_non_stop): New.
8371 * server.c (non_stop, own_buf, mem_buf): New globals.
8372 (struct vstop_notif): New.
8373 (notif_queue): New global.
8374 (queue_stop_reply, push_event, discard_queued_stop_replies)
8375 (send_next_stop_reply): New.
8376 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8377 interface changes.
8378 (attach_inferior): In non-stop mode, don't wait for the target
8379 here.
8380 (handle_general_set): Handle QNonStop.
8381 (handle_query): When handling qC, return the current general
8382 thread, instead of the first thread of the list.
8383 (handle_query): If the backend supports non-stop mode, include
8384 QNonStop+ in the qSupported query response.
8385 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8386 and non-stop mode.
8387 (handle_v_attach, handle_v_run): Handle non-stop mode.
8388 (handle_v_stopped): New.
8389 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8390 (myresume): Adjust to use resume_kind. Handle non-stop.
8391 (queue_stop_reply_callback): New.
8392 (handle_status): Handle non-stop mode.
8393 (main): Clear non_stop flag on reconnection. Use the event-loop.
8394 Refactor serial protocol handling from here ...
8395 (process_serial_event): ... to this new function. When GDB
8396 selects any thread, select one here. In non-stop mode, wait until
8397 GDB acks all pending events before exiting.
8398 (handle_serial_event, handle_target_event): New.
8399 * remote-utils.c (remote_open): Install remote_desc in the event
8400 loop.
8401 (remote_close): Remove remote_desc from the event loop.
8402 (putpkt_binary): Rename to...
8403 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8404 (putpkt_binary): New as wrapper around putpkt_binary_1.
8405 (putpkt_notif): New.
8406 (prepare_resume_reply): In non-stop mode, don't change the
8407 general_thread.
8408 * event-loop.c: New.
8409 * Makefile.in (OBJ): Add event-loop.o.
8410 (event-loop.o): New rule.
8411
8412 * linux-low.h (pid_of): Moved here.
8413 (lwpid_of): New.
8414 (get_lwp_thread): Use lwpid_of.
8415 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8416 * linux-low.c (pid_of): Delete.
8417 (inferior_pid): Use lwpid_of.
8418 (linux_event_pipe): New.
8419 (target_is_async_p): New.
8420 (delete_lwp): New.
8421 (handle_extended_wait): Use lwpid_of.
8422 (add_lwp): Don't set lwpid field.
8423 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8424 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8425 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8426 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8427 first. Adjust to linux_wait_for_event interface changes. Use
8428 lwpid_of.
8429 (linux_detach): Don't delete the main lwp here.
8430 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8431 (status_pending_p): Don't consider explicitly suspended lwps.
8432 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8433 pointer. Add OPTIONS argument. Change return type to int. Use
8434 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8435 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8436 pointer. Add status pointer argument. Return a pid instead of a
8437 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8438 changes. In non-stop mode, don't switch to a random thread.
8439 (linux_wait): Rename to...
8440 (linux_wait_1): ... this. Add target_options argument, and handle
8441 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8442 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8443 clean exit and signal exit code. Don't stop all threads in
8444 non-stop mode. In all-stop mode, only stop all threads when
8445 reporting a stop to GDB. Handle explicit thread stop requests.
8446 (async_file_flush, async_file_mark): New.
8447 (linux_wait): New.
8448 (send_sigstop): Use lwpid_of.
8449 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8450 interface changes. In non-stop mode, don't switch to a random
8451 thread.
8452 (linux_resume_one_lwp): Use lwpid_of.
8453 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8454 (linux_resume_one_thread): ... this. Handle resume_stop. In
8455 non-stop mode, don't look for pending flag in all threads.
8456 (resume_status_pending_p): Don't consider explicitly suspended
8457 threads.
8458 (my_waitpid): Reimplement. Emulate __WALL.
8459 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8460 Use lwpid_of.
8461 (sigchld_handler, linux_supports_non_stop, linux_async)
8462 (linux_start_non_stop): New.
8463 (linux_target_ops): Register linux_supports_non_stop, linux_async
8464 and linux_start_non_stop.
8465 (initialize_low): Install SIGCHLD handler.
8466 * thread-db.c (thread_db_create_event, find_one_thread)
8467 (thread_db_get_tls_address): Use lwpid_of.
8468 * win32-low.c (win32_detach): Adjust to use resume_kind.
8469 (win32_wait): Add `options' argument.
8470 * spu-low.c (spu_resume): Adjust to use resume_kind.
8471 (spu_wait): Add `options' argument.
8472
5b1c542e
PA
84732009-04-01 Pedro Alves <pedro@codesourcery.com>
8474
8475 Decouple target code from remote protocol.
8476
8477 * target.h (enum target_waitkind): New.
8478 (struct target_waitstatus): New.
8479 (struct target_ops) <wait>: Return an unsigned long. Take a
8480 target_waitstatus pointer instead of a char pointer.
8481 (mywait): Likewise.
8482 * target.c (mywait): Change prototype to return an unsigned long.
8483 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8484 * server.h (thread_from_wait, old_thread_from_wait): Delete
8485 declarations.
8486 (prepare_resume_reply): Change prototype to take a
8487 target_waitstatus.
8488 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8489 (last_status, last_ptid): New.
8490 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8491 pid instead of a signal.
8492 (attach_inferior): Remove "status" and "signal" parameters.
8493 Adjust.
8494 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8495 not as an address.
8496 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8497 (handle_v_requests, myresume): Remove "status" and "signal"
8498 parameters. Adjust.
8499 (handle_status): New.
8500 (main): Delete local `status'. Adjust.
8501 * remote-utils.c: Include target.h.
8502 (prepare_resume_reply): Change prototype to take a
8503 target_waitstatus. Adjust.
8504
8505 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8506 interface.
8507 * spu-low.c (spu_wait): Adjust.
8508 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8509 Delete.
8510 (win32_wait): Adjust.
8511
2bd7c093
PA
85122009-04-01 Pedro Alves <pedro@codesourcery.com>
8513
8514 * target.h (struct thread_resume): Delete leave_stopped member.
8515 (struct target_ops): Add a `n' argument to the `resume' callback.
8516 * server.c (start_inferior): Adjust.
8517 (handle_v_cont, myresume): Adjust.
8518 * linux-low.c (check_removed_breakpoint): Adjust to resume
8519 interface change, and to removed leave_stopped field.
8520 (resume_ptr): Delete.
8521 (struct thread_resume_array): New.
8522 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8523 resume interface change.
8524 (linux_continue_one_thread, linux_queue_one_thread)
8525 (resume_status_pending_p): Check if the resume field is NULL
8526 instead of checking the leave_stopped member.
8527 (linux_resume): Adjust to the target resume interface change.
8528 * spu-low.c (spu_resume): Adjust to the target resume interface
8529 change.
8530 * win32-low.c (win32_detach, win32_resume): Ditto.
8531
c35fafde
PA
85322009-04-01 Pedro Alves <pedro@codesourcery.com>
8533
8534 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8535 flag.
8536 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8537 pending.
8538 (linux_continue_one_thread): Only preserve the stepping flag if
8539 there's a pending breakpoint.
8540
0a59d50b
PA
85412009-03-31 Pedro Alves <pedro@codesourcery.com>
8542
8543 * server.c (main): After the inferior having exited, call
8544 remote_close before exiting gdbserver.
8545
f04c6d38
TJB
85462009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8547
8548 Fix size of FPSCR in Power 7 processors.
8549 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8550 (PPC_FEATURE_HAS_DFP): New #define.
8551 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8552 size of the FPSCR.
8553
78e5cee6
PA
85542009-03-23 Pedro Alves <pedro@codesourcery.com>
8555
8556 * server.c (handle_query) Whitespace and formatting.
8557
1b3f6016
PA
85582009-03-22 Pedro Alves <pedro@codesourcery.com>
8559
8560 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8561 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8562 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8563 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8564 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8565 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8566 Makefile.in, configure.ac: Fix whitespace throughout.
8567 * configure: Regenerate.
8568
a07b2135
PA
85692009-03-22 Pedro Alves <pedro@codesourcery.com>
8570
8571 * inferiors.c (find_inferior): Make it safe for the callback
8572 function to delete the currently iterated inferior.
8573
67cc2626
PA
85742009-03-22 Pedro Alves <pedro@codesourcery.com>
8575
8576 * Makefile.in (linuw_low_h): Move higher.
8577 (thread-db.o): Depend on $(linux_low_h).
8578
54a0b537
PA
85792009-03-17 Pedro Alves <pedro@codesourcery.com>
8580
8581 Rename "process" to "lwp" throughout.
8582
8583 * linux-low.c (all_processes): Rename to...
8584 (all_lwps): ... this.
8585 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8586 (add_process): Rename to ...
8587 (add_lwp): ... this. Adjust.
8588 (linux_create_inferior): Adjust.
8589 (linux_attach_lwp): Adjust.
8590 (linux_attach): Adjust.
8591 (linux_kill_one_process): Rename to ...
8592 (linux_kill_one_lwp): ... this. Adjust.
8593 (linux_kill): Adjust.
8594 (linux_detach_one_process): Rename to ...
8595 (linux_detach_one_lwp): ... this. Adjust.
8596 (linux_detach): Adjust.
8597 (check_removed_breakpoint): Adjust.
8598 (status_pending_p): Adjust.
8599 (linux_wait_for_process): Rename to ...
8600 (linux_wait_for_lwp): ... this. Adjust.
8601 (linux_wait_for_event): Adjust.
8602 (send_sigstop): Adjust.
8603 (wait_for_sigstop): Adjust.
8604 (stop_all_processes): Rename to ...
8605 (stop_all_lwps): ... this.
8606 (linux_resume_one_process): Rename to ...
8607 (linux_resume_one_lwp): ... this. Adjust.
8608 (linux_set_resume_request, linux_continue_one_thread)
8609 (linux_queue_one_thread, resume_status_pending_p)
8610 (usr_store_inferior_registers, regsets_store_inferior_registers)
8611 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8612 Adjust.
8613 * linux-low.h (get_process): Rename to ...
8614 (get_lwp): ... this. Adjust.
8615 (get_thread_process): Rename to ...
8616 (get_thread_lwp): ... this. Adjust.
8617 (get_process_thread): Rename to ...
8618 (get_lwp_thread): ... this. Adjust.
8619 (struct process_info): Rename to ...
8620 (struct lwp_info): ... this.
8621 (all_processes): Rename to ...
8622 (all_lwps): ... this.
8623 * proc-service.c (ps_lgetregs): Adjust.
8624 * thread-db.c (thread_db_create_event, find_one_thread)
8625 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8626
0b16c5cf
PA
86272009-03-14 Pedro Alves <pedro@codesourcery.com>
8628
8629 * server.c (handle_query): Handle "qAttached".
8630
32de4b9d
NS
86312009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8632
8633 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8634 GPLv3, update license URL.
8635
2aecd87f
DE
86362009-03-01 Doug Evans <dje@google.com>
8637
93efd302 8638 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8639 (server_h): Add gdb_signals.h.
8640 (signals.o): Update.
8641 * server.h (target_signal_from_host,target_signal_to_host_p)
8642 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8643
86b1f9c5
PM
86442009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8645
8646 * remote-utils.c (getpkt): Also generate remote-debug
8647 information if noack_mode is set.
8648
4aa995e1
PA
86492009-02-06 Pedro Alves <pedro@codesourcery.com>
8650
8651 * server.c (handle_query): Report qXfer:siginfo:read and
8652 qXfer:siginfo:write as supported and handle them.
8653 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8654 * linux-low.c (linux_xfer_siginfo): New.
8655 (linux_target_ops): Set it.
8656
62709adf
PA
86572009-01-26 Pedro Alves <pedro@codesourcery.com>
8658
8659 * server.c (gdbserver_usage): Mention --remote-debug.
8660 (main): Accept '--remote-debug' switch.
8661
aef93bd7
DE
86622009-01-18 Doug Evans <dje@google.com>
8663
8664 * regcache.c (new_register_cache): No need to check result of xcalloc.
8665 * server.c (handle_search_memory): Back out calls to xmalloc,
8666 result is checked and error is returned to user upon failure.
8667 (handle_query): Ditto. Add more checks for result of malloc.
8668 (handle_v_cont): Check result of malloc, report error back to
8669 user upon failure.
8670 (handle_v_run): Ditto. Call freeargv.
8671 * server.h (freeargv): Declare.
8672 * utils.c (freeargv): New fn.
8673
54363045
DE
86742009-01-15 Doug Evans <dje@google.com>
8675
f626972c
DE
8676 * gdbreplay.c (perror_with_name): Make arg const char *.
8677 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8678 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8679 * utils.c (perror_with_name): Make arg const char *.
54363045 8680
18aae699
PA
86812009-01-14 Pedro Alves <pedro@codesourcery.com>
8682
8683 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8684 when handling a EXIT_PROCESS_DEBUG_EVENT.
8685
ff703abe
JB
86862009-01-06 Joel Brobecker <brobecker@adacore.com>
8687
8688 * gdbreplay.c (gdbreplay_version): Update copyright year.
8689 * server.c (gdbserver_version): Likewise.
8690
f21cc1a2 86912009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8692
8693 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8694 (handle_extended_wait): Improve comment.
0e21c1ec 8695
bca929d3
DE
86962008-12-13 Doug Evans <dje@google.com>
8697
8698 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8699 * server.h (ATTR_MALLOC): New macro.
8700 (xmalloc,xcalloc,xstrdup): Declare.
8701 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8702 * inferiors.c: Ditto.
8703 * linux-low.c: Ditto.
8704 * mem-break.c: Ditto.
8705 * regcache.c: Ditto.
8706 * remote-utils.c: Ditto.
8707 * server.c: Ditto.
8708 * target.c: Ditto.
8709 * win32-low.c: Ditto.
8710
97438e3f
DE
87112008-12-12 Doug Evans <dje@google.com>
8712
896c7fbb
DE
8713 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8714 in debugging printf.
8715
97438e3f
DE
8716 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8717
e3b886f8
DE
87182008-12-09 Doug Evans <dje@google.com>
8719
8720 * linux-low.h (struct process_info): Delete member tid, unused.
8721 * thread-db.c (find_one_thread): Update.
8722 (maybe_attach_thread): Update.
8723
07e059b5
VP
87242008-12-02 Pedro Alves <pedro@codesourcery.com>
8725
889bf7c5
PA
8726 * target.h (struct target_ops): Add qxfer_osdata member.
8727 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8728 and dirent.h.
8729 (linux_qxfer_osdata): New functions.
8730 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8731 callback.
8732 * server.c (handle_query): Handle "qXfer:osdata:read:".
8733 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8734 (buffer_xml_printf): New functions.
8735 * server.h (struct buffer): New.
8736 (buffer_grow_str, buffer_grow_str0): New macros.
8737 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8738 (buffer_xml_printf): Declare.
07e059b5 8739
4cab47ab
DE
87402008-11-24 Doug Evans <dje@google.com>
8741
8742 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8743
f142445f
DJ
87442008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8745
8746 * server.c (handle_v_run): Always use the supplied argument list.
8747
d0107bb6 87482008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8749
d0107bb6
BW
8750 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8751 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8752
2c4ad781
TJB
87532008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8754
8755 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8756 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8757 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8758 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8759 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8760 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8761 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8762 XML target descriptions.
8763 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8764 when inferior is running on an ISA 2.05 or later processor. Add
8765 special case to return offset for full 64-bit slot of FPSCR when
8766 in 32-bits.
8767
dfb64f85
DJ
87682008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8769
8770 * Makefile.in (SFILES, clean): Added sparc64 files.
8771 (reg-sparc64.o, reg-sparc64.c): New.
8772 * configure.srv (sparc*-*-linux*): New configuration.
8773 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8774 syscall arguments for SPARC.
8775 (regsets_store_inferior_registers): Likewise.
8776 * linux-sparc-low.c: New file.
8777
66b6e1dd
DE
87782008-10-21 Doug Evans <dje@google.com>
8779
8780 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8781 (READLINE_DIR,READLINE_DEP): Delete.
8782 (INTERNAL_CFLAGS): Update.
8783 (LINTFLAGS): Update.
8784
9b710a42
PA
87852008-10-10 Pedro Alves <pedro@codesourcery.com>
8786
8787 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8788 whole argv from the last run, not just argv[0].
8789
5822d809
PA
87902008-09-08 Pedro Alves <pedro@codesourcery.com>
8791
8792 * regcache.c (new_register_cache): Return NULL if the register
8793 cache size isn't known yet.
8794 (free_register_cache): Avoid dereferencing a NULL regcache.
8795
74aac56f
DJ
87962008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8797
8798 * configure.srv: Merge MIPS and MIPS64.
8799
400b20f5
MR
88002008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8801
8802 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8803
677c5bb1
LM
88042008-08-18 Luis Machado <luisgpm@br.ibm.com>
8805
8806 * Makefile.in: Add required vsx dependencies.
8807
8808 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8809 Declare init_registers_powerpc_vsx32l.
8810 Declare init_registers_powerpc_vsx64l.
8811 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8812 (ppc_arch_setup): Check for VSX in hwcap.
8813 (ppc_fill_vsxregset): New function.
8814 (ppc_store_vsxregset): New function.
8815 Add new VSX entry in regset_info target_regsets.
8816
8817 * configure.srv: Add new VSX dependencies.
8818
a6f3e723
SL
88192008-08-12 Pedro Alves <pedro@codesourcery.com>
8820
8821 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8822 (remote_open): Set or clear transport_is_reliable.
8823 (putpkt_binary): Don't expect acks in noack mode.
8824 (getpkt): Don't send ack/nac in noack mode.
8825 * server.c (handle_general_set): Handle QStartNoAckMode.
8826 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8827 qSupported.
8828 (main): Reset noack_mode on every connection.
8829 * server.h (noack_mode): Declare.
8830
a417dc56
RW
88312008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8832
8833 * Makefile.in (GDBREPLAY_OBS): New variable.
8834 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8835
3221518c
UW
88362008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8837 Daniel Jacobowitz <dan@codesourcery.com>
8838
8839 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8840 (usr_store_inferior_registers): Likewise.
8841 (regsets_store_inferior_registers): Likewise.
8842
ec56be1b
PA
88432008-07-31 Rolf Jansen <rj@surtec.com>
8844 Pedro Alves <pedro@codesourcery.com>
8845
8846 * configure.ac: Check for memmem declaration.
8847 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8848 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8849 (disable_packet_qfThreadInfo): Unconditionally compile.
8850 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8851 * configure, config.in: Regenerate.
8852
2fe5e3ff
DE
88532008-07-28 Doug Kwan <dougkwan@google.com>
8854
8855 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8856 (linux_write_memory): Remove declaration of errno.
8857
836acd6d
UW
88582008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8859
8860 * linux-low.c (handle_extended_wait): Do not use "status"
8861 variable uninitialized.
8862
aeba519e
PA
88632008-07-07 Pedro Alves <pedro@codesourcery.com>
8864
8865 * server.c (handle_v_attach): Inhibit reporting dll changes.
8866
db42f210
PA
88672008-06-27 Pedro Alves <pedro@codesourcery.com>
8868
8869 * remote-utils.c (prepare_resume_reply): If requested, don't
8870 output "thread:TID" in the T stop reply.
8871
8872 * server.c (disable_packet_vCont, disable_packet_Tthread)
8873 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8874 (handle_query): If requested, disable support for qC, qfThreadInfo
8875 and qsThreadInfo.
8876 (handle_v_requests): If requested, disable support for vCont.
8877 (gdbserver_show_disableable): New.
8878 (main): Handle --disable-packet and --disable-packet=LIST.
8879
8880 * server.h (disable_packet_vCont, disable_packet_Tthread)
8881 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8882
8e4c5421
CD
88832008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8884
8885 * server.c (gdbserver_usage): Mention --version.
8886
6e23a804
DJ
88872008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8888
8889 * Makefile.in (gdbreplay.o): New rule.
8890
90aa6a40
JM
88912008-06-06 Joseph Myers <joseph@codesourcery.com>
8892
8893 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8894 message, not gdbserver.
8895
c16158bc 88962008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
8897 Nathan Sidwell <nathan@codesourcery.com>
8898 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
8899
8900 * acinclude.m4: Include ../../config/acx.m4.
8901 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8902 * configure, config.in: Regenerate.
8903 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8904 * server.c (gdbserver_version): Print PKGVERSION.
8905 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8906 (main): Adjust gdbserver_usage calls.
8907 * gdbreplay.c (version, host_name): Add declarations.
8908 (gdbreplay_version, gdbreplay_usage): New.
8909 (main): Accept --version and --help options.
8910
aeb75bf5
DJ
89112008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8912
8913 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8914 (arm_breakpoint_at): Handle Thumb.
8915 (the_low_target): Add comment.
8916
76b233dd
UW
89172008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8918
8919 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8920
08388c79
DE
89212008-05-09 Doug Evans <dje@google.com>
8922
a3c83fae
DE
8923 * server.h (decode_search_memory_packet): Declare.
8924 * remote-utils.c (decode_search_memory_packet): New fn.
8925 * server.c (handle_search_memory_1): New fn.
08388c79
DE
8926 (handle_search_memory): New fn.
8927 (handle_query): Process qSearch:memory packets.
8928
bb9c3d36
UW
89292008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8930
8931 * regcache.c (registers_length): Remove.
8932 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8933 full register packet.
8934 * regcache.h (registers_length): Remove prototype.
8935 * server.h (PBUFSIZ): Define to 16384.
8936
7284e1be
UW
89372008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8938
8939 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8940 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8941 powerpc-64l.o, and powerpc-altivec64l.o.
8942 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8943 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8944 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8945 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8946 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8947 to srv_xmlfiles.
8948
8949 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8950 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8951 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8952 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8953 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8954 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8955 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8956 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8957 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8958 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8959 (clean): Update.
8960
8961 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8962 (init_registers_powerpc_32l): ... this new prototype.
8963 (init_registers_powerpc_32): Remove, replace by ...
8964 (init_registers_powerpc_altivec32l): ... this new prototype.
8965 (init_registers_powerpc_e500): Remove, replace by ...
8966 (init_registers_powerpc_e500l): ... this new prototype.
8967 (init_registers_ppc64): Remove, replace by ...
8968 (init_registers_powerpc_64l): ... this new prototype.
8969 (init_registers_powerpc_64): Remove, replace by ...
8970 (init_registers_powerpc_altivec64l): ... this new prototype.
8971 (ppc_num_regs): Set to 73.
8972 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8973 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8974 (ppc_cannot_store_register): Handle orig_r3 and trap.
8975 (ppc_arch_setup): Update init_registers_... calls.
8976 (ppc_fill_gregset): Handle orig_r3 and trap.
8977
8978 * inferiors.c (clear_inferiors): Reset current_inferior.
8979
fdc59709
PB
89802008-04-23 Paolo Bonzini <bonzini@gnu.org>
8981
889bf7c5
PA
8982 * acinclude.m4: Add override.m4.
8983 * configure: Regenerate.
fdc59709 8984
c9b2f845
UW
89852008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8986
8987 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8988 initial call to init_register_ppc64.
8989
550512b8
UW
89902008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8991
43aaf8b6
PA
8992 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8993 single powerpc*-*-linux* case.
550512b8
UW
8994 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8995
b6430ec3
UW
89962008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8997
8998 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 8999 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
9000 from reg_xmlfiles.
9001 * linux-ppc-low.c: Include <elf.h>.
9002 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9003 (ppc_hwcap): New global variable.
9004 (ppc_regmap): Remove __SPE__ #ifdef sections.
9005 (ppc_regmap_e500): New global variable.
9006 (ppc_cannot_store_register): Update __SPE__ special case.
9007 (ppc_get_hwcap): New function.
9008 (ppc_arch_setup): Use it to determine whether inferior supports
9009 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9010 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9011 Do not access registers if target does not support AltiVec.
9012 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9013 Do not access registers if target does not support SPE.
9014 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9015
52fa2412
UW
90162008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9017
9018 * linux-low.c (disabled_regsets, num_regsets): New.
9019 (use_regsets_p): Delete.
9020 (linux_wait_for_process): Clear disabled_regsets.
9021 (regsets_fetch_inferior_registers): Check and set it.
9022 (regsets_store_inferior_registers): Likewise.
9023 (linux_fetch_registers, linux_store_registers): Do not use
9024 use_regsets_p.
9025 (initialize_low): Allocate disabled_regsets.
9026
e28b3332
DJ
90272008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9028
9029 * Makefile.in (LIBOBJS): New.
9030 (OBS): Use LIBOBJS.
9031 (memmem.o): New rule.
9032 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9033 * configure: Regenerated.
9034
4536995d
UW
90352008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9036
9037 * server.c (handle_query): Never return "unsupported" for
9038 qXfer:features:read queries.
9039
221c031f
UW
90402008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9041
9042 * server.c (get_features_xml): Fix inverted condition.
9043 (handle_query): Always support qXfer:feature:read.
9044
ccd213ac
DJ
90452008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9046
9047 * server.c (wrapper_argv): New.
9048 (start_inferior): Handle wrapper_argv. If set, expect an extra
9049 trap.
9050 (gdbserver_usage): Document --wrapper.
9051 (main): Parse --wrapper.
9052
6fe305f7
UW
90532008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9054
9055 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9056 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9057 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9058 (ppc_set_pc): Likewise.
9059 (ppc_arch_setup): New function.
9060 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9061 of collect_register.
889bf7c5 9062 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9063
5b0a002e
UW
90642008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9065
9066 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9067 instead of linux-ppc64-low.o.
9068 * linux-ppc64-low.c: Remove file.
9069 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9070 (linux-ppc64-low.o): Remove rule.
9071
9072 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9073 (init_registers_powerpc_64): Likewise.
9074 (ppc_regmap): Conditionally define depending on __powerpc64__.
9075 (ppc_cannot_store_register): Do not special-case "fpscr" when
9076 compiled on __powerpc64__.
9077 (ppc_collect_ptrace_register): New function.
9078 (ppc_supply_ptrace_register): New function.
9079 (ppc_breakpoint): Change type to "unsigned int".
9080 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9081 (the_low_target): Conditionally provide initializers for the
889bf7c5 9082 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9083 collect_ptrace_register and supply_ptrace_register members.
9084
9b4b61c8
UW
90852008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9086
9087 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9088 * server.c (gdbserver_xmltarget): Define.
9089 (get_features_xml): Use it to replace "target.xml" and arch_string.
9090
9091 * configure.srv: Remove srv_xmltarget. Add XML files that were
9092 mentioned there to srv_xmlfiles instead. Remove conditional tests
9093 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9094 srv_xmlfiles and srv_regobj to include all possible choices.
9095 * configure.ac (srv_xmltarget): Remove.
9096 (srv_xmlfiles): Do not add "target.xml".
9097 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9098 checks for supplementary target information.
9099 * configure: Regenerate.
9100 * Makefile.in (XML_TARGET): Remove.
9101 (target.xml): Remove rule.
9102 (clean): Do not clean up target.xml.
9103 (.PRECIOUS): Do not mention target.xml.
9104
9105 * target.h (struct target_ops): Remove arch_string member.
9106 * linux-low.c (linux_arch_string): Remove.
9107 (linux_target_ops): Remove arch_string initializer.
9108 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9109 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9110 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9111 * spu-low.c (spu_arch_string): Remove.
9112 (spu_target_ops): Remove arch_string initializer.
9113 * win32-low.c (win32_arch_string): Remove.
9114 (win32_target_ops): Remove arch_string initializer.
9115 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9116 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9117 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9118
ee1a7ae4
UW
91192008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9120
9121 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9122 by collect_ptrace_register and supply_ptrace_register hooks.
9123 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9124 instead of checking for the_low_target.left_pad_xfer.
9125 (usr_store_inferior_registers): Use collect_ptrace_register callback
9126 instead of checking for the_low_target.left_pad_xfer.
9127
9128 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9129 (s390_supply_ptrace_register): Likewise.
9130 (s390_fill_gregset): Call s390_collect_ptrace_register.
9131 (the_low_target): Update.
9132
9133 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9134 (ppc_supply_ptrace_register): Likewise.
9135 (the_low_target): Update.
9136
9137 * linux-i386-low.c (the_low_target): Update.
9138 * linux-x86-64-low.c (the_low_target): Update.
9139
d61ddec4
UW
91402008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9141
9142 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9143 reg-s390.o and reg-s390x.o.
9144
9145 * linux-low.c (new_inferior): New global variable.
9146 (linux_create_inferior, linux_attach): Set it.
9147 (linux_wait_for_process): Call the_low_target.arch_setup after the
9148 target has stopped for the first time.
9149 (initialize_low): Do not call the_low_target.arch_setup.
9150
9151 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9152 (s390_set_pc): Likewise.
9153 (s390_arch_setup): New function.
9154 (the_low_target): Use s390_arch_setup as arch_setup routine.
9155
9156 * regcache.c (realloc_register_cache): New function.
9157 (set_register_cache): Call it for each existing regcache.
9158
d05b4ac3
UW
91592008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9160
9161 * server.h (init_registers): Remove prototype.
9162
9163 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9164 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9165 instead of init_registers ().
9166 * linux-arm-low.c (init_registers_arm): Add prototype.
9167 (init_registers_arm_with_iwmmxt): Likewise.
9168 (the_low_target): Add initializer for arch_setup field.
9169 * linux-cris-low.c (init_registers_cris): Add prototype.
9170 (the_low_target): Add initializer for arch_setup field.
9171 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9172 (the_low_target): Add initializer for arch_setup field.
9173 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9174 (the_low_target): Add initializer for arch_setup field.
9175 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9176 (the_low_target): Add initializer for arch_setup field.
9177 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9178 (the_low_target): Add initializer for arch_setup field.
9179 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9180 (the_low_target): Add initializer for arch_setup field.
9181 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9182 (init_registers_mips64_linux): Likewise.
9183 (the_low_target): Add initializer for arch_setup field.
9184 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9185 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9186 (the_low_target): Add initializer for arch_setup field.
9187 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9188 (init_registers_powerpc_64): Likewise.
9189 (the_low_target): Add initializer for arch_setup field.
9190 * linux-s390-low.c (init_registers_s390): Add prototype.
9191 (init_registers_s390x): Likewise.
9192 (the_low_target): Add initializer for arch_setup field.
9193 * linux-sh-low.c (init_registers_sh): Add prototype.
9194 (the_low_target): Add initializer for arch_setup field.
9195 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9196 (the_low_target): Add initializer for arch_setup field.
9197 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9198 (the_low_target): Add initializer for arch_setup field.
9199
9200 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9201 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9202 instead of init_registers ().
9203 * win32-arm-low.c (init_registers_arm): Add prototype.
9204 (the_low_target): Add initializer for arch_setup field.
9205 * win32-i386-low.c (init_registers_i386): Add prototype.
9206 (the_low_target): Add initializer for arch_setup field.
9207
9208 * spu-low.c (init_registers_spu): Add prototype.
9209 (initialize_low): Call initialie_registers_spu () instead of
9210 initialize_registers ().
9211
fd96d250
PA
92122008-02-19 Pedro Alves <pedro@codesourcery.com>
9213
9214 * server.c (handle_v_requests): When handling the vRun and vAttach
9215 packets, if already debugging a process, don't kill it. Return an
9216 error instead.
9217
d41b6bb4
DJ
92182008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9219
9220 * server.c (handle_query): Correct length check.
9221
5ac588cf
PA
92222008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9223
9224 * win32-low.c (do_initial_child_stuff): Add process handle
9225 parameter. Set current_process_handle and current_process_id from the
9226 parameters. Clear globals.
9227 (win32_create_inferior): Don't set current_process_handle and
9228 current_process_id here. Instead pass them on the call to
9229 do_initial_child_stuff.
9230 (win32_attach): Likewise.
9231 (win32_clear_inferiors): New.
9232 (win32_kill): Don't close the current process handle or the
9233 current thread handle here. Instead call win32_clear_inferiors.
9234 (win32_detach): Don't open a new handle to the process. Call
9235 win32_clear_inferiors.
9236 (win32_join): Don't rely on current_process_handle; open a new
9237 handle using the process id.
9238 (win32_wait): Call win32_clear_inferiors when the inferior process
9239 has exited.
9240
ecd7ecbc
DJ
92412008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9242
9243 * server.c (monitor_show_help): Add "exit".
9244
1525d545
MG
92452008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9246
ecd7ecbc 9247 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9248 (clean): Add reg-xtensa.c.
9249 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9250 * configure.srv (xtensa*-*-linux*) New target.
9251 * linux-xtensa-low.c: New.
9252 * xtensa-xtregs.c: New.
1525d545 9253
59a016f0
PA
92542008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9255
9256 * hostio.c: Don't include errno.h.
9257 (errno_to_fileio_errno): Move to hostio-errno.
9258 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9259 error number outputting to the target->hostio_last_error callback.
9260 (hostio_packet_error): Use FILEIO_EINVAL directly.
9261 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9262 calls to hostio_error.
9263 * hostio-errno.c: New.
9264 * server.h (hostio_last_error_from_errno): Declare.
9265 * target.h (target_ops): Add hostio_last_error member.
9266 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9267 as hostio_last_error handler.
889bf7c5 9268 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9269 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9270 (wince_hostio_last_error): New functions.
9271 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9272 as hostio_last_error handler.
9273 (win32_target_ops) [!_WIN32_WCE]: Register
9274 hostio_last_error_from_errno as hostio_last_error handler.
9275 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9276 (hostio-errno.o): New rule.
9277 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9278 * configure.srv (srv_hostio_err_objs): New variable. Default to
9279 hostio-errno.o.
9280 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9281 * configure: Regenerate.
9282
2d717e4f
DJ
92832008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9284
9285 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9286 (linux_kill, linux_detach): Clean up the process list.
9287 * remote-utils.c (remote_open): Improve port number parsing.
9288 (putpkt_binary, input_interrupt): Only send interrupts if the target
9289 is running.
9290 * server.c (extended_protocol): Make static.
9291 (attached): Define earlier.
9292 (exit_requested, response_needed, program_argv): New variables.
9293 (target_running): New.
9294 (start_inferior): Clear attached here.
9295 (attach_inferior): Set attached here.
9296 (require_running): Define.
9297 (handle_query): Use require_running and target_running. Implement
9298 "monitor exit".
9299 (handle_v_attach, handle_v_run): New.
9300 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9301 (gdbserver_usage): Update.
9302 (main): Redo argument parsing. Handle --debug and --multi. Handle
9303 --attach along with other options or after the port. Save
9304 program_argv. Support no initial program. Resynchronize
9305 communication with GDB after an error. Handle "monitor exit".
9306 Use require_running and target_running. Always allow the extended
9307 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9308 restart in extended mode.
9309 * README: Refer to the GDB manual. Update --attach usage.
9310
7407e2de
AS
93112007-12-20 Andreas Schwab <schwab@suse.de>
9312
9313 * linux-low.c (STACK_SIZE): Define.
9314 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9315 (linux_test_for_tracefork): Likewise.
9316
b65d95c5
DJ
93172007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9318
9319 * linux-low.c (linux_wait_for_event): Update messages. Do not
9320 reinsert auto-delete breakpoints.
9321 * mem-break.c (struct breakpoint): Change return type of handler to
9322 int.
9323 (set_breakpoint_at): Update handler type.
9324 (reinsert_breakpoint_handler): Return 1 instead of calling
9325 delete_breakpoint.
9326 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9327 setting a new one.
9328 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9329 * mem-break.h (set_breakpoint_at): Update handler type.
9330 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9331 * win32-low.c (auto_delete_breakpoint): New.
9332 (get_child_debug_event): Use it.
9333
4e799345
DJ
93342007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9335
9336 * configure.ac: Check for pread and pwrite.
9337 * hostio.c (handle_pread): Fall back to lseek and read.
9338 (handle_pwrite): Fall back to lseek and write.
9339 * config.in, configure: Regenerated.
9340
27524b67
DJ
93412007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9342
9343 * server.c (myresume): Add own_buf argument.
9344 (main): Update calls.
9345
a20d5e98
DJ
93462007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9347
9348 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9349 * remote-utils.c (remote_open): Do not call disable_async_io.
9350 (block_async_io): Delete.
9351 (unblock_async_io): Make static.
9352 (initialize_async_io): New.
9353 * server.c (handle_v_cont): Handle async I/O here.
9354 (myresume): Likewise. Move other common resume tasks here...
9355 (main): ... from here. Call initialize_async_io. Disable async
9356 I/O before the main loop.
9357 * server.h (initialize_async_io): Declare.
9358 (block_async_io, unblock_async_io): Delete prototypes.
9359 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9360
b79d787e
DJ
93612007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9362
9363 * remote-utils.c (readchar): Allow binary data in received messages.
9364
d97903b2
PA
93652007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9366
9367 * win32-low.c (attaching): New global.
9368 (win32_create_inferior): Clear the `attaching' global.
9369 (win32_attach): Set the `attaching' global.
9370 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9371 attaching. Only set a breakpoint at the entry point if not
9372 attaching.
9373
311de423
PA
93742007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9375
9376 * server.c (main): Don't report dll events on the initial
9377 connection on attaches.
9378
6c2d16d2
PA
93792007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9380
9381 * server.c (main): Relax numerical bases supported for the pid of
9382 the --attach command line argument.
9383
5ca906e6
PA
93842007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9385
9386 * win32-low.c (win32_attach): Call OpenProcess before
9387 DebugActiveProcess, not after. Add last error output to error
9388 call.
9389
9c6c8194
PA
93902007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9391
9392 * win32-low.c (win32_get_thread_context)
9393 (win32_set_thread_context): New functions.
9394 (thread_rec): Use win32_get_thread_context.
9395 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9396 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9397 field.
9398
4d5d1aaa
PA
93992007-12-03 Leo Zayas
9400 Pedro Alves <pedro_alves@portugalmail.pt>
9401
9402 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9403 global variables.
9404 (child_add_thread): Minor cleanup.
9405 (child_continue): Resume artificially suspended threads before
9406 calling ContinueDebugEvent.
9407 (suspend_one_thread): New.
9408 (fake_breakpoint_event): New.
9409 (get_child_debug_event): Change return type to int. Check here if
9410 gdb sent an interrupt request. If a soft interrupt was requested,
9411 fake a breakpoint event. Return 0 if there is no event to handle,
9412 and 1 otherwise.
9413 (win32_wait): Don't check here if gdb sent an interrupt request.
9414 Ensure there is a valid event to handle.
9415 (win32_request_interrupt): Add soft interruption method as last
9416 resort.
9417
c436e841
PA
94182007-12-03 Leo Zayas
9419 Pedro Alves <pedro_alves@portugalmail.pt>
9420
9421 * win32-low.h (win32_thread_info): Add descriptions to the
9422 structure members. Replace `suspend_count' counter by a
9423 `suspended' flag.
9424 * win32-low.c (thread_rec): Update condition of when to get the
9425 context from the inferior. Rely on ContextFlags being set if it
9426 has already been retrieved. Only suspend the inferior thread if
9427 we haven't already. Warn if that fails.
9428 (continue_one_thread): s/suspend_count/suspended/. Only call
9429 ResumeThread once. Warn if that fails.
9430
e7b5fa67
PA
94312007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9432
9433 * win32-low.c (win32_wait): Don't read from the inferior when it
9434 has already exited.
9435
a385171d
PA
94362007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9437
9438 * Makefile.in (win32_low_h): New variable.
9439 (win32-low.o): Add dependency on $(win32_low_h).
9440 (win32-arm-low.o, win32-i386-low.o): New rules.
9441
f80c84b3
DJ
94422007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9443
9444 * hostio.c: Correct copyright year.
9445
a6b151f1
DJ
94462007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9447
9448 * Makefile.in (OBS): Add hostio.o.
9449 (hostio.o): New rule.
9450 * server.h (handle_vFile): Declare.
9451 * hostio.c: New file.
9452 * server.c (handle_v_requests): Take packet_len and new_packet_len
9453 for binary packets. Call handle_vFile.
9454 (main): Update call to handle_v_requests.
9455
f9387fc3
DJ
94562007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9457
9458 * linux-low.c: Include <sched.h>.
9459
51c2684e
DJ
94602007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9461
9462 * linux-low.c (linux_tracefork_grandchild): New.
9463 (linux_tracefork_child): Use clone.
9464 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9465
75f83163
JB
94662007-10-31 Joel Brobecker <brobecker@adacore.com>
9467
9468 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9469
da5898ce
DJ
94702007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9471
9472 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9473
24a09b5f
DJ
94742007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9475
9476 * inferiors.c (change_inferior_id): Delete.
9477 (add_pid_to_list, pull_pid_from_list): New.
9478 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9479 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9480 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9481 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9482 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9483 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9484 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9485 (using_threads): Always set to 1.
9486 (handle_extended_wait): New.
9487 (add_process): Do not set TID.
9488 (linux_create_inferior): Set must_set_ptrace_flags.
9489 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9490 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9491 (linux_thread_alive): Rename TID argument to LWPID.
9492 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9493 (linux_wait_for_event): Do not use TID or check using_threads. Update
9494 call to dead_thread_notify. Call handle_extended_wait.
9495 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9496 (send_sigstop): Delete sigstop_sent.
9497 (wait_for_sigstop): Avoid TID.
9498 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9499 (linux_test_for_tracefork): New.
9500 (linux_lookup_signals): Use thread_db_active and
9501 linux_supports_tracefork_flag.
9502 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9503 * linux-low.h (get_process_thread): Avoid TID.
9504 (struct process_ifo): Move thread_known and tid to the end. Remove
9505 sigstop_sent.
9506 (linux_attach_lwp, thread_db_init): Update prototypes.
9507 * server.h (change_inferior_id): Delete prototype.
9508 (add_pid_to_list, pull_pid_from_list): New prototypes.
9509 * thread-db.c (thread_db_use_events): New.
9510 (find_first_thread): Rename to...
9511 (find_one_thread): ...this. Update callers and messages. Do not
9512 call fatal. Check thread_db_use_events. Do not call
9513 change_inferior_id or new_thread_notify.
9514 (maybe_attach_thread): Update. Do not call new_thread_notify.
9515 (thread_db_init): Set thread_db_use_events. Check use_events.
9516 * utils.c (fatal, warning): Correct message prefix.
9517
30ed0a8f
DJ
95182007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9519
9520 * Makefile.in (clean): Remove new files.
9521 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9522 (powerpc-64.o, powerpc-64.c): New rules.
9523 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9524 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9525 with SPE.
9526 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9527 SPE targets.
9528 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9529 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9530 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9531 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9532 (target_regsets): Add AltiVec and SPE register sets.
9533 * configure.ac: Check for AltiVec and SPE.
9534 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9535 (ppc_fill_vrregset, ppc_store_vrregset): New.
9536 (target_regsets): Add AltiVec register set.
9537 * configure: Regenerated.
9538
fd462a61
DJ
95392007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9540
9541 * linux-low.c (O_LARGEFILE): Define.
9542 (linux_read_memory): Use /proc/PID/mem.
9543 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9544 * configure, config.in: Regenerated.
9545
69f223ed
DJ
95462007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9547
9548 * linux-low.c (linux_wait_for_event): Do not pass signals while
9549 single-stepping.
9550
aec18585
PA
95512007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9552
9553 * win32-low.c (create_process): New.
9554 (win32_create_inferior): Use create_process instead of
9555 CreateProcess. If create_process failed retry appending an ".exe"
9556 suffix. Store the GetLastError result immediatelly after
9557 create_process calls and use it on the call to error.
9558
34d86ddd
PA
95592007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9560
9561 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9562
5a0e3bd0
JB
95632007-08-23 Joel Brobecker <brobecker@adacore.com>
9564
9565 * configure.ac: Switch license to GPLv3.
9566
f88c79e6
MS
95672007-08-01 Michael Snyder <msnyder@access-company.com>
9568
9569 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9570
6b3d9b83
PA
95712007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9572
9573 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9574 typedef.
9575 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9576 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9577 CloseToolhelp32Snapshot.
9578 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9579 CloseToolhelp32Snapshot.
9580
c588c53c
MS
95812007-07-27 Michael Snyder <michael.snyder@access-company.com>
9582
9583 * server.c (main): Check for inferior exit before main loop.
9584
aa0403d9
PA
95852007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9586
9587 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9588 instead of on tmp_desc.
9589
255e7678
DJ
95902007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9591 Daniel Jacobowitz <dan@codesourcery.com>
9592
9593 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9594 (add_thread): Minor cleanups.
9595 (clear_inferiors): Move lower in the file. Clear the DLL
9596 list.
9597 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9598 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9599 (xml_escape_text): New.
9600 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9601 for qSupported.
9602 (handle_v_cont): Report errors.
9603 (gdbserver_version): Update.
9604 (main): Correct size of own_buf. Do not report initial DLL events.
9605 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9606 (unloaded_dll, xml_escape_text): New.
9607 * win32-low.c (enum target_waitkind): Update comments.
9608 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9609 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9610 (win32_EnumProcessModules, win32_GetModuleInformation)
9611 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9612 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9613 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9614 (win32_Module32First, win32_Module32Next, load_toolhelp)
9615 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9616 (get_child_debug_event): Handle DLL events.
9617 (win32_wait): Likewise.
9618
0d37add9
DJ
96192007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9620
9621 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9622 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9623
45e2715e
PA
96242007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9625
9626 * win32-low.c (handle_output_debug_string): Ignore event if not
9627 waiting.
9628
c5674cf1
PA
96292007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9630
9631 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9632
2bbe3cc1
DJ
96332007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9634
9635 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9636
ae13219e
DJ
96372007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9638
9639 * inferiors.c (change_inferior_id): Add comment.
9640 * linux-low.c (check_removed_breakpoint): Add an early
9641 prototype. Improve debug output.
9642 (linux_attach): Doc update.
9643 (linux_detach_one_process, linux_detach): Clean up before releasing
9644 each process.
9645 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9646 * linux-low.h (struct process_info): Doc improvement.
9647 * mem-break.c (delete_all_breakpoints): New.
9648 * mem-break.h (delete_all_breakpoints): New prototype.
9649 * thread-db.c (find_first_thread): New.
9650 (thread_db_create_event): Call it instead of
9651 thread_db_find_new_threads. Clean up unused variables.
9652 (maybe_attach_thread): Remove first thread handling.
9653 (thread_db_find_new_threads): Use find_first_thread.
9654 (thread_db_get_tls_address): Likewise.
9655
4105de34
DJ
96562007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9657
9658 * thread-db.c (thread_db_find_new_threads): Add prototype.
9659 (thread_db_create_event): Check for the main thread before adding
9660 a new thread.
9661 (maybe_attach_thread): Only enable event reporting if TID == 0.
9662 (thread_db_get_tls_address): Check for new threads.
9663
2b876972
DJ
96642007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9665
9666 * linux-low.c (linux_create_inferior): Try execv before execvp.
9667 * spu-low.c (spu_create_inferior): Likewise.
9668
7a245884
DJ
96692007-06-13 Mike Frysinger <vapier@gentoo.org>
9670
9671 * linux-low.c (linux_create_inferior): Change execv to execvp.
9672 * spu-low.c (spu_create_inferior): Likewies.
9673
117ce543
DJ
96742007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9675
9676 * Makefile.in (clean): Clean new files instead of deleted ones.
9677 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9678 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9679 rules.
9680 * configure.srv: Specify XML files and new regformats for MIPS and
9681 MIPS64 GNU/Linux.
9682 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9683 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9684 an entry for the restart register.
9685 (mips_cannot_fetch_register, mips_cannot_store_register)
9686 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9687 register names to match the XML descriptions.
9688 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9689 restart register instead of $0.
9690
0e7f50da
UW
96912007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9692 Markus Deuling <deuling@de.ibm.com>
9693
9694 * remote-utils.c (decode_xfer_write): New function.
9695 * server.h (decode_xfer_write): Add prototype.
9696 * server.c (handle_query): Add PACKET_LEN argument. Support
9697 qXfer:spu:read and qXfer:spu:write packets.
9698 (main): Pass packet_len to handle_query.
9699 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9700 * target.h (target_ops): Add qxfer_spu.
9701
374c1d38
UW
97022007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9703
9704 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9705 accessing non-seekable spufs files.
9706
bb63802a
UW
97072007-05-16 Markus Deuling <deuling@de.ibm.com>
9708
889bf7c5 9709 * server.c (handle_query): Add reply for qC packet.
bb63802a 9710
7390519e
PA
97112007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9712 Leo Zayas <lerele@champenstudios@com>
9713
9714 * server.h (check_remote_input_interrupt_request): New function.
9715 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9716 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9717 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9718 (check_remote_input_interrupt_request): New function.
9719 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9720 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9721 winapi_GenerateConsoleCtrlEvent): New typedefs.
9722 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9723 to 250 ms.
9724 (win32_wait): Check for remote interrupt request
9725 with check_remote_input_interrupt_request.
9726 (win32_request_interrupt): New function.
9727 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9728
34b34921
PA
97292007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9730
9731 * win32-low.c (debug_registers_changed,
9732 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9733 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9734 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9735 (thread_rec): Get context using the low target.
9736 (child_add_thread): Call thread_added on the low target,
9737 which does the same thing.
9738 (regptr): Delete.
9739 (do_initial_child_stuff): Remove debug registers references.
9740 Set context using the low target. Resume threads after
9741 setting the contexts.
9742 (child_continue): Remove dead variable. Remove debug
9743 registers references.
9744 (child_fetch_inferior_registers): Go through the low target.
9745 (do_child_store_inferior_registers): Remove.
9746 (child_store_inferior_registers): Go through the low target.
9747 (win32_resume): Remove debug registers references.
9748 Set context using the low target.
9749 (handle_exception): Change return type to void. Don't record
9750 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9751 first chance exception.
889bf7c5 9752 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9753 goto loop. Always return after waiting for debug event.
9754 (win32_wait): Convert to switch statement. Handle spurious
9755 events.
9756
9757 * win32-i386-low.c (debug_registers_changed,
9758 debug_registers_used): New.
9759 (initial_stuff): Rename to ...
9760 (i386_initial_stuff): ... this. Clear debug registers
9761 state variables.
9762 (store_debug_registers): Delete.
9763 (i386_get_thread_context): New.
9764 (load_debug_registers): Delete.
9765 (i386_set_thread_context): New.
9766 (i386_thread_added): New.
9767 (single_step): Rename to ...
9768 (i386_single_step): ... this.
9769 (do_fetch_inferior_registers): Rename to ...
9770 (i386_fetch_inferior_register): ... this.
9771 (i386_store_inferior_register): New.
9772 (the_low_target): Adapt to new interface.
9773
9774 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9775 (arm_get_thread_context): New.
9776 (arm_set_thread_context): New.
9777 (regptr): New.
9778 (do_fetch_inferior_registers): Rename to ...
9779 (arm_fetch_inferior_register): ... this.
9780 (arm_store_inferior_register): New.
9781 (arm_wince_breakpoint): Reimplement as unsigned long.
9782 (arm_wince_breakpoint_len): Define.
9783 (the_low_target): Adapt to new interface.
9784
9785 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9786 load_debug_registers. Add get_thread_context, set_thread_context,
9787 thread_added and store_inferior_register. Rename
9788 fetch_inferior_registers to fetch_inferior_register.
9789 (regptr): Remove declaration.
9790
dd6953e1
PA
97912007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9792
9793 * linux-low.c (linux_detach): Change return type to int. Return 0.
9794 * spu-low.c (spu_detach): Likewise.
9795
444d6139
PA
97962007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9797
9798 * target.h (target_ops): Change return type of detach to int.
9799 Add join.
9800 (join_inferior): New.
9801 * server.c (main): Don't skip detach support on mingw32.
9802 If the inferior doesn't support detaching return error.
9803 Call join_inferior instead of using waitpid.
9804 * linux-low.c (linux_join): New.
9805 (linux_target_op): Add linux_join.
9806 * spu-low.c (spu_join): New.
9807 (spu_target_ops): Add spu_join.
9808 * win32-low.c (win32_detach): Adapt to new interface.
9809 Reopen current_process_handle before detaching. Issue a child
9810 resume before detaching.
9811 (win32_join): New.
9812 (win32_target_op): Add win32_join.
9813
1d5315fe
PA
98142007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9815
9816 * win32-low.c (win32-attach): Fix return value.
9817 * target.h (target_ops): Describe ATTACH return values.
9818
bf914831
PA
98192007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9820
9821 * win32-low.c (GETPROCADDRESS): Define.
9822 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9823 (winapi_DebugSetProcessKillOnExit): Likewise.
9824 (win32_create_inferior): Force usage of ansi CreateProcessA.
9825 (win32_attach): Use GETPROCADDRESS.
9826 (win32_detach): Likewise.
9827
f72f3e60
PA
98282007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9829
9830 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9831
ed50f18f
PA
98322007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9833
9834 * win32-low.c: Commit leftover changes from 2007-03-29.
9835
0c2ead7e
DJ
98362007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9837
9838 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9839 fields short instead of int. Add explicit padding.
9840 (i387_cache_to_fsave): Remove unnecessary casts.
9841 (i387_fsave_to_cache): Doc fix.
9842 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9843
73725ff3
DJ
98442007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9845
9846 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9847 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9848
d99f33d8
PA
98492007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9850
9851 * configure.srv (arm*-*-mingw32ce*): Move near the other
9852 arm targets.
9853
68070c10
PA
98542007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9855
2482afc6 9856 * configure.ac: Add errno checking.
68070c10
PA
9857 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9858 sys/file.h and malloc.h.
9859 (AC_CHECK_DECLS): Add perror.
9860 (srv_mingwce): Handle.
2482afc6 9861 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
9862 win32-i386-low.o to srv_tgtobj.
9863 (i[34567]86-*-mingw*): Likewise.
9864 (arm*-*-mingw32ce*): Add case.
9865 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9866 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9867 [__MINGW32CE__] (strerror): New function.
9868 [__MINGW32CE__] (errno): Define to GetLastError.
9869 [__MINGW32CE__] (COUNTOF): New macro.
9870 (remote_open): Remove extra close call.
9871 * mem-break.c (delete_breakpoint_at): New function.
9872 * mem-break.h (delete_breakpoint_at): Declare.
9873 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9874 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9875 [USE_WIN32API] (read, write): Add char* casts.
9876 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9877 * server.h: Include wincecompat.h on Windows CE.
9878 [HAVE_ERRNO_H]: Check.
9879 (perror): Declare if not declared.
9880 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9881 (perror_with_name): Remove errno declaration.
9882 * wincecompat.h: New.
9883 * wincecompat.c: New.
9884 * win32-low.h: New.
9885 * win32-arm-low.c: New.
9886 * win32-i386-low.c: New.
9887 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9888 (OUTMSG2): Make it safe.
9889 (_T): New macro.
9890 (COUNTOF): New macro.
9891 (NUM_REGS): Get it from the low target.
9892 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9893 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9894 (thread_rec): Let low target handle debug registers.
9895 (child_add_thread): Likewise.
9896 (child_init_thread_list): Likewise.
9897 (continue_one_thread): Likewise.
9898 (regptr): New.
9899 (do_child_fetch_inferior_registers): Move to ...
9900 * win32-i386-low.c: ... here, and rename to ...
9901 (do_fetch_inferior_registers): ... this.
889bf7c5 9902 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
9903 Go through the low target.
9904 (do_child_store_inferior_registers): Use regptr.
9905 (strwinerror): New function.
9906 (win32_create_inferior): Handle Windows CE.
9907 Use strwinerror instead of strerror on Windows error
9908 codes. Add program to the error output.
9909 Don't close the main thread handle on Windows CE.
9910 (win32_attach): Use coredll.dll on Windows CE.
9911 (win32_kill): Close current process and current
9912 thread handles.
9913 (win32_detach): Use coredll.dll on Windows CE.
9914 (win32_resume): Let low target handle debug registers, and
9915 step request.
9916 (handle_exception): Add/Remove initial breakpoint. Avoid
9917 non-existant WSTOPSIG on Windows CE.
9918 (win32_read_inferior_memory): Cast to remove warning.
9919 (win32_arch_string): Go through the low target.
9920 (initialize_low): Call set_breakpoint_data with the low
9921 target's breakpoint.
9922 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9923 FOP_REGNUM, mappings): Move to ...
9924 * win32-i386-low.c: ... here.
9925 * win32-low.c (win32_thread_info): Move to ...
9926 * win32-low.h: ... here.
9927 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9928 win32-arm-low.c and wincecompat.c.
9929 (all:): Add $EXEEXT.
9930 (install-only:): Likewise.
9931 (gdbserver:): Likewise.
9932 (gdbreplay:): Likewise.
9933 * config.in: Regenerate.
9934 * configure: Regenerate.
9935
41093d81
PA
99362007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9937
9938 * win32-low.c: Rename typedef thread_info to
9939 win32_thread_info throughout.
9940
544afa54
PA
99412007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9942
9943 * win32-i386-low.c: Rename to ...
9944 * win32-low.c: ... this.
9945 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9946 * Makefile.in: Likewise.
9947
bce7165d
PA
99482007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9949
9950 * remote-utils.c (monitor_output): Constify msg parameter.
9951 * server.h (monitor_output): Likewise.
9952 * win32-i386-low.c (handle_output_debug_string): New.
9953 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9954 handle_output_debug_string.
9955 (get_child_debug_event): Likewise.
9956
506c7aa0
DJ
99572007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9958
9959 * server.c (main): Correct strtoul check.
9960
42c81e2a
DJ
99612007-03-27 Jon Ringle <jon@ringle.org>
9962
9963 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9964
9453113a
DJ
99652007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9966
9967 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9968
64a69107
DJ
99692007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9970
9971 * terminal.h: Check HAVE_SGTTY_H.
9972
99732007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
9974
9975 * remote-utils.c (remote_open): Print out the assigned port number.
9976
c74d0ad8
DJ
99772007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9978
9979 * remote-utils.c (monitor_output): New function.
9980 * server.c (debug_threads): Define here.
9981 (monitor_show_help): New function.
9982 (handle_query): Handle qRcmd.
9983 (main): Do not handle 'd' packet.
9984 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9985 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9986 of debug_threads.
9987
de7c3b4a
PA
99882007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9989
9990 * Makefile.in (EXEEXT): New.
9991 (clean): Use $(EXEEXT).
9992
ef57601b
PA
99932007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9994
9995 * target.h (target_ops): Rename send_signal to request_interrupt,
9996 and remove enum target_signal parameter.
9997 * linux-low.c (linux_request_interrupt): Rename from
9998 linux_send_signal, and always send SIGINT.
9999 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10000 and always send SIGINT.
10001 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10002 of send_signal.
10003 (input_interrupt): Likewise.
10004
820f2bda
PA
100052007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10006
10007 * server.c (get_features_xml): Check if target implemented
10008 arch_string.
10009 * win32-i386-low.c (win32_arch_string): New.
10010 (win32_target_ops): Add win32_arch_string as arch_string member.
10011
ab39bf24
UW
100122007-02-22 Markus Deuling <deuling@de.ibm.com>
10013
10014 * spu-low.c (spu_arch_string): New.
10015 (spu_target_ops): Add spu_arch_string.
10016
61ff6e04
DJ
100172007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10018
10019 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10020 * configure.ac: Do not check for terminal.h.
10021 * configure, config.in: Regenerated.
10022
fb1e4ffc
DJ
100232007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10024
10025 * Makefile.in (OBS): Add $(XML_BUILTIN).
10026 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10027 (clean): Update.
10028 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10029 (arm-with-iwmmxt.c): New.
10030 * config.in, configure: Regenerate.
10031 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10032 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10033 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10034 (arm*-*-linux*): Add iWMMXt and regset support.
10035 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10036 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10037 (arm_store_wmmxregset, target_regsets): New.
10038 * server.c (get_features_xml): Take annex argument. Check builtin
10039 XML documents.
10040 (handle_query): Handle multiple annexes.
10041
0f48aa01
DJ
100422007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10043
10044 * remote-utils.c [USE_WIN32API] (read, write): Define.
10045 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10046 write.
10047
23181151
DJ
100482007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10049
10050 * linux-i386-low.c (the_low_target): Set arch_string.
10051 * linux-x86-64-low.c (the_low_target): Likewise.
10052 * linux-low.c (linux_arch_string): New.
10053 (linux_target_ops): Add it.
10054 * linux-low.h (struct linux_target_ops): Add arch_string.
10055 * server.c (write_qxfer_response): Use const void * for DATA.
10056 (get_features_xml): New.
10057 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10058 * target.h (struct target_ops): Add arch_string method.
10059
9d606399
DJ
100602007-01-03 Denis Pilat <denis.pilat@st.com>
10061 Daniel Jacobowitz <dan@codesourcery.com>
10062
10063 * linux-low.c (linux_kill): Handle being called with no threads.
10064 * win32-i386-low.c (win32_kill): Likewise.
10065 (get_child_debug_event): Clear current_process_handle.
10066
100672006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10068 Daniel Jacobowitz <dan@codesourcery.com>
10069
10070 * remote-utils.c (remote_open): Check the type of specified
10071 serial port devices before opening them.
10072 * server.c (main): Kill the inferior if an error occurs during
10073 the first remote_open.
10074
a5e13d24
DJ
100752006-12-05 Markus Deuling <deuling@de.ibm.com>
10076
10077 * README: Update supported targets.
10078
186947f7
DJ
100792006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10080
10081 * Makefile.in (clean): Remove reg-mips64.c.
10082 (reg-mips64.c, reg-mips64.o): New rules.
10083 * configure.srv: Handle mips64. Include regset support for mips.
10084 * linux-mips-low.c (union mips_register): New.
10085 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10086 (mips_breakpoint, mips_breakpoint_at): Use int.
10087 (mips_collect_register, mips_supply_register)
10088 (mips_collect_register_32bit, mips_supply_register_32bit)
10089 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10090 (mips_store_fpregset, target_regsets): New.
10091 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10092
a13e2c95
UW
100932006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10094
10095 * configure.srv: Add target "spu*-*-*".
10096 * Makefile.in (clean): Remove reg-spu.c.
10097 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10098 * spu-low.c: New file.
10099
cb7283db
DJ
101002006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10101
10102 * configure.ac: Correct td_thr_tls_get_addr test.
10103 * configure: Regenerated.
10104
89be2091
DJ
101052006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10106
10107 * linux-low.c (linux_wait_for_event): Reformat. Use the
10108 pass_signals array.
10109 * remote-utils.c (decode_address_to_semicolon): New.
10110 * server.c (pass_signals, handle_general_set): New.
10111 (handle_query): Mention QPassSignals for qSupported.
10112 (main): Call handle_general_set.
10113 * server.h (pass_signals, decode_address_to_semicolon): New.
10114
000ef4f0
DJ
101152006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10116
10117 * server.c (handle_query): Correct error handling for read_auxv.
10118
b7149293
UW
101192005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10120
10121 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10122 and srv_linux_thread_db to yes.
10123 * linux-s390-low.c (s390_fill_gregset): New function.
10124 (target_regsets): Define data structure.
10125
dae5f5cf
DJ
101262006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10127
10128 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10129 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10130 * config.in, configure: Regenerated.
10131 * inferiors.c (gdb_id_to_thread): New function.
10132 (gdb_id_to_thread_id): Use it.
10133 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10134 * linux-low.h (struct process_info): Add th member.
10135 (thread_db_get_tls_address): New prototype.
10136 * remote-utils.c (decode_address): Make non-static.
10137 * server.c (handle_query): Handle qGetTLSAddr.
10138 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10139 * target.h (struct target_ops): Add get_tls_address.
10140 * thread-db.c (maybe_attach_thread): Save the thread handle.
10141 (thread_db_get_tls_address): New.
10142
32ca6d61
DJ
101432006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10144
10145 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10146 (linux_resume_one_process): Take a siginfo_t *. Update all
10147 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10148 (struct pending_signals): Add a siginfo_t.
10149 (linux_wait_for_process): Always set last_status.
10150 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10151 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10152 * linux-low.h (struct process_info): Add last_status.
10153
5ffff7c1
DJ
101542006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10155
10156 * remote-utils.c (try_rle): New function.
10157 (putpkt_binary): Use it.
10158
8695c747
DJ
101592006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10160
10161 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10162 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10163 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10164 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10165 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10166 point registers.
10167
290fadea
RS
101682006-08-08 Richard Sandiford <richard@codesourcery.com>
10169
10170 * server.c (terminal_fd): New variable.
10171 (old_foreground_pgrp): Likewise.
10172 (restore_old_foreground_pgrp): New function.
10173 (start_inferior): Record the terminal file descriptor in terminal_fd
10174 and its original foreground group in old_foreground_pgrp. Register
10175 restore_old_foreground_pgrp with atexit().
10176
9f2e1e63
DJ
101772006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10178
10179 * server.c (handle_query): Correct qPart to qXfer.
10180
b80864fb
DJ
101812006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10182
10183 * configure.ac: Check for more headers which are missing on
10184 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10185 * configure.srv: Add Cygwin and mingw32.
10186 * remote-utils.c: Don't include headers unconditionally which
10187 are missing on mingw32. Include <winsock.h> for mingw32.
10188 (remote_open): Adjust for mingw32 support. Flush
10189 standard error after writing to it.
10190 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10191 (unblock_async_io, enable_async_io, disable_async_io)
10192 (readchar, getpkt): Update for Winsock support.
10193 (prepare_resume_reply): Expect a protocol signal number.
10194 * server.c: Disable <sys/wait.h> on mingw32.
10195 (start_inferior): Adjust for mingw32 support. Flush
10196 standard error after writing to it.
10197 (attach_inferior): Likewise. Use protocol signal
10198 numbers.
10199 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10200 and names.
10201 * win32-i386-low.c: New file.
10202 * Makefile.in (XM_CLIBS): Set.
10203 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10204 (win32-i386-low.o): New dependency rule.
10205 * linux-low.c (linux_wait): Use target signal numbers.
10206 * target.h (struct target_ops): Doc fix.
10207 * server.h (target_signal_to_name): New prototype.
10208 * gdbreplay.c: Don't include headers unconditionally which
10209 are missing on mingw32. Include <winsock.h> for mingw32.
10210 (remote_close, remote_open): Adjust for Winsock support.
10211 * configure, config.in: Regenerated.
10212
0876f84a
DJ
102132006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10214
10215 * server.c (decode_xfer_read, write_qxfer_response): New.
10216 (handle_query): Take a packet length argument. Handle
10217 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10218 the qSupported response.
10219 (main): Update call to handle_query.
10220
01f9e8fa
DJ
102212006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10222
10223 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10224 (putpkt_binary): Renamed from putpkt and adjusted for binary
10225 data.
10226 (putpkt): New wrapper for putpkt_binary.
10227 (readchar): Don't mask off the high bit.
10228 (decode_X_packet): New function.
10229 * server.c (main): Call putpkt_binary if a handler sets the packet
10230 length. Save the length of the incoming packet. Handle 'X'.
10231 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10232
be2a5f71
DJ
102332006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10234
10235 * server.c (handle_query): Handle qSupported.
10236
ea025f5f
DJ
102372006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10238
10239 * remote-utils.c (all_symbols_looked_up): New variable.
10240 (look_up_one_symbol): Check it.
10241 * server.h (look_up_one_symbol): New declaration.
10242 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10243
9308fc88
DJ
102442006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10245
10246 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10247 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10248 (PTRACE_GET_THREAD_AREA): Define.
10249 (ps_get_thread_area): New function.
10250
52fb6437
NS
102512006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10252
10253 * configure.srv (m68k*-*-uclinux*): New target.
10254 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10255 (linux_resume_one_process): Remove extraneous cast.
10256 (linux_read_offsets): New.
10257 (linux_target_op): Add linux_read_offsets on mmuless systems.
10258 * server.c (handle_query): Add qOffsets logic.
10259 * target.h (struct target_ops): Add read_offsets.
10260
21b0f40c
DJ
102612006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10262
10263 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10264 (PTRACE_GET_THREAD_AREA): Define.
10265 (ps_get_thread_area): New function.
10266 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10267 (linux-x86-64-low.o): Update.
10268
0050a760
DJ
102692006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10270
10271 * configure.ac: Remove checks for prfpregset_t.
10272 * gdb_proc_service.h: New file.
10273 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10274 new "gdb_proc_service.h".
10275 * proc-service.c: Likewise.
10276 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10277 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10278 * Makefile.in (gdb_proc_service_h): Updated.
10279 * configure, config.in: Regenerated.
10280
b92a518e
DJ
102812006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10282
10283 * remote-utils.c (prepare_resume_reply): Move declaration
10284 of gdb_id_from_wait to the top of the block.
10285
545587ee
DJ
102862006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10287
10288 * linux-low.c (regsets_store_inferior_registers): Read the regset
10289 from the target before filling it.
10290
9db87ebd
DJ
102912006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10292
10293 * server.c (attach_inferior): Return SIGTRAP for a successful
10294 attach.
10295
dd24457d
DJ
102962006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10297
10298 * Makefile.in (OBS): Add version.o.
10299 (STAGESTUFF): Delete.
10300 (version.o): Add dependencies.
10301 (version.c): Replace rule.
10302 (clean): Remove version.c.
10303 * server.c (gdbserver_version): New.
10304 (gdbserver_usage): Use printf.
10305 (main): Handle --version and --help.
10306 * server.h (version, host_name): Add declarations.
10307
6f0f660e
EZ
103082005-12-23 Eli Zaretskii <eliz@gnu.org>
10309
889bf7c5
PA
10310 * linux-arm-low.c:
10311 * linux-arm-low.c:
10312 * inferiors.c:
10313 * i387-fp.h:
10314 * i387-fp.c:
10315 * gdbreplay.c:
10316 * regcache.c:
10317 * proc-service.c:
10318 * mem-break.h:
10319 * mem-break.c:
10320 * linux-x86-64-low.c:
10321 * linux-sh-low.c:
10322 * linux-s390-low.c:
10323 * linux-ppc64-low.c:
10324 * linux-ppc-low.c:
10325 * linux-mips-low.c:
10326 * linux-m68k-low.c:
10327 * linux-m32r-low.c:
10328 * linux-low.h:
10329 * linux-low.c:
10330 * linux-ia64-low.c:
10331 * linux-i386-low.c:
10332 * linux-crisv32-low.c:
10333 * thread-db.c:
10334 * terminal.h:
10335 * target.h:
10336 * target.c:
10337 * server.h:
10338 * server.c:
10339 * remote-utils.c:
10340 * regcache.h:
10341 * utils.c:
10342 * Makefile.in:
10343 * configure.ac:
6f0f660e
EZ
10344 * gdbserver.1: Add (C) after Copyright. Update the FSF
10345 address.
10346
9d1fb177
DJ
103472005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10348
10349 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10350 (arm_breakpoint_at): Recognize both breakpoints.
10351 (the_low_target): Use the correct breakpoint instruction.
10352
011a70c2
DJ
103532005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10354
10355 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10356 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10357 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10358 (the_low_target): Update.
10359
7fb85e41
AS
103602005-10-25 Andreas Schwab <schwab@suse.de>
10361
10362 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10363
10364 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10365 (ia64_num_regs): Reduce to 462.
10366
3db0444b
DJ
103672005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10368
10369 * acinclude.m4: Correct quoting.
10370 * aclocal.m4: Regenerated.
10371
10372 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10373 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10374 (thread_db_init): Call thread_db_err_str.
10375 * configure.ac: Check for TD_VERSION.
10376 * config.in, configure: Regenerated.
10377
bee0189a
DJ
103782005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10379
10380 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10381
e9d25b98
DJ
103822005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10383
10384 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10385 is not available. Define HAVE_PTRACE_GETREGS if it is.
10386 * config.in, configure: Regenerated.
10387 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10388 * linux-i386-low.c, linux-m68k-low.c: Update to use
10389 HAVE_PTRACE_GETREGS.
10390 * linux-low.c (regsets_fetch_inferior_registers)
10391 (regsets_store_inferior_registers): Only return 0 if we processed
10392 GENERAL_REGS.
10393 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10394 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10395
a06660f7
DJ
103962005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10397
10398 * inferiors.c (struct thread_info): Add gdb_id.
10399 (add_thread): Add gdb_id argument.
10400 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10401 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10402 calls to add_thread.
10403 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10404 * server.c (handle_query): Use thread_to_gdb_id.
10405 (handle_v_cont, main): Use gdb_id_to_thread_id.
10406 * server.h (add_thread): Update prototype.
10407 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10408 prototypes.
10409
5a1f5858
DJ
104102005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10411
10412 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10413 left-padded registers.
10414 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10415 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10416
e122f1f5
SE
104172005-07-01 Steve Ellcey <sje@cup.hp.com>
10418
10419 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10420 * configure: Regenerate.
10421 * config.in: Regenerate.
10422 * server.h (NEED_DECLARATION_STRERROR):
10423 Replace with !HAVE_DECL_STRERROR.
10424
d592fa2f
DJ
104252005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10426
10427 * linux-low.c (linux_wait, linux_send_signal): Don't test
10428 an unsigned long variable for > 0 if it could be MAX_ULONG.
10429 * server.c (myresume): Likewise.
10430 * target.c (set_desired_inferior): Likewise.
10431
ccbd4912
MK
104322005-06-13 Mark Kettenis <kettenis@gnu.org>
10433
10434 * configure.ac: Simplify and improve check for socklen_t.
10435 * configure, config.in: Regenerate.
10436
f450004a
DJ
104372005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10438
10439 * acconfig.h: Remove.
10440 * configure.ac: Add a test for socklen_t. Use three-argument
10441 AC_DEFINE throughout.
10442 * config.in: Regenerated using autoheader 2.59.
10443 * configure: Regenerated.
10444
10445 * gdbreplay.c (socklen_t): Provide a default.
10446 (remote_open): Use socklen_t.
10447 * remote-utils.c (socklen_t): Provide a default.
10448 (remote_open): Use socklen_t.
10449 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10450 unsigned char.
10451
10452 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10453 char for buffers.
10454 * linux-low.c (linux_read_memory, linux_write_memory)
10455 (linux_read_auxv): Likewise.
10456 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10457 (check_mem_write): Likewise.
10458 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10459 Likewise.
10460 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10461 (registers_from_string, register_data): Likewise.
10462 * server.c (handle_query, main): Likewise.
10463 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10464 (decode_M_packet): Likewise.
10465 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10466 * target.h (struct target_ops): Update read_memory, write_memory,
10467 and read_auxv.
10468 (read_inferior_memory, write_inferior_memory): Update.
10469 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10470 to unsigned char *.
10471 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10472 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10473 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10474 linux-s390-low.c, linux-sh-low.c: Update for changes in
10475 read_inferior_memory and the_low_target->breakpoint.
10476
eee84df1
DJ
104772005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10478
10479 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10480 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10481 * configure.srv: Add powerpc64-*-linux*.
10482 * linux-ppc64-low.c: New file.
10483
45b134e5
OF
104842005-05-23 Orjan Friberg <orjanf@axis.com>
10485
10486 * linux-cris-low.c: New file with support for CRIS.
10487 * linux-crisv32-low.c: Ditto for CRISv32.
10488 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10489 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10490 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10491 reg-crisv32.o, and reg-crisv32.c to make rules.
10492 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10493 recognized targets.
10494
48d93c75
UW
104952005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10496
10497 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10498 of sizeof (PTRACE_XFER_TYPE).
10499 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10500
e013ee27
OF
105012005-05-12 Orjan Friberg <orjanf@axis.com>
10502
889bf7c5 10503 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10504 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10505 pointers for hardware watchpoint support.
10506 * linux-low.h (struct linux_target_ops): Ditto.
10507 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10508 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10509 to linux_target_ops.
10510 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10511 reply packet.
10512 * server.c (main): Recognize 'Z' and 'z' packets.
10513
b0ded00b
UW
105142005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10515
10516 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10517 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10518 (the_low_target): Add new members.
10519
8643e2ad
DJ
105202005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10521
10522 * proc-service.c (ps_lgetregs): Search all_processes instead of
10523 all_threads.
10524
fc620387
DJ
105252005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10526
10527 * server.c (start_inferior): Change return type to int.
10528 (attach_inferior): Change sigptr to int *.
10529 (handle_v_cont, handle_v_requests): Change signal to int *.
10530 (main): Change signal to int.
10531
105322005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10533
10534 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10535 * configure.srv: Add m32r*-*-linux*.
10536 * linux-m32r-low.c: New file.
10537
e0e76420
DJ
105382005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10539
10540 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10541
a1928bad
DJ
105422005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10543
10544 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10545 Take unsigned long arguments for PIDs.
10546 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10547 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10548 (wait_for_sigstop, linux_resume_one_process)
10549 (regsets_fetch_inferior_registers, linux_send_signal)
10550 (linux_read_auxv): Likewise. Update the types of variables holding
10551 PIDs. Update format string specifiers.
10552 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10553 * remote-utils.c (prepare_resume_reply): Likewise.
10554 * server.c (cont_thread, general_thread, step_thread)
10555 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10556 unsigned long.
10557 (handle_query): Update format specifiers.
10558 (handle_v_cont, main): Use strtoul for thread IDs.
10559 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10560 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10561 (general_thread, step_thread, thread_from_wait)
10562 (old_thread_from_wait): Update.
10563 * target.h (struct thread_resume): Use unsigned long for THREAD.
10564 (struct target_ops): Use unsigned long for arguments to attach and
10565 thread_alive.
10566
dcdb98d2
DJ
105672005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10568
10569 * acinclude.m4: Include bfd/bfd.m4 directly.
10570 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10571 <agriffis@toolchain.org>.
10572 * aclocal.m4, configure: Regenerated.
10573
bec39cab
AC
105742005-01-07 Andrew Cagney <cagney@gnu.org>
10575
10576 * configure.ac: Rename configure.in, require autoconf 2.59.
10577 * configure: Re-generate.
10578
434c4c77
DJ
105792004-12-08 Daniel Jacobowitz <dan@debian.org>
10580
10581 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10582 LIBS when finished.
10583 * aclocal.m4: Regenerated.
10584 * configure: Regenerated.
10585
db1d3e1b
AS
105862004-11-21 Andreas Schwab <schwab@suse.de>
10587
10588 * linux-m68k-low.c (m68k_num_gregs): Define.
10589 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10590 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10591 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10592 (m68k_breakpoint_at): New. Add to the_low_target.
10593
10594 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10595 srv_linux_thread_db to yes.
10596
43360365
JB
105972004-10-20 Joel Brobecker <brobecker@gnat.com>
10598
10599 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10600 (ARCH_SET_FS): Likewise.
10601 (ARCH_GET_FS): Likewise.
10602 (ARCH_GET_GS): Likewise.
10603
fd500816
DJ
106042004-10-16 Daniel Jacobowitz <dan@debian.org>
10605
10606 * linux-i386-low.c (ps_get_thread_area): New.
10607 * linux-x86-64-low.c (ps_get_thread_area): New.
10608 * linux-low.c: Include <sys/syscall.h>.
10609 (linux_kill_one_process): Don't kill the first thread here.
10610 (linux_kill): Kill the first thread here.
10611 (kill_lwp): New function.
10612 (send_sigstop, linux_send_signal): Use it.
10613 * proc-service.c: Clean up #ifdefs.
10614 (fpregset_info): Delete.
10615 (ps_lgetregs): Update and enable implementation.
10616 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10617 implementations.
10618 * remote-utils.c (struct sym_cache, symbol_cache): New.
10619 (input_interrupt): Print a clearer message.
10620 (async_io_enabled): New variable.
10621 (enable_async_io, disable_async_io): Use it. Update comments.
10622 (look_up_one_symbol): Use the symbol cache.
10623 * thread-db.c (thread_db_look_up_symbols): New function.
10624 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10625
f6de3c42
DJ
106262004-10-16 Daniel Jacobowitz <dan@debian.org>
10627
10628 * configure.in: Test for -rdynamic.
10629 * configure: Regenerated.
10630 * Makefile (INTERNAL_LDFLAGS): New.
10631 (gdbserver, gdbreplay): Use it.
10632
2c0fc042
AC
106332004-09-02 Andrew Cagney <cagney@gnu.org>
10634
10635 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10636
075b3282
DJ
106372004-03-23 Daniel Jacobowitz <drow@mvista.com>
10638
10639 * linux-low.c (linux_wait): Clear all_processes list also.
10640
fa6a77dc
DJ
106412004-03-12 Daniel Jacobowitz <drow@mvista.com>
10642
10643 * linux-low.c: Include <errno.h>. Remove extern declaration of
10644 errno.
10645
6d782a97
DJ
106462004-03-12 Daniel Jacobowitz <drow@mvista.com>
10647
10648 * gdbreplay.c, server.h, utils.c: Update copyright years.
10649
3a7fb99b
DJ
106502004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10651
10652 * server.c (main): Print child status or termination signal from
10653 variable 'signal', not 'sig'.
10654
c3e735a6
DJ
106552004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10656
10657 * linux-low.c (linux_read_memory): Change return type to
10658 int. Check for and return error from ptrace().
10659 * target.c (read_inferior_memory): Change return type to int. Pass
10660 back return status from the_target->read_memory().
10661 * target.h (struct target_ops): Adapt *read_memory() prototype.
10662 Update comment.
10663 (read_inferior_memory): Adapt prototype.
10664 * server.c (main): Return an error packet if
10665 read_inferior_memory() returns an error.
10666
a59d1c82
DJ
106672004-03-04 Daniel Jacobowitz <drow@mvista.com>
10668
10669 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10670 Unify with other clean targets.
10671
dc3f8883
DJ
106722004-02-29 Daniel Jacobowitz <drow@mvista.com>
10673
10674 * server.c (handle_v_cont): Call set_desired_inferior.
10675
89a208da
DJ
106762004-02-29 Daniel Jacobowitz <drow@mvista.com>
10677
10678 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10679
62ea82f5
DJ
106802004-02-29 Daniel Jacobowitz <drow@mvista.com>
10681
10682 * linux-low.c (linux_wait): Unblock async I/O.
10683 (linux_resume): Block and enable async I/O.
10684 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10685 * server.h (block_async_io, unblock_async_io): Add prototypes.
10686
6910d122
DJ
106872004-02-29 Daniel Jacobowitz <drow@mvista.com>
10688
10689 * remote-utils.c (remote_open): Print a status notice after
10690 opening a TCP port.
10691 * server.c (attach_inferior): Print a status notice after
10692 attaching.
10693
106942004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10695
10696 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10697
c89dc5d4
DJ
106982004-02-26 Daniel Jacobowitz <drow@mvista.com>
10699
10700 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10701 error packet.
10702 * server.c, target.h: Update copyright years.
10703
4b8dad4a
RM
107042004-02-25 Roland McGrath <roland@redhat.com>
10705
10706 * target.h (struct target_ops): New member `read_auxv'.
10707 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10708 * linux-low.c (linux_read_auxv): New function.
10709 (linux_target_ops): Initialize `read_auxv' member to that.
10710
d7446758
JB
107112004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10712
10713 Committed by Jim Blandy <jimb@redhat.com>.
10714
10715 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10716 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10717 instead of GPR_SIZE to distiguish s390 and s390x targets.
10718
5544ad89
DJ
107192004-01-31 Daniel Jacobowitz <drow@mvista.com>
10720
10721 * linux-low.c: Update copyright year.
10722 (check_removed_breakpoint): Clear pending_is_breakpoint.
10723 (linux_set_resume_request, linux_queue_one_thread)
10724 (resume_status_pending_p): New functions.
10725 (linux_continue_one_thread): Use process->resume.
10726 (linux_resume): Only resume threads if there are no pending events.
10727 * linux-low.h (struct process_info): Add resume request
10728 pointer.
10729
2a68b70e
DJ
107302004-01-30 Daniel Jacobowitz <drow@mvista.com>
10731
10732 * regcache.c (new_register_cache): Clear the allocated register
10733 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10734
64386c31
DJ
107352003-10-13 Daniel Jacobowitz <drow@mvista.com>
10736
10737 * linux-low.c (linux_resume): Take a struct thread_resume *
10738 argument.
10739 (linux_wait): Update call.
10740 (resume_ptr): New static variable.
10741 (linux_continue_one_thread): Renamed from
10742 linux_continue_one_process. Use resume_ptr.
10743 (linux_resume): Use linux_continue_one_thread.
10744 * server.c (handle_v_cont, handle_v_requests): New functions.
10745 (myresume): New function.
10746 (main): Handle 'v' case.
10747 * target.h (struct thread_resume): New type.
10748 (struct target_ops): Change argument of "resume" to struct
10749 thread_resume *.
10750 (myresume): Delete macro.
10751
c938e9b0
L
107522003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10753
10754 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10755 (uninstall): Support DESTDIR.
10756
7f313d07
BC
10757Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10758
10759 * configure.srv: Add xscale*linux copy of arm*linux entry.
10760
3b2fc2ea
DJ
107612003-07-24 Daniel Jacobowitz <drow@mvista.com>
10762
10763 * linux-arm-low.c (arm_reinsert_addr): New function.
10764 (the_low_target): Add arm_reinsert_addr.
10765
1c0a559e
MK
107662003-07-08 Mark Kettenis <kettenis@gnu.org>
10767
10768 * mem-break.c: Remove whitespace at end of file.
10769
43d5792c
DJ
107702003-06-28 Daniel Jacobowitz <drow@mvista.com>
10771
10772 * configure.in: Check whether we need to prototype strerror.
10773 * server.h: Optionally prototype strerror.
10774 * gdbreplay.c (perror_with_name): Use strerror.
10775 * linux-low.c (linux_attach_lwp): Use strerror.
10776 * utils.c (perror_with_name): Use strerror.
10777 * config.in, configure: Regenerated.
10778
c8a86edf
DJ
107792003-06-28 Daniel Jacobowitz <drow@mvista.com>
10780
10781 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10782 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10783
73d37363
DJ
107842003-06-20 Daniel Jacobowitz <drow@mvista.com>
10785
10786 * Makefile.in (SFILES): Update.
10787 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10788 low-sun3.c: Remove files.
10789
6ad8ae5c
DJ
107902003-06-17 Daniel Jacobowitz <drow@mvista.com>
10791
10792 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10793 (linux_detach_one_process, linux_detach): New functions.
10794 (linux_target_ops): Add linux_detach.
10795 * server.c (main): Handle 'D' packet.
10796 * target.h (struct target_ops): Add "detach" member.
10797 (detach_inferior): Define.
10798
1581182a
MK
107992003-06-13 Mark Kettenis <kettenis@gnu.org>
10800
10801 From Kelley Cook <kelleycook@wideopenwest.com>:
10802 * configure.srv: Accept i[34567]86 variants.
10803
e5379b03
DJ
108042003-06-05 Daniel Jacobowitz <drow@mvista.com>
10805
10806 * linux-low.c (linux_wait_for_event): Correct comment typos.
10807 (linux_resume_one_process): Call check_removed_breakpoint.
10808 (linux_send_signal): New function.
10809 (linux_target_ops): Add linux_send_signal.
10810 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10811 of kill.
10812 * target.h (struct target_ops): Add send_signal.
10813
2ff29de4
JB
108142003-05-29 Jim Blandy <jimb@redhat.com>
10815
10816 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10817 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10818 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10819 away part of the register's value.
10820
254787d4
DJ
108212003-03-26 Daniel Jacobowitz <drow@mvista.com>
10822
10823 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10824 (linux_wait_for_event, linux_init_signals): Likewise.
10825
94e10508
DJ
108262003-03-17 Daniel Jacobowitz <drow@mvista.com>
10827
10828 * configure.in: Check for stdlib.h.
10829 * configure: Regenerated.
10830 * config.in: Regenerated.
10831
4c0711e0
DJ
108322003-01-04 Andreas Schwab <schwab@suse.de>
10833
10834 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10835
ef66e766
AC
108362003-01-02 Andrew Cagney <ac131313@redhat.com>
10837
10838 * Makefile.in: Remove obsolete code.
10839
a1358604
DJ
108402002-11-20 Daniel Jacobowitz <drow@mvista.com>
10841
10842 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10843 defined(PT_FPR0_HI).
10844
23ce3b1c
DJ
108452002-11-17 Stuart Hughes <seh@zee2.com>
10846
10847 * linux-arm-low.c (arm_num_regs): Increase.
10848 (arm_regmap): Include status register.
10849
108502002-11-17 Daniel Jacobowitz <drow@mvista.com>
10851
10852 * linux-low.c (register_addr): Remove incorrect -1 check.
10853
a9fa9f7d
DJ
108542002-08-29 Daniel Jacobowitz <drow@mvista.com>
10855
10856 * linux-low.c (linux_create_inferior): Call setpgid. Return
10857 the new PID.
10858 (unstopped_p, linux_signal_pid): Remove.
10859 (linux_target_ops): Remove linux_signal_pid.
10860 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10861 global instead of target method.
10862 * target.h (struct target_ops): Remove signal_pid. Update comment
10863 for create_inferior.
10864 * server.c (signal_pid): New variable.
10865 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 10866 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
10867 (attach_inferior): Set signal_pid.
10868
17574093
DJ
108692002-08-23 Daniel Jacobowitz <drow@mvista.com>
10870
10871 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10872
108732002-08-20 Jim Blandy <jimb@redhat.com>
10874
10875 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10876 default for this.
10877
108782002-08-01 Andrew Cagney <cagney@redhat.com>
10879
10880 * Makefile.in: Make chill references obsolete.
10881
108822002-07-24 Kevin Buettner <kevinb@redhat.com>
10883
10884 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10885 * configure: Regenerate.
10886 * config.in: Regenerate.
10887
108882002-07-09 David O'Brien <obrien@FreeBSD.org>
10889
10890 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10891 (perror_with_name, remote_close, remote_open, expect, play): Static.
10892
108932002-07-04 Michal Ludvig <mludvig@suse.cz>
10894
4b8dad4a 10895 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
10896 byte offsets instead of an array of indexes.
10897 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10898
108992002-06-13 Daniel Jacobowitz <drow@mvista.com>
10900
10901 * regcache.c: Add comment.
10902
109032002-06-11 Daniel Jacobowitz <drow@mvista.com>
10904
10905 * thread-db.c: New file.
10906 * proc-service.c: New file.
10907 * acinclude.m4: New file.
10908 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10909 proc-service.o, and thread-db.o.
10910 (linux-low.o): Add USE_THREAD_DB.
10911 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10912 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10913 * aclocal.m4: Regenerated.
10914 * config.in: Regenerated.
10915 * configure: Regenerated.
10916 * configure.in: Check for proc_service.h, sys/procfs.h,
10917 thread_db.h, and linux/elf.h headrs.
10918 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10919 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10920 Check for -lthread_db and thread support.
10921 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10922 PowerPC, and SuperH.
10923 * i387-fp.c: Constify arguments.
10924 * i387-fp.h: Likewise.
10925 * inferiors.c: (struct thread_info): Renamed from
10926 `struct inferior_info'. Remove PID member. Use generic inferior
10927 list header. All uses updated.
10928 (inferiors, signal_pid): Removed.
10929 (all_threads): New variable.
10930 (get_thread): Define.
10931 (add_inferior_to_list): New function.
10932 (for_each_inferior): New function.
10933 (change_inferior_id): New function.
10934 (add_inferior): Removed.
10935 (remove_inferior): New function.
10936 (add_thread): New function.
10937 (free_one_thread): New function.
10938 (remove_thread): New function.
10939 (clear_inferiors): Use for_each_inferior and free_one_thread.
10940 (find_inferior): New function.
10941 (find_inferior_id): New function.
10942 (inferior_target_data): Update argument type.
10943 (set_inferior_target_data): Likewise.
10944 (inferior_regcache_data): Likewise.
10945 (set_inferior_regcache_data): Likewise.
10946 * linux-low.c (linux_bp_reinsert): Remove.
10947 (all_processes, stopping_threads, using_thrads)
10948 (struct pending_signals, debug_threads, pid_of): New.
10949 (inferior_pid): Replace with macro.
10950 (struct inferior_linux_data): Remove.
10951 (get_stop_pc, add_process): New functions.
10952 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10953 Use add_process and add_thread.
10954 (linux_attach_lwp): New function, based on old linux_attach. Use
10955 add_process and add_thread. Set stop_expected for new threads.
10956 (linux_attach): New function.
10957 (linux_kill_one_process): New function.
10958 (linux_kill): Kill all LWPs.
10959 (linux_thread_alive): Use find_inferior_id.
10960 (check_removed_breakpoints, status_pending_p): New functions.
10961 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10962 Update. Use WNOHANG. Wait for cloned processes also. Update process
10963 struct for the found process.
10964 (linux_wait_for_event): New function.
10965 (linux_wait): Use it. Support LWPs.
10966 (send_sigstop, wait_for_sigstop, stop_all_processes)
10967 (linux_resume_one_process, linux_continue_one_process): New functions.
10968 (linux_resume): Support LWPs.
10969 (REGISTER_RAW_SIZE): Remove.
10970 (fetch_register): Use register_size instead. Call supply_register.
10971 (usr_store_inferior_registers): Likewise. Call collect_register.
10972 Fix recursive case.
10973 (regsets_fetch_inferior_registers): Improve error message.
10974 (regsets_store_inferior_registers): Add debugging.
10975 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10976 (unstopped_p, linux_signal_pid): New functions.
10977 (linux_target_ops): Add linux_signal_pid.
10978 (linux_init_signals): New function.
10979 (initialize_low): Call it. Initialize using_threads.
10980 * regcache.c (inferior_regcache_data): Add valid
10981 flag.
10982 (get_regcache): Fetch registers lazily. Add fetch argument
10983 and update all callers.
10984 (regcache_invalidate_one, regcache_invalidate): New
10985 functions.
10986 (new_register_cache): Renamed from create_register_cache.
10987 Return the new regcache.
10988 (free_register_cache): Change argument to a void *.
10989 (registers_to_string, registers_from_string): Call get_regcache
10990 with fetch flag set.
10991 (register_data): Make static. Pass fetch flag to get_regcache.
10992 (supply_register): Call get_regcache with fetch flag clear.
10993 (collect_register): Call get_regcache with fetch flag set.
10994 (collect_register_as_string): New function.
10995 * regcache.h: Update.
10996 * remote-utils.c (putpkt): Flush after debug output and use
10997 stderr.
10998 Handle input interrupts while waiting for an ACK.
10999 (input_interrupt): Use signal_pid method.
11000 (getpkt): Flush after debug output and use stderr.
11001 (outreg): Use collect_register_as_string.
11002 (new_thread_notify, dead_thread_notify): New functions.
11003 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11004 and general_thread.
11005 (look_up_one_symbol): Flush after debug output.
11006 * server.c (step_thread, server_waiting): New variables.
11007 (start_inferior): Don't use signal_pid. Update call to mywait.
11008 (attach_inferior): Update call to mywait.
11009 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11010 (main): Don't fetch/store registers explicitly. Use
11011 set_desired_inferior. Support proposed ``Hs'' packet. Update
11012 calls to mywait.
11013 * server.h: Update.
11014 (struct inferior_list, struct_inferior_list_entry): New.
11015 * target.c (set_desired_inferior): New.
11016 (write_inferior_memory): Constify.
11017 (mywait): New function.
11018 * target.h: Update.
11019 (struct target_ops): New signal_pid method.
11020 (mywait): Removed macro, added prototype.
11021
11022 * linux-low.h (regset_func): Removed.
11023 (regset_fill_func, regset_store_func): New.
11024 (enum regset_type): New.
11025 (struct regset_info): Add type field. Use new operation types.
11026 (struct linux_target_ops): stop_pc renamed to get_pc.
11027 Add decr_pc_after_break and breakpoint_at.
11028 (get_process, get_thread_proess, get_process_thread)
11029 (strut process_info, all_processes, linux_attach_lwp)
11030 (thread_db_init): New.
11031
11032 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11033 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11034 (the_low_target): Add new members.
11035 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11036 (i386_store_fpxregset): Constify.
11037 (target_regsets): Add new kind identifier.
11038 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11039 (i386_set_pc): Add debugging.
11040 (i386_breakpoint_at): New function.
11041 (the_low_target): Add new members.
11042 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11043 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11044 (mips_breakpoint_at): New.
11045 (the_low_target): Add new members.
11046 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11047 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11048 (the_low_target): Add new members.
11049 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11050 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11051 (the_low_target): Add new members.
11052 * linux-x86-64-low.c (target_regsets): Add new kind
11053 identifier.
11054
110552002-05-15 Daniel Jacobowitz <drow@mvista.com>
11056
11057 From Martin Pool <mbp@samba.org>:
11058 * server.c (gdbserver_usage): New function.
11059 (main): Call it.
11060
110612002-05-14 Daniel Jacobowitz <drow@mvista.com>
11062
11063 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11064 stop_at -> stop_pc.
11065
110662002-05-04 Andrew Cagney <ac131313@redhat.com>
11067
11068 * Makefile.in: Remove obsolete code.
11069
110702002-04-24 Michal Ludvig <mludvig@suse.cz>
11071
11072 * linux-low.c (regsets_fetch_inferior_registers),
11073 (regsets_store_inferior_registers): Removed cast to int from
11074 ptrace() calls.
11075 * regcache.h: Added declaration of struct inferior_info.
11076
110772002-04-20 Daniel Jacobowitz <drow@mvista.com>
11078
11079 * inferiors.c (struct inferior_info): Add regcache_data.
11080 (add_inferior): Call create_register_cache.
11081 (clear_inferiors): Call free_register_cache.
11082 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11083 * regcache.c (struct inferior_regcache_data): New.
11084 (registers): Remove.
11085 (get_regcache): New function.
11086 (create_register_cache, free_register_cache): New functions.
11087 (set_register_cache): Don't initialize the register cache here.
11088 (registers_to_string, registers_from_string, register_data): Call
11089 get_regcache.
11090 * regcache.h: Add prototypes.
11091 * server.h: Likewise.
11092
110932002-04-20 Daniel Jacobowitz <drow@mvista.com>
11094
11095 * mem-break.c: New file.
11096 * mem-break.h: New file.
11097 * Makefile.in: Add mem-break.o rule; update server.h
11098 dependencies.
11099 * inferiors.c (struct inferior_info): Add target_data
11100 member.
11101 (clear_inferiors): Free target_data member if set.
11102 (inferior_target_data, set_inferior_target_data): New functions.
11103 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11104 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11105 * linux-low.c (linux_bp_reinsert): New variable.
11106 (struct inferior_linux_data): New.
11107 (linux_create_inferior): Use set_inferior_target_data.
11108 (linux_attach): Likewise. Call add_inferior.
11109 (linux_wait_for_one_inferior): New function.
11110 (linux_wait): Call it.
11111 (linux_write_memory): Add const.
11112 (initialize_low): Call set_breakpoint_data.
11113 * linux-low.h (struct linux_target_ops): Add breakpoint
11114 handling members.
11115 * server.c (attach_inferior): Remove extra add_inferior
11116 call.
11117 * server.h: Include mem-break.h. Update inferior.c
11118 prototypes.
11119 * target.c (read_inferior_memory)
11120 (write_inferior_memory): New functions.
11121 * target.h (read_inferior_memory)
11122 (write_inferior_memory): Change macros to prototypes.
11123 (struct target_ops): Update comments. Add const to write_memory
11124 definition.
11125
111262002-04-11 Daniel Jacobowitz <drow@mvista.com>
11127
11128 * linux-low.c (usr_store_inferior_registers): Support
11129 registers which are allowed to fail to store.
11130 * linux-low.h (linux_target_ops): Likewise.
11131 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11132 (ppc_cannot_store_register): FPSCR may not be storable.
11133
111342002-04-09 Daniel Jacobowitz <drow@mvista.com>
11135
11136 * server.h: Include <string.h> if HAVE_STRING_H.
11137 * ChangeLog: Correct paths in last ChangeLog entry.
11138
111392002-04-09 Daniel Jacobowitz <drow@mvista.com>
11140
11141 * linux-low.h: Remove obsolete prototypes.
11142 (struct linux_target_ops): New.
11143 (extern the_low_target): New.
11144 * linux-low.c (num_regs, regmap): Remove declarations.
11145 (register_addr): Use the_low_target explicitly.
11146 (fetch_register): Likewise.
11147 (usr_fetch_inferior_registers): Likewise.
11148 (usr_store_inferior_registers): Likewise.
11149 * linux-arm-low.c (num_regs): Remove.
11150 (arm_num_regs): Define.
11151 (arm_regmap): Renamed from regmap, made static.
11152 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11153 made static.
11154 (arm_cannot_store_register): Renamed from cannot_store_register,
11155 made static.
11156 (the_low_target): New.
11157 * linux-i386-low.c (num_regs): Remove.
11158 (i386_num_regs): Define.
11159 (i386_regmap): Renamed from regmap, made static.
11160 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11161 made static.
11162 (i386_cannot_store_register): Renamed from cannot_store_register,
11163 made static.
11164 (the_low_target): New.
11165 * linux-ia64-low.c (num_regs): Remove.
11166 (ia64_num_regs): Define.
11167 (ia64_regmap): Renamed from regmap, made static.
11168 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11169 made static.
11170 (ia64_cannot_store_register): Renamed from cannot_store_register,
11171 made static.
11172 (the_low_target): New.
11173 * linux-m68k-low.c (num_regs): Remove.
11174 (m68k_num_regs): Define.
11175 (m68k_regmap): Renamed from regmap, made static.
11176 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11177 made static.
11178 (m68k_cannot_store_register): Renamed from cannot_store_register,
11179 made static.
11180 (the_low_target): New.
11181 * linux-mips-low.c (num_regs): Remove.
11182 (mips_num_regs): Define.
11183 (mips_regmap): Renamed from regmap, made static.
11184 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11185 made static.
11186 (mips_cannot_store_register): Renamed from cannot_store_register,
11187 made static.
11188 (the_low_target): New.
11189 * linux-ppc-low.c (num_regs): Remove.
11190 (ppc_num_regs): Define.
11191 (ppc_regmap): Renamed from regmap, made static.
11192 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11193 made static.
11194 (ppc_cannot_store_register): Renamed from cannot_store_register,
11195 made static.
11196 (the_low_target): New.
11197 * linux-s390-low.c (num_regs): Remove.
11198 (s390_num_regs): Define.
11199 (s390_regmap): Renamed from regmap, made static.
11200 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11201 made static.
11202 (s390_cannot_store_register): Renamed from cannot_store_register,
11203 made static.
11204 (the_low_target): New.
11205 * linux-sh-low.c (num_regs): Remove.
11206 (sh_num_regs): Define.
11207 (sh_regmap): Renamed from regmap, made static.
11208 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11209 made static.
11210 (sh_cannot_store_register): Renamed from cannot_store_register,
11211 made static.
11212 (the_low_target): New.
11213 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11214 (the_low_target): New.
11215
112162002-04-09 Daniel Jacobowitz <drow@mvista.com>
11217
11218 * Makefile.in: Add stamp-h target.
11219 * configure.in: Create stamp-h.
11220 * configure: Regenerated.
11221
112222002-04-09 Daniel Jacobowitz <drow@mvista.com>
11223
11224 * inferiors.c: New file.
11225 * target.c: New file.
11226 * target.h: New file.
11227 * Makefile.in: Add target.o and inferiors.o. Update
11228 dependencies.
11229 * linux-low.c (inferior_pid): New static variable,
11230 moved from server.c.
11231 (linux_create_inferior): Renamed from create_inferior.
11232 Call add_inferior. Return 0 on success instead of a PID.
11233 (linux_attach): Renamed from myattach.
11234 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11235 (linux_thread_alive): Renamed from mythread_alive.
11236 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11237 child dies.
11238 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11239 (regsets_store_inferior_registers): Correct error message.
11240 Add missing ``return 0''.
11241 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11242 (linux_store_registers): Renamed from store_inferior_registers.
11243 (linux_read_memory): Renamed from read_inferior_memory.
11244 (linux_write_memory): Renamed from write_inferior_memory.
11245 (linux_target_ops): New structure.
11246 (initialize_low): Call set_target_ops ().
11247 * remote-utils.c (unhexify): New function.
11248 (hexify): New function.
11249 (input_interrupt): Send signals to ``signal_pid''.
11250 * server.c (inferior_pid): Remove.
11251 (start_inferior): Update create_inferior call.
11252 (attach_inferior): Call add_inferior.
11253 (handle_query): New function.
11254 (main): Call handle_query for `q' packets.
11255 * server.h: Include "target.h". Remove obsolete prototypes.
11256 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11257
112582002-04-09 Daniel Jacobowitz <drow@mvista.com>
11259
11260 * Makefile.in: Add WARN_CFLAGS. Update configury
11261 dependencies.
11262 * configure.in: Check for <string.h>
11263 * configure: Regenerate.
11264 * config.in: Regenerate.
11265 * gdbreplay.c: Include needed system headers.
11266 (remote_open): Remove strchr prototype.
11267 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11268 * regcache.c (supply_register): Change buf argument to const void *.
11269 (supply_register_by_name): Likewise.
11270 (collect_register): Change buf argument to void *.
11271 (collect_register_by_name): Likewise.
11272 * regcache.h: Add missing prototypes.
11273 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11274 * server.c (handle_query): New function.
11275 (attached): New static variable, moved out of main.
11276 (main): Quiet longjmp clobber warnings.
11277 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11278 * utils.c (error): Remove NORETURN.
11279 (fatal): Likewise.
This page took 1.408469 seconds and 4 git commands to generate.