gdbserver build-id attribute generator
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
700ca40f
JK
12015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2 Jan Kratochvil <jan.kratochvil@redhat.com>
3
4 gdbserver build-id attribute generator.
5 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
7 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
8 (find_phdr): New.
9 (get_dynamic): Use find_pdhr to traverse program headers.
10 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
11 (compare_mapping_entry_range, struct find_memory_region_callback_data)
12 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
13 (get_hex_build_id): New.
14 (linux_qxfer_libraries_svr4): Add optional build-id attribute
15 to reply XML document.
16
9904185c
JK
172015-07-15 Aleksandar Ristovski <aristovski@qnx.com
18 Jan Kratochvil <jan.kratochvil@redhat.com>
19
20 * target.c: Include target/target-utils.h and fcntl.h.
21 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
22 (target_fileio_read_stralloc): New functions.
23
6e5b4429
JK
242015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
25
26 * Makefile.in (OBS): Add gdb_regex.o.
27 (gdb_regex.o): New.
28 * config.in: Rebuilt.
29 * configure: Rebuilt.
30
ddc98fbf
JK
312015-07-15 Aleksandar Ristovski <aristovski@qnx.com
32 Jan Kratochvil <jan.kratochvil@redhat.com>
33
34 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
35 * Makefile.in (OBS): Add target-utils.o.
36 (linux-maps.o, target-utils.o): New.
37 * configure.srv (srv_linux_obj): Add linux-maps.o.
38
e57bb7a0
PL
392015-07-15 Pierre Langlois <pierre.langlois@arm.com>
40
41 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
42 function, return 1.
43 (the_low_target): Install it.
44
586b02a9
PA
452015-07-14 Pedro Alves <palves@redhat.com>
46
47 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
48 Instead, ignore ECHILD, and throw an error for other errnos.
49
58c1b36c
PA
502015-07-10 Pedro Alves <palves@redhat.com>
51
52 * event-loop.c (struct callback_event) <data>: Change type to
53 gdb_client_data instance instead of gdb_client_data pointer.
54 (append_callback_event): Adjust.
55
421530db
PL
562015-07-10 Pierre Langlois <pierre.langlois@arm.com>
57
58 * linux-aarch64-low.c: Add comments for each linux_target_ops
59 method. Remove comments already covered in target_ops and
60 linux_target_ops definitions.
61 (the_low_target): Add comments for each unimplemented method.
62
c2d65f38
YQ
632015-07-09 Yao Qi <yao.qi@linaro.org>
64
65 * linux-aarch64-low.c (aarch64_regmap): Remove.
66 (aarch64_usrregs_info): Remove.
67 (regs_info): Set field usrregs to NULL.
68
b20a6524
MM
692015-07-02 Markus Metzger <markus.t.metzger@intel.com>
70
71 * linux-low.c: Include "rsp-low.h"
72 (linux_low_encode_pt_config, linux_low_encode_raw): New.
73 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
74 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
75 (handle_btrace_enable_pt): New.
76 (handle_btrace_general_set): Support "pt".
77 (handle_btrace_conf_general_set): Support "pt:size".
78
96c97461
PL
792015-06-29 Pierre Langlois <pierre.langlois@arm.com>
80
81 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
82 Z_PACKET_SW_BP.
83
37d66942
PL
842015-06-29 Pierre Langlois <pierre.langlois@arm.com>
85
86 * linux-aarch64-low.c: Remove comment about endianness.
87 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
88 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
89 memcmp.
90
dc06243f
GB
912015-06-24 Gary Benson <gbenson@redhat.com>
92
93 * linux-i386-ipa.c (stdint.h): Do not include.
94 * lynx-i386-low.c (stdint.h): Likewise.
95 * lynx-ppc-low.c (stdint.h): Likewise.
96 * mem-break.c (stdint.h): Likewise.
97 * thread-db.c (stdint.h): Likewise.
98 * tracepoint.c (stdint.h): Likewise.
99 * win32-low.c (stdint.h): Likewise.
100
124e13d9
SM
1012015-06-18 Simon Marchi <simon.marchi@ericsson.com>
102
103 * server.c (write_qxfer_response): Update call to
104 remote_escape_output.
105
909c2cda
JK
1062015-06-15 Aleksandar Ristovski <aristovski@qnx.com
107 Jan Kratochvil <jan.kratochvil@redhat.com>
108
109 Merge multiple hex conversions.
110 * gdbreplay.c (tohex): Rename to 'fromhex'.
111 (logchar): Use fromhex.
112
24c05f46
JK
1132015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
114
115 * server.c (handle_qxfer_libraries): Set `version' attribute for
116 <library-list>.
117
14d2069a
GB
1182015-06-10 Gary Benson <gbenson@redhat.com>
119
120 * target.h (struct target_ops) <multifs_open>: New field.
121 <multifs_unlink>: Likewise.
122 <multifs_readlink>: Likewise.
123 * linux-low.c (nat/linux-namespaces.h): New include.
124 (linux_target_ops): Initialize the_target->multifs_open,
125 the_target->multifs_unlink and the_target->multifs_readlink.
126 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
127 * hostio.c (hostio_fs_pid): New static variable.
128 (hostio_handle_new_gdb_connection): New function.
129 (handle_setfs): Likewise.
130 (handle_open): Use the_target->multifs_open as appropriate.
131 (handle_unlink): Use the_target->multifs_unlink as appropriate.
132 (handle_readlink): Use the_target->multifs_readlink as
133 appropriate.
134 (handle_vFile): Handle vFile:setfs packets.
135 * server.c (handle_query): Call hostio_handle_new_gdb_connection
136 after target_handle_new_gdb_connection.
137
4b8b5e72
GB
1382015-06-10 Gary Benson <gbenson@redhat.com>
139
140 * configure.ac (AC_CHECK_FUNCS): Add setns.
141 * config.in: Regenerate.
142 * configure: Likewise.
143 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
144 (linux-namespaces.o): New rule.
145 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
146
3ac2e371
GB
1472015-06-09 Gary Benson <gbenson@redhat.com>
148
149 * hostio.c (handle_open): Process mode argument with
150 fileio_to_host_mode.
151
ca9b78ce
YQ
1522015-06-01 Yao Qi <yao.qi@linaro.org>
153
154 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
155 * linux-x86-low.c: Likewise.
156
bfacd19d
DB
1572015-05-28 Don Breazeal <donb@codesourcery.com>
158
159 * linux-low.c (handle_extended_wait): Initialize
160 thread_info.last_resume_kind for new fork children.
161
452003ef
PA
1622015-05-15 Pedro Alves <palves@redhat.com>
163
164 * target.h (target_handle_new_gdb_connection): Rewrite using if
165 wrapped in do/while.
166
1041a03c
JB
1672015-05-14 Joel Brobecker <brobecker@adacore.com>
168
169 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
170 * configure, config.in: Regenerate.
171 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
172 Declare typedef.
173
c269dbdb
DB
1742015-05-12 Don Breazeal <donb@codesourcery.com>
175
176 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
177 PTRACE_EVENT_VFORK_DONE.
178 (linux_low_ptrace_options, extended_event_reported): Add vfork
179 events.
180 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
181 and "vforkdone" for RSP 'T' Stop Reply Packet.
182 * server.h (report_vfork_events): Declare
183 global variable.
184
3a8a0396
DB
1852015-05-12 Don Breazeal <donb@codesourcery.com>
186
187 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
188 (the_low_target) <new_fork>: Initialize new member.
189 * linux-arm-low.c (arm_new_fork): New function.
190 (the_low_target) <new_fork>: Initialize new member.
191 * linux-low.c (handle_extended_wait): Call new target function
192 new_fork.
193 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
194 * linux-mips-low.c (mips_add_watchpoint): New function
195 extracted from mips_insert_point.
196 (the_low_target) <new_fork>: Initialize new member.
197 (mips_linux_new_fork): New function.
198 (mips_insert_point): Call mips_add_watchpoint.
199 * linux-x86-low.c (x86_linux_new_fork): New function.
200 (the_low_target) <new_fork>: Initialize new member.
201
de0d863e
DB
2022015-05-12 Don Breazeal <donb@codesourcery.com>
203
204 * linux-low.c (handle_extended_wait): Implement return value,
205 rename argument 'event_child' to 'event_lwp', handle
206 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
207 (linux_low_ptrace_options): New function.
208 (linux_low_filter_event): Call linux_low_ptrace_options,
209 use different argument fo linux_enable_event_reporting,
210 use return value from handle_extended_wait.
211 (extended_event_reported): New function.
212 (linux_wait_1): Call extended_event_reported and set
213 status to report fork events.
214 (linux_write_memory): Add pid to debug message.
215 (reset_lwp_ptrace_options_callback): New function.
216 (linux_handle_new_gdb_connection): New function.
217 (linux_target_ops): Initialize new structure member.
218 * linux-low.h (struct lwp_info) <waitstatus>: New member.
219 * lynx-low.c: Initialize new structure member.
220 * remote-utils.c (prepare_resume_reply): Implement stop reason
221 "fork" for "T" stop message.
222 * server.c (handle_query): Call handle_new_gdb_connection.
223 * server.h (report_fork_events): Declare global flag.
224 * target.h (struct target_ops) <handle_new_gdb_connection>:
225 New member.
226 (target_handle_new_gdb_connection): New macro.
227 * win32-low.c: Initialize new structure member.
228
ddcbc397
DB
2292015-05-12 Don Breazeal <donb@codesourcery.com>
230
231 * mem-break.c (APPEND_TO_LIST): Define macro.
232 (clone_agent_expr): New function.
233 (clone_one_breakpoint): New function.
234 (clone_all_breakpoints): New function.
235 * mem-break.h: Declare new functions.
236
89245bc0
DB
2372015-05-12 Don Breazeal <donb@codesourcery.com>
238
239 * linux-low.c (linux_supports_fork_events): New function.
240 (linux_supports_vfork_events): New function.
241 (linux_target_ops): Initialize new structure members.
242 (initialize_low): Call linux_check_ptrace_features.
243 * lynx-low.c (lynx_target_ops): Initialize new structure
244 members.
245 * server.c (report_fork_events, report_vfork_events):
246 New global flags.
247 (handle_query): Add new features to qSupported packet and
248 response.
249 (captured_main): Initialize new global variables.
250 * target.h (struct target_ops) <supports_fork_events>:
251 New member.
252 <supports_vfork_events>: New member.
253 (target_supports_fork_events): New macro.
254 (target_supports_vfork_events): New macro.
255 * win32-low.c (win32_target_ops): Initialize new structure
256 members.
257
835205d0
GB
2582015-05-12 Gary Benson <gbenson@redhat.com>
259
260 * server.c (handle_qxfer_exec_file): Use current process
261 if annex is empty.
262
21e94bd9
SL
2632015-05-08 Sandra Loosemore <sandra@codesourcery.com>
264
265 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
266 Remove HAVE_PTRACE_GETREGS conditionals.
267 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
268 instead of PTRACE_GETREGS and PTRACE_SETREGS.
269
45614f15
YQ
2702015-05-08 Yao Qi <yao.qi@linaro.org>
271
272 * linux-low.c (linux_supports_conditional_breakpoints): New
273 function.
274 (linux_target_ops): Install new target method.
275 * lynx-low.c (lynx_target_ops): Install NULL hook for
276 supports_conditional_breakpoints.
277 * nto-low.c (nto_target_ops): Likewise.
278 * spu-low.c (spu_target_ops): Likewise.
279 * win32-low.c (win32_target_ops): Likewise.
280 * server.c (handle_query): Check
281 target_supports_conditional_breakpoints.
282 * target.h (struct target_ops) <supports_conditional_breakpoints>:
283 New field.
284 (target_supports_conditional_breakpoints): New macro.
285
80ad801e
PA
2862015-05-06 Pedro Alves <palves@redhat.com>
287
288 PR server/18081
289 * server.c (start_inferior): If the process exits, mourn it.
290
819843c7
GB
2912015-04-21 Gary Benson <gbenson@redhat.com>
292
293 * hostio.c (fileio_open_flags_to_host): Factored out to
294 fileio_to_host_openflags in common/fileio.c. Single use
295 updated.
296
a2d5a9d7
MF
2972015-04-17 Max Filippov <jcmvbkbc@gmail.com>
298
299 * linux-xtensa-low.c (xtensa_fill_gregset)
300 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
301 XCHAL_HAVE_LOOP.
302
deb44829
MF
3032015-04-17 Max Filippov <jcmvbkbc@gmail.com>
304
305 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
306 (regs_info): Replace usrregs pointer with NULL.
307
e57f1de3
GB
3082015-04-17 Gary Benson <gbenson@redhat.com>
309
310 * target.h (struct target_ops) <pid_to_exec_file>: New field.
311 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
312 * server.c (handle_qxfer_exec_file): New function.
313 (qxfer_packets): Add exec-file entry.
314 (handle_query): Report qXfer:exec-file:read as supported packet.
315
62828379
RN
3162015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
317
318 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
319
b88bb450
GB
3202015-04-09 Gary Benson <gbenson@redhat.com>
321
322 * hostio-errno.c (errno_to_fileio_error): Remove function.
323 Update caller to use remote_fileio_to_fio_error.
324
c8f4bfdd
YQ
3252015-04-09 Yao Qi <yao.qi@linaro.org>
326
327 * linux-low.c (linux_insert_point): Call
328 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
329 (linux_remove_point): Call remove_memory_breakpoint if type is
330 raw_bkpt_type_sw.
331 * linux-x86-low.c (x86_insert_point): Don't call
332 insert_memory_breakpoint.
333 (x86_remove_point): Don't call remove_memory_breakpoint.
334
41f98f02
PA
3352015-04-01 Pedro Alves <palves@redhat.com>
336 Cleber Rosa <crosa@redhat.com>
337
338 * server.c (gdbserver_usage): Reorganize and extend the usage
339 message.
340
2bf6fb9d
PA
3412015-03-24 Pedro Alves <palves@redhat.com>
342
343 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
344 output. Also dump TRAP_TRACE.
345 (linux_low_filter_event): In debug output, distinguish a
346 resume_stop SIGSTOP from a delayed SIGSTOP.
347
369f6daa
GB
3482015-03-24 Gary Benson <gbenson@redhat.com>
349
350 * linux-x86-low.c (x86_linux_new_thread): Moved to
351 nat/x86-linux.c.
352 (x86_linux_prepare_to_resume): Likewise.
353
8e5d4070
GB
3542015-03-24 Gary Benson <gbenson@redhat.com>
355
356 * Makefile.in (x86-linux-dregs.o): New rule.
357 * configure.srv: Add x86-linux-dregs.o to relevant targets.
358 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
359 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
360 (x86_linux_dr_get): Likewise.
361 (x86_linux_dr_set): Likewise.
362 (update_debug_registers_callback): Likewise.
363 (x86_linux_dr_set_addr): Likewise.
364 (x86_linux_dr_get_addr): Likewise.
365 (x86_linux_dr_set_control): Likewise.
366 (x86_linux_dr_get_control): Likewise.
367 (x86_linux_dr_get_status): Likewise.
368 (x86_linux_update_debug_registers): Likewise.
369
2b95d440
GB
3702015-03-24 Gary Benson <gbenson@redhat.com>
371
372 * linux-x86-low.c (x86_linux_update_debug_registers):
373 New function, factored out from...
374 (x86_linux_prepare_to_resume): ...this.
375
14b0bc68
GB
3762015-03-24 Gary Benson <gbenson@redhat.com>
377
378 * linux-x86-low.c (x86_linux_dr_get): Update comments.
379 (x86_linux_dr_set): Likewise.
380 (update_debug_registers_callback): Likewise.
381 (x86_linux_dr_set_addr): Likewise.
382 (x86_linux_dr_get_addr): Likewise.
383 (x86_linux_dr_set_control): Likewise.
384 (x86_linux_dr_get_control): Likewise.
385 (x86_linux_dr_get_status): Likewise.
386 (x86_linux_prepare_to_resume): Likewise.
387
5dfe6ca8
GB
3882015-03-24 Gary Benson <gbenson@redhat.com>
389
390 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
391 Use perror_with_name. Pass string through gettext.
392 (x86_linux_dr_set): Likewise.
393
d33472ad
GB
3942015-03-24 Gary Benson <gbenson@redhat.com>
395
396 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
397 (x86_linux_dr_set_addr): ...this.
398 (x86_dr_low_get_addr): Rename to...
399 (x86_linux_dr_get_addr): ...this.
400 (x86_dr_low_set_control): Rename to...
401 (x86_linux_dr_set_control): ...this.
402 (x86_dr_low_get_control): Rename to...
403 (x86_linux_dr_get_control): ...this.
404 (x86_dr_low_get_status): Rename to...
405 (x86_linux_dr_get_status): ...this.
406 (x86_dr_low): Update with new function names.
407
4b134ca1
GB
4082015-03-24 Gary Benson <gbenson@redhat.com>
409
410 * Makefile.in (x86-linux.o): New rule.
411 * configure.srv: Add x86-linux.o to relevant targets.
412 * linux-low.c (lwp_set_arch_private_info): New function.
413 (lwp_arch_private_info): Likewise.
414 * linux-x86-low.c: Include nat/x86-linux.h.
415 (arch_lwp_info): Removed structure.
416 (update_debug_registers_callback):
417 Use lwp_set_debug_registers_changed.
418 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
419 and lwp_set_debug_registers_changed.
420 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
421
34c703da
GB
4222015-03-24 Gary Benson <gbenson@redhat.com>
423
424 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
425 * linux-arm-low.c (arm_new_thread): Likewise.
426 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
427 * linux-mips-low.c (mips_linux_new_thread): Likewise.
428 * linux-x86-low.c (x86_linux_new_thread): Likewise.
429 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
430
cff068da
GB
4312015-03-24 Gary Benson <gbenson@redhat.com>
432
433 * linux-low.c (ptid_of_lwp): New function.
434 (lwp_is_stopped): Likewise.
435 (lwp_stop_reason): Likewise.
436 * linux-x86-low.c (update_debug_registers_callback):
437 Use lwp_is_stopped.
438 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
439 lwp_stop_reason.
440
b2f7c7e8
GB
4412015-03-24 Gary Benson <gbenson@redhat.com>
442
443 * linux-low.h (linux_stop_lwp): Remove declaration.
444
6d4ee8c6
GB
4452015-03-24 Gary Benson <gbenson@redhat.com>
446
447 * linux-low.h: Include nat/linux-nat.h.
448 * linux-low.c (iterate_over_lwps_args): New structure.
449 (iterate_over_lwps_filter): New function.
450 (iterate_over_lwps): Likewise.
451 * linux-x86-low.c (update_debug_registers_callback):
452 Update signature to what iterate_over_lwps expects.
453 Remove PID check that iterate_over_lwps now performs.
454 (x86_dr_low_set_addr): Use iterate_over_lwps.
455 (x86_dr_low_set_control): Likewise.
456
70a0bb6b
GB
4572015-03-24 Gary Benson <gbenson@redhat.com>
458
459 * linux-x86-low.c (x86_debug_reg_state): New function.
460 (x86_linux_prepare_to_resume): Use the above.
461
7b669087
GB
4622015-03-24 Gary Benson <gbenson@redhat.com>
463
464 * linux-low.c (current_lwp_ptid): New function.
465 * linux-x86-low.c: Include nat/linux-nat.h.
466 (x86_dr_low_get_addr): Use current_lwp_ptid.
467 (x86_dr_low_get_control): Likewise.
468 (x86_dr_low_get_status): Likewise.
469
eef49a3d
PA
4702015-03-20 Pedro Alves <palves@redhat.com>
471
472 * tracepoint.c (cmd_qtstatus): Make "str" const.
473
b2333d22
PA
4742015-03-20 Pedro Alves <palves@redhat.com>
475
476 * server.c (handle_general_set): Make "req_str" const.
477
23f238d3
PA
4782015-03-19 Pedro Alves <palves@redhat.com>
479
480 * linux-low.c (linux_resume_one_lwp): Rename to ...
481 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
482 instead call perror_with_name.
483 (check_ptrace_stopped_lwp_gone): New function.
484 (linux_resume_one_lwp): Reimplement as wrapper around
485 linux_resume_one_lwp_throw that swallows errors if the LWP is
486 gone.
487
91baf43f
PA
4882015-03-19 Pedro Alves <palves@redhat.com>
489
490 * linux-low.c (count_events_callback, select_event_lwp_callback):
491 No longer check whether the thread has resume_stop as last resume
492 kind.
493
8bf3b159
PA
4942015-03-19 Pedro Alves <palves@redhat.com>
495
496 * linux-low.c (count_events_callback, select_event_lwp_callback):
497 Use the lwp's status_pending_p field, not the thread's.
498
b90fc188
PA
4992015-03-19 Pedro Alves <palves@redhat.com>
500
501 * linux-low.c (select_event_lwp_callback): Update comments to
502 no longer mention SIGTRAP.
503
464b0089
GB
5042015-03-18 Gary Benson <gbenson@redhat.com>
505
506 * server.c (handle_query): Do not report vFile:fstat as supported.
507
aa9e327f
GB
5082015-03-11 Gary Benson <gbenson@redhat.com>
509
510 * hostio.c (sys/types.h): New include.
511 (sys/stat.h): Likewise.
512 (common-remote-fileio.h): Likewise.
513 (handle_fstat): New function.
514 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 515
791c0056
GB
5162015-03-11 Gary Benson <gbenson@redhat.com>
517
518 * configure.ac (AC_CHECK_MEMBERS): Add checks for
519 struct stat.st_blocks and struct stat.st_blksize.
520 * configure: Regenerate.
521 * config.in: Likewise.
522 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
523 (OBS): Add common-remote-fileio.o.
524 (common-remote-fileio.o): New rule.
525
9a9df970
PA
5262015-03-09 Pedro Alves <palves@redhat.com>
527
528 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
529 'struct sockaddr' pointer in 'accept' call.
530
9eb1356e
PA
5312015-03-09 Pedro Alves <palves@redhat.com>
532
533 Revert:
534 2015-03-07 Pedro Alves <palves@redhat.com>
535 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
536 or <winsock2.h> here. Instead include "gdb_socket.h".
537 (remote_open): Use union gdb_sockaddr_u.
538 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
539 or <winsock2.h> here. Instead include "gdb_socket.h".
540 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
541 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
542 or <sys/un.h>.
543 (init_named_socket, gdb_agent_helper_thread): Use union
544 gdb_sockaddr_u.
545
aac331e4
PA
5462015-03-07 Pedro Alves <palves@redhat.com>
547
548 * configure.ac (build_warnings): Move
549 -Wdeclaration-after-statement to the C-specific set.
550 * configure: Regenerate.
551
366c75fc
PA
5522015-03-07 Pedro Alves <palves@redhat.com>
553
554 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
555 or <winsock2.h> here. Instead include "gdb_socket.h".
556 (remote_open): Use union gdb_sockaddr_u.
557 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
558 or <winsock2.h> here. Instead include "gdb_socket.h".
559 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
560 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
561 or <sys/un.h>.
562 (init_named_socket, gdb_agent_helper_thread): Use union
563 gdb_sockaddr_u.
564
492d29ea
PA
5652015-03-07 Pedro Alves <palves@redhat.com>
566
567 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
568 instead.
569
60a191ed
YQ
5702015-03-06 Yao Qi <yao.qi@linaro.org>
571
572 * linux-aarch64-low.c (aarch64_insert_point): Use
573 show_debug_regs as a boolean.
574 (aarch64_remove_point): Likewise.
575
f5771b1d
PA
5762015-03-05 Pedro Alves <palves@redhat.com>
577
578 * lynx-low.c (lynx_target_ops): Install NULL hooks for
579 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
580 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
581 * nto-low.c (nto_target_ops): Likewise.
582 * spu-low.c (spu_target_ops): Likewise.
583 * win32-low.c (win32_target_ops): Likewise.
584
3e572f71
PA
5852015-03-04 Pedro Alves <palves@redhat.com>
586
587 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
588 Decide whether a breakpoint triggered based on the SIGTRAP's
589 siginfo.si_code.
590 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
591 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
592 (linux_low_filter_event): Check for breakpoints before checking
593 watchpoints.
594 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
595 siginfo.si_code.
596 (linux_stopped_by_sw_breakpoint)
597 (linux_supports_stopped_by_sw_breakpoint)
598 (linux_stopped_by_hw_breakpoint)
599 (linux_supports_stopped_by_hw_breakpoint): New functions.
600 (linux_target_ops): Install new target methods.
601
1ec68e26
PA
6022015-03-04 Pedro Alves <palves@redhat.com>
603
604 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
605 * server.c (swbreak_feature, hwbreak_feature): New globals.
606 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
607 (captured_main): Clear swbreak_feature and hwbreak_feature.
608 * server.h (swbreak_feature, hwbreak_feature): Declare.
609 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
610 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
611 supports_stopped_by_hw_breakpoint>: New fields.
612 (target_supports_stopped_by_sw_breakpoint)
613 (target_stopped_by_sw_breakpoint)
614 (target_supports_stopped_by_hw_breakpoint)
615 (target_stopped_by_hw_breakpoint): Declare.
616
15c66dd6
PA
6172015-03-04 Pedro Alves <palves@redhat.com>
618
619 enum lwp_stop_reason -> enum target_stop_reason
620 * linux-low.c (check_stopped_by_breakpoint): Adjust.
621 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
622 (linux_wait_1, stuck_in_jump_pad_callback)
623 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
624 (linux_stopped_by_watchpoint):
625 * linux-low.h (enum lwp_stop_reason): Delete.
626 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
627 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
628
98fc70d6
YQ
6292015-03-04 Yao Qi <yao.qi@linaro.org>
630
631 * Makefile.in (SFILES): Add linux-aarch64-low.c.
632
dd2ac174
GB
6332015-03-03 Gary Benson <gbenson@redhat.com>
634
635 * hostio.c (handle_vFile): Fix prefix lengths.
636
d68e53f4
MM
6372015-03-03 Markus Metzger <markus.t.metzger@intel.com>
638
639 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
640 ptr_bits.
641
bf2d68ab
AA
6422015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
643
644 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
645 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
646 (clean): Add "rm -f" for above C files.
647 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
648 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
649 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
650 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
651 * linux-s390-low.c (HWCAP_S390_VX): New macro.
652 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
653 (init_registers_s390x_vx_linux64)
654 (init_registers_s390x_tevx_linux64)
655 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
656 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
657 declarations.
658 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
659 (s390_store_vxrs_high): New functions.
660 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
661 NT_S390_VXRS_HIGH.
662 (s390_arch_setup): Add logic for selecting one of the new target
663 descriptions. Activate the new vector regsets if applicable.
664 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
665 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
666 and init_registers_s390x_tevx_linux64.
667
c966a859
PA
6682015-03-01 Pedro Alves <palves@redhat.com>
669
670 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
671 parameter.
672
4180215b
PA
6732015-02-27 Pedro Alves <palves@redhat.com>
674
675 * linux-x86-low.c (u_debugreg_offset): New function.
676 (x86_linux_dr_get, x86_linux_dr_set): Use it.
677
749bab01
PA
6782015-02-27 Pedro Alves <palves@redhat.com>
679
680 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
681 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
682 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
683 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
684 (ps_lsetfpregs, ps_getpid)
685 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
686 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
687 (ps_lsetxregs, ps_plog): Declare.
688
3c14e5a3
PA
6892015-02-27 Pedro Alves <palves@redhat.com>
690
691 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
692 IP_AGENT_EXPORT_FUNC.
693 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
694 IP_AGENT_EXPORT_FUNC.
695 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
696 (IP_AGENT_EXPORT): Delete.
697 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
698 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
699 (gdb_trampoline_buffer_error, collecting, gdb_collect)
700 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
701 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
702 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
703 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
704 (traceframe_read_count, traceframe_write_count)
705 (traceframes_created, trace_state_variables, get_raw_reg)
706 (get_trace_state_variable_value, set_trace_state_variable_value)
707 (ust_loaded, helper_thread_id, cmd_buf): Use
708 IPA_SYM_EXPORTED_NAME.
709 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
710 (tracepoints) Use IP_AGENT_EXPORT_VAR.
711 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
712 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
713 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
714 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
715 EXTERN_C_PUSH/EXTERN_C_POP.
716 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
717 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
718 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
719 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
720 (traceframe_write_count, traceframe_read_count)
721 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
722 (about_to_request_buffer_space, get_trace_state_variable_value)
723 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
724 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
725 EXTERN_C_PUSH/EXTERN_C_POP.
726 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
727 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
728 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
729 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
730 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
731 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
732 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
733 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
734 Define.
735 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
736 (IP_AGENT_EXPORT_VAR_DECL): Define.
737 (tracing): Declare.
738 (gdb_agent_get_raw_reg): Declare.
739
fe978cb0
PA
7402015-02-27 Tom Tromey <tromey@redhat.com>
741 Pedro Alves <palves@redhat.com>
742
743 Rename symbols whose names are reserved C++ keywords throughout.
744
3bc3d82a
PA
7452015-02-27 Pedro Alves <palves@redhat.com>
746
747 * Makefile.in (COMPILER): New, get it from autoconf.
748 (CXX): Get from autoconf instead.
749 (COMPILE.pre): Use COMPILER.
750 (CC-LD): Rename to ...
751 (CC_LD): ... this. Use COMPILER.
752 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
753 (CXX_FOR_TARGET): Default to g++ instead of gcc.
754 * acinclude.m4: Include build-with-cxx.m4.
755 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
756 Disable -Werror by default if building in C++ mode.
757 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
758 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
759 the C++ compiler. Save/restore CXXFLAGS too.
760 * configure: Regenerate.
761
07697489
PA
7622015-02-27 Pedro Alves <palves@redhat.com>
763
764 * acinclude.m4: Include libiberty.m4.
765 * configure.ac: Call libiberty_INIT.
766 * config.in, configure: Regenerate.
767
9beb7c4e
PA
7682015-02-26 Pedro Alves <palves@redhat.com>
769
770 * linux-low.c (linux_wait_1): When incrementing the PC past a
771 program breakpoint always use the_low_target.breakpoint_len as
772 increment, rather than the maximum between that and
773 the_low_target.decr_pc_after_break.
774
8090aef2
PA
7752015-02-23 Pedro Alves <palves@redhat.com>
776
777 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
778 thread was doing a step-over; always adjust the PC if
779 we stepped over a permanent breakpoint.
780 (linux_wait_1): If we stepped over breakpoint that was on top of a
781 permanent breakpoint, manually advance the PC past it.
782
bc9540e8
PA
7832015-02-23 Pedro Alves <palves@redhat.com>
784
785 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
786 modes.
787 (x86_fill_gregset, x86_store_gregset): Use it when handling
788 $orig_eax.
789
2db9a427
PA
7902015-02-20 Pedro Alves <palves@redhat.com>
791
792 * thread-db.c: Include "nat/linux-procfs.h".
793 (thread_db_init): Skip listing new threads if the kernel supports
794 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
795
afa8d396
PA
7962015-02-20 Pedro Alves <palves@redhat.com>
797
798 * linux-low.c (status_pending_p_callback): Use ptid_match.
799
c9587f88
AT
8002015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
801
802 PR breakpoints/16812
803 * linux-low.c (wstatus_maybe_breakpoint): Remove.
804 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
805 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
806
b05ec7a5
AT
8072015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
808
809 PR breakpoints/15956
810 * tracepoint.c (cmd_qtinit): Add check for current_thread.
811
d33501a5
MM
8122015-02-09 Markus Metzger <markus.t.metzger@intel.com>
813
814 * linux-low.c (linux_low_btrace_conf): Print size.
815 * server.c (handle_btrace_conf_general_set): New.
816 (hanle_general_set): Call handle_btrace_conf_general_set.
817 (handle_query): Report Qbtrace-conf:bts:size as supported.
818
f4abbc16
MM
8192015-02-09 Markus Metzger <markus.t.metzger@intel.com>
820
821 * linux-low.c (linux_low_enable_btrace): Update parameters.
822 (linux_low_btrace_conf): New.
823 (linux_target_ops)<to_btrace_conf>: Initialize.
824 * server.c (current_btrace_conf): New.
825 (handle_btrace_enable): Rename to ...
826 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
827 to target_enable_btrace. Update comment. Update users.
828 (handle_qxfer_btrace_conf): New.
829 (qxfer_packets): Add btrace-conf entry.
830 (handle_query): Report qXfer:btrace-conf:read as supported packet.
831 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
832 (target_ops)<read_btrace_conf>: New.
833 (target_enable_btrace): Update parameters.
834 (target_read_btrace_conf): New.
835
043c3577
MM
8362015-02-09 Markus Metzger <markus.t.metzger@intel.com>
837
838 * server.c (handle_btrace_general_set): Remove call to
839 target_supports_btrace.
840 (supported_btrace_packets): New.
841 (handle_query): Call supported_btrace_packets.
842 * target.h: include btrace-common.h.
843 (btrace_target_info): Removed.
844 (supports_btrace, target_supports_btrace): Update parameters.
845
734b0e4b
MM
8462015-02-09 Markus Metzger <markus.t.metzger@intel.com>
847
848 * Makefile.in (SFILES): Add common/btrace-common.c.
849 (OBS): Add common/btrace-common.o.
850 (btrace-common.o): Add build rules.
851 * linux-low: Include btrace-common.h.
852 (linux_low_read_btrace): Use struct btrace_data. Call
853 btrace_data_init and btrace_data_fini.
854
d6c146e9
PA
8552015-02-06 Pedro Alves <palves@redhat.com>
856
857 * thread-db.c (find_new_threads_callback): Add debug output.
858
20ba1ce6
PA
8592015-02-04 Pedro Alves <palves@redhat.com>
860
861 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
862 (resume_stopped_resumed_lwps): New function.
863 (linux_wait_for_event_filtered): Use it.
864
8cc73a39
SDJ
8652015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
866
867 * Makefile.in (SFILES): Add linux-personality.c.
868 (linux-personality.o): New rule.
869 * configure.srv (srv_linux_obj): Add linux-personality.o to the
870 list of objects to be built.
871 * linux-low.c: Include nat/linux-personality.h.
872 (linux_create_inferior): Remove code to disable address space
873 randomization (moved to ../nat/linux-personality.c). Create
874 cleanup to disable address space randomization.
875
fb23d554
SDJ
8762015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
877
878 * Makefile.in (posix-strerror.o): New rule.
879 (mingw-strerror.o): Likewise.
880 * configure: Regenerated.
881 * configure.ac: Source file ../common/common.host. Initialize new
882 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
883
cdf43629
YQ
8842015-01-14 Yao Qi <yao@codesourcery.com>
885
886 * Makefile.in (SFILES): Add nat/ppc-linux.c.
887 (ppc-linux.o): New rule.
888 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
889 * configure.ac: AC_CHECK_FUNCS(getauxval).
890 * config.in: Re-generated.
891 * configure: Re-generated.
892 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
893 ppc64_64bit_inferior_p
894
514c5338
YQ
8952015-01-14 Yao Qi <yao@codesourcery.com>
896
897 * linux-ppc-low.c: Include "nat/ppc-linux.h".
898 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
899 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
900 (PT_ORIG_R3, PT_TRAP): Likewise.
901 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
902 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
903 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
904
3368c1e5
JB
9052015-01-10 Joel Brobecker <brobecker@adacore.com>
906
907 * i387-fp.c (i387_cache_to_xsave): In look over
908 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
909 zmmh_low_space field by use of zmmh_high_space.
910
582511be
PA
9112015-01-09 Pedro Alves <palves@redhat.com>
912
913 * linux-low.c (step_over_bkpt): Move higher up in the file.
914 (handle_extended_wait): Don't store the stop_pc here.
915 (get_stop_pc): Adjust comments and rename to ...
916 (check_stopped_by_breakpoint): ... this. Record whether the LWP
917 stopped for a software breakpoint or hardware breakpoint.
918 (thread_still_has_status_pending_p): New function.
919 (status_pending_p_callback): Use
920 thread_still_has_status_pending_p. If the event is no longer
921 interesting, resume the LWP.
922 (handle_tracepoints): Add assert.
923 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
924 (wstatus_maybe_breakpoint): New function.
925 (cancel_breakpoint): Delete function.
926 (check_stopped_by_watchpoint): New function, factored out from
927 linux_low_filter_event.
928 (lp_status_maybe_breakpoint): Delete function.
929 (linux_low_filter_event): Remove filter_ptid argument.
930 Leave thread group exits pending here. Store the LWP's stop PC.
931 Always leave events pending.
932 (linux_wait_for_event_filtered): Pull all events out of the
933 kernel, and leave them all pending.
934 (count_events_callback, select_event_lwp_callback): Consider all
935 events.
936 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
937 (select_event_lwp): Only give preference to the stepping LWP in
938 all-stop mode. Adjust comments.
939 (ignore_event): New function.
940 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
941 references to cancel_breakpoints. Adjust to renames. Also give
942 equal priority to all LWPs that have had events in non-stop mode.
943 If reporting a software breakpoint event, unadjust the LWP's PC.
944 (linux_wait): If linux_wait_1 returned an ignored event, retry.
945 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
946 Adjust.
947 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
948 (resume_status_pending_p): Use thread_still_has_status_pending_p.
949 (linux_stopped_by_watchpoint): Adjust.
950 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
951 * linux-low.h (enum lwp_stop_reason): New.
952 (struct lwp_info) <stop_pc>: Adjust comment.
953 <stopped_by_watchpoint>: Delete field.
954 <stop_reason>: New field.
955 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
956 * mem-break.c (software_breakpoint_inserted_here)
957 (hardware_breakpoint_inserted_here): New function.
958 * mem-break.h (software_breakpoint_inserted_here)
959 (hardware_breakpoint_inserted_here): Declare.
960 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
961 (cancel_breakpoints): Delete.
962 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
963 (upload_fast_traceframes): Remove references to
964 cancel_breakpoints.
965
a33e3959
PA
9662015-01-09 Pedro Alves <palves@redhat.com>
967
968 * thread-db.c (find_new_threads_callback): Ignore thread if the
969 kernel thread ID is -1.
970
8784d563
PA
9712015-01-09 Pedro Alves <palves@redhat.com>
972
973 * linux-low.c (linux_attach_fail_reason_string): Move to
974 nat/linux-ptrace.c, and rename.
975 (linux_attach_lwp): Update comment.
976 (attach_proc_task_lwp_callback): New function.
977 (linux_attach): Adjust to rename and use
978 linux_proc_attach_tgid_threads.
979 (linux_attach_fail_reason_string): Delete declaration.
980
76f2b779
JB
9812015-01-01 Joel Brobecker <brobecker@adacore.com>
982
983 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
984 * server.c (gdbserver_version): Likewise.
985
fafcc06a
SDJ
9862014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
987
988 * remote-utils.c: Include ctype.h.
989 (input_interrupt): Explicitly handle the case when the char
990 received is the NUL byte. Improve the printing of non-ASCII
991 characters.
992
beed38b8
JB
9932014-12-16 Joel Brobecker <brobecker@adacore.com>
994
995 * linux-low.c (linux_low_filter_event): Update call to
996 linux_enable_event_reporting following the addition of
997 a new parameter to that function.
998
bf330350
CU
9992014-12-16 Catalin Udma <catalin.udma@freescale.com>
1000
1001 PR server/17457
1002 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1003 (AARCH64_FPCR_REGNO): Likewise.
1004 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1005 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1006 (aarch64_store_fpregset): Likewise.
1007
5227d625
JB
10082014-12-15 Joel Brobecker <brobecker@adacore.com>
1009
1010 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1011 Remove FIXME comment about assumption about N.
1012
f93b65a0
JB
10132014-12-13 Joel Brobecker <brobecker@adacore.com>
1014
1015 * configure.ac: If large-file support is disabled in GDBserver,
1016 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1017 * configure: Regenerate.
1018
e5a9158d
AA
10192014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1020
1021 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1022 warning upon ENODATA from ptrace.
1023 * linux-s390-low.c (s390_store_tdb): New.
1024 (s390_regsets): Add regset for NT_S390_TDB.
1025
feea5f36
AA
10262014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1027
1028 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1029 without a fill_function.
1030 * linux-s390-low.c (s390_fill_last_break): Remove.
1031 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1032 (s390_arch_setup): Use regset's size instead of fill_function for
1033 loop end condition.
1034
098dbe61
AA
10352014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1036
1037 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1038 the regset's store function when ptrace returned an error.
1039 * regcache.c (get_thread_regcache): Invalidate register cache
1040 before fetching inferior's registers.
1041
28eef672
AA
10422014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1043
1044 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1045 while-loop as for-loop.
1046 (regsets_store_inferior_registers): Likewise.
1047
bdca27a2
YQ
10482014-11-28 Yao Qi <yao@codesourcery.com>
1049
1050 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1051 * config.in, configure: Re-generate.
1052 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1053 is defined.
1054
9c232dda
YQ
10552014-11-21 Yao Qi <yao@codesourcery.com>
1056
1057 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1058 (AC_CHECK_HEADERS): Remove malloc.h.
1059 * configure: Re-generated.
1060 * config.in: Re-generated.
1061 * server.h: Don't include alloca.h and malloc.h.
1062 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1063 Don't include malloc.h.
1064
43968415
JB
10652014-11-17 Joel Brobecker <brobecker@adacore.com>
1066
1067 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1068 corresponding ERRNO check in same block.
1069
40e91bc7
PA
10702014-11-12 Pedro Alves <palves@redhat.com>
1071
1072 * server.c (cont_thread): Update comment.
1073 (start_inferior, attach_inferior): No longer clear cont_thread.
1074 (handle_v_cont): No longer set cont_thread.
1075 (captured_main): Clear cont_thread each time a GDB connects.
1076
c2c118cf
PA
10772014-11-12 Pedro Alves <palves@redhat.com>
1078
1079 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1080 thread, and don't resume all threads if the Hc thread has exited.
1081
78708b7c
PA
10822014-11-12 Pedro Alves <palves@redhat.com>
1083
1084 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1085 the process group instead of to a specific LWP.
1086
a2abc7de
PA
10872014-10-15 Pedro Alves <palves@redhat.com>
1088
1089 PR server/17487
1090 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1091 parameter.
1092 (arm_set_thread_context): Delete.
1093 (the_low_target): Adjust.
1094 * win32-i386-low.c (debug_registers_changed)
1095 (debug_registers_used): Delete.
1096 (update_debug_registers_callback): New function.
1097 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1098 needing to update their debug registers.
1099 (win32_get_current_dr): New function.
1100 (x86_dr_low_get_addr, x86_dr_low_get_control)
1101 (x86_dr_low_get_status): Fetch the debug register from the thread
1102 record's context.
1103 (i386_initial_stuff): Adjust.
1104 (i386_get_thread_context): Remove current_event parameter. Don't
1105 clear debug_registers_changed nor copy DR values to
1106 debug_reg_state.
1107 (i386_set_thread_context): Delete.
1108 (i386_prepare_to_resume): New function.
1109 (i386_thread_added): Mark the thread as needing to update irs
1110 debug registers.
1111 (the_low_target): Remove i386_set_thread_context and install
1112 i386_prepare_to_resume.
1113 * win32-low.c (win32_get_thread_context): Adjust.
1114 (win32_set_thread_context): Use SetThreadContext
1115 directly.
1116 (win32_prepare_to_resume): New function.
1117 (win32_require_context): New function, factored out from ...
1118 (thread_rec): ... this.
1119 (continue_one_thread): Call win32_prepare_to_resume on each thread
1120 we're about to continue.
1121 (win32_resume): Call win32_prepare_to_resume on the event thread.
1122 * win32-low.h (struct win32_thread_info)
1123 <debug_registers_changed>: New field.
1124 (struct win32_target_ops): Change prototype of set_thread_context,
1125 delete set_thread_context and add prepare_to_resume.
1126 (win32_require_context): New declaration.
1127
a442d071
GB
11282014-10-08 Gary Benson <gbenson@redhat.com>
1129
1130 * server.h: Do not include common-exceptions.h.
1131
6f1947e8
GB
11322014-10-08 Gary Benson <gbenson@redhat.com>
1133
1134 * server.h: Do not include cleanups.h.
1135
63b434a4
JH
11362014-09-30 James Hogan <james.hogan@imgtec.com>
1137
1138 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1139 mips64-dsp-linux.c.
1140
c4d9ceb6
YQ
11412014-09-23 Yao Qi <yao@codesourcery.com>
1142
1143 * linux-low.c (lp_status_maybe_breakpoint): New function.
1144 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1145 (count_events_callback): Likewise.
1146 (select_event_lwp_callback): Likewise.
1147 (cancel_breakpoints_callback): Likewise.
1148
89a5711c
DB
11492014-09-19 Don Breazeal <donb@codesourcery.com>
1150
1151 * linux-low.c (handle_extended_wait): Call
1152 linux_ptrace_get_extended_event.
1153 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1154 linux_is_extended_waitstatus.
1155
bffc0964
JB
11562014-09-16 Joel Brobecker <brobecker@adacore.com>
1157
1158 * Makefile.in (CPPFLAGS): Define.
1159 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1160 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1161
0bfdf32f
GB
11622014-09-16 Gary Benson <gbenson@redhat.com>
1163
1164 * inferiors.h (current_inferior): Renamed as...
1165 (current_thread): New variable. All uses updated.
1166 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1167 (maybe_move_out_of_jump_pad): Likewise.
1168 (cancel_breakpoint): Likewise.
1169 (linux_low_filter_event): Likewise.
1170 (wait_for_sigstop): Likewise.
1171 (linux_resume_one_lwp): Likewise.
1172 (need_step_over_p): Likewise.
1173 (start_step_over): Likewise.
1174 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1175 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1176 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1177 and save_inferior as saved_thread.
1178 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1179 saved_thread.
1180 (regcache_invalidate_thread): Likewise.
1181 * remote-utils.c (prepare_resume_reply): Likewise.
1182 * thread-db.c (thread_db_get_tls_address): Likewise.
1183 (disable_thread_event_reporting): Likewise.
1184 (remove_thread_event_breakpoints): Likewise.
1185 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1186 as saved_thread.
1187 * target.h (set_desired_inferior): Renamed as...
1188 (set_desired_thread): New declaration. All uses updated.
1189 * server.c (myresume): Updated comment to reference thread instead
1190 of inferior.
1191 (handle_serial_event): Likewise.
1192 (handle_target_event): Likewise.
1193
361c8ade
GB
11942014-09-12 Tom Tromey <tromey@redhat.com>
1195 Gary Benson <gbenson@redhat.com>
1196
1197 * regcache.h: Include common-regcache.h.
1198 (regcache_read_pc): Don't declare.
1199 * regcache.c (get_thread_regcache_for_ptid): New function.
1200
bd9269f7
GB
12012014-09-11 Tom Tromey <tromey@redhat.com>
1202 Gary Benson <gbenson@redhat.com>
1203
1204 * symbol.c: New file.
1205 * Makefile.in (SFILES): Add symbol.c.
1206 (OBS): Add symbol.o.
1207
f8c1d06b
GB
12082014-09-11 Gary Benson <gbenson@redhat.com>
1209
1210 * target.c (target_stop_ptid, target_continue_ptid): New
1211 functions.
1212
721ec300
GB
12132014-09-11 Tom Tromey <tromey@redhat.com>
1214 Gary Benson <gbenson@redhat.com>
1215
1216 * target.h: Include target/target.h.
1217 * target.c (target_read_memory, target_read_uint32)
1218 (target_write_memory): New functions.
1219
c5e92cca
GB
12202014-09-11 Gary Benson <gbenson@redhat.com>
1221
1222 * server.h (debug_hw_points): Don't declare.
1223 * server.c (debug_hw_points): Don't define. Replace all uses
1224 with show_debug_regs.
1225 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1226 all uses with show_debug_regs.
1227
2e4bb98a
EBM
12282014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1229
1230 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1231 endianness into account.
1232 (ppc_supply_ptrace_register): Likewise.
1233
ac740bc7
JH
12342014-09-03 James Hogan <james.hogan@imgtec.com>
1235
1236 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1237 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1238
97ea6506
GB
12392014-09-03 Gary Benson <gbenson@redhat.com>
1240
1241 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1242 ALL_DEBUG_ADDRESS_REGISTERS.
1243
df7e5265
GB
12442014-09-02 Gary Benson <gbenson@redhat.com>
1245
1246 * i386-low.h: Renamed as...
1247 * x86-low.h: New file. All type, function and variable name
1248 prefixes changed from "i386_" to "x86_". All references updated.
1249 * i386-low.c: Renamed as...
1250 * x86-low.c: New file. All type, function and variable name
1251 prefixes changed from "i386_" to "x86_". All references updated.
1252
ed859da7
GB
12532014-09-02 Gary Benson <gbenson@redhat.com>
1254
1255 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1256 (x86_linux_new_thread): Likewise.
1257
860789c7
GB
12582014-08-29 Gary Benson <gbenson@redhat.com>
1259
1260 * server.h (setjmp.h): Do not include.
1261 (toplevel): Do not declare.
1262 (common-exceptions.h): Include.
1263 (cleanups.h): Likewise.
1264 * server.c (toplevel): Do not define.
1265 (exit_code): New static global.
1266 (detach_or_kill_for_exit_cleanup): New function.
1267 (main): New function. Original main renamed to...
1268 (captured_main): New function.
1269 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1270
ff55e1b5
GB
12712014-08-29 Gary Benson <gbenson@redhat.com>
1272
1273 * Makefile.in (SFILES): Add common/common-exceptions.c.
1274 (OBS): Add common-exceptions.o.
1275 (common-exceptions.o): New rule.
1276 * utils.c (prepare_to_throw_exception): New function.
1277
e9bcb658
GB
12782014-08-29 Gary Benson <gbenson@redhat.com>
1279
1280 * config.in: Regenerate.
1281 * configure: Likewise.
1282
e3180625
GB
12832014-08-29 Gary Benson <gbenson@redhat.com>
1284
1285 * Makefile.in (SFILES): Add common/cleanups.c.
1286 (OBS): cleanups.o.
1287 (cleanups.o): New rule.
1288
e3d6ba5d
GB
12892014-08-29 Gary Benson <gbenson@redhat.com>
1290
1291 * utils.c (internal_vwarning): New function.
1292
7096e886
GB
12932014-08-28 Gary Benson <gbenson@redhat.com>
1294
1295 * utils.h (fatal): Remove declaration.
1296 * utils.c (fatal): Remove function.
1297
14ce3192
GB
12982014-08-28 Gary Benson <gbenson@redhat.com>
1299
1300 * tracepoint.c (gdb_agent_init): Replace fatal with
1301 perror_with_name.
1302 (initialize_tracepoint): Likewise.
1303
50278d59
GB
13042014-08-28 Gary Benson <gbenson@redhat.com>
1305
1306 * remote-utils.c (remote_prepare): Replace fatal with error.
1307
aa96c426
GB
13082014-08-28 Gary Benson <gbenson@redhat.com>
1309
1310 * linux-low.c (linux_async): Replace fatal with warning.
1311 Tidy up and return.
1312 (linux_start_non_stop): Return -1 if linux_async failed.
1313
f7160e97
GB
13142014-08-28 Gary Benson <gbenson@redhat.com>
1315
1316 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1317 gdb_assert.
1318 (i386_dr_low_get_addr): Remove vague comment.
1319 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1320 gdb_assert.
1321
38e08fca
GB
13222014-08-28 Gary Benson <gbenson@redhat.com>
1323
1324 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1325 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1326 internal_error.
1327 (linux_resume_one_lwp): Likewise.
1328 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1329 gdb_assert.
1330 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1331 with internal_error.
1332 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1333 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1334 (find_register_by_name): Replace fatal with internal_error.
1335 (find_regno): Likewise.
1336 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1337 * thread-db.c (thread_db_create_event): Likewise.
1338 (thread_db_load_search): Likewise.
1339 (try_thread_db_load_1): Likewise.
1340 * tracepoint.c (get_jump_space_head): Replace fatal with
1341 internal_error.
1342 (claim_trampoline_space): Likewise.
1343 (have_fast_tracepoint_trampoline_buffer): Likewise.
1344 (cmd_qtstart): Likewise.
1345 (stop_tracing): Likewise.
1346 (fast_tracepoint_collecting): Likewise.
1347 (target_malloc): Likewise.
1348 (download_tracepoint): Likewise.
1349 (download_trace_state_variables): Replace check with gdb_assert.
1350 (upload_fast_traceframes): Replace fatal with internal_error.
1351
34abf635
GB
13522014-08-19 Tom Tromey <tromey@redhat.com>
1353 Gary Benson <gbenson@redhat.com>
1354
1355 * Makefile.in (SFILES): Add common/common-debug.c.
1356 (OBS): Add common-debug.o.
1357 (common-debug.o): New rule.
1358 * debug.h (debug_printf): Don't declare.
1359 * debug.c (debug_printf): Renamed and rewritten as...
1360 (debug_vprintf): New function.
1361
f6e94d78
GB
13622014-08-19 Gary Benson <gbenson@redhat.com>
1363
1364 * utils.h: Do not include print-utils.h.
1365
9239eeab
GB
13662014-08-19 Tom Tromey <tromey@redhat.com>
1367 Gary Benson <gbenson@redhat.com>
1368
1369 * server.h: Add static assertion.
1370 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1371
ef87c8bb
GB
13722014-08-19 Tom Tromey <tromey@redhat.com>
1373 Gary Benson <gbenson@redhat.com>
1374
1375 * Makefile.in (SFILES): Add common/errors.c.
1376 (OBS): Add errors.o.
1377 (IPA_OBS): Add errors-ipa.o.
1378 (errors.o): New rule.
1379 (errors-ipa.o): Likewise.
1380 * utils.h (perror_with_name, error, warning): Don't declare.
1381 * utils.c (warning): Renamed and rewritten as...
1382 (vwarning): New function.
1383 (error): Renamed and rewritten as...
1384 (verror): New function.
1385 (internal_error): Renamed and rewritten as...
1386 (internal_verror): New function.
1387
bb974a24
GB
13882014-08-07 Gary Benson <gbenson@redhat.com>
1389
1390 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1391 * configure: Regenerate.
1392 * config.in: Likewise.
1393 * server.h: Do not include errno.h.
1394 * event-loop.c: Likewise.
1395 * hostio-errno.c: Likewise.
1396 * linux-low.c: Likewise.
1397 * remote-utils.c: Likewise.
1398 * spu-low.c: Likewise.
1399 * utils.c: Likewise.
1400 * gdbreplay.c: Unconditionally include errno.h.
1401
6d3d12eb
GB
14022014-08-07 Gary Benson <gbenson@redhat.com>
1403
1404 * server.h: Do not include string.h.
1405 * event-loop.c: Likewise.
1406 * linux-low.c: Likewise.
1407 * regcache.c: Likewise.
1408 * remote-utils.c: Likewise.
1409 * spu-low.c: Likewise.
1410 * utils.c: Likewise.
1411
dccbb609
GB
14122014-08-07 Gary Benson <gbenson@redhat.com>
1413
1414 * server.h: Do not include gdb_assert.h.
1415
e76df0d0
GB
14162014-08-07 Gary Benson <gbenson@redhat.com>
1417
1418 * server.h: Do not include common-utils.h.
1419
4cb9c816
GB
14202014-08-07 Gary Benson <gbenson@redhat.com>
1421
1422 * server.h: Do not include ptid.h.
1423 * notif.h: Likewise.
1424
3995eeee
GB
14252014-08-07 Gary Benson <gbenson@redhat.com>
1426
1427 * server.h: Do not include gdb_locale.h.
1428
cb9f1a9b
GB
14292014-08-07 Gary Benson <gbenson@redhat.com>
1430
1431 * server.h: Do not include gdb/signals.h.
1432 * win32-low.c: Likewise.
1433
a5fceff8
GB
14342014-08-07 Gary Benson <gbenson@redhat.com>
1435
1436 * server.h: Do not include pathmax.h.
1437
b9391142
GB
14382014-08-07 Gary Benson <gbenson@redhat.com>
1439
1440 * server.h: Do not include libiberty.h.
1441 * linux-bfin-low.c: Likewise.
1442
0e443c87
GB
14432014-08-07 Gary Benson <gbenson@redhat.com>
1444
1445 * server.h: Do not include ansidecl.h.
1446
8ebb3f56
GB
14472014-08-07 Gary Benson <gbenson@redhat.com>
1448
1449 * linux-x86-low.c: Do not include stddef.h.
1450 * lynx-ppc-low.c: Likewise.
1451 * tracepoint.c: Likewise.
1452
8980bdf6
GB
14532014-08-07 Gary Benson <gbenson@redhat.com>
1454
1455 * server.h: Do not include stdarg.h.
1456 * nto-low.c: Likewise.
1457
d7096f71
GB
14582014-08-07 Gary Benson <gbenson@redhat.com>
1459
1460 * server.h: Do not include stdlib.h.
1461 * inferiors.c: Likewise.
1462 * linux-low.c: Likewise.
1463 * regcache.c: Likewise.
1464 * spu-low.c: Likewise.
1465 * tracepoint.c: Likewise.
1466 * utils.c: Likewise.
1467
d02f550d
GB
14682014-08-07 Gary Benson <gbenson@redhat.com>
1469
1470 * server.h: Do not include stdio.h.
1471 * linux-low.c: Likewise.
1472 * remote-utils.c: Likewise.
1473 * spu-low.c: Likewise.
1474 * utils.c: Likewise.
1475 * wincecompat.c: Likewise.
1476
87f6c4e3
GB
14772014-08-06 Gary Benson <gbenson@redhat.com>
1478
1479 * regcache.c (init_register_cache): Move conditionals inside if.
1480
7089dca4
GB
14812014-08-06 Gary Benson <gbenson@redhat.com>
1482
1483 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1484
462f517e
GB
14852014-07-31 Gary Benson <gbenson@redhat.com>
1486
1487 * ax.h: Do not include server.h.
1488 * gdbthread.h: Likewise.
1489 * lynx-low.h: Likewise.
1490 * notif.h: Likewise.
1491
976411d6
GB
14922014-07-30 Gary Benson <gbenson@redhat.com>
1493
1494 * server.h: Include common-defs.h.
1495 Do not include config.h or build-gnulib-gdbserver/config.h.
1496
d41f6d8e
GB
14972014-07-30 Gary Benson <gbenson@redhat.com>
1498
1499 * hostio-errno.c: Move server.h to top of includes list.
1500 * inferiors.c: Likewise.
1501 * linux-x86-low.c: Likewise.
1502 * notif.c: Include server.h.
1503
314c6a35
TT
15042014-07-24 Tom Tromey <tromey@redhat.com>
1505 Gary Benson <gbenson@redhat.com>
1506
1507 * server.h (CORE_ADDR): Now unsigned.
1508
69ff6be5
PA
15092014-07-16 Pedro Alves <palves@redhat.com>
1510
1511 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1512
ce9e3fe7
PA
15132014-07-15 Pedro Alves <palves@redhat.com>
1514
1515 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1516 copy.
1517
e76126e8
PA
15182014-07-11 Pedro Alves <palves@redhat.com>
1519
1520 * linux-low.c (kill_wait_lwp): New function, based on
1521 kill_one_lwp_callback, but use my_waitpid directly.
1522 (kill_one_lwp_callback, linux_kill): Use it.
1523
8e9db26e
PA
15242014-06-23 Pedro Alves <palves@redhat.com>
1525
1526 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1527 before setting DR0..DR3.
1528
698b3e08
GB
15292014-06-20 Gary Benson <gbenson@redhat.com>
1530
1531 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1532 * configure: Regenerated.
1533 * config.in: Likewise.
1534
125f8a3d
GB
15352014-06-20 Gary Benson <gbenson@redhat.com>
1536
1537 * Makefile.in (SFILES): Update locations for files moved
1538 from common to nat.
1539 (object file files): Reordered.
1540
42995dbd
GB
15412014-06-20 Gary Benson <gbenson@redhat.com>
1542
1543 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1544 (i386_dr_low_set_addr): Likewise.
1545 (i386_dr_low_get_addr): Likewise.
1546 (i386_dr_low_can_set_control): Likewise.
1547 (i386_dr_low_set_control): Likewise.
1548 (i386_dr_low_get_control): Likewise.
1549 (i386_dr_low_get_status): Likewise.
1550 (i386_get_debug_register_length): Likewise.
1551 * linux-x86-low.c (i386_dr_low_set_addr):
1552 Changed signature. Made static.
1553 (i386_dr_low_get_addr): Likewise.
1554 (i386_dr_low_set_control): Likewise.
1555 (i386_dr_low_get_control): Likewise.
1556 (i386_dr_low_get_status): Likewise.
1557 (i386_dr_low): New global variable.
1558 * win32-i386-low.c (i386_dr_low_set_addr):
1559 Changed signature. Made static.
1560 (i386_dr_low_get_addr): Likewise.
1561 (i386_dr_low_set_control): Likewise.
1562 (i386_dr_low_get_control): Likewise.
1563 (i386_dr_low_get_status): Likewise.
1564 (i386_dr_low): New global variable.
1565
e1d2394b
MS
15662014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1567
1568 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1569 * Makefile.in (AR, AR_FLAGS): Define.
1570 * configure: Regenerate.
1571
3a8ee006
GB
15722014-06-19 Gary Benson <gbenson@redhat.com>
1573
1574 * Makefile.in (i386-dregs.o): New rule.
1575 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1576 * i386-low.c (target.h): Remove include.
1577 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1578 (DR_CONTROL_SHIFT): Likewise.
1579 (DR_CONTROL_SIZE): Likewise.
1580 (DR_RW_EXECUTE): Likewise.
1581 (DR_RW_WRITE): Likewise.
1582 (DR_RW_READ): Likewise.
1583 (DR_RW_IORW): Likewise.
1584 (DR_LEN_1): Likewise.
1585 (DR_LEN_2): Likewise.
1586 (DR_LEN_4): Likewise.
1587 (DR_LEN_8): Likewise.
1588 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1589 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1590 (DR_ENABLE_SIZE): Likewise.
1591 (DR_LOCAL_SLOWDOWN): Likewise.
1592 (DR_GLOBAL_SLOWDOWN): Likewise.
1593 (DR_CONTROL_RESERVED): Likewise.
1594 (I386_DR_CONTROL_MASK): Likewise.
1595 (I386_DR_VACANT): Likewise.
1596 (I386_DR_LOCAL_ENABLE): Likewise.
1597 (I386_DR_GLOBAL_ENABLE): Likewise.
1598 (I386_DR_DISABLE): Likewise.
1599 (I386_DR_SET_RW_LEN): Likewise.
1600 (I386_DR_GET_RW_LEN): Likewise.
1601 (I386_DR_WATCH_HIT): Likewise.
1602 (i386_wp_op_t): Likewise.
1603 (i386_show_dr): Likewise.
1604 (i386_length_and_rw_bits): Likewise.
1605 (i386_insert_aligned_watchpoint): Likewise.
1606 (i386_remove_aligned_watchpoint): Likewise.
1607 (i386_handle_nonaligned_watchpoint): Likewise.
1608 i386_update_inferior_debug_regs(): Likewise.
1609 (i386_dr_insert_watchpoint): Likewise.
1610 (i386_dr_remove_watchpoint): Likewise.
1611 (i386_dr_region_ok_for_watchpoint): Likewise.
1612 (i386_dr_stopped_data_address): Likewise.
1613 (i386_dr_stopped_by_watchpoint): Likewise.
1614
8f26655c
GB
16152014-06-19 Gary Benson <gbenson@redhat.com>
1616
1617 * i386-low.c (i386_dr_show): Renamed to
1618 i386_show_dr and made static. All uses updated.
1619 (i386_dr_length_and_rw_bits): Renamed to
1620 i386_length_and_rw_bits and made static.
1621 All uses updated.
1622 (i386_dr_insert_aligned_watchpoint): Renamed to
1623 i386_insert_aligned_watchpoint and made static.
1624 All uses updated.
1625 (i386_dr_remove_aligned_watchpoint): Renamed to
1626 i386_remove_aligned_watchpoint and made static.
1627 All uses updated.
1628 (i386_dr_update_inferior_debug_regs): Renamed to
1629 i386_update_inferior_debug_regs and made static.
1630 All uses updated.
1631
b9228891
GB
16322014-06-18 Gary Benson <gbenson@redhat.com>
1633
5171def3
GB
1634 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1635 (i386_dr_low_can_set_control): Likewise.
1636 (i386_get_debug_register_length): Likewise.
1637 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1638 (i386_dr_low_can_set_control): Likewise.
1639 (i386_get_debug_register_length): Likewise.
1640
16412014-06-17 Gary Benson <gbenson@redhat.com>
1642
b9228891
GB
1643 * i386-low.h (i386-dregs.h): New include.
1644 (DR_FIRSTADDR): Now in i386-dregs.h.
1645 (DR_LASTADDR): Likewise.
1646 (DR_NADDR): Likewise.
1647 (DR_STATUS): Likewise.
1648 (DR_CONTROL): Likewise.
1649 (i386_debug_reg_state): Likewise.
1650 (i386_dr_insert_watchpoint): Likewise.
1651 (i386_dr_remove_watchpoint): Likewise.
1652 (i386_dr_region_ok_for_watchpoint): Likewise.
1653 (i386_dr_stopped_data_address): Likewise.
1654 (i386_dr_stopped_by_watchpoint): Likewise.
1655 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1656
4be83cc2
GB
16572014-06-18 Gary Benson <gbenson@redhat.com>
1658
1659 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1660 i386_dr_insert_watchpoint.
1661 (i386_low_remove_watchpoint): Renamed to
1662 i386_dr_remove_watchpoint.
1663 (i386_low_region_ok_for_watchpoint): Renamed to
1664 i386_dr_region_ok_for_watchpoint.
1665 (i386_low_stopped_data_address): Renamed to
1666 i386_dr_stopped_data_address.
1667 (i386_low_stopped_by_watchpoint): Renamed to
1668 i386_dr_stopped_by_watchpoint.
1669 * i386-low.c (i386_show_dr): Renamed to
1670 i386_dr_show and made nonstatic. All uses updated.
1671 (i386_length_and_rw_bits): Renamed to
1672 i386_dr_length_and_rw_bits and made nonstatic.
1673 All uses updated.
1674 (i386_insert_aligned_watchpoint): Renamed to
1675 i386_dr_insert_aligned_watchpoint and made nonstatic.
1676 All uses updated.
1677 (i386_remove_aligned_watchpoint): Renamed to
1678 i386_dr_remove_aligned_watchpoint and made nonstatic.
1679 All uses updated.
1680 (i386_update_inferior_debug_regs): Renamed to
1681 i386_dr_update_inferior_debug_regs and made nonstatic.
1682 All uses updated.
1683 (i386_low_insert_watchpoint): Renamed to
1684 i386_dr_insert_watchpoint. All uses updated.
1685 (i386_low_remove_watchpoint): Renamed to
1686 i386_dr_remove_watchpoint. All uses updated.
1687 (i386_low_region_ok_for_watchpoint): Renamed to
1688 i386_dr_region_ok_for_watchpoint. All uses updated.
1689 (i386_low_stopped_data_address): Renamed to
1690 i386_dr_stopped_data_address. All uses updated.
1691 (i386_low_stopped_by_watchpoint): Renamed to
1692 i386_dr_stopped_by_watchpoint. All uses updated.
1693
131aa0d4
GB
16942014-06-18 Gary Benson <gbenson@redhat.com>
1695
1696 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1697 (i386_dr_low_can_set_control): Likewise.
1698 (i386_insert_aligned_watchpoint): New check.
1699
d9305f7f
GB
17002014-06-18 Gary Benson <gbenson@redhat.com>
1701
1702 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1703 Renamed to state.
1704
e927c9fc
GB
17052014-06-18 Gary Benson <gbenson@redhat.com>
1706
1707 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1708 instead of fatal and error.
1709 (i386_handle_nonaligned_watchpoint): Likewise.
1710
1b6d4134
GB
17112014-06-18 Gary Benson <gbenson@redhat.com>
1712
1713 * i386-low.c (i386_get_debug_register_length): New macro.
1714 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1715 (i386_show_dr): Use debug_printf instead of fprintf. Use
1716 phex to format values.
1717
6e62758f
GB
17182014-06-18 Gary Benson <gbenson@redhat.com>
1719
1720 * i386-low.h: Comment changes.
1721 * i386-low.c: Likewise.
1722
fc6e2f03
GB
17232014-06-18 Gary Benson <gbenson@redhat.com>
1724
1725 * i386-low.c: Whitespace changes.
1726
f9d1eeed
TT
17272014-06-12 Tom Tromey <tromey@redhat.com>
1728
1729 * utils.c (freeargv): Remove.
1730
0b04e523
TT
17312014-06-12 Tom Tromey <tromey@redhat.com>
1732
1733 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1734 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1735 (parse_debug_format_options): Likewise.
1736 (gdbserver_usage): Likewise.
1737 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1738 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1739 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1740 against libiberty.
1741 ($(LIBGNU)): Depend on libiberty.
1742 (all-lib): Recurse into all subdirs.
1743 (install-only): Invoke "install" target in subdirs.
1744 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1745 targets.
1746 * configure: Rebuild.
1747 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1748 for vasprintf, vsnprintf, or gettimeofday.
1749 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1750 srv_tgtobj.
1751
270c9937
JB
17522014-06-05 Joel Brobecker <brobecker@adacore.com>
1753
1754 * development.sh: Delete.
1755 * Makefile.in (config.status): Adjust dependency on development.sh.
1756 * configure.ac: Adjust development.sh source call.
1757 * configure: Regenerate.
1758
0a261ed8
PA
17592014-06-02 Pedro Alves <palves@redhat.com>
1760
1761 * ax.c (gdb_free_agent_expr): New function.
1762 * ax.h (gdb_free_agent_expr): New declaration.
1763 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1764 list.
1765 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1766 static.
1767 (clear_breakpoint_conditions_and_commands): New function.
1768 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1769 (clear_breakpoint_conditions_and_commands): New declaration.
1770
e9dae05e
RR
17712014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1772
1773 * linux-aarch64-low.c (asm/ptrace.h): Include.
1774
5876f503
JK
17752014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1776
1777 Fix TLS access for -static -pthread.
1778 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1779 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1780 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1781
802e8e6d
PA
17822014-05-20 Pedro Alves <palves@redhat.com>
1783
1784 * linux-aarch64-low.c (aarch64_insert_point)
1785 (aarch64_remove_point): No longer check whether the type is
1786 supported here. Adjust to new interface.
1787 (the_low_target): Install aarch64_supports_z_point_type as
1788 supports_z_point_type method.
1789 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1790 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1791 instead of a Z packet char. Adjust.
1792 (arm_supports_z_point_type): New function.
1793 (arm_insert_point, arm_remove_point): Adjust to new interface.
1794 (the_low_target): Install arm_supports_z_point_type.
1795 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1796 (cris_insert_point, cris_remove_point): Adjust to new interface.
1797 Don't check whether the type is supported here.
1798 (the_low_target): Install cris_supports_z_point_type.
1799 * linux-low.c (linux_supports_z_point_type): New function.
1800 (linux_insert_point, linux_remove_point): Adjust to new interface.
1801 * linux-low.h (struct linux_target_ops) <insert_point,
1802 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1803 raw_breakpoint pointer parameter.
1804 <supports_z_point_type>: New method.
1805 * linux-mips-low.c (mips_supports_z_point_type): New function.
1806 (mips_insert_point, mips_remove_point): Adjust to new interface.
1807 Use mips_supports_z_point_type.
1808 (the_low_target): Install mips_supports_z_point_type.
1809 * linux-ppc-low.c (the_low_target): Install NULL as
1810 supports_z_point_type method.
1811 * linux-s390-low.c (the_low_target): Install NULL as
1812 supports_z_point_type method.
1813 * linux-sparc-low.c (the_low_target): Install NULL as
1814 supports_z_point_type method.
1815 * linux-x86-low.c (x86_supports_z_point_type): New function.
1816 (x86_insert_point): Adjust to new insert_point interface. Use
1817 insert_memory_breakpoint. Adjust to new
1818 i386_low_insert_watchpoint interface.
1819 (x86_remove_point): Adjust to remove_point interface. Use
1820 remove_memory_breakpoint. Adjust to new
1821 i386_low_remove_watchpoint interface.
1822 (the_low_target): Install x86_supports_z_point_type.
1823 * lynx-low.c (lynx_target_ops): Install NULL as
1824 supports_z_point_type callback.
1825 * nto-low.c (nto_supports_z_point_type): New.
1826 (nto_insert_point, nto_remove_point): Adjust to new interface.
1827 (nto_target_ops): Install nto_supports_z_point_type.
1828 * mem-break.c: Adjust intro comment.
1829 (struct raw_breakpoint) <raw_type, size>: New fields.
1830 <inserted>: Update comment.
1831 <shlib_disabled>: Delete field.
1832 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1833 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1834 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1835 (raw_bkpt_type_to_target_hw_bp_type): New function.
1836 (find_enabled_raw_code_breakpoint_at): New function.
1837 (find_raw_breakpoint_at): New type and size parameters. Use them.
1838 (insert_memory_breakpoint): New function, based off
1839 set_raw_breakpoint_at.
1840 (remove_memory_breakpoint): New function.
1841 (set_raw_breakpoint_at): Reimplement.
1842 (set_breakpoint): New, based on set_breakpoint_at.
1843 (set_breakpoint_at): Reimplement.
1844 (delete_raw_breakpoint): Go through the_target->remove_point
1845 instead of assuming memory breakpoints.
1846 (find_gdb_breakpoint_at): Delete.
1847 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1848 (find_gdb_breakpoint): New function.
1849 (set_gdb_breakpoint_at): Delete.
1850 (z_type_supported): New function.
1851 (set_gdb_breakpoint_1): New function, loosely based off
1852 set_gdb_breakpoint_at.
1853 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1854 (delete_gdb_breakpoint_at): Delete.
1855 (delete_gdb_breakpoint_1): New function, loosely based off
1856 delete_gdb_breakpoint_at.
1857 (delete_gdb_breakpoint): New function.
1858 (clear_gdb_breakpoint_conditions): Rename to ...
1859 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1860 breakpoint.
1861 (add_condition_to_breakpoint): Make static.
1862 (add_breakpoint_condition): Take a struct breakpoint pointer
1863 instead of an address. Adjust.
1864 (gdb_condition_true_at_breakpoint): Rename to ...
1865 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1866 z_type parameter.
1867 (gdb_condition_true_at_breakpoint): Reimplement.
1868 (add_breakpoint_commands): Take a struct breakpoint pointer
1869 instead of an address. Adjust.
1870 (gdb_no_commands_at_breakpoint): Rename to ...
1871 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1872 parameter. Return true if no breakpoint was found. Change debug
1873 output.
1874 (gdb_no_commands_at_breakpoint): Reimplement.
1875 (run_breakpoint_commands): Rename to ...
1876 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1877 and change return type to boolean.
1878 (run_breakpoint_commands): New function.
1879 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1880 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1881 breakpoint. Go through the_target->remove_point instead of
1882 assuming memory breakpoint.
1883 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1884 software and hardware breakpoints.
1885 (reinsert_raw_breakpoint): Go through the_target->insert_point
1886 instead of assuming memory breakpoint.
1887 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1888 software and hardware breakpoints.
1889 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1890 Check both software and hardware breakpoints.
1891 (validate_inserted_breakpoint): Assert the breakpoint is a
1892 software breakpoint. Set the inserted flag to -1 instead of
1893 setting shlib_disabled.
1894 (delete_disabled_breakpoints): Adjust.
1895 (validate_breakpoints): Only validate software breakpoints.
1896 Adjust to inserted flag change.
1897 (check_mem_read, check_mem_write): Skip breakpoint types other
1898 than software breakpoints. Adjust to inserted flag change.
1899 * mem-break.h (enum raw_bkpt_type): New enum.
1900 (raw_breakpoint, struct process_info): Forward declare.
1901 (Z_packet_to_target_hw_bp_type): Delete declaration.
1902 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1903 (set_gdb_breakpoint, delete_gdb_breakpoint)
1904 (clear_breakpoint_conditions): New declarations.
1905 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1906 (breakpoint_inserted_here): Update comment.
1907 (add_breakpoint_condition, add_breakpoint_commands): Replace
1908 address parameter with a breakpoint pointer parameter.
1909 (gdb_breakpoint_here): Update comment.
1910 (delete_gdb_breakpoint_at): Delete.
1911 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1912 * server.c (process_point_options): Take a struct breakpoint
1913 pointer instead of an address. Adjust.
1914 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1915 delete_gdb_breakpoint.
1916 * spu-low.c (spu_target_ops): Install NULL as
1917 supports_z_point_type method.
1918 * target.h: Include mem-break.h.
1919 (struct target_ops) <prepare_to_access_memory>: Update comment.
1920 <supports_z_point_type>: New field.
1921 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1922 instead of a char. Also take a raw breakpoint pointer.
1923 * win32-arm-low.c (the_low_target): Install NULL as
1924 supports_z_point_type.
1925 * win32-i386-low.c (i386_supports_z_point_type): New function.
1926 (i386_insert_point, i386_remove_point): Adjust to new interface.
1927 (the_low_target): Install i386_supports_z_point_type.
1928 * win32-low.c (win32_supports_z_point_type): New function.
1929 (win32_insert_point, win32_remove_point): Adjust to new interface.
1930 (win32_target_ops): Install win32_supports_z_point_type.
1931 * win32-low.h (struct win32_target_ops):
1932 <supports_z_point_type>: New method.
1933 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1934 instead of a char. Also take a raw breakpoint pointer.
1935
932539e3
PA
19362014-05-20 Pedro Alves <palves@redhat.com>
1937
1938 * mem-break.h: Include break-common.h.
1939 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1940 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1941 (Z_packet_to_target_hw_bp_type): New declaration.
1942 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1943 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1944 (Z_PACKET_ACCESS_WP): Delete macros.
1945 (Z_packet_to_hw_type): Delete function.
1946 * i386-low.h: Don't include break-common.h here.
1947 (Z_packet_to_hw_type): Delete declaration.
1948 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1949 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1950 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1951 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1952 * linux-aarch64-low.c: Don't include break-common.h here.
1953 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1954 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1955 (Z_packet_to_target_hw_bp_type): Delete function.
1956 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1957 function.
1958 (mips_insert_point, mips_remove_point): Use
1959 Z_packet_to_target_hw_bp_type.
1960
4ff0d3d8
PA
19612014-05-20 Pedro Alves <palves@redhat.com>
1962
1963 * linux-aarch64-low.c: Include break-common.h.
1964 (enum target_point_type): Delete.
1965 (Z_packet_to_point_type): Rename to ...
1966 (Z_packet_to_target_hw_bp_type): ... this, and return a
1967 target_hw_bp_type instead.
1968 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1969 instead of an enum target_point_type.
1970 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1971 breakpoint type.
1972 (aarch64_dr_state_insert_one_point)
1973 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1974 (aarch64_handle_aligned_watchpoint)
1975 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1976 Take an enum target_hw_bp_type instead of an enum
1977 target_point_type.
1978 (aarch64_supports_z_point_type): New function.
1979 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1980 use Z_packet_to_target_hw_bp_type.
1981
786dc519
JB
19822014-05-20 Joel Brobecker <brobecker@adacore.com>
1983
1984 * configure.ac: Only use -Werror by default when DEVELOPMENT
1985 is true.
1986 * configure: Regenerate.
1987
9e0aa64f
JK
19882014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1989
1990 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1991 * linux-x86-low.c (X86_64_USER_REGS): New.
1992 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1993
2b577b92
YQ
19942014-04-28 Yao Qi <yao@codesourcery.com>
1995
1996 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1997 name.
1998
94611da2
PA
19992014-04-25 Pedro Alves <palves@redhat.com>
2000
2001 PR server/16255
2002 * linux-low.c (linux_attach_fail_reason_string): New function.
2003 (linux_attach_lwp): Delete.
2004 (linux_attach_lwp_1): Rename to ...
2005 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2006 argument. Remove "initial" parameter. Return int instead of
2007 void. Don't error or warn here.
2008 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2009 failure to attach to the tgid. Call warning when failing to
2010 attach to an lwp.
2011 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2012 argument. Remove "initial" parameter. Return int instead of
2013 void. Don't error or warn here.
2014 (linux_attach_fail_reason_string): New declaration.
2015 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2016 interface change. Use linux_attach_fail_reason_string.
2017
01f9f808
MS
20182014-04-24 Michael Sturm <michael.sturm@mintel.com>
2019 Walfred Tedeschi <walfred.tedeschi@intel.com>
2020
2021 * Makefile.in: Added rules to handle new files
2022 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2023 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2024 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2025 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2026 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2027 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2028 x32-avx512-linux.o.
2029 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2030 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2031 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2032 i386/x32-avx512.xml.
2033 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2034 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2035 i386/x32-avx512-linux.xml.
2036 * i387-fp.c (num_avx512_k_registers): New constant for number
2037 of K registers.
2038 (num_avx512_zmmh_low_registers): New constant for number of
2039 lower ZMM registers (0-15).
2040 (num_avx512_zmmh_high_registers): New constant for number of
2041 higher ZMM registers (16-31).
2042 (num_avx512_ymmh_registers): New contant for number of higher
2043 YMM registers (ymm16-31 added by avx521 on x86_64).
2044 (num_avx512_xmm_registers): New constant for number of higher
2045 XMM registers (xmm16-31 added by AVX512 on x86_64).
2046 (struct i387_xsave): Add space for AVX512 registers.
2047 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2048 Add code to handle AVX512 registers.
2049 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2050 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2051 prototypei from generated file.
2052 (tdesc_amd64_avx512_linux): Likewise.
2053 (init_registers_x32_avx512_linux): Likewise.
2054 (tdesc_x32_avx512_linux): Likewise.
2055 (init_registers_i386_avx512_linux): Likewise.
2056 (tdesc_i386_avx512_linux): Likewise.
2057 (x86_64_regmap): Add AVX512 registers.
2058 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2059 mask.
2060 (initialize_low_arch): Add code to initialize AVX512 registers.
2061
51aa91f9
PA
20622014-04-23 Pedro Alves <palves@redhat.com>
2063
2064 * mem-break.c (find_gdb_breakpoint_at): Make static.
2065 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2066
a4165e94
PA
20672014-04-23 Pedro Alves <palves@redhat.com>
2068
2069 * i386-low.c: Don't include break-common.h here.
2070 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2071 prototype to take target_hw_bp_type as argument instead of a Z
2072 packet char.
2073 * i386-low.h: Include break-common.h here.
2074 (Z_packet_to_hw_type): Declare.
2075 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2076 prototypes.
2077 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2078 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2079 (x86_remove_point): Convert the packet number to a
2080 target_hw_bp_type before calling i386_low_remove_watchpoint.
2081 * win32-i386-low.c (i386_insert_point): Convert the packet number
2082 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2083 (i386_remove_point): Convert the packet number to a
2084 target_hw_bp_type before calling i386_low_remove_watchpoint.
2085
b8acf843
PA
20862014-04-23 Pedro Alves <palves@redhat.com>
2087
2088 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2089
d708bcd1
PA
20902014-04-10 Pedro Alves <palves@redhat.com>
2091
2092 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2093 Check if the condition or command is NULL before checking if the
2094 breakpoint is known. On success, return true.
2095 * mem-break.h (add_breakpoint_condition): Document return.
2096 (add_breakpoint_commands): Add describing comment.
2097 * server.c (skip_to_semicolon): New function.
2098 (process_point_options): Use it.
2099
2eec7d5b
PA
21002014-04-09 Pedro Alves <palves@redhat.com>
2101
2102 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2103 to lwpid_of.
2104
fa96cb38
PA
21052014-02-27 Pedro Alves <palves@redhat.com>
2106
2107 PR 12702
2108 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2109 macros.
2110 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2111 output.
2112 (last_thread_of_process_p): Take a PID argument instead of a
2113 thread pointer.
2114 (linux_wait_for_lwp): Delete.
2115 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2116 functions.
2117 (linux_low_filter_event): New function, party factored out from
2118 linux_wait_for_event.
2119 (linux_wait_for_event): Rename to ...
2120 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2121 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2122 sigsuspend. Check for zombie leaders.
2123 (linux_wait_for_event): Reimplement as wrapper around
2124 linux_wait_for_event_filtered.
2125 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2126 a normal or signal exit is seen, it's the whole process exiting.
2127 (wait_for_sigstop): No longer a for_each_inferior callback.
2128 Rewrite on top of linux_wait_for_event_filtered.
2129 (stop_all_lwps): Call wait_for_sigstop directly.
2130 * server.c (resume, handle_target_event): Handle
2131 TARGET_WAITKIND_NO_RESUMED.
2132
d763de10
JB
21332014-02-26 Joel Brobecker <brobecker@adacore.com>
2134
2135 * win32-low.c (psapi_get_dll_name,
2136 * win32_CreateToolhelp32Snapshot): Delete.
2137 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2138 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2139 Delete.
2140 (handle_load_dll): Add function description.
2141 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2142
850a0f76
JB
21432014-02-26 Joel Brobecker <brobecker@adacore.com>
2144
2145 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2146 Add comment.
2147 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2148 base address when calling win32_add_one_solib.
2149 (handle_load_dll): Delete local variable load_addr.
2150 Remove 0x1000 offset applied to DLL base address when calling
2151 win32_add_one_solib.
2152 (handle_unload_dll): Add comment.
2153
f25b3fc3
JB
21542014-02-26 Joel Brobecker <brobecker@adacore.com>
2155
2156 * win32-low.c (win32_add_all_dlls): Renames
2157 win32_ensure_ntdll_loaded. Rewrite function documentation.
2158 Adjust implementation to always load all DLLs.
2159 Add 0x1000 offset to DLL base address when calling
2160 win32_add_one_solib.
2161 (child_initialization_done): New static global.
2162 (do_initial_child_stuff): Set child_initialization_done to
2163 zero during child initialization, and 1 after. Replace call
2164 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2165 Add comment.
2166 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2167 (handle_unload_dll): Add function documentation.
2168 (get_child_debug_event): Ignore load and unload DLL events
2169 during child initialization.
2170
d86d4aaf
DE
21712014-02-20 Doug Evans <dje@google.com>
2172
3bc32da3 2173 Remove global all_lwps.
d86d4aaf
DE
2174 * inferiors.h (ptid_of): Move here from linux-low.h.
2175 (pid_of, lwpid_of): Ditto.
2176 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2177 parameter is a struct thread_info * now.
2178 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2179 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2180 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2181 directly.
2182 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2183 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2184 * linux-arm-low.c (update_registers_callback): Update, "entry"
2185 parameter is a struct thread_info * now.
2186 Fetch lwpid from current_inferior directly.
2187 (arm_insert_point): Pass &all_threads to find_inferior instead of
2188 &all_lwps.
2189 (arm_remove_point): Ditto.
2190 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2191 (arm_prepare_to_resume): Fetch pid from thread.
2192 (arm_read_description): Fetch lwpid from current_inferior directly.
2193 * linux-low.c (all_lwps): Delete.
2194 (delete_lwp): Delete call to remove_inferior.
2195 (handle_extended_wait): Fetch lwpid from thread.
2196 (add_lwp): Don't set lwp->entry.id. Remove call to
2197 add_inferior_to_list.
2198 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2199 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2200 (kill_one_lwp_callback): Ditto.
2201 (linux_kill): Don't dereference NULL pointer.
2202 Fetch ptid,lwpid from thread.
2203 (get_detach_signal): Fetch ptid from thread.
2204 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2205 Simplify call to regcache_invalidate_thread.
2206 (delete_lwp_callback): Update, "entry" parameter is a
2207 struct thread_info * now. Fetch pid from thread.
2208 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2209 (status_pending_p_callback): Update, "entry" parameter is a
2210 struct thread_info * now. Fetch ptid from thread.
2211 (find_lwp_pid): Update, "entry" parameter is a
2212 struct thread_info * now.
2213 (linux_wait_for_lwp): Fetch pid from thread.
2214 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2215 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2216 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2217 (dequeue_one_deferred_signal): Ditto.
2218 (cancel_breakpoint): Fetch ptid from current_inferior.
2219 (linux_wait_for_event): Pass &all_threads to find_inferior,
2220 not &all_lwps. Fetch ptid, lwpid from thread.
2221 (count_events_callback): Update, "entry" parameter is a
2222 struct thread_info * now.
2223 (select_singlestep_lwp_callback): Ditto.
2224 (select_event_lwp_callback): Ditto.
2225 (cancel_breakpoints_callback): Ditto.
2226 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2227 not &all_lwps.
2228 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2229 (unsuspend_one_lwp): Update, "entry" parameter is a
2230 struct thread_info * now.
2231 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2232 not &all_lwps.
2233 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2234 Fetch lwpid from thread, not lwp.
2235 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2236 Pass &all_threads to find_inferior, not &all_lwps.
2237 (send_sigstop): Fetch lwpid from thread, not lwp.
2238 (send_sigstop_callback): Update, "entry" parameter is a
2239 struct thread_info * now.
2240 (suspend_and_send_sigstop_callback): Ditto.
2241 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2242 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2243 struct thread_info * now.
2244 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2245 from thread, lwp.
2246 (lwp_running): Update, "entry" parameter is a
2247 struct thread_info * now.
2248 (stop_all_lwps): Fetch ptid from thread.
2249 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2250 (linux_resume_one_lwp): Fetch lwpid from thread.
2251 (linux_set_resume_request): Update, "entry" parameter is a
2252 struct thread_info * now. Fetch pid, lwpid from thread.
2253 (resume_status_pending_p): Update, "entry" parameter is a
2254 struct thread_info * now.
2255 (need_step_over_p): Ditto. Fetch lwpid from thread.
2256 (start_step_over): Fetch lwpid from thread.
2257 (linux_resume_one_thread): Update, "entry" parameter is a
2258 struct thread_info * now. Fetch lwpid from thread.
2259 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2260 (proceed_one_lwp): Update, "entry" parameter is a
2261 struct thread_info * now. Fetch lwpid from thread.
2262 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2263 struct thread_info * now.
2264 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2265 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2266 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2267 directly.
2268 (regsets_store_inferior_registers): Ditto.
2269 (fetch_register, store_register): Ditto.
2270 (linux_read_memory, linux_write_memory): Ditto.
2271 (linux_request_interrupt): Ditto.
2272 (linux_read_auxv): Ditto.
2273 (linux_xfer_siginfo): Ditto.
2274 (linux_qxfer_spu): Ditto.
2275 (linux_qxfer_libraries_svr4): Ditto.
2276 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2277 moved to inferiors.h.
2278 (get_lwp): Delete.
2279 (get_thread_lwp): Update.
2280 (struct lwp_info): Delete member "entry". Simplify comment for
2281 member "thread".
2282 (all_lwps): Delete.
2283 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2284 current_inferior directly.
2285 (update_watch_registers_callback): Update, "entry" parameter is a
2286 struct thread_info * now. Fetch pid from thread.
2287 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2288 (mips_insert_point): Fetch lwpid from current_inferior.
2289 Pass &all_threads to find_inferior, not &all_lwps.
2290 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2291 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2292 directly.
2293 (mips_stopped_data_address): Ditto.
2294 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2295 directly.
2296 * linux-tile-low.c (tile_arch_setup): Ditto.
2297 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2298 (update_debug_registers_callback): Update, "entry" parameter is a
2299 struct thread_info * now. Fetch pid from thread.
2300 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2301 Pass &all_threads to find_inferior, not &all_lwps.
2302 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2303 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2304 Pass &all_threads to find_inferior, not &all_lwps.
2305 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2306 (i386_dr_low_get_status): Ditto.
2307 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2308 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2309 (x86_linux_read_description): Ditto.
2310 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2311
3b8361aa
DE
23122014-02-20 Doug Evans <dje@google.com>
2313
2314 * inferiors.c (get_first_inferior): Fix buglet.
2315
f7667f0d
DE
23162014-02-19 Doug Evans <dje@google.com>
2317
2318 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2319 * inferiors.c (add_thread): Change result type to struct thread_info *.
2320 All callers updated.
2321 (add_lwp): Call add_thread here instead of in callers.
2322 All callers updated.
2323 * linux-low.h (get_lwp_thread): Rewrite.
2324 (struct lwp_info): New member "thread".
2325
b3312d80
DE
23262014-02-19 Doug Evans <dje@google.com>
2327
2328 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2329 All callers updated.
2330
ecc6f45c
DE
23312014-02-19 Doug Evans <dje@google.com>
2332
2333 * inferiors.c (add_thread): Fix whitespace.
2334
649ebbca
DE
23352014-02-19 Doug Evans <dje@google.com>
2336
2337 * dll.c (clear_dlls): Replace accessing list implemention details
2338 with API function.
2339 * gdbthread.h (get_first_thread): Declare.
2340 * inferiors.c (for_each_inferior_with_data): New function.
2341 (get_first_thread): New function.
2342 (find_thread_ptid): Simplify.
2343 (get_first_inferior): New function.
2344 (clear_list): Delete.
2345 (one_inferior_p): New function.
2346 (clear_inferior_list): New function.
2347 (clear_inferiors): Update.
2348 * inferiors.h (for_each_inferior_with_data): Declare.
2349 (clear_inferior_list): Declare.
2350 (one_inferior_p): Declare.
2351 (get_first_inferior): Declare.
2352 * linux-low.c (linux_wait_for_event): Replace accessing list
2353 implemention details with API function.
2354 * server.c (target_running): Ditto.
2355 (accumulate_file_name_length): New function.
2356 (emit_dll_description): New function.
2357 (handle_qxfer_libraries): Replace accessing list implemention
2358 details with API function.
2359 (handle_qxfer_threads_worker): New function.
2360 (handle_qxfer_threads_proper): Replace accessing list implemention
2361 details with API function.
2362 (handle_query): Ditto.
2363 (visit_actioned_threads_callback_ftype): New typedef.
2364 (visit_actioned_threads_data): New struct.
2365 (visit_actioned_threads): Rewrite to be find_inferior callback.
2366 (resume): Call find_inferior.
2367 (handle_status): Replace accessing list implemention
2368 details with API function.
2369 (process_serial_event): Replace accessing list implemention details
2370 with API function.
2371 * target.c (set_desired_inferior): Replace accessing list implemention
2372 details with API function.
2373 * tracepoint.c (same_process_p): New function.
2374 (gdb_agent_about_to_close): Replace accessing list implemention
2375 details with API function.
2376 * win32-low.c (child_delete_thread): Replace accessing list
2377 implemention details with API function.
2378 (match_dll_by_basename): New function.
2379 (dll_is_loaded_by_basename): New function.
2380 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2381 details call to dll_is_loaded_by_basename.
2382
80894984
DE
23832014-02-19 Doug Evans <dje@google.com>
2384
2385 * dll.h (struct dll_info): Add comment.
2386 * gdbthread.h (struct thread_info): Add comment.
2387 (current_ptid): Simplify.
2388 * inferiors.c (add_process): Update.
2389 (remove_process): Update.
2390 * inferiors.h (struct process_info): Rename member "head" to "entry".
2391 * linux-low.c (delete_lwp): Update.
2392 (add_lwp): Update.
2393 (last_thread_of_process_p): Update.
2394 (kill_one_lwp_callback, linux_kill): Update.
2395 (status_pending_p_callback): Update.
2396 (wait_for_sigstop): Update. Simplify read of ptid.
2397 (start_step_over): Update.
2398 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2399 (get_lwp_thread): Update.
2400 (struct lwp_info): Rename member "head" to "entry".
2401 * regcache.h (inferior_list_entry): Delete.
2402 * server.c (kill_inferior_callback): Update.
2403 (detach_or_kill_inferior_callback): Update.
2404 (print_started_pid): Update.
2405 (print_attached_pid): Update.
2406 (process_serial_event): Simplify read of ptid.
2407 * thread-db.c (thread_db_create_event): Update.
2408 (thread_db_get_tls_address): Update.
2409 * win32-low.c (current_inferior_ptid): Simplify.
2410
46917d26
TT
24112014-02-19 Tom Tromey <tromey@redhat.com>
2412
2413 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2414 argument.
2415 (target_supports_btrace): Update.
2416
0759a81e
YQ
24172014-02-14 Yao Qi <yao@codesourcery.com>
2418
2419 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2420 (rsp-low-ipa.o): New target.
2421
a7191e8b
TT
24222014-02-12 Tom Tromey <tromey@redhat.com>
2423
2424 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2425 convert_ascii_to_int.
2426 * regcache.c (registers_to_string): Likewise.
2427 * remote-utils.c (decode_M_packet): Likewise.
2428 * server.c (process_serial_event): Likewise.
2429
ff0e980e
TT
24302014-02-12 Tom Tromey <tromey@redhat.com>
2431
2432 * server.c (handle_query, handle_v_run): Use hex2bin, not
2433 unhexify.
2434 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2435
e9371aff
TT
24362014-02-12 Tom Tromey <tromey@redhat.com>
2437
2438 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2439 convert_int_to_ascii.
2440 * regcache.c (registers_to_string, collect_register_as_string):
2441 Likewise.
2442 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2443 Likewise.
2444 * server.c (process_serial_event): Likewise.
2445 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2446 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2447
971dc0b8
TT
24482014-02-12 Tom Tromey <tromey@redhat.com>
2449
2450 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2451 bin2hex, not hexify.
2452 * tracepoint.c (cmd_qtstatus): Likewise.
2453
0a822afb
TT
24542014-02-12 Tom Tromey <tromey@redhat.com>
2455
2456 * remote-utils.c (monitor_output): Pass explicit length to
2457 hexify.
2458
9c3d6531
TT
24592014-02-12 Tom Tromey <tromey@redhat.com>
2460
2461 * tracepoint.c: Include rsp-low.h.
2462 * server.c: Include rsp-low.h.
2463 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2464 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2465 declare.
2466 * remote-utils.c: Include rsp-low.h.
2467 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2468 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2469 (convert_int_to_ascii, convert_ascii_to_int): Move to
2470 common/rsp-low.c.
2471 * regcache.c: Include rsp-low.h.
2472 * ax.c: Include rsp-low.h.
2473 * Makefile.in (SFILES): Add common/rsp-low.c.
2474 (OBS): Add rsp-low.o.
2475 (rsp-low.o): New target.
2476
01fd3ea5
TT
24772014-02-12 Tom Tromey <tromey@redhat.com>
2478
2479 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2480 Include print-utils.h.
2481 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2482 (plongest, thirty_two, phex_nz): Remove.
2483 * Makefile.in (SFILES): Add common/print-utils.c.
2484 (OBS): Add print-utils.o.
2485 (print-utils-ipa.o): New target.
2486 (print-utils.o): New target.
2487 (IPA_OBJS): Add print-utils-ipa.o.
2488
e99dc820
TT
24892014-02-06 Tom Tromey <tromey@redhat.com>
2490
2491 * Makefile.in (SFILES): Fix indentation.
2492
ee1e2d4f
DE
24932014-02-05 Doug Evans <dje@google.com>
2494
2495 * linux-low.c (linux_wait_for_event): Improve comment.
2496 (linux_wait_1): Keep current_inferior in sync with event_child.
2497
f5a02773
DE
24982014-01-22 Doug Evans <dje@google.com>
2499
2500 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2501
87ce2a04
DE
25022014-01-22 Doug Evans <dje@google.com>
2503
2504 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2505 * configure: Regenerate.
2506 * config.in: Regenerate.
2507 * Makefile.in (SFILES): Add debug.c.
2508 (OBS): Add debug.o.
2509 * debug.c: New file.
2510 * debug.h: New file.
2511 * linux-aarch64-low.c (*): Update all debugging printfs to use
2512 debug_printf instead of fprintf.
2513 * linux-arm-low.c (*): Ditto.
2514 * linux-cris-low.c (*): Ditto.
2515 * linux-crisv32-low.c (*): Ditto.
2516 * linux-m32r-low.c (*): Ditto.
2517 * linux-sparc-low.c (*): Ditto.
2518 * linux-x86.c (*): Ditto.
2519 * linux-low.c (*): Ditto.
2520 (linux_wait_1): Add calls to debug_enter, debug_exit.
2521 (linux_wait): Remove redundant debugging printf.
2522 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2523 (linux_resume, unstop_all_lwps): Ditto.
2524 * mem-break.c (*): Update all debugging printfs to use
2525 debug_printf instead of fprintf.
2526 * remote-utils.c (*): Ditto.
2527 * thread-db.c (*): Ditto.
2528 * server.c #include <ctype.h>, "gdb_vecs.h".
2529 (debug_threads): Moved to debug.c.
2530 (*): Update all debugging printfs to use debug_printf instead of
2531 fprintf.
2532 (start_inferior): Replace call to fflush with call to debug_flush.
2533 (monitor_show_help): Mention set debug-format.
2534 (parse_debug_format_options): New function.
2535 (handle_monitor_command): Handle "monitor set debug-format".
2536 (gdbserver_usage): Mention --debug-format.
2537 (main): Parse --debug-format.
2538 * server.h (debug_threads): Declaration moved to debug.h.
2539 #include "debug.h".
2540 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2541 trace_debug_1 that uses debug_printf.
2542 (tracepoint_look_up_symbols): Update all debugging printfs to use
2543 debug_printf instead of fprintf.
2544
e671835b
BS
25452014-01-20 Baruch Siach <baruch@tkos.co.il>
2546
2547 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2548 sys/ptrace.h.
2549
b5737fa9
PA
25502014-01-17 Pedro Alves <palves@redhat.com>
2551
ea38d2a9 2552 PR build/16445
c7faa97a
PA
2553 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2554 defined after including gdb_proc_service.h.
b5737fa9 2555
40ed484e
DE
25562014-01-16 Doug Evans <dje@google.com>
2557
2558 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2559 (match_dll): Use it.
2560
969c39fb
MM
25612014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2562
2563 * target.h (target_ops) <read_btrace>: Change parameters and
2564 return type to allow error reporting.
2565 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2566 trace reading errors on.
2567 * linux-low.c (linux_low_read_btrace): Pass trace reading
2568 errors on.
2569 (linux_low_disable_btrace): New.
2570
ab7f45ba
DE
25712014-01-15 Doug Evans <dje@google.com>
2572
2573 * inferiors.c (thread_id_to_gdb_id): Delete.
2574 * inferiors.h (thread_id_to_gdb_id): Delete.
2575
66af0f44
EZ
25762014-01-13 Eli Zaretskii <eliz@gnu.org>
2577
2578 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2579 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2580 versions.
2581
9939e131
PA
25822014-01-08 Pedro Alves <palves@redhat.com>
2583
2584 * server.c (handle_status): Don't discard previous queued stop
2585 replies or thread's pending status here.
2586 (main) <disconnection>: Do it here instead.
2587
b7ea362b
PA
25882014-01-08 Pedro Alves <palves@redhat.com>
2589
2590 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2591 * server.c (visit_actioned_threads, handle_pending_status): New
2592 function.
2593 (handle_v_cont): Factor out parts to ...
2594 (resume): ... this new function. If in all-stop, and a thread
2595 being resumed has a pending status, report it without actually
2596 resuming.
2597 (myresume): Adjust to use the new 'resume' function.
2598 (clear_pending_status_callback, set_pending_status_callback)
2599 (find_status_pending_thread_callback): New functions.
2600 (handle_status): Handle the case of multiple threads having
2601 interesting statuses to report. Report threads' real last signal
2602 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2603 with an interesting thread to report the status for, instead of
2604 always reporting the status of the first thread.
2605
28498c42
JB
26062014-01-01 Joel Brobecker <brobecker@adacore.com>
2607
2608 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2609 * gdbreplay.c (gdbreplay_version): Likewise.
2610
f45c82da
YZ
26112013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2612
2613 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2614 iov.iov_len with the real length in use.
2615
379a5e2d
JB
26162013-12-13 Joel Brobecker <brobecker@adacore.com>
2617
2618 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2619 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2620 for all targets that use win32-low.c.
2621 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2622 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2623
4210d83e
PA
26242013-12-13 Pedro Alves <palves@redhat.com>
2625
2626 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2627 if equal to TARGET_WAITKIND_LOADED.
2628 * win32-low.c (cached_status): New static global.
2629 (win32_wait): Add declaration.
2630 (do_initial_child_stuff): Flush all initial pending debug events
2631 up to the initial breakpoint.
2632 (win32_wait): If CACHED_STATUS was set, return that instead
2633 of doing a real wait. Remove the code resuming the execution
2634 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2635 during the initial phase. Also remove the code changing
2636 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2637 TARGET_WAITKIND_STOPPED.
2638
e7f0d979
YQ
26392013-12-11 Yao Qi <yao@codesourcery.com>
2640
2641 * notif.c (handle_notif_ack): Return 0 if no notification
2642 matches.
2643
ebcf782c
DE
26442013-11-20 Doug Evans <dje@google.com>
2645
2646 * linux-low.c (linux_set_resume_request): Fix comment.
2647
20ad9378
DE
26482013-11-20 Doug Evans <dje@google.com>
2649
2650 * linux-low.c (resume_status_pending_p): Tweak comment.
2651
a196ebeb
WT
26522013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2653
2654 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2655 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2656 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2657 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2658 (srv_amd64_regobj): Add amd64-mpx.o.
2659 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2660 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2661 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2662 * i387-fp.c (num_pl_bnd_register) Added constant.
2663 (num_pl_bnd_cfg_registers) Added constant.
2664 (struct i387_xsave) Added reserved area and MPX fields.
2665 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2666 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2667 function.
2668 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2669 (init_registers_amd64_mpx_linux): Declare new function.
2670 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2671 (x86_64_regmap): Add MPX registers.
2672 (x86_linux_read_description): Add MPX case.
2673 (initialize_low_arch): Initialize MPX targets.
2674
0080a2f6
TT
26752013-11-18 Tom Tromey <tromey@redhat.com>
2676
2677 * configure: Rebuild.
2678 * configure.ac: Don't check for stdlib.h.
2679 * gdbreplay.c: Unconditionally include stdlib.h.
2680
2978b111
TT
26812013-11-18 Tom Tromey <tromey@redhat.com>
2682
2683 * config.in: Rebuild.
2684 * configure: Rebuild.
2685 * configure.ac: Don't use AC_HEADER_DIRENT.
2686
a3d08894
TT
26872013-11-18 Tom Tromey <tromey@redhat.com>
2688
2689 * server.h: Don't check HAVE_STRING_H.
2690 * gdbreplay.c: Don't check HAVE_STRING_H.
2691 * configure: Rebuild.
2692
0a5dd17d
TT
26932013-11-18 Tom Tromey <tromey@redhat.com>
2694
2695 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2696 LIBGNU.
2697
1bd2f0ba
TT
26982013-11-08 Tom Tromey <tromey@redhat.com>
2699
2700 * configure, config.in: Rebuild.
2701 * configure.ac: Remove unused configury.
2702
3266f10b
TT
27032013-11-08 Tom Tromey <tromey@redhat.com>
2704
2705 * acinclude.m4: Include common.m4, codeset.m4.
2706 * configure, config.in: Rebuild.
2707 * configure.ac: Use GDB_AC_COMMON.
2708
6682d959
AA
27092013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2710
2711 * linux-s390-low.c (HWCAP_S390_TE): New define.
2712 (s390_arch_setup): Consider the TE field in the HWCAP for
2713 determining 'have_regset_tdb'.
2714
fd0a4d76
SDJ
27152013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2716
2717 PR gdb/16014
2718 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2719 call to sizeof.
2720
1a3d890b
PA
27212013-10-02 Pedro Alves <palves@redhat.com>
2722
2723 * server.c (process_serial_event): Don't output "GDBserver
2724 exiting" if GDB is connected through stdio.
2725 * target.c (mywait): Likewise, be silent if GDB is connected
2726 through stdio.
2727
97ad4581
JB
27282013-10-01 Joel Brobecker <brobecker@adacore.com>
2729
2730 * lynx-low.c (lynx_add_threads_after_attach): New function.
2731 (lynx_attach): Remove call to add_thread. Add call to
2732 lynx_add_threads_after_attach instead.
2733
5b4e221c
MF
27342013-09-28 Mike Frysinger <vapier@gentoo.org>
2735
2736 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2737 * config.in, configure: Regenerated.
2738
ee47b2f8
YQ
27392013-09-18 Yao Qi <yao@codesourcery.com>
2740
2741 PR server/15959
2742 * server.c (start_inferior): Clear 'resume_info'.
2743
d6707650 27442013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2745
d6707650
JW
2746 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2747 for each register.
2748
9243dd0e 27492013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2750
9243dd0e
JW
2751 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2752 linux-tile-low.o to srv_tgtobj.
2753
c623a6ef
WN
27542013-09-16 Will Newton <will.newton@linaro.org>
2755
2756 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2757 out regs.
2758
fb71d39e
PA
27592013-09-06 Pedro Alves <palves@redhat.com>
2760
2761 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2762 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2763 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2764 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2765 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2766 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2767
8e7e9910
PA
27682013-09-06 Pedro Alves <palves@redhat.com>
2769
2770 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2771 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2772
7c3a12ca
PA
27732013-09-06 Pedro Alves <palves@redhat.com>
2774
2775 * linux-amd64-ipa.c: Include tracepoint.h.
2776 * linux-i386-ipa.c: Include tracepoint.h.
2777
8eb3d7b6
RW
27782013-09-06 Ricard Wanderlof <ricardw@axis.com>
2779
2780 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2781 (ps_get_thread_area): New function.
2782
eddddb9d
RW
27832013-09-06 Ricard Wanderlof <ricardw@axis.com>
2784
2785 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2786 (initialize_low_arch): Call init_registers_crisv32 rather than
2787 init_register_crisv32.
2788
533b0600
PA
27892013-09-05 Pedro Alves <palves@redhat.com>
2790
2791 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2792 to ...
2793 * hostio.h: ... this new file.
2794 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2795 win32-low.c: Include hostio.h.
2796
0ce3d3b5
PA
27972013-09-05 Pedro Alves <palves@redhat.com>
2798
2799 * server.h (gdb_client_data, handler_func, callback_handler_func)
2800 (delete_file_handler, add_file_handler, append_callback_event)
2801 (delete_callback_event, start_event_loop, initialize_event_loop):
2802 Move to event-loop.h and include it.
2803 * event-loop.h: New file.
2804
799cdc37
PA
28052013-09-05 Pedro Alves <palves@redhat.com>
2806
2807 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2808 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2809 (loaded_dll, unloaded_dll): Move to ...
2810 * dll.h: ... this new file.
2811 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2812
6a6bbd9d
PA
28132013-09-05 Pedro Alves <palves@redhat.com>
2814
2815 * server.h (current_process, get_thread_process, all_processes)
2816 (add_inferior_to_list, for_each_inferior, current_inferior)
2817 (remove_inferior, add_process, remove_process, find_process_pid)
2818 (have_started_inferiors_p, have_attached_inferiors_p)
2819 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2820 (clear_inferiors, find_inferior, find_inferior_id)
2821 (inferior_target_data, set_inferior_target_data)
2822 (inferior_regcache_data, set_inferior_regcache_data): Move to
2823 inferiors.h, and include it.
2824 * inferiors.h: New file.
2825
f699aaba
PA
28262013-09-05 Pedro Alves <palves@redhat.com>
2827
2828 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2829 Move ...
2830 * ax.h: ... here.
2831
c144c7a0
PA
28322013-09-05 Pedro Alves <palves@redhat.com>
2833
2834 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2835 tracepoint.h.
2836 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2837 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2838 (handle_tracepoint_general_set, handle_tracepoint_query)
2839 (tracepoint_finished_step, tracepoint_was_hit)
2840 (release_while_stepping_state_list, current_traceframe)
2841 (in_readonly_region, traceframe_read_mem)
2842 (fetch_traceframe_registers, traceframe_read_sdata)
2843 (traceframe_read_info, struct fast_tpoint_collect_status)
2844 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2845 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2846 (supply_fast_tracepoint_registers)
2847 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2848 (ipa_tdesc, claim_trampoline_space)
2849 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2850 (agent_mem_read, agent_get_trace_state_variable_value)
2851 (agent_set_trace_state_variable_value, agent_tsv_read)
2852 (agent_mem_read_string, get_raw_reg_func_addr)
2853 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2854 * tracepoint.h: ... this new file.
2855
ff42e6ab
PA
28562013-09-05 Pedro Alves <palves@redhat.com>
2857
2858 * server.h (perror_with_name, error, fatal, warning, paddress)
2859 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2860 include it.
2861 * utils.h: New file.
2862
541af0f4
PA
28632013-09-05 Pedro Alves <palves@redhat.com>
2864
2865 * server.h (remote_debug, noack_mode, transport_is_reliable)
2866 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2867 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2868 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2869 (write_enn, initialize_async_io, enable_async_io)
2870 (disable_async_io, check_remote_input_interrupt_request)
2871 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2872 (dead_thread_notify, prepare_resume_reply)
2873 (decode_address_to_semicolon, decode_address, decode_m_packet)
2874 (decode_M_packet, decode_X_packet, decode_xfer_write)
2875 (decode_search_memory_packet, unhexify, hexify)
2876 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2877 (look_up_one_symbol, relocate_instruction)
2878 (monitor_output): Move to remote-utils.h, and include it.
2879 * remote-utils.h: New file.
2880
eebdf26b
PA
28812013-09-05 Pedro Alves <palves@redhat.com>
2882
2883 * server.h (_): Delete.
2884
3aafd2ff
PA
28852013-09-02 Pedro Alves <palves@redhat.com>
2886
2887 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2888 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2889 allocated.
2890 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2891
cee83bcb
PM
28922013-09-02 Pierre Muller <muller@sourceware.org>
2893
2894 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2895 or WriteProcessMemory complete successfully and handle
2896 ERROR_PARTIAL_COPY error.
2897
9a13b2fa
PA
28982013-09-02 Pedro Alves <palves@redhat.com>
2899
2900 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2901 error instead of EIO.
2902
602e3198
JK
29032013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2904
2905 PR server/15604
2906 * linux-low.c: Include filestuff.h.
2907 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2908 * lynx-low.c: Include filestuff.h.
2909 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2910 * server.c: Include filestuff.h.
2911 (main): Call notice_open_fds.
2912 * spu-low.c: Include filestuff.h.
2913 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2914
96d7229d
LM
29152013-08-22 Luis Machado <lgustavo@codesourcery.com>
2916
2917 * Makefile.in: Explain why ../target and ../nat are not
2918 listed as include file search paths.
2919 (linux-waitpid.o): New object file rule.
2920 * configure.srv (srv_native_linux_obj): New variable.
2921 Replace all occurrences of linux native object files with
2922 $srv_native_linux_obj.
2923 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2924 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2925 (linux_enable_event_reporting): Remove declaration.
2926 (my_waitpid): Moved to common/linux-waitpid.c.
2927 (linux_wait_for_event): Pass ptid when calling
2928 linux_enable_event_reporting.
2929 (linux_supports_tracefork_flag): Remove.
2930 (linux_enable_event_reporting): Likewise.
2931 (linux_tracefork_grandchild): Remove.
2932 (STACK_SIZE): Moved to common/linux-ptrace.c.
2933 (linux_tracefork_child): Remove.
2934 (linux_test_for_tracefork): Remove.
2935 (linux_look_up_symbols): Call linux_supports_traceclone.
2936 (initialize_low): Remove call to linux_test_for_tracefork.
2937 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2938 common/linux-ptrace.h.
2939 (PTRACE_TYPE_ARG4): Likewise.
2940 Include linux-ptrace.h.
2941
32940073
PA
29422013-08-21 Pedro Alves <palves@redhat.com>
2943
2944 * config.in: Renegerate.
2945
33b60d58 29462013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2947
33b60d58
LM
2948 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2949 (SFILES): Remove $(srcdir)/common/target-common.c and
2950 add $(srcdir)/target/waitstatus.c.
2951 (OBS): Remove target-common.o and add waitstatus.o.
2952 (server_h): Remove $(srcdir)/../common/target-common.h and
2953 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2954 and $(srcdir)/../target/waitstatus.h.
2955 (target-common.o): Remove.
2956 (waitstatus.o): New target object file.
2957 * target.h: Do not include target-common.h and
2958 include target/resume.h, target/wait.h and
2959 target/waitstatus.h.
2960
b8e1b30e
LM
29612013-08-13 Luis Machado <lgustavo@codesourcery.com>
2962
2963 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2964 to PTRACE_TYPE_ARG3.
2965 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2966 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2967 PTRACE_TYPE_ARG4.
2968 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2969 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2970
7a60ad40
YQ
29712013-07-27 Jie Zhang <jie@codesourcery.com>
2972 Daniel Jacobowitz <dan@codesourcery.com>
2973 Yao Qi <yao@codesourcery.com>
2974
2975 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2976 (mips-linux-watch.o): New rule.
2977 (mips_linux_watch_h): New variable.
2978 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2979 srv_tgtobj.
2980 * linux-mips-low.c: Include mips-linux-watch.h.
2981 (struct arch_process_info, struct arch_lwp_info): New.
2982 (update_watch_registers_callback): New function.
2983 (mips_linux_new_process, mips_linux_new_thread) New functions.
2984 (mips_linux_prepare_to_resume, mips_insert_point): New
2985 functions.
2986 (mips_remove_point, mips_stopped_by_watchpoint): New
2987 functions.
2988 (rsp_bp_type_to_target_hw_bp_type): New function.
2989 (mips_stopped_data_address): New function.
2990 (the_low_target): Add watchpoint support functions.
2991
de6f69ad
YQ
29922013-07-27 Yao Qi <yao@codesourcery.com>
2993
2994 * i386-low.c: Include break-common.h.
2995 (enum target_hw_bp_type): Remove.
2996
3360c0bf
LM
29972013-07-24 Luis Machado <lgustavo@codesourcery.com>
2998
2999 * Makefile.in (SFILES): /common/target-common.c.
3000 (OBS): Add target-common.o.
3001 (server_h): Add $(srcdir)/../common/target-common.h.
3002 (target-common.o): New target.
3003 * server.c (queue_stop_reply_callback): Free
3004 status string after use.
3005 * target.c (target_waitstatus_to_string): Remove.
3006 * target.h: Include target-common.h.
3007 (resume_kind): Likewise.
3008 (target_waitkind): Likewise.
3009 (target_waitstatus): Likewise.
3010 (TARGET_WNOHANG): Likewise.
3011
bd885420
YQ
30122013-07-04 Yao Qi <yao@codesourcery.com>
3013
3014 * Makefile.in (host_alias): Use @host_noncanonical@.
3015 (target_alias): Use @target_noncanonical@.
3016 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3017 ACX_NONCANONICAL_HOST.
3018 * configure: Regenerated.
3019
3020 Revert:
3021 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3022
3023 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3024 * configure: Rebuild.
3025 * Makefile.in (version_host, version_target): Get from configure.
3026 (version.c): Use $(version_host) and $(version_target).
3027
17ef446e
PA
30282013-07-03 Pedro Alves <palves@redhat.com>
3029
3030 * Makefile.in (config.status): Depend on development.sh.
3031 * acinclude.m4: Include libmcheck.m4.
3032 * configure: Regenerate.
3033
7a9a7487
MG
30342013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3035
3036 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3037 attribute inside the parentheses.
3038 (winapi_DebugSetProcessKillOnExit): Ditto.
3039 (winapi_DebugBreakProcess): Ditto.
3040 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 3041
49b64de6
MG
30422013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3043
3044 * notif.h (notif_event): Add a dummy member to avoid compiler
3045 errors.
3046
d5749ee7
PA
30472013-07-01 Pedro Alves <palves@redhat.com>
3048
3049 * hostio.c (HOSTIO_PATH_MAX): Define.
3050 (require_filename, handle_open, handle_unlink, handle_readlink):
3051 Use it.
3052
d8d2a3ee
PA
30532013-07-01 Pedro Alves <palves@redhat.com>
3054
3055 * server.h: Include "pathmax.h".
3056 * linux-low.c: Don't include sys/param.h.
3057 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3058 MAXPATHLEN.
3059 * win32-low.c: Don't include sys/param.h.
3060 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3061
bc7dea8d
PA
30622013-07-01 Pedro Alves <palves@redhat.com>
3063
3064 * event-loop.c: Don't check HAVE_UNISTD_H before including
3065 <unistd.h>.
3066 * gdbreplay.c: Likewise.
3067 * remote-utils.c: Likewise.
3068 * server.c: Likewise.
3069 * configure.ac: Don't check for unistd.h.
3070 * configure: Regenerate.
3071
d6c2da54
TT
30722013-06-28 Tom Tromey <tromey@redhat.com>
3073
3074 * Makefile.in (version.c): Use version.in, not
3075 common/version.in.
3076
257b6bec
MG
30772013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3078
3079 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3080 * configure: Rebuild.
3081 * Makefile.in (version_host, version_target): Get from configure.
3082 (version.c): Use $(version_host) and $(version_target).
3083
86ebe149
DK
30842013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3085
3086 Fix trace-status to output user name without trailing colon.
3087 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3088
f30aa5af
DK
30892013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3090
3091 Fix trace-status to output proper start-time and stop-time.
3092 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3093 output start time and stop time in hex as gdb expects.
3094
28a93511
YQ
30952013-06-26 Pedro Alves <pedro@codesourcery.com>
3096
3097 * tracepoint.c (build_traceframe_info_xml): Output trace state
3098 variables present in the trace buffer.
3099
01208463
TT
31002013-06-24 Tom Tromey <tromey@redhat.com>
3101
3102 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3103 create-version.sh.
3104 (version.o): Remove.
3105 * gdbreplay.c: Include version.h.
3106 (version, host_name): Don't declare.
3107 * server.h: Include version.h.
3108 (version, host_name): Don't declare.
3109
760256f9
PA
31102013-06-12 Pedro Alves <palves@redhat.com>
3111
3112 * linux-x86-low.c (linux_is_elf64): Delete global.
3113 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3114 with local linux_pid_exe_is_elf_64_file use.
3115
030031ee
PA
31162013-06-11 Pedro Alves <palves@redhat.com>
3117
3118 * linux-low.c (regset_disabled, disable_regset): New functions.
3119 (regsets_fetch_inferior_registers)
3120 (regsets_store_inferior_registers): Use them.
3121 (initialize_regsets_info); Don't allocate the disabled_regsets
3122 array here.
3123 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3124 comment.
3125
5da6eb0a
PA
31262013-06-11 Pedro Alves <palves@redhat.com>
3127
3128 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3129 xmalloc.
3130
7e5aaa09
PA
31312013-06-11 Pedro Alves <palves@redhat.com>
3132
3133 * linux-x86-low.c (initialize_low_arch): Call
3134 init_registers_x32_avx_linux.
3135
d878444c
JK
31362013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3137
3138 Fix compatibility with Android Bionic.
3139 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3140 it is not empty.
3141
3aee8918
PA
31422013-06-07 Pedro Alves <palves@redhat.com>
3143
5f2b57b5 3144 PR server/14823
3aee8918
PA
3145 * Makefile.in (OBS): Add tdesc.o.
3146 (IPA_OBJS): Add tdesc-ipa.o.
3147 (tdesc-ipa.o): New rule.
3148 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3149 interface.
3150 * linux-low.c (new_inferior): Delete.
3151 (disabled_regsets, num_regsets): Delete.
3152 (linux_add_process): Adjust to set the new per-process
3153 new_inferior flag.
3154 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3155 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3156 was a stop. When calling arch_setup, switch the current inferior
3157 to the thread that got an event.
3158 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3159 (regsets_fetch_inferior_registers)
3160 (regsets_store_inferior_registers): New regsets_info parameter.
3161 Adjust to use it.
3162 (linux_register_in_regsets): New regs_info parameter. Adjust to
3163 use it.
3164 (register_addr, fetch_register, store_register): New usrregs_info
3165 parameter. Adjust to use it.
3166 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3167 parameter regs_info. Adjust to use it.
3168 (linux_fetch_registers): Get the current inferior's regs_info, and
3169 adjust to use it.
3170 (linux_store_registers): Ditto.
3171 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3172 (initialize_low): Don't initialize the target_regsets here. Call
3173 initialize_low_arch.
3174 * linux-low.h (target_regsets): Delete declaration.
3175 (struct regsets_info): New.
3176 (struct usrregs_info): New.
3177 (struct regs_info): New.
3178 (struct process_info_private) <new_inferior>: New field.
3179 (struct linux_target_ops): Delete the num_regs, regmap, and
3180 regset_bitmap fields. New field regs_info.
3181 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3182 * i387-fp.c (num_xmm_registers): Delete.
3183 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3184 calls to new interface.
3185 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3186 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3187 Infer the number of xmm registers from the regcache's target
3188 description.
3189 * i387-fp.h (num_xmm_registers): Delete.
3190 * inferiors.c (add_thread): Don't install the thread's regcache
3191 here.
3192 * proc-service.c (gregset_info): Fetch the current inferior's
3193 regs_info. Adjust to use it.
3194 * regcache.c: Include tdesc.h.
3195 (register_bytes, reg_defs, num_registers)
3196 (gdbserver_expedite_regs): Delete.
3197 (get_thread_regcache): If the thread doesn't have a regcache yet,
3198 create one, instead of aborting gdbserver.
3199 (regcache_invalidate_one): Rename to ...
3200 (regcache_invalidate_thread): ... this.
3201 (regcache_invalidate_one): New.
3202 (regcache_invalidate): Only invalidate registers of the current
3203 process.
3204 (init_register_cache): Add target_desc parameter, and use it.
3205 (new_register_cache): Ditto. Assert the target description has a
3206 non zero registers_size.
3207 (regcache_cpy): Add assertions. Adjust.
3208 (realloc_register_cache, set_register_cache): Delete.
3209 (registers_to_string, registers_from_string): Adjust.
3210 (find_register_by_name, find_regno, find_register_by_number)
3211 (register_cache_size): Add target_desc parameter, and use it.
3212 (free_register_cache_thread, free_register_cache_thread_one)
3213 (regcache_release, register_cache_size): New.
3214 (register_size): Add target_desc parameter, and use it.
3215 (register_data, supply_register, supply_register_zeroed)
3216 (supply_regblock, supply_register_by_name, collect_register)
3217 (collect_register_as_string, collect_register_by_name): Adjust.
3218 * regcache.h (struct target_desc): Forward declare.
3219 (struct regcache) <tdesc>: New field.
3220 (init_register_cache, new_register_cache): Add target_desc
3221 parameter.
3222 (regcache_invalidate_thread): Declare.
3223 (regcache_invalidate_one): Delete declaration.
3224 (regcache_release): Declare.
3225 (find_register_by_number, register_cache_size, register_size)
3226 (find_regno): Add target_desc parameter.
3227 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3228 declarations.
3229 * remote-utils.c: Include tdesc.h.
3230 (outreg, prepare_resume_reply): Adjust.
3231 * server.c: Include tdesc.h.
3232 (gdbserver_xmltarget): Delete declaration.
3233 (get_features_xml, process_serial_event): Adjust.
3234 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3235 declare.
3236 (struct process_info) <tdesc>: New field.
3237 (ipa_tdesc): Declare.
3238 * tdesc.c: New file.
3239 * tdesc.h: New file.
3240 * tracepoint.c: Include tdesc.h.
3241 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3242 (get_context_regcache): Adjust to pass ipa_tdesc down.
3243 (do_action_at_tracepoint): Adjust to get the register cache size
3244 from the context regcache's description.
3245 (traceframe_walk_blocks): Adjust to get the register cache size
3246 from the current trace frame's description.
3247 (traceframe_get_pc): Adjust to get current trace frame's
3248 description and pass it down.
3249 (gdb_collect): Adjust to get the register cache size from the
3250 IPA's description.
3251 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3252 (gdbserver_xmltarget): Delete.
3253 (initialize_low_tracepoint): Set the ipa's target description.
3254 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3255 (initialize_low_tracepoint): Set the ipa's target description.
3256 * linux-x86-low.c: Include tdesc.h.
3257 [__x86_64__] (is_64bit_tdesc): New.
3258 (ps_get_thread_area, x86_get_thread_area): Use it.
3259 (i386_cannot_store_register): Rename to ...
3260 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3261 (i386_cannot_fetch_register): Rename to ...
3262 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3263 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3264 to new interface.
3265 (target_regsets): Rename to ...
3266 (x86_regsets): ... this.
3267 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3268 interface.
3269 (x86_siginfo_fixup): Use is_64bit_tdesc.
3270 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3271 (tdesc_x32_avx_linux, tdesc_x32_linux)
3272 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3273 Declare.
3274 (x86_linux_update_xmltarget): Delete.
3275 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3276 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3277 (AMD64_LINUX_USER64_CS): New.
3278 (x86_linux_read_description): New, based on
3279 x86_linux_update_xmltarget.
3280 (same_process_callback): New.
3281 (x86_arch_setup_process_callback): New.
3282 (x86_linux_update_xmltarget): New.
3283 (x86_regsets_info): New.
3284 (amd64_linux_regs_info): New.
3285 (i386_linux_usrregs_info): New.
3286 (i386_linux_regs_info): New.
3287 (x86_linux_regs_info): New.
3288 (x86_arch_setup): Reimplement.
3289 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3290 (x86_emit_ops): Ditto.
3291 (the_low_target): Adjust. Install x86_linux_regs_info,
3292 x86_cannot_fetch_register, and x86_cannot_store_register.
3293 (initialize_low_arch): New.
3294 * linux-ia64-low.c (tdesc_ia64): Declare.
3295 (ia64_fetch_register): Adjust.
3296 (ia64_usrregs_info, regs_info): New globals.
3297 (ia64_regs_info): New function.
3298 (the_low_target): Adjust.
3299 (initialize_low_arch): New function.
3300 * linux-sparc-low.c (tdesc_sparc64): Declare.
3301 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3302 Adjust.
3303 (sparc_arch_setup): New function.
3304 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3305 (the_low_target): Adjust.
3306 (initialize_low_arch): New function.
3307 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3308 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3309 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3310 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3311 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3312 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3313 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3314 (tdesc_powerpc_isa205_vsx64l): Declare.
3315 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3316 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3317 (ppc_set_pc, ppc_get_hwcap): Adjust.
3318 (ppc_usrregs_info): Forward declare.
3319 (!__powerpc64__) ppc_regmap_adjusted: New global.
3320 (ppc_arch_setup): Adjust to the current process'es target
3321 description.
3322 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3323 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3324 (ppc_store_evrregset): Adjust.
3325 (target_regsets): Rename to ...
3326 (ppc_regsets): ... this, and make static.
3327 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3328 (ppc_regs_info): New function.
3329 (the_low_target): Adjust.
3330 (initialize_low_arch): New function.
3331 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3332 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3333 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3334 (tdesc_s390x_linux64v2): Declare.
3335 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3336 (s390_fill_gregset, s390_store_last_break): Adjust.
3337 (target_regsets): Rename to ...
3338 (s390_regsets): ... this, and make static.
3339 (s390_get_pc, s390_set_pc): Adjust.
3340 (s390_get_hwcap): New target_desc parameter, and use it.
3341 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3342 (s390_arch_setup): Adjust to set the current process'es target
3343 description. Don't adjust the regmap.
3344 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3345 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3346 (regs_info_3264): New globals.
3347 (s390_regs_info): New function.
3348 (the_low_target): Adjust.
3349 (initialize_low_arch): New function.
3350 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3351 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3352 [__mips64] (init_registers_mips_linux)
3353 (init_registers_mips_dsp_linux): Delete defines.
3354 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3355 (have_dsp): New global.
3356 (mips_read_description): New, based on mips_arch_setup.
3357 (mips_arch_setup): Reimplement.
3358 (get_usrregs_info): New function.
3359 (mips_cannot_fetch_register, mips_cannot_store_register)
3360 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3361 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3362 (target_regsets): Rename to ...
3363 (mips_regsets): ... this, and make static.
3364 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3365 (dsp_regs_info, regs_info): New globals.
3366 (mips_regs_info): New function.
3367 (the_low_target): Adjust.
3368 (initialize_low_arch): New function.
3369 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3370 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3371 Declare.
3372 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3373 (arm_read_description): New, with bits factored from
3374 arm_arch_setup.
3375 (arm_arch_setup): Reimplement.
3376 (target_regsets): Rename to ...
3377 (arm_regsets): ... this, and make static.
3378 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3379 (arm_regs_info): New function.
3380 (the_low_target): Adjust.
3381 (initialize_low_arch): New function.
3382 * linux-m68k-low.c (tdesc_m68k): Declare.
3383 (target_regsets): Rename to ...
3384 (m68k_regsets): ... this, and make static.
3385 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3386 (m68k_regs_info): New function.
3387 (m68k_arch_setup): New function.
3388 (the_low_target): Adjust.
3389 (initialize_low_arch): New function.
3390 * linux-sh-low.c (tdesc_sharch): Declare.
3391 (target_regsets): Rename to ...
3392 (sh_regsets): ... this, and make static.
3393 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3394 (sh_regs_info, sh_arch_setup): New functions.
3395 (the_low_target): Adjust.
3396 (initialize_low_arch): New function.
3397 * linux-bfin-low.c (tdesc_bfin): Declare.
3398 (bfin_arch_setup): New function.
3399 (bfin_usrregs_info, regs_info): New globals.
3400 (bfin_regs_info): New function.
3401 (the_low_target): Adjust.
3402 (initialize_low_arch): New function.
3403 * linux-cris-low.c (tdesc_cris): Declare.
3404 (cris_arch_setup): New function.
3405 (cris_usrregs_info, regs_info): New globals.
3406 (cris_regs_info): New function.
3407 (the_low_target): Adjust.
3408 (initialize_low_arch): New function.
3409 * linux-cris-low.c (tdesc_crisv32): Declare.
3410 (cris_arch_setup): New function.
3411 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3412 (cris_regs_info): New function.
3413 (the_low_target): Adjust.
3414 (initialize_low_arch): New function.
3415 * linux-m32r-low.c (tdesc_m32r): Declare.
3416 (m32r_arch_setup): New function.
3417 (m32r_usrregs_info, regs_info): New globals.
3418 (m32r_regs_info): Adjust.
3419 (initialize_low_arch): New function.
3420 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3421 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3422 (tic6x_usrregs_info): Forward declare.
3423 (tic6x_read_description): New function, based on ...
3424 (tic6x_arch_setup): ... this. Reimplement.
3425 (target_regsets): Rename to ...
3426 (tic6x_regsets): ... this, and make static.
3427 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3428 (tic6x_regs_info): New function.
3429 (the_low_target): Adjust.
3430 (initialize_low_arch): New function.
3431 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3432 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3433 (target_regsets): Rename to ...
3434 (xtensa_regsets): ... this, and make static.
3435 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3436 globals.
3437 (xtensa_arch_setup, xtensa_regs_info): New functions.
3438 (the_low_target): Adjust.
3439 (initialize_low_arch): New function.
3440 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3441 (nios2_arch_setup): Set the current process'es tdesc.
3442 (target_regsets): Rename to ...
3443 (nios2_regsets): ... this.
3444 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3445 (nios2_regs_info): New function.
3446 (the_low_target): Adjust.
3447 (initialize_low_arch): New function.
a261b8f5
PA
3448 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3449 (aarch64_arch_setup): Set the current process'es tdesc.
3450 (target_regsets): Rename to ...
3451 (aarch64_regsets): ... this.
3452 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3453 (aarch64_regs_info): New function.
3454 (the_low_target): Adjust.
3455 (initialize_low_arch): New function.
3aee8918
PA
3456 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3457 globals.
3458 (target_regsets): Rename to ...
3459 (tile_regsets): ... this.
3460 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3461 (tile_regs_info): New function.
3462 (tile_arch_setup): Set the current process'es tdesc.
3463 (the_low_target): Adjust.
3464 (initialize_low_arch): New function.
3465 * spu-low.c (tdesc_spu): Declare.
3466 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3467 * win32-arm-low.c (tdesc_arm): Declare.
3468 (arm_arch_setup): New function.
3469 (the_low_target): Install arm_arch_setup instead of
3470 init_registers_arm.
3471 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3472 (init_windows_x86): Rename to ...
3473 (i386_arch_setup): ... this. Set `win32_tdesc'.
3474 (the_low_target): Adjust.
3475 * win32-low.c (win32_tdesc): New global.
3476 (child_add_thread): Don't create the thread cache here.
3477 (do_initial_child_stuff): Set the new process'es tdesc.
3478 * win32-low.h (struct target_desc): Forward declare.
3479 (win32_tdesc): Declare.
3480 * lynx-i386-low.c (tdesc_i386): Declare global.
3481 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3482 * lynx-low.c (lynx_tdesc): New global.
3483 (lynx_add_process): Set the new process'es tdesc.
3484 * lynx-low.h (struct target_desc): Forward declare.
3485 (lynx_tdesc): Declare global.
3486 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3487 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3488 * nto-low.c (nto_tdesc): New global.
3489 (do_attach): Set the new process'es tdesc.
3490 * nto-low.h (struct target_desc): Forward declare.
3491 (nto_tdesc): Declare.
3492 * nto-x86-low.c (tdesc_i386): Declare.
3493 (nto_x86_arch_setup): Set `nto_tdesc'.
3494
b1fbec62
GB
34952013-06-04 Gary Benson <gbenson@redhat.com>
3496
3497 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3498 to qSupported response when appropriate.
3499 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3500 with nonzero-length annex.
3501 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3502 arguments supplied in annex.
3503
d1ec4ce7
DE
35042013-05-31 Doug Evans <dje@google.com>
3505
ac44adcb 3506 PR server/15594
d1ec4ce7
DE
3507 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3508 64 bits in 64-cross-32 environment.
3509
9b25f2d3
PA
35102013-05-28 Pedro Alves <palves@redhat.com>
3511
3512 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3513 (aarch64-without-fpu.c): Delete rule.
3514 * configure.srv (aarch64*-*-linux*): Remove references to
3515 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3516 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3517 declaration.
3518
6740dc9c
PA
35192013-05-24 Pedro Alves <palves@redhat.com>
3520
3521 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3522 instead of strchr/decode_address. Error if the range isn't split
3523 with a ','. Don't assume there's be a ':' in the action.
3524
c2d6af84
PA
35252013-05-23 Yao Qi <yao@codesourcery.com>
3526 Pedro Alves <palves@redhat.com>
3527
3528 * linux-low.c (lwp_in_step_range): New function.
3529 (linux_wait_1): If the thread was range stepping and stopped
3530 outside the stepping range, report the stop to GDB. Otherwise,
3531 continue stepping. Add range stepping debug output.
3532 (linux_set_resume_request): Copy the step range from the resume
3533 request to the lwp.
3534 (linux_supports_range_stepping): New.
3535 (linux_target_ops) <supports_range_stepping>: Set to
3536 linux_supports_range_stepping.
3537 * linux-low.h (struct linux_target_ops)
3538 <supports_range_stepping>: New field.
3539 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3540 * linux-x86-low.c (x86_supports_range_stepping): New.
3541 (the_low_target) <supports_range_stepping>: Set to
3542 x86_supports_range_stepping.
3543 * server.c (handle_v_cont): Handle 'r' action.
3544 (handle_v_requests): Append ";r" if the target supports range
3545 stepping.
3546 * target.h (struct thread_resume) <step_range_start,
3547 step_range_end>: New fields.
3548 (struct target_ops) <supports_range_stepping>:
3549 New field.
3550 (target_supports_range_stepping): New macro.
3551
58794e1a
JB
35522013-05-17 Joel Brobecker <brobecker@adacore.com>
3553
3554 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3555 confusion in comment.
3556
d631c5a7
JB
35572013-05-17 Joel Brobecker <brobecker@adacore.com>
3558
3559 * lynx-low.c (struct process_info_private): New type.
3560 (lynx_add_process): New function.
3561 (lynx_create_inferior, lynx_attach): Replace calls to
3562 add_process by calls to lynx_add_process.
3563 (lynx_resume): If PTID is null, then try using
3564 current_process()->private->last_wait_event_ptid.
3565 Add comments.
3566 (lynx_clear_inferiors): Delete. The contents of that function
3567 has been inlined in lynx_mourn;
3568 (lynx_wait_1): Save the ptid in the process's private data.
3569 (lynx_mourn): Free the process' private data. Replace call
3570 to lynx_clear_inferiors by call to clear_inferiors.
3571
96f7a20f
YQ
35722013-05-17 Yao Qi <yao@codesourcery.com>
3573
3574 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3575 the right place.
3576
db0dfaa0
LM
35772013-05-16 Luis Machado <lgustavo@codesourcery.com>
3578
3579 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3580 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3581 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3582 PT_TEXT_END_ADDR guards. Update comments.
3583 (linux_target_op) <read_offsets>: Conditionally define to
3584 linux_read_offsets if the target is UCLIBC and if it defines
3585 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3586
68f5f838
SL
35872013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3588 Andrew Jenner <andrew@codesourcery.com>
3589
3590 * Makefile.in (SFILES): Add linux-nios2-low.c.
3591 (clean): Add action to delete nios2-linux.c.
3592 (nios2-linux.c): New rule.
3593 * configure.srv: Add nios2*-*-linux*.
3594 * linux-nios2-low.c: New.
3595
1ebff1fd
HAQ
35962013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3597
3598 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3599
f6150862
HZ
36002013-04-25 Hui Zhu <hui@codesourcery.com>
3601
3602 PR gdb/15186
f6150862
HZ
3603 * ax.c (ax_printf): Add fflush.
3604
614c279d
TT
36052013-04-22 Tom Tromey <tromey@redhat.com>
3606
3607 * Makefile.in (SFILES): Add filestuff.c.
3608 (OBS): Add filestuff.o.
3609 (filestuff.o): New target.
3610 * config.in, configure: Rebuild.
3611 * configure.ac: Check for fdwalk, pipe2.
3612
7d4e5717
PA
36132013-04-17 Pedro Alves <palves@redhat.com>
3614
3615 * configure.ac (USE_THREAD_DB): Delete variable.
3616 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3617 Don't AC_SUBST USE_THREAD_DB.
3618 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3619 * config.in, configure: Regenerate.
3620
d5c93e41
PA
36212013-04-16 Pedro Alves <palves@redhat.com>
3622
3623 * linux-low.h (struct lwp_info) <thread_known>: Move under
3624 the USE_THREAD_DB #ifdef.
3625
04f5fe89
PA
36262013-04-16 Pedro Alves <palves@redhat.com>
3627
3628 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3629 (linux-low.o): Delete rule.
3630 * linux-low.h: Always include "gdb_thread_db.h" instead of
3631 conditionally including thread_db.h.
3632 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3633 HAVE_THREAD_DB_H.
3634
480b27bf
JK
36352013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3636
3637 * Makefile.in (install-only): Fix make install regression.
3638
43662968
JK
36392013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3640
3641 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3642 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3643 installation.
3644 * gdbserver.1: Remove.
3645
3e74e146
PA
36462013-03-22 Pedro Alves <palves@redhat.com>
3647
3648 * linux-low.c (handle_extended_wait): Don't call
3649 linux_enable_event_reporting.
3650
a8347a2a
TT
36512013-03-15 Tony Theodore <tonyt@logyst.com>
3652
3653 PR build/9098:
3654 * Makefile.in (SHELL): Use @SHELL@.
3655
eeb56fa7
SDJ
36562013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3657
3658 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3659 compiler warning.
3660
4fa7e2ff
JB
36612013-03-13 Joel Brobecker <brobecker@adacore.com>
3662
3663 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3664 Remove extraneous NULL element.
3665
8ddb1965
YQ
36662013-03-13 Yao Qi <yao@codesourcery.com>
3667
3668 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3669 'V' block in trace frame.
3670
9accd112
MM
36712013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3672
3673 * target.h (struct target_ops): Add btrace ops.
3674 (target_supports_btrace): New macro.
3675 (target_enable_btrace): New macro.
3676 (target_disable_btrace): New macro.
3677 (target_read_btrace): New macro.
3678 * gdbthread.h (struct thread_info): Add btrace field.
3679 * server.c: Include btrace-common.h.
3680 (handle_btrace_general_set): New function.
3681 (handle_btrace_enable): New function.
3682 (handle_btrace_disable): New function.
3683 (handle_general_set): Call handle_btrace_general_set.
3684 (handle_qxfer_btrace): New function.
3685 (struct qxfer qxfer_packets[]): Add btrace entry.
3686 * inferiors.c (remove_thread): Disable btrace.
3687 * linux-low: Include linux-btrace.h.
3688 (linux_low_enable_btrace): New function.
3689 (linux_low_read_btrace): New function.
3690 (linux_target_ops): Add btrace ops.
3691 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3692 Add srv_linux_btrace=yes.
3693 (x86_64-*-linux*): Add linux-btrace.o.
3694 Add srv_linux_btrace=yes.
3695 * configure.ac: Define HAVE_LINUX_BTRACE.
3696 * config.in: Regenerated.
3697 * configure: Regenerated.
3698
5cc22e4c
MM
36992013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3700
3701 * server.c (handle_qxfer): Preserve error message if -3 is
3702 returned.
3703 (qxfer): Document the -3 return value.
3704
7c97f91e
MM
37052013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3706
3707 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3708 (linux_btrace_h): New variable.
3709 (linux-btrace.o): New rule.
3710
be9a119c 37112013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3712 Hafiz Abid Qadeer <abidh@codesourcery.com>
3713
3714 * tracepoint.c (trace_buffer_size): New global.
3715 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3716 (init_trace_buffer): Change to one-argument function. Allocate
3717 trace buffer memory.
3718 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3719 handle QTBuffer:size packet.
3720 (cmd_bigqtbuffer_size): New function.
3721 (initialize_tracepoint): Call init_trace_buffer with
3722 DEFAULT_TRACE_BUFFER_SIZE.
3723 * server.c (handle_query): Add QTBuffer:size in the
3724 supported packets.
3725
e64f7499
YQ
37262013-03-07 Yao Qi <yao@codesourcery.com>
3727
3728 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3729 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3730 of -1.
3731 (cmd_qtsp): Adjust condition. Do post increment.
3732 Set cur_action and cur_step_action back to 0.
3733
f0ae6fc3
PA
37342013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3735
3736 PR server/15236
3737 * linux-low.c (linux_write_memory): Return early success if LEN is
3738 zero.
3739
b5b0b0af
CV
37402013-03-05 Corinna Vinschen <vinschen@redhat.de>
3741
334ad4a8 3742 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3743
589bc927
TT
37442013-02-28 Tom Tromey <tromey@redhat.com>
3745
3746 * configure.ac: Invoke AC_SYS_LARGEFILE.
3747 * configure, config.in: Rebuild.
3748
dfe07582
CV
37492013-02-28 Corinna Vinschen <vinschen@redhat.com>
3750
3751 * win32-low.c: Throughout, fix format strings and casts of
3752 printf-like functions to avoid type related warnings on all
3753 platforms.
3754 (get_child_debug_event): Print dwDebugEventCode as hex since
3755 that's how it's usually documented.
3756
736cd585
YQ
37572013-02-28 Yao Qi <yao@codesourcery.com>
3758
3759 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3760 pulongest.
3761
e1f58301
JW
37622013-02-27 Jiong Wang <jiwang@tilera.com>
3763
3764 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3765 (reg-tilegx32.c): New rule.
3766 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3767 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3768 different register info initializer according to elf class.
3769 (init_registers_tilgx32): New function. The tilegx32 register info
3770 initializer.
3771 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3772 (tile_store_gregset): Likewise.
3773
d171ca78
YQ
37742013-02-27 Yao Qi <yao@codesourcery.com>
3775
3776 * server.c (process_point_options): Print debug message when
3777 debug_threads is true.
3778
282bbdf3
YQ
37792013-02-26 Yao Qi <yao@codesourcery.com>
3780
3781 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3782
aca22551
PA
37832013-02-19 Pedro Alves <palves@redhat.com>
3784 Kai Tietz <ktietz@redhat.com>
3785
3786 PR gdb/15161
3787
3788 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3789 instead of strtoul to extract address from packet.
3790 (process_serial_event) <'z'>: Likewise.
3791
4f3cee1c
YQ
37922013-02-18 Yao Qi <yao@codesourcery.com>
3793
3794 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3795
8e1d55a3
PA
37962013-02-14 Pedro Alves <palves@redhat.com>
3797
3798 Plug memory leak.
3799
3800 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3801 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3802
458820da
PA
38032013-02-14 Pedro Alves <palves@redhat.com>
3804
3805 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3806
baea0dae
PA
38072013-02-14 Pedro Alves <palves@redhat.com>
3808
3809 * tracepoint.c (save_string): Delete.
3810 (add_tracepoint_action): Use savestring instead of save_string.
3811
0b1afbb3
PA
38122013-02-12 Pedro Alves <palves@redhat.com>
3813
3814 * linux-xtensa-low.c: Ditto.
3815 * xtensa-xtregs.c: Ditto.
3816
8a4ac37e
PA
38172013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3818
3819 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3820 thread_db.
3821
148de6bb
MS
38222013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3823
3824 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3825 aarch64_num_wp_regs and aarch64_num_bp_regs to
3826 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3827
55fac6e0
MS
38282013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3829
3830 * linux-aarch64-low.c (ps_get_thread_area): Replace
3831 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3832
176eb98c
MS
38332013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3834 Marcus Shawcroft <marcus.shawcroft@arm.com>
3835 Nigel Stephens <nigel.stephens@arm.com>
3836 Yufeng Zhang <yufeng.zhang@arm.com>
3837
3838 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3839 (aarch64.c, aarch64-without-fpu.c): New targets.
3840 * configure.srv (aarch64*-*-linux*): New.
3841 * linux-aarch64-low.c: New file.
3842
56f7af9c
MS
38432013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3844
43aaf8b6 3845 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3846 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3847 (dequeue_one_deferred_signal, linux_resume_one_thread)
3848 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3849 (linux_tracefork_grandchild, linux_test_for_tracefork)
3850 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3851 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3852 where the argument is 0.
3853
60f662b0
YQ
38542013-01-25 Yao Qi <yao@codesourcery.com>
3855
3856 * event-loop.c: Include "queue.h".
3857 (gdb_event_p): New typedef.
3858 (struct gdb_event) <next_event>: Remove.
3859 (event_queue): Change to QUEUE(gdb_event_p).
3860 (async_queue_event): Remove.
3861 (gdb_event_xfree): New.
3862 (initialize_event_loop): New.
3863 (process_event): Use API from QUEUE.
3864 (wait_for_event): Likewise.
3865 * server.c (main): Call initialize_event_loop.
3866 * server.h (initialize_event_loop): Declare.
3867
5ae4861a
YQ
38682013-01-18 Yao Qi <yao@codesourcery.com>
3869
3870 * ax.h (struct eval_agent_expr_context): New.
3871 (gdb_eval_agent_expr): Update declaration.
3872 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3873 TFRAME. Add new argument CTX.
3874 * server.h (struct eval_agent_expr_context): Declare.
3875 (agent_mem_read, agent_tsv_read): Update declaration.
3876 (agent_mem_read_string): Likewise.
3877 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3878 (add_traceframe_block): Add new argument TPOINT.
3879 Increase TPOINT->traceframe_usage.
3880 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3881 eval_tracepoint_agent_expr.
3882 (condition_true_at_tracepoint): Likewise.
3883 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3884 (agent_mem_read_string, agent_tsv_read): Likewise.
3885
85e00e85
YQ
38862013-01-16 Yao Qi <yao@codesourcery.com>
3887
3888 * linux-low.c (linux_resume_one_lwp): Don't check
3889 'lwp->bp_reinsert != 0'.
3890
4039cf45
JB
38912013-01-07 Joel Brobecker <brobecker@adacore.com>
3892 Pedro Alves <palves@redhat.com>
3893
3894 * lynx-low.c (ptrace_request_to_str): Define a temporary
3895 macro and use it to simplify this function's implementation.
3896
9044dee2
JB
38972013-01-07 Joel Brobecker <brobecker@adacore.com>
3898
3899 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3900 sets errno.
3901
e6352c8f
JB
39022013-01-07 Joel Brobecker <brobecker@adacore.com>
3903
3904 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3905
50681a27
JB
39062013-01-07 Joel Brobecker <brobecker@adacore.com>
3907
3908 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3909
3f6e77ef
JB
39102013-01-07 Joel Brobecker <brobecker@adacore.com>
3911
3912 * lynx-low.c (lynx_resume): Use the resume_info parameter
3913 to determine the ptid for the lynx_ptrace call, unless
3914 it is equal to minus_one_ptid, in which case we use the
3915 ptid of the current_inferior.
3916 (lynx_wait_1): After having received a thread create/exit
3917 event, resume the inferior's execution using the signaling
3918 thread's ptid, rather than the old ptid.
3919
7fda33ae
JB
39202013-01-07 Joel Brobecker <brobecker@adacore.com>
3921
3922 * lynx-low.c (lynx_resume): Delete variable ret.
3923
b9786c74
JB
39242013-01-01 Joel Brobecker <brobecker@adacore.com>
3925
3926 * gdbreplay.c (gdbreplay_version): Update copyright year.
3927 * server.c (gdbserver_version): Likewise.
3928
8b93d60f
JB
39292012-12-17 Joel Brobecker <brobecker@adacore.com>
3930
3931 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3932 new thread.
3933
037335a7
JB
39342012-12-17 Joel Brobecker <brobecker@adacore.com>
3935
3936 * lynx-low.c (ptrace_request_to_str): Add handling for
3937 PTRACE_GETTRACESIG.
3938
52d4cbd8
JB
39392012-12-17 Joel Brobecker <brobecker@adacore.com>
3940
3941 * lynx-low.c (lynx_attach): Delete variable new_process.
3942
ab8f6ca9
JB
39432012-12-17 Joel Brobecker <brobecker@adacore.com>
3944
3945 * lynx-low.c (lynx_create_inferior): Delete variable
3946 new_process.
3947
78cbc024
JB
39482012-12-17 Joel Brobecker <brobecker@adacore.com>
3949
3950 * lynx-low.c (ptrace_request_to_str): Do not handle
3951 PTRACE_GETTHREADLIST if this macro does not exist.
3952
14a00470
YQ
39532012-12-15 Yao Qi <yao@codesourcery.com>
3954
3955 * Makefile.in (OBS): Add notif.o.
3956 * notif.c, notif.h: New.
3957 * server.c: Include "notif.h".
3958 (struct vstop_notif) <next>: Remove.
3959 <base>: New field.
3960 (queue_stop_reply): Update.
3961 (push_event, send_next_stop_reply): Remove.
3962 (discard_queued_stop_replies): Update.
3963 (notif_stop): New variable.
3964 (handle_v_stopped): Remove.
3965 (handle_v_requests): Don't call handle_v_stopped. Call
3966 handle_ack_notif instead.
3967 (queue_stop_reply_callback): Call notif_event_enque instead
3968 of queue_stop_reply.
3969 (handle_status): Don't call send_next_stop_reply, call
3970 notif_write_event instead.
3971 (kill_inferior_callback): Likewise.
3972 (detach_or_kill_inferior_callback): Likewise.
3973 (main): Call initialize_notif.
3974 (process_serial_event): Call QUEUE_is_empty.
3975 (handle_target_event): Call notif_push instead of push event.
3976 * server.h (push_event): Remove declaration.
3977
61c125b9
TT
39782012-12-10 Tom Tromey <tromey@redhat.com>
3979
3980 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3981 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3982 macros.
3983 (.c.o): Rewrite.
3984 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3985 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3986 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3987 (amd64-linux-ipa.o, ax.o): Rewrite.
3988 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3989 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3990 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3991 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3992 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3993 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3994 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3995 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3996 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3997 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3998 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3999 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4000 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4001 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4002 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4003 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4004 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4005 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4006 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4007 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4008 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4009 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4010 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4011 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4012 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4013 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4014 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4015 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4016 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4017 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4018 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4019 (reg-tilegx.o): Remove.
4020 (all_object_files): New macro.
4021 Include .deps files.
4022 * aclocal.m4, configure: Rebuild.
4023 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4024 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4025 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4026
e90e9ad9
TT
40272012-12-05 Tom Tromey <tromey@redhat.com>
4028
4029 PR gdb/14917:
4030 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4031
02d403bf 40322012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
4033
4034 * configure.ac: Check for linux/perf_event.h.
4035 * config.in: Regenerated.
4036 * configure: Regenerated.
4037
0270a750
PA
40382012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4039
4040 * hostio.c (handle_readlink): Decrease buffer size
4041 parameter passed to readlink by one byte.
4042
8c29b58e
YQ
40432012-11-26 Yao Qi <yao@codesourcery.com>
4044
4045 * configure.ac (build_warnings): Append '-Wempty-body'.
4046 * configure: Regenerated.
4047 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4048 body.
4049
8bdce1ff
PM
40502012-11-15 Pierre Muller <muller@sourceware.org>
4051
4052 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4053 * config.in: Regenerate.
4054 * configure: Regenerate.
4055 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4056 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4057 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4058 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4059 header.
4060 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4061 instead of <sys/wait.h> header.
4062 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4063
02d403bf 40642012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
4065
4066 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4067 (various make rules): Remove -DGDBSERVER
4068
fbd5db48
YQ
40692012-11-09 Yao Qi <yao@codesourcery.com>
4070
4071 * spu-low.c (current_ptid): Move it to ..
4072 * gdbthread.h: ... here. New.
4073 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4074 * server.c (myresume, process_serial_event): Likewise.
4075 * thread-db.c (thread_db_find_new_threads): Likewise.
4076 * tracepoint.c (run_inferior_command): Likewise.
4077
b3dc46ff
AB
40782012-10-01 Andrew Burgess <aburgess@broadcom.com>
4079
4080 * server.c (handle_search_memory_1): Include access length in
4081 warning message.
4082
07c04788
HPN
40832012-09-05 Michael Brandt <michael.brandt@axis.com>
4084
4085 * linux-crisv32-low.c: Fix compile errors.
4086
918d227b
YQ
40872012-09-04 Yao Qi <yao@codesourcery.com>
4088
4089 * tracepoint.c (cmd_qtsv): Adjust debug message.
4090 Don't check CUR_TPOINT.
4091
18c1b81a
YQ
40922012-08-28 Yao Qi <yao@codesourcery.com>
4093
4094 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4095 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4096 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4097 Remove declarations of xmalloc, xreallloc, xstrdup and
4098 freeargv.
4099 * Makefile.in (libiberty_h): New.
4100 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4101 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4102
dc82f37b
YQ
41032012-08-23 Yao Qi <yao@codesourcery.com>
4104
4105 * server.h: Remove declaration of 'xsnprintf'.
4106
406b1477
KS
41072012-08-22 Keith Seitz <keiths@redhat.com>
4108
4109 * server.h: Include build-gnulib-gbserver/config.h.
4110 * gdbreplay.c: Likewise.
4111
e6712ff1
DE
41122012-08-08 Doug Evans <dje@google.com>
4113
4114 * Makefile.in (SFILES): Add gdb_vecs.c.
4115 (OBS): Add gdb_vecs.o.
4116 (gdb_vecs_h, host_defs_h): New variables.
4117 (thread-db.o): Add $(gdb_vecs_h) dependency.
4118 (gdb_vecs.o): New rule.
4119 * thread-db.c: #include "gdb_vecs.h".
4120 (thread_db_load_search): Use a vector to iterate over path elements.
4121 Handle text appearing after "$pdir".
4122
4123 * configure.ac: Add check for strstr.
4124 * config.in: Regenerate.
4125 * configure: Regenerate.
4126
7c3270ae
UW
41272012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4128
4129 * hostio.c (handle_pread): If pread fails, fall back to attempting
4130 lseek/read.
4131 (handle_pwrite): Likewise for pwrite.
4132
b62e2b27
UW
41332012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4134
4135 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4136 between unsupported TYPE and unimplementable ADDR/LEN combination.
4137 (arm_insert_point): Act on new return value.
4138
78a99e91
PA
41392012-07-31 Pedro Alves <palves@redhat.com>
4140
4141 * server.c (process_point_options): Only skip tokens if we find
4142 one that is unrecognized. Don't treat 'X' specially while
4143 skipping unrecognized tokens.
4144
fcf303ab
UW
41452012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4146
4147 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4148 to 4-byte-align HW breakpoint addresses for Thumb.
4149
7255706c
YQ
41502012-07-27 Yao Qi <yao@codesourcery.com>
4151
4152 PR remote/14161.
4153
4154 * server.h: Declare gdb_agent_about_to_close.
4155 * target.c (kill_inferior): Include "agent.h".
4156 New. Send command 'kill'.
4157 * target.h (kill_inferior): Removed macro.
4158 * tracepoint.c (gdb_agent_about_to_close): New.
4159 (gdb_agent_helper_thread): Handle command 'close'.
4160 Wait endlessly until the inferior stops.
4161 Install gdb_agent_remove_socket to atexit hook.
4162 (agent_socket_name): New static variable.
4163 (gdb_agent_socket_init): Replace local variable 'name' with
4164 'agent_socket_name'.
4165 (gdb_agent_remove_socket): New.
4166
5a3f286f
YQ
41672012-07-27 Yao Qi <yao@codesourcery.com>
4168
4169 * server.c (process_point_options): Stop at 'X' when parsing.
4170
961bd387
ME
41712012-07-19 Michael Eager <eager@eagercon.com>
4172
a261b8f5 4173 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
4174 to hw_execute.
4175 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4176 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4177 hardware breakpoint.
4178
aa7c7447
JK
41792012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4180
4181 * gdbserver/linux-low.c (initialize_low): Call
4182 linux_ptrace_init_warnings.
4183
7f216e7c
DE
41842012-07-02 Doug Evans <dje@google.com>
4185
4186 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4187 pointer to int.
4188
d3ce09f5
SS
41892012-07-02 Stan Shebs <stan@codesourcery.com>
4190
4191 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4192 (ax.o): Add it to build rule.
4193 (ax-ipa.o): Ditto.
4194 (OBS): Add format.o.
4195 (IPA_OBS): Add format.o.
4196 * server.c (handle_query): Claim support for breakpoint commands.
4197 (process_point_options): Add command case.
4198 (process_serial_event): Leave running if there are printfs in
4199 effect.
4200 * mem-break.h (any_persistent_commands): Declare.
4201 (add_breakpoint_commands): Declare.
4202 (gdb_no_commands_at_breakpoint): Declare.
4203 (run_breakpoint_commands): Declare.
4204 * mem-break.c (struct point_command_list): New struct.
4205 (struct breakpoint): New field command_list.
4206 (any_persistent_commands): New function.
4207 (add_commands_to_breakpoint): New function.
4208 (add_breakpoint_commands): New function.
4209 (gdb_no_commands_at_breakpoint): New function.
4210 (run_breakpoint_commands): New function.
4211 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4212 locally.
4213 * ax.c: Include format.h.
4214 (ax_printf): New function.
4215 (gdb_eval_agent_expr): Add printf opcode.
4216
2f8f6aed
YQ
42172012-06-13 Yao Qi <yao@codesourcery.com>
4218
4219 * server.c (start_inferior): Remove duplicated writes to fields
4220 'last_resume_kind' and 'last_status' of 'current_inferior'.
4221
0c9070b3
YQ
42222012-06-12 Yao Qi <yao@codesourcery.com>
4223 Pedro Alves <palves@redhat.com>
4224
4225 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4226 comment.
4227 * server.c (handle_v_cont): Extend comment.
4228
c52daf70
YQ
42292012-06-11 Yao Qi <yao@codesourcery.com>
4230
4231 * linux-low.c (linux_attach): Add 'static'.
4232
d38bbb0a
YQ
42332012-06-06 Yao Qi <yao@codesourcery.com>
4234
4235 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4236
89dc0afd
JK
42372012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4238
4239 Fix gcc -flto compilation warning.
4240 * server.c (main): Make variable multi_mode and attach volatile.
4241
75f62ce7
TJB
42422012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4243
4244 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4245 if the platform doesn't know about it.
4246
65f479b6
PA
42472012-05-30 Jeff Kenton <jkenton@tilera.com>
4248
4249 * Makefile.in (SFILES): Add linux-tile-low.c.
4250 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4251 * configure.srv: Handle tilegx-*-linux*.
4252 * linux-tile-low.c: New file.
4253
0c5bf5a9
JK
42542012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4255
4256 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4257
a493e3e2
PA
42582012-05-24 Pedro Alves <palves@redhat.com>
4259
4260 PR gdb/7205
4261
43aaf8b6 4262 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4263
2ea28649
PA
42642012-05-24 Pedro Alves <palves@redhat.com>
4265
4266 PR gdb/7205
4267
4268 Replace target_signal with gdb_signal throughout.
4269
8d409d16
MR
42702012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4271
4272 * linux-low.c (linux_store_registers): Avoid the copying sequence
4273 when no data has been retrieved by ptrace.
4274
23512c01
MGD
42752012-05-22 Will Deacon <will.deacon@arm.com>
4276
4277 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4278 Include asm/ptrace.h.
4279 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4280 already defined.
4281
4934b29e
MR
42822012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4283
4284 * linux-low.c (linux_store_registers): Don't re-retrieve data
4285 with ptrace that has already been obtained from /proc. Always
4286 copy any data retrieved with ptrace to the buffer supplied.
4287
bde24c0a
PA
42882012-05-11 Yao Qi <yao@codesourcery.com>
4289 Pedro Alves <palves@redhat.com>
4290
4291 * linux-low.c (enum stopping_threads_kind): New.
4292 (stopping_threads): Change type to `enum stopping_threads_kind'.
4293 (handle_extended_wait): If stopping and suspending threads, leave
4294 the new_lwp suspended too.
4295 (linux_wait_for_event): Adjust.
4296 (stop_all_lwps): Set `stopping_threads' to
4297 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4298 whether we're suspending threads or just stopping them. Assert no
4299 recursion happens.
4300
623b6bdf
YQ
43012012-04-29 Yao Qi <yao@codesourcery.com>
4302
4303 * server.h: Move some code to ...
4304 * gdbthread.h: ... here. New.
4305 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4306 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4307 (nto-low.o, win32-low.o): Likewise.
4308 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4309 * regcache.c, remote-utils.c, server.c: Likewise.
4310 * target.c, tracepoint.c, win32-low.c: Likewise.
4311
f15f9948
TJB
43122012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4313
4314 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4315 (PTRACE_ARG4_TYPE): Likewise.
4316 (PTRACE_XFER_TYPE): Likewise.
4317 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4318 ptrace to PTRACE_ARG3_TYPE.
4319 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4320 (PTRACE_ARG4_TYPE): Likewise.
4321 (PTRACE_XFER_TYPE): Likewise.
4322 (linux_detach_one_lwp): Cast fourth argument of
4323 ptrace to long then PTRACE_ARG4_TYPE.
4324 (regsets_fetch_inferior_registers): Cast third argument of
4325 ptrace to long then PTRACE_ARG3_TYPE.
4326 (regsets_store_inferior_registers): Likewise.
4327
38ea300a
PA
43282012-04-20 Pedro Alves <palves@redhat.com>
4329
4330 * configure: Regenerate.
4331
c971b7fa
PA
43322012-04-19 Pedro Alves <palves@redhat.com>
4333
43aaf8b6 4334 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4335 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4336 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4337 (all, install-only, uninstall, clean-info, all-lib, clean): No
4338 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4339 (maintainer-clean realclean distclean): Use subdir_do.
4340 (subdir_do): New.
4341 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4342 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4343 * acinclude.m4: Include acx_configure_dir.m4.
4344 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4345 calls. Call AC_PROG_RANLIB. Configure gnulib using
4346 ACX_CONFIGURE_DIR.
4347 (GNULIB): New.
4348 (GNULIB_STDINT_H): Adjust.
4349 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4350 * gdbreplay.c: Include build-gnulib/config.h.
4351 * server.h: Likewise.
4352 * aclocal.m4: Regenerate.
4353 * config.in: Regenerate.
4354 * configure: Regenerate.
c971b7fa 4355
809277f8
PA
43562012-04-19 Pedro Alves <palves@redhat.com>
4357
4358 * Makefile.in (LIBGNU, INCGNU): Adjust.
4359 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4360 (all, install-only, uninstall, clean-info, all-lib, clean)
4361 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4362 * configure.ac: Adjust AC_OUTPUT output.
4363 * aclocal.m4: Regenerate.
4364 * configure: Regenerate.
4365
fd9bb8b8
PA
43662012-04-19 Pedro Alves <palves@redhat.com>
4367
4368 * Makefile.in (generated_files): New.
4369 (server_h): Remove the explicit dependency on config.h, and depend
4370 on $generated_files.
4371
1c298c66
PA
43722012-04-19 Pedro Alves <palves@redhat.com>
4373
4374 * Makefile.in (INCGNU): Add -Ignulib.
4375
57c4b50b
PA
43762012-04-19 Pedro Alves <palves@redhat.com>
4377
4378 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4379 (INCGNU): ... this, and spell out -I here.
4380 (GNULIB_LIB): Rename to ...
4381 (LIBGNU): ... this.
4382 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4383
1030e047
PA
43842012-04-19 Pedro Alves <palves@redhat.com>
4385
4386 * config.in: Regenerate.
4387
447d4319
PA
43882012-04-19 Pedro Alves <palves@redhat.com>
4389
4390 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4391 * server.h (memmem): Remove declaration.
4392 * config.in: Regenerate.
4393 * configure: Regenerate.
4394
aad9eab9
YQ
43952012-04-19 Yao Qi <yao@codesourcery.com>
4396
4397 * Makefile.in (SFILES): Add common/vec.c.
4398 (OBS): Add vec.o.
4399 (vec.o): New rule.
4400
3e10640f
YQ
44012012-04-19 Yao Qi <yao@codesourcery.com>
4402
4403 * remote-utils.c (prepare_resume_reply): Replace with macro
4404 target_core_of_thread.
4405 * server.c (handle_qxfer_threads_proper): Likewise.
4406 * target.h (traget_core_of_thread): New macro.
4407
71622373
PA
44082012-04-18 Pedro Alves <palves@redhat.com>
4409
4410 * aclocal.m4: Regenerate.
4411 * configure: Regenerate.
4412
80d26939
YQ
44132012-04-16 Yao Qi <yao@codesourcery.com>
4414
4415 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4416 duplicated on address.
4417
42476b70
YQ
44182012-04-16 Yao Qi <yao@codesourcery.com>
4419
4420 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4421 (struct tracepoint_action_ops) <send>: New field.
4422 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4423 (agent_expr_send, x_tracepoint_action_send): New.
4424 (l_tracepoint_action_send): New.
4425 (cmd_qtdp): Download and install tracepoint
4426 according to `use_agent'.
4427 (run_inferior_command): Add one more parameter `len'.
4428 Update callers.
4429 (tracepoint_send_agent): New.
4430 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4431
7bc83639
YQ
44322012-04-16 Yao Qi <yao@codesourcery.com>
4433
4434 * tracepoint.c (download_tracepoints): Moved to ...
4435 (cmd_qtstart): ... here.
4436
5f18041e
YQ
44372012-04-14 Yao Qi <yao@codesourcery.com>
4438
4439 * tracepoint.c: Include inttypes.h.
4440 (struct collect_memory_action): Use sized types.
4441 (struct tracepoint): Likewise.
4442 (cmd_qtdp, stop_tracing): Update print specifiers.
4443 (cmd_qtp, response_tracepoint): Likewise.
4444 (collect_data_at_tracepoint): Likewise.
4445 (collect_data_at_step): Likewise.
4446
55a8c076
YQ
44472012-04-14 Yao Qi <yao@codesourcery.com>
4448
4449 Import gnulib module inttypes.
4450 * aclocal.m4, config.in, configure: Regenerated.
4451
dc750257
YQ
44522012-04-14 Yao Qi <yao@codesourcery.com>
4453
4454 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4455 Makefile and config.status at last.
4456
0ab5faf9
YQ
44572012-04-13 Yao Qi <yao@codesourcery.com>
4458
4459 * tracepoint.c: Include stdint.h unconditionally.
4460
18f5fd81
TJB
44612012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4462
4463 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4464 on BFD_HAVE_SYS_PROCFS_TYPE.
4465 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4466 * configure: Regenerate.
4467 * config.in: Likewise.
4468
4d47af5c
L
44692012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4470
4471 * Makefile.in (clean): Also remove x32.c x32-linux.c
4472 x32-avx.c x32-avx-linux.c.
4473 (x32.o): New target.
4474 (x32.c): Likewise.
4475 (x32-linux.o): Likewise.
4476 (x32-linux.c): Likewise.
4477 (x32-avx.o): Likewise.
4478 (x32-avx.c): Likewise.
4479 (x32-avx-linux.o): Likewise.
4480 (x32-avx-linux.c): Likewise.
4481
4482 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4483 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4484 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4485 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4486 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4487 i386/x32-avx-linux.xml.
4488
4489 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4490 (init_registers_x32_avx_linux): Likwise.
4491 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4492 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4493
ecedbe58
PA
44942012-04-13 Pedro Alves <palves@redhat.com>
4495
4496 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4497 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4498 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4499 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4500 the sub-make.
4501
c92b5177
L
45022012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4503
4504 * linux-x86-low.c (compat_x32_clock_t): New.
4505 (compat_x32_siginfo_t): Likewise.
4506 (compat_x32_siginfo_from_siginfo): Likewise.
4507 (siginfo_from_compat_x32_siginfo): Likewise.
4508 (linux_is_elf64): Likewise.
4509 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4510 and siginfo_from_compat_x32_siginfo for x32.
4511 (x86_arch_setup): Set linux_is_elf64.
4512
214d508e
L
45132012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4514
4515 PR gdb/13969
4516 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4517 e_machine field.
4518 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4519 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4520 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4521 compatible with process.
4522
c9a1864a
YQ
45232012-04-12 Yao Qi <yao@codesourcery.com>
4524
4525 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4526 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4527 (install-only, install-info, clean): Handle sub dir gnulib.
4528 (all-lib, am--refresh): New targets.
4529 (memmem.o): Remove target.
4530 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4531 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4532 (AC_REPLACE_FUNCS): Remove memmem.
4533 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4534 (AC_OUTPUT): Generate Makefile in gnulib/.
4535 * aclocal.m4, config.in, configure: Regenerated.
4536
367ba2c2
MR
45372012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4538
4539 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4540
9d236627
PA
45412012-04-05 Pedro Alves <palves@redhat.com>
4542
4543 -Werror=strict-aliasing
4544
4545 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4546 pointer.
4547
111217b3
PA
45482012-04-04 Pedro Alves <palves@redhat.com>
4549
4550 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4551 (sparc_store_gregset_from_stack, sparc_store_gregset)
4552 (sparc_breakpoint_at): Fix formatting.
4553
8365dcf5
TJB
45542012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4555
4556 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4557 are available.
4558 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4559 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4560 * config.in: Regenerate.
4561 * configure: Likewise.
4562
689cc2ae
PA
45632012-03-29 Pedro Alves <palves@redhat.com>
4564
4565 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4566 Correct ptrace arguments.
4567
c14dfd32
PA
45682012-03-28 Pedro Alves <palves@redhat.com>
4569
4570 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4571 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4572 (IA64_FR1_REGNUM): New defines.
4573 (ia64_fetch_register): New.
4574 (the_low_target): Install it.
4575 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4576 field.
4577 * linux-low.c (linux_fetch_registers): Try the
4578 the_low_target.fetch_register hook first.
4579
4580 * linux-arm-low.c (the_low_target): Adjust.
4581 * linux-bfin-low.c (the_low_target): Adjust.
4582 * linux-cris-low.c (the_low_target): Adjust.
4583 * linux-crisv32-low.c (the_low_target): Adjust.
4584 * linux-m32r-low.c (the_low_target): Adjust.
4585 * linux-m68k-low.c (the_low_target): Adjust.
4586 * linux-mips-low.c (the_low_target): Adjust.
4587 * linux-ppc-low.c (the_low_target): Adjust.
4588 * linux-s390-low.c (the_low_target): Adjust.
4589 * linux-sh-low.c (the_low_target): Adjust.
4590 * linux-sparc-low.c (the_low_target): Adjust.
4591 * linux-tic6x-low.c (the_low_target): Adjust.
4592 * linux-x86-low.c (the_low_target): Adjust.
4593 * linux-xtensa-low.c (the_low_target): Adjust.
4594
63c88e13
PA
45952012-03-26 Pedro Alves <palves@redhat.com>
4596
4597 * server.c (handle_qxfer_libraries): Don't bail early if
4598 the_target->qxfer_libraries_svr4 is not NULL.
4599
fb723180
PA
46002012-03-26 Pedro Alves <palves@redhat.com>
4601
4602 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4603
0afae3cf
PA
46042012-03-23 Pedro Alves <palves@redhat.com>
4605
4606 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4607 "library-list-svr4" element's start tag when the the DSO list is
4608 empty.
4609
485f1ee4
PA
46102012-03-23 Pedro Alves <palves@redhat.com>
4611
4612 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4613 a variable whose type size is the same as the inferior's pointer
4614 size.
4615
a5362b9a
TS
46162012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4617
4618 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4619 struct siginfo.
4620 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4621 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4622 * linux-low.h: Include <signal.h>.
4623 (struct siginfo): Remove forward declaration.
4624 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4625 struct siginfo.
4626
d226c142
MF
46272012-03-21 Mike Frysinger <vapier@gentoo.org>
4628
4629 * .gitignore: Ignore more files.
4630
122f36ef
PA
46312012-03-19 Pedro Alves <palves@redhat.com>
4632 Jan Kratochvil <jan.kratochvil@redhat.com>
4633
4634 * server.c (cont_thread, general_thread): Add describing comments.
4635 (start_inferior): Clear `cont_thread'.
4636 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4637 of a process.
4638
fc3e5175
YQ
46392012-03-15 Yao Qi <yao@codesourcery.com>
4640
4641 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4642 handling to ...
4643 (cmd_qtdp): ... here.
4644
8d0d92cd
YQ
46452012-03-15 Yao Qi <yao@codesourcery.com>
4646
4647 * tracepoint.c (struct tracepoint_action_ops): New.
4648 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4649 (m_tracepoint_action_download): New.
4650 (r_tracepoint_action_download): New.
4651 (x_tracepoint_action_download): New.
4652 (l_tracepoint_action_download): New.
4653 (add_tracepoint_action): Install `action->ops' according type.
4654 (download_tracepoint_1): Move code `download' function pointer
4655 of various tracepoint_action_ops.
4656
87b0bb13
JK
46572012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4658
4659 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4660 linux_ptrace_attach_warnings.
4661
5f572dec
JK
46622012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4663
4664 * Makefile.in (linux-ptrace.o): New.
4665 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4666 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4667 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4668 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4669 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4670 of these targets.
4671 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4672
f4647387
YQ
46732012-03-08 Yao Qi <yao@codesourcery.com>
4674 Pedro Alves <palves@redhat.com>
4675
4676 Fix PR server/13392.
4677 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4678 offset of JMP insn.
4679 * tracepoint.c (remove_tracepoint): New.
4680 (cmd_qtdp): Call remove_tracepoint when failed to install.
4681
9b224c5e
PA
46822012-03-07 Pedro Alves <palves@redhat.com>
4683
4684 * linux-low.c (get_detach_signal): New.
4685 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4686 Pass on pending signals to PTRACE_DETACH. Check the result of the
4687 ptrace call.
4688 * server.c (program_signals, program_signals_p): New.
4689 (handle_general_set): Handle QProgramSignals.
4690 * server.h (program_signals, program_signals_p): Declare.
4691
e237a7e2
JK
46922012-03-05 Pedro Alves <palves@redhat.com>
4693 Jan Kratochvil <jan.kratochvil@redhat.com>
4694
4695 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4696 New comment why.
4697
5808517f
YQ
46982012-03-03 Yao Qi <yao@codesourcery.com>
4699
4700 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4701 agent_look_up_symbols.
4702
58b4daa5
YQ
47032012-03-03 Yao Qi <yao@codesourcery.com>
4704
4705 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4706 (linux-x86-low.o): Likewise.
4707 * server.h: Remove in_process_agent_loaded.
4708 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4709 common/agent.c.
4710 Update callers.
4711
8ffcbaaf
YQ
47122012-03-03 Yao Qi <yao@codesourcery.com>
4713
4714 * tracepoint.c (gdb_agent_capability): New global.
4715 (in_process_agent_loaded_ust): Renamed to
4716 `in_process_agent_supports_ust'.
4717 Update callers.
4718 (in_process_agent_supports_ust): Call agent_capability_check.
4719 (clear_installed_tracepoints): Assert that agent supports
4720 agent.
4721
d1feda86
YQ
47222012-03-03 Yao Qi <yao@codesourcery.com>
4723
4724 * linux-low.c (linux_supports_agent): New.
4725 (linux_target_ops): Initialize field `supports_agent' with
4726 linux_supports_agent.
4727 * target.h (struct target_ops) <supports_agent>: New.
4728 (target_supports_agent): New macro.
4729 * server.c (handle_general_set): Handle packet 'QAgent'.
4730 (handle_query): Send `QAgent+'.
4731 * Makefile.in (server.o): Depends on agent.h.
4732
2fa291ac
YQ
47332012-03-03 Yao Qi <yao@codesourcery.com>
4734
4735 * Makefile.in (OBS): Add agent.o.
4736 Add new rule for agent.o.
4737 Track dependence of tracepoint.c on agent.h.
4738 * tracepoint.c (run_inferior_command_1):
4739 (run_inferior_command): Call agent_run_command.
4740 (gdb_ust_connect_sync_socket): Deleted. Move it to
4741 common/agent.c.
4742 (resume_thread, stop_thread): Likewise.
4743 (gdb_ust_socket_init): Renamed to ...
4744 (gdb_agent_socket_init): ... New.
4745 (gdb_ust_thread): Renamed to ...
4746 (gdb_agent_helper_thread): ... New.
4747 (gdb_ust_init): Move some code to ...
4748 (gdb_agent_init): ... here. New.
4749 [HAVE_UST]: Call gdb_ust_init.
4750 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4751 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4752 * config.in, configure: Regenerated.
4753
05044653
PA
47542012-03-02 Pedro Alves <palves@redhat.com>
4755
4756 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4757 * linux-low.c (struct simple_pid_list): New.
4758 (stopped_pids): New a struct simple_pid_list pointer.
4759 (add_to_pid_list, pull_pid_from_list): New.
4760 (handle_extended_wait): Don't assume the first signal new children
4761 report is SIGSTOP. Adjust call to pull_pid_from_list.
4762 (linux_wait_for_lwp): Adjust.
4763
8d00225b
YQ
47642012-03-02 Yao Qi <yao@codesourcery.com>
4765
4766 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4767 debug log.
4768
19560ba5
YQ
47692012-03-02 Yao Qi <yao@codesourcery.com>
4770
4771 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4772 `stop_pc' and `tpoint'. Update caller.
4773
1faeff08
MR
47742012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4775
4776 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4777 * linux-low.c (use_linux_regsets): New macro.
4778 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4779 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4780 (linux_register_in_regsets): New function.
4781 (usr_fetch_inferior_registers): Skip registers covered by
4782 regsets.
4783 (usr_store_inferior_registers): Likewise.
4784 (usr_fetch_inferior_registers): New macro.
4785 (usr_store_inferior_registers): Likewise.
4786 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4787 (linux_store_registers): Likewise.
4788 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4789 prototype.
4790 (init_registers_mips64_dsp_linux): Likewise.
4791 (init_registers_mips_linux): New macro.
4792 (init_registers_mips_dsp_linux): Likewise.
4793 (mips_dsp_num_regs): Likewise.
4794 (DSP_BASE, DSP_CONTROL): New fallback macros.
4795 (mips_base_regs): New macro.
4796 (mips_regmap): Use it. Fix the size.
4797 (mips_dsp_regmap): New variable.
4798 (mips_dsp_regset_bitmap): Likewise.
4799 (mips_arch_setup): New function.
4800 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4801 than mips_regmap.
4802 (mips_cannot_store_register): Likewise.
4803 (the_low_target): Update .arch_setup, .num_regs and .regmap
4804 initializers. Add .regset_bitmap initializer.
4805 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4806 initializer.
4807 * linux-bfin-low.c (the_low_target): Likewise.
4808 * linux-cris-low.c (the_low_target): Likewise.
4809 * linux-crisv32-low.c (the_low_target): Likewise.
4810 * linux-ia64-low.c (the_low_target): Likewise.
4811 * linux-m32r-low.c (the_low_target): Likewise.
4812 * linux-m68k-low.c (the_low_target): Likewise.
4813 * linux-ppc-low.c (the_low_target): Likewise.
4814 * linux-s390-low.c (the_low_target): Likewise.
4815 * linux-sh-low.c (the_low_target): Likewise.
4816 * linux-sparc-low.c (the_low_target): Likewise.
4817 * linux-tic6x-low.c (the_low_target): Likewise.
4818 * linux-x86-low.c (the_low_target): Likewise.
4819 * linux-xtensa-low.c (the_low_target): Likewise.
4820 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4821 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4822 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4823 srv_xmlfiles.
4824 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4825 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4826
c03e6ccc
YQ
48272012-02-29 Yao Qi <yao@codesourcery.com>
4828 Pedro Alves <palves@redhat.com>
4829
4830 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4831 `step_over_finished' is true.
4832
644cebc9
PA
48332012-02-27 Pedro Alves <palves@redhat.com>
4834
4835 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4836 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4837
c14d7ab2
PA
48382012-02-27 Pedro Alves <palves@redhat.com>
4839
4840 PR server/9684
4841 * linux-low.c (pid_is_stopped): New.
4842 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4843
412c89dd
LM
48442012-02-25 Luis Machado <lgustavo@codesourcery.com>
4845
4846 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4847 of conditions.
4848
b745defe
MR
48492012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4850
4851 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4852
9f3a5c85
LM
48532012-02-24 Luis Machado <lgustavo@codesourcery>
4854
4855 * server.c (handle_query): Advertise support for target-side
4856 breakpoint condition evaluation.
4857 (process_point_options): New function.
4858 (process_serial_event): When inserting a breakpoint, check for
4859 a target-side condition that should be evaluated.
4860
4861 * mem-break.c: Include regcache.h and ax.h.
4862 (point_cond_list_t): New data structure.
4863 (breakpoint) <cond_list>: New field.
4864 (find_gdb_breakpoint_at): Make non-static.
4865 (delete_gdb_breakpoint_at): Clear any target-side
4866 conditions.
4867 (clear_gdb_breakpoint_conditions): New function.
4868 (add_condition_to_breakpoint): Likewise.
4869 (add_breakpoint_condition): Likewise.
4870 (gdb_condition_true_at_breakpoint): Likewise.
4871 (gdb_breakpoint_here): Return result directly instead
4872 of going through a local variable.
4873
4874 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4875 (clear_gdb_breakpoint_conditions): Likewise.
4876 (add_breakpoint_condition): Likewise.
4877 (gdb_condition_true_at_breakpoint): Likewise.
4878
4879 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4880 (need_step_over_p): Take target-side breakpoint condition into
4881 consideration.
4882
5e1dc496
LM
48832012-02-24 Luis Machado <lgustavo@codesourcery>
4884
4885 * server.h: Include tracepoint.h.
4886 (agent_mem_read, agent_get_trace_state_variable_value,
4887 agent_set_trace_state_variable_value,
4888 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4889 get_set_tsv_func_addr): New prototypes.
4890
4891 * ax.h: New include file.
4892 * ax.c: New source file.
4893
4894 * tracepoint.c: Include ax.h.
4895 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4896 agent_expr, eval_result_type): Move to ax.h.
4897 (parse_agent_expr): Rename to ...
4898 (gdb_parse_agent_expr): ... this, make it non-static and move
4899 to ax.h.
4900 (unparse_agent_expr) Rename to ...
4901 (gdb_unparse_agent_expr): ... this, make it non-static and move
4902 to ax.h.
4903 (eval_agent_expr): Rename to ...
4904 (eval_tracepoint_agent_expr): ... this.
4905 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4906 forward declarations.
4907 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4908 (agent_get_trace_state_variable_value): New function.
4909 (agent_set_trace_state_variable_value): New function.
4910 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4911 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4912 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4913 (condition_true_at_tracepoint): Likewise.
4914 (parse_agent_expr): Rename to ...
4915 (gdb_parse_agent_expr): ... this and move to ax.c.
4916 (unparse_agent_expr): Rename to ...
4917 (gdb_unparse_agent_expr): ... this and move to ax.c.
4918 (gdb_agent_op_name): Move to ax.c.
4919 (eval_agent_expr): Rename to ...
4920 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4921 and move to ax.c.
4922 (eval_tracepoint_agent_expr): New function.
4923 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4924 non-static.
5e1dc496
LM
4925 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4926 ax.c.
4927 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4928 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4929 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4930 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4931 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4932 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4933 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4934 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4935 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4936 (compile_bytecodes): Remove forward declaration.
4937 (is_goto_target): Move to ax.c.
4938 (compile_bytecodes): Move to ax.c and call
4939 agent_get_trace_state_variable_value (...) and
4940 agent_set_trace_state_variable_value (...).
4941
4942 * Makefile.in: Update ax.c and IPA dependencies.
4943
277e4e52
PA
49442012-02-24 Pedro Alves <palves@redhat.com>
4945
4946 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4947 (cmd_bigqtbuffer_circular): ... this. Only handle
4948 'QTBuffer:circular:'.
4949 (handle_tracepoint_general_set): Adjust.
4950
bf4c19f7
YQ
49512012-02-16 Yao Qi <yao@codesourcery.com>
4952
4953 * inferiors.c: Move code to ...
4954 * dll.c: .... here. New.
4955 * server.h: Declare clear_dlls.
4956 * Makefile.in (SFILES): Add dll.c.
4957 (OBS): Add dll.o
4958 (dll.o): New rule.
4959
d73f2619
YQ
49602012-02-11 Yao Qi <yao@codesourcery.com>
4961
4962 * server.c: (handle_monitor_command): Add a new parameter
4963 `own_buf'.
4964 (handle_query): Update caller.
4965
f8255c2a
JB
49662012-02-09 Joel Brobecker <brobecker@adacore.com>
4967
4968 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4969 * configure, config.in: Regenerate.
4970 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4971 is not defined.
4972
da84f473
PA
49732012-02-02 Pedro Alves <palves@redhat.com>
4974
4975 Try SIGKILL first, then PTRACE_KILL.
4976 * linux-low.c (linux_kill_one_lwp): New.
4977 (linux_kill_one_lwp): Rename to ...
4978 (kill_one_lwp_callback): ... this. Use the new
4979 linux_kill_one_lwp.
4980
e886a173
PA
49812012-02-02 Pedro Alves <palves@redhat.com>
4982
4983 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4984 inferior.
4985
be07f1a2
PA
49862012-01-27 Pedro Alves <palves@redhat.com>
4987
4988 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4989 (elf_64_file_p): Make static.
4990 (linux_pid_exe_is_elf_64_file): New.
4991 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4992 Delete declarations.
4993 (linux_pid_exe_is_elf_64_file): Declare.
4994 * linux-x86-low.c (x86_arch_setup): Use
4995 linux_pid_exe_is_elf_64_file.
4996
d8301ad1
JK
49972012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4998
4999 * linux-low.c (linux_wait_for_event_1): Rename to ...
5000 (linux_wait_for_event): ... here and merge it with former
5001 linux_wait_for_event - new variable wait_ptid, use it.
5002 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5003
01b17894
PA
50042012-01-23 Pedro Alves <palves@redhat.com>
5005
5006 * server.c (main): Avoid yet another case of infinite loop while
5007 detaching/killing after a longjmp.
5008
e825046f
JK
50092012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5010
5011 Code cleanup.
5012 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5013
b9e7b9c3
UW
50142012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5015
5016 * hostio.c (handle_readlink): New function.
5017 (handle_vFile): Call it to handle "vFile:readlink" packets.
5018
901f9912
UW
50192012-01-20 Pedro Alves <palves@redhat.com>
5020 Ulrich Weigand <ulrich.weigand@linaro.org>
5021
5022 * server.c (handle_v_requests): Only support vAttach and vRun to
5023 start multiple processes when in extended protocol mode.
5024
fc1ab1a0
PA
50252012-01-17 Pedro Alves <palves@redhat.com>
5026
5027 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5028 memalign plus mprotect to allocate the scratch buffer.
5029
7d5d4e98
PA
50302012-01-13 Pedro Alves <palves@redhat.com>
5031
5032 * server.c (attach_inferior): Clear `cont_thread'.
5033
f128d5e9
PA
50342012-01-13 Pedro Alves <palves@redhat.com>
5035
5036 * server.c (main): Avoid infinite loop while detaching/killing
5037 after a longjmp.
5038
06db92f0
DE
50392012-01-09 Doug Evans <dje@google.com>
5040
5041 * server.c (start_inferior): Set last_ptid in --wrapper case.
5042
32d92999
YQ
50432012-01-06 Yao Qi <yao@codesourcery.com>
5044
5045 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5046 defined.
5047 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5048
5e0a92a9
YQ
50492012-01-04 Yao Qi <yao@codesourcery.com>
5050
5051 * tracepoint.c (cmd_qtdp): Print debug message
5052 for static tracepoint.
5053
ae639e8c
YQ
50542012-01-04 Yao Qi <yao@codesourcery.com>
5055
5056 * tracepoint.c (trace_vdebug): Differentiate debug message
5057 between gdbserver and IPA.
5058
f72429c5
YQ
50592012-01-03 Yao Qi <yao@codesourcery.com>
5060
5061 * tracepoint.c (tracepoint_was_hit): Don't collect for
5062 static tracepoint.
5063
12c3e59c
JB
50642012-01-02 Joel Brobecker <brobecker@adacore.com>
5065
5066 * terminal.h: Reformat copyright header.
5067
67827812
JB
50682012-01-02 Joel Brobecker <brobecker@adacore.com>
5069
5070 * server.c (gdbserver_version): Update copyright year.
5071 * gdbreplay.c (gdbreplay_version): Likewise.
5072
3e52c33d
JK
50732011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5074
5075 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5076
5077 Revert:
5078 2011-12-18 Hui Zhu <teawater@gmail.com>
5079 * linux-low.c (linux_create_inferior): Save return value to ret.
5080
66f1260e
HZ
50812011-12-18 Hui Zhu <teawater@gmail.com>
5082
5083 * linux-low.c (linux_create_inferior): Save return value to ret.
5084
e77616d7
DE
50852011-12-16 Doug Evans <dje@google.com>
5086
e7b06c57
DE
5087 * linux-low.c (linux_create_inferior): If stdio connection,
5088 redirect stdin from /dev/null, stdout to stderr.
5089 * remote-utils.c (remote_is_stdio): New static global.
5090 (remote_connection_is_stdio): New function.
5091 (remote_prepare): Handle stdio connection.
5092 (remote_open): Ditto.
5093 (remote_close): Don't close stdin for stdio connections.
5094 (read_prim,write_prim): New functions. Replace all calls to
5095 read/write to these.
5096 * server.c (main): Watch for "-" argument. Move call to
5097 remote_prepare before start_inferior.
5098 * server.h (STDIO_CONNECTION_NAME): New macro.
5099 (remote_connection_is_stdio): Declare.
5100
e77616d7
DE
5101 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5102 in debugging output.
5103
82067193
YQ
51042011-12-15 Yao Qi <yao@codesourcery.com>
5105
5106 * tracepoint.c: Include sys/syscall.h.
5107 (gdb_ust_thread): Remove preprocessor conditional.
5108
82bfbe7e
PA
51092011-12-14 Pedro Alves <pedro@codesourcery.com>
5110
5111 * linux-low.c (linux_detach_one_lwp): Call
5112 the_low_target.prepare_to_resume before detaching.
5113
712c6575
YQ
51142011-12-14 Yao Qi <yao@codesourcery.com>
5115
5116 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5117 of write.
5118
d54d1edf
YQ
51192011-12-14 Yao Qi <yao@codesourcery.com>
5120
5121 * i386-low.c (i386_low_stopped_data_address): Initialize local
5122 variable `control'.
5123
6210a125
PA
51242011-12-13 Pedro Alves <pedro@codesourcery.com>
5125
5126 PR remote/13492
5127
5128 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5129 DR_CONTROL unless necessary. Extend comments.
5130 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5131 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5132
2ece8244
YQ
51332011-12-13 Yao Qi <yao@codesourcery.com>
5134
5135 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5136 macros.
5137 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5138
784867a5
JK
51392011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5140
5141 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5142 Print new debug message for such case.
5143
6bf36717
JK
51442011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5145
5146 Fix overlapping memcpy.
5147 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5148 the read_inferior_memory transfer.
5149 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5150 write_inferior_memory transfer.
5151 (set_fast_tracepoint_jump): New variable buf. Use it for the
5152 read_inferior_memory and write_inferior_memory transfers.
5153 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5154 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5155 Use it for the write_inferior_memory transfer.
5156 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5157 buffers.
5158
50275556
MR
51592011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5160
5161 * linux-low.c (fetch_register, store_register): Make code
5162 consistent, fix formatting.
5163
7325beb4
MR
51642011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5165
5166 * linux-low.c (usr_store_inferior_registers): Factor out code
5167 to handle individual registers into...
5168 (store_register): ... this new function.
5169
c642a434
UW
51702011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5171
5172 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5173 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5174 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5175 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5176 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5177 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5178 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5179 (srv_xmlfiles): Add new XML files.
5180
5181 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5182 and <sys/uio.h>.
5183 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5184 (init_registers_s390_linux32v1): Add prototype.
5185 (init_registers_s390_linux32v2): Likewise.
5186 (init_registers_s390_linux64v1): Likewise.
5187 (init_registers_s390_linux64v2): Likewise.
5188 (init_registers_s390x_linux64v1): Likewise.
5189 (init_registers_s390x_linux64v2): Likewise.
5190 (s390_num_regs): Increment to 52.
5191 (s390_regmap): Add orig_r2 register.
5192 (s390_num_regs_3264): Increment to 68.
5193 (s390_regmap_3264): Add orig_r2 register.
5194 (s390_collect_ptrace_register): Handle orig_r2 register.
5195 (s390_supply_ptrace_register): Likewise.
5196 (s390_fill_last_break): New function.
5197 (s390_store_last_break): Likewise.
5198 (s390_fill_system_call): New function.
5199 (s390_store_system_call): Likewise.
5200 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5201 register sets.
5202 (s390_check_regset): New function.
5203 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5204 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5205 Update target_regsets for available register sets.
5206
2268b414
JK
52072011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5208 Jan Kratochvil <jan.kratochvil@redhat.com>
5209
5210 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5211 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5212 New.
5213 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5214 * linux-low.h (struct process_info_private): New member r_debug.
5215 * server.c (handle_qxfer_libraries): Call
5216 the_target->qxfer_libraries_svr4.
5217 (handle_qxfer_libraries_svr4): New function.
5218 (qxfer_packets): New entry "libraries-svr4".
5219 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5220 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5221 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5222 PACKET_qXfer_libraries_svr4.
5223
d6db1fab
UW
52242011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5225
5226 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5227 PSW address/mask between 8-byte and 16-byte formats.
5228 (s390_supply_ptrace_register): Likewise.
5229 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5230 basic addressing mode bit.
5231
242f5f1c
SS
52322011-11-24 Stan Shebs <stan@codesourcery.com>
5233
5234 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5235
f196051f
SS
52362011-11-17 Stan Shebs <stan@codesourcery.com>
5237
5238 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5239 (tracing_start_time): New global.
5240 (tracing_stop_time): New global.
5241 (tracing_user_name): New global.
5242 (tracing_notes): New global.
5243 (tracing_stop_note): New global.
5244 (cmd_qtstart): Set traceframe_usage, start_time.
5245 (stop_tracing): Set stop_time.
5246 (cmd_qtstatus): Report additional status.
5247 (cmd_qtp): New function.
5248 (handle_tracepoint_query): Call it.
5249 (cmd_qtnotes): New function.
5250 (handle_tracepoint_general_set): Call it.
5251 (get_timestamp): Rename from tsv_get_timestamp.
5252
405f8e94
SS
52532011-11-14 Stan Shebs <stan@codesourcery.com>
5254 Kwok Cheung Yeung <kcy@codesourcery.com>
5255
5256 * linux-x86-low.c (small_jump_insn): New.
5257 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5258 trampoline and error message, build a trampoline and issue a small
5259 jump instruction to it.
5260 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5261 trampoline and error message.
5262 (x86_get_min_fast_tracepoint_insn_len): New.
5263 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5264 * linux-low.h (struct linux_target_ops): Add arguments to
5265 install_fast_tracepoint_jump_pad operation, add new operation.
5266 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5267 arguments.
5268 (linux_get_min_fast_tracepoint_insn_len): New function.
5269 (linux_target_op): Add new operation.
5270 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5271 (gdb_trampoline_buffer_end): Ditto.
5272 (gdb_trampoline_buffer_error): Ditto.
5273 (struct ipa_sym_addresses): Add fields for new IPA variables.
5274 (symbol_list): Add entries for new IPA variables.
5275 (struct tracepoint): Add fields to hold the address range of the
5276 trampoline used by the tracepoint.
5277 (trampoline_buffer_head): New static variable.
5278 (trampoline_buffer_tail): Ditto.
5279 (claim_trampoline_space): New function.
5280 (have_fast_tracepoint_trampoline_buffer): New function.
5281 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5282 structure.
5283 (install_fast_tracepoint): Ditto, also add error buffer argument.
5284 (cmd_qtminftpilen): New function.
5285 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5286 (fast_tracepoint_from_trampoline_address): New function.
5287 (fast_tracepoint_collecting): Handle trampoline as part of jump
5288 pad space.
5289 (set_trampoline_buffer_space): New function.
5290 (initialize_tracepoint): Initialize new IPA variables.
5291 * target.h (struct target_ops): Add arguments to
5292 install_fast_tracepoint_jump_pad operation, add new
5293 get_min_fast_tracepoint_insn_len operation.
5294 (target_get_min_fast_tracepoint_insn_len): New.
5295 (install_fast_tracepoint_jump_pad): Add arguments.
5296 * server.h (IPA_BUFSIZ): Define.
5297 * linux-i386-ipa.c: Include extra header files.
5298 (initialize_fast_tracepoint_trampoline_buffer): New function.
5299 (initialize_low_tracepoint): Call it.
5300 * server.h (set_trampoline_buffer_space): Declare.
5301 (claim_trampoline_space): Ditto.
5302 (have_fast_tracepoint_trampoline_buffer): Ditto.
5303
1e4d1764
YQ
53042011-11-14 Yao Qi <yao@codesourcery.com>
5305
5306 * server.c (handle_query): Handle InstallInTrace for qSupported.
5307 * tracepoint.c (add_tracepoint): Sort list.
5308 (install_tracepoint, download_tracepoint): New.
5309 (cmd_qtdp): Call them to install and download tracepoints.
5310 (sort_tracepoints): Removed.
5311 (cmd_qtstart): Update.
5312
5c73ff4e
YQ
53132011-11-14 Yao Qi <yao@codesourcery.com>
5314
5315 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5316 * mem-break.h: Declare.
5317 * tracepoint.c (cmd_qtstart): Move some code to ...
5318 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5319 New.
5320 (download_tracepoints): Move some code to ...
5321 (download_tracepoint_1): ... here. New.
5322
86a30030
YQ
53232011-11-08 Yao Qi <yao@codesourcery.com>
5324
5325 * remote-utils.c (relocate_instruction): A comment fix.
5326
8d26e50c
JB
53272011-11-07 Joel Brobecker <brobecker@adacore.com>
5328
5329 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5330 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5331 dr_status_mirror and dr_control_mirror from debug_reg_state.
5332 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5333 (i386_initial_stuff): Remove use of deleted globals.
5334 (i386_get_thread_context, i386_set_thread_context,
5335 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5336 from debug_reg_state.
5337
a59306a3
YQ
53382011-11-05 Yao Qi <yao@codesourcery.com>
5339
5340 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5341 address as TPOINT's.
5342
3065dfb6
SS
53432011-11-02 Stan Shebs <stan@codesourcery.com>
5344
5345 * tracepoint.c (agent_mem_read_string): New function.
5346 (eval_agent_expr): Call it for tracenz.
5347 * server.c (handle_query): Report support for tracenz.
5348
fd0d8c7c
YQ
53492011-11-02 Yao Qi <yao@codesourcery.com>
5350
5351 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5352
609086b1
YQ
53532011-11-02 Yao Qi <yao@codesourcery.com>
5354
5355 * target.h: Fix a typo in comment.
5356
b9fd1791
PA
53572011-10-31 Pedro Alves <pedro@codesourcery.com>
5358
5359 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5360 clobber the breakpoints' shadows with fast tracepoint jumps.
5361 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5362 * target.c (write_inferior_memory): Also pass MYADDR down to
5363 check_mem_write.
5364
03583c20
UW
53652011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5366
5367 * configure.ac: Check support for personality routine.
5368 * configure: Regenerate.
5369 * config.in: Likewise.
5370 * linux-low.c: Include <sys/personality.h>.
5371 Define ADDR_NO_RANDOMIZE if necessary.
5372 (linux_create_inferior): Disable address space randomization when
5373 forking inferior, if requested.
5374 (linux_supports_disable_randomization): New function.
5375 (linux_target_ops): Install it.
5376 * server.h (disable_randomization): Declare.
5377 * server.c (disable_randomization): New global variable.
5378 (handle_general_set): Handle QDisableRandomization.
5379 (handle_query): Likewise for qSupported.
5380 (main): Support --disable-randomization and --no-disable-randomization
5381 command line arguments.
5382 * target.h (struct target_ops): Add supports_disable_randomization.
5383 (target_supports_disable_randomization): New macro.
5384
723b724b
MF
53852011-09-29 Mike Frysinger <vapier@gentoo.org>
5386
5387 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5388 ifdef check.
5389 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5390 [!PT_GETDSBT] (target_loadmap): New definition.
5391 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5392 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5393 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5394 and PT_GETDSBT to LINUX_LOADMAP.
5395 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5396 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5397
55329a5c 53982011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5399
5400 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5401 (arm_linux_hwbp_cap): New static variable.
5402 (arm_linux_get_hwbp_cap): Replace by ...
5403 (arm_linux_init_hwbp_cap): ... this new function.
5404 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5405 (arm_linux_get_hw_watchpoint_count): Likewise.
5406 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5407 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5408 (arm_prepare_to_resume): Use perror_with_name instead of error.
5409
55329a5c 54102011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5411
5412 * linux-arm-low.c: Include <signal.h>.
5413 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5414 (struct arm_linux_hwbp_cap): New data type.
5415 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5416 (struct arm_linux_hw_breakpoint): New data type.
5417 (MAX_BPTS, MAX_WPTS): Define.
5418 (struct arch_process_info, struct arch_lwp_info): New data types.
5419 (arm_linux_get_hwbp_cap): New function.
5420 (arm_linux_get_hw_breakpoint_count): Likewise.
5421 (arm_linux_get_hw_watchpoint_count): Likewise.
5422 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5423 (arm_hwbp_control_initialize): Likewise.
5424 (arm_hwbp_control_is_enabled): Likewise.
5425 (arm_hwbp_control_is_initialized): Likewise.
5426 (arm_hwbp_control_disable): Likewise.
5427 (arm_linux_hw_breakpoint_equal): Likewise.
5428 (arm_linux_hw_point_initialize): Likewise.
5429 (struct update_registers_data): New data structure.
5430 (update_registers_callback: New function.
5431 (arm_insert_point): Likewise.
5432 (arm_remove_point): Likewise.
5433 (arm_stopped_by_watchpoint): Likewise.
5434 (arm_stopped_data_address): Likewise.
5435 (arm_new_process): Likewise.
5436 (arm_new_thread): Likewise.
5437 (arm_prepare_to_resume): Likewise.
5438 (the_low_target): Register arm_insert_point, arm_remove_point,
5439 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5440 arm_new_thread, and arm_prepare_to_resume.
5441
6b9801d4
SS
54422011-09-15 Stan Shebs <stan@codesourcery.com>
5443
5444 * server.h (struct emit_ops): Add compare-goto fields.
5445 * tracepoint.c (gdb_agent_op_sizes): New table.
5446 (emit_eq_goto): New function.
5447 (emit_ne_goto): New function.
5448 (emit_lt_goto): New function.
5449 (emit_le_goto): New function.
5450 (emit_gt_goto): New function.
5451 (emit_ge_goto): New function.
5452 (is_goto_target): New function.
5453 (compile_bytecodes): Recognize special cases of compare-goto
5454 combinations and call specialized emitters for them.
5455 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5456 (amd64_emit_ne_goto): New function.
5457 (amd64_emit_lt_goto): New function.
5458 (amd64_emit_le_goto): New function.
5459 (amd64_emit_gt_goto): New function.
5460 (amd64_emit_ge_goto): New function.
5461 (amd64_emit_ops): Add the new functions.
5462 (i386_emit_eq_goto): New function.
5463 (i386_emit_ne_goto): New function.
5464 (i386_emit_lt_goto): New function.
5465 (i386_emit_le_goto): New function.
5466 (i386_emit_gt_goto): New function.
5467 (i386_emit_ge_goto): New function.
5468 (i386_emit_ops): Add the new functions.
5469
bf15cbda
SS
54702011-09-08 Stan Shebs <stan@codesourcery.com>
5471
5472 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5473 (i386_emit_epilogue): Restore %ebx.
5474
943ca1dd
JZ
54752011-08-31 Jie Zhang <jzhang918@gmail.com>
5476
5477 * server.c (step_thread): Remove definition.
5478 (process_serial_event): Don't handle Hs.
5479 * server.h (step_thread): Remove declaration.
5480 * target.c (set_desired_inferior): Remove use of step_thread.
5481
e3deef73
LM
54822011-08-24 Luis Machado <lgustavo@codesourcery.com>
5483
5484 * linux-low.c: Include linux-procfs.h.
5485 (linux_attach_lwp_1): Update comments.
5486 (linux_attach): Scan for existing threads when attaching to a
5487 process that is the tgid.
5488 * Makefile.in: Update dependencies.
5489
13da1c97
LM
54902011-08-24 Luis Machado <lgustavo@codesourcery.com>
5491
5492 * configure.srv: Add linux-procfs.o dependencies.
5493
881127c9
YQ
54942011-08-14 Yao Qi <yao@codesourcery.com>
5495
5496 * target.h (struct target_ops): Fix indent.
5497 * win32-low.c (win32_target_ops): Fix comment.
5498
58dbd541
YQ
54992011-08-14 Andrew Jenner <andrew@codesourcery.com>
5500 Yao Qi <yao@codesourcery.com>
5501
5502 * Makefile.in (clean): Remove tic6x-*.c files.
5503 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5504 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5505 (tic6x-c64xp-linux.c): Likewise.
5506 * configure.srv: Add support for tic6x-*-uclinux.
5507 * linux-tic6x-low.c: New.
5508 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5509
78d85199
YQ
55102011-08-14 Andrew Stubbs <ams@codesourcery.com>
5511 Yao Qi <yao@codesourcery.com>
5512
5513 * target.h (struct target_ops): Add read_loadmap.
5514 * linux-low.c (struct target_loadseg): New type.
5515 (struct target_loadmap): New type.
5516 (linux_read_loadmap): New function.
5517 (linux_target_ops): Add linux_read_loadmap.
5518 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5519 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5520 to NULL.
78d85199 5521
a959a88d
EZ
55222011-08-05 Eli Zaretskii <eliz@gnu.org>
5523
5524 * win32-low.c: Include <stdint.h>.
5525
1ced966e
PA
55262011-07-22 Pedro Alves <pedro@codesourcery.com>
5527
5528 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5529 to the inferior here.
5530 (i386_remove_aligned_watchpoint): Ditto.
5531 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5532 fit part of the watchpoint in the debug registers.
5533 (i386_update_inferior_debug_regs): New.
5534 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5535 registers, and only update the inferior on success.
5536 (i386_low_remove_watchpoint): Ditto.
5537
d26e3629
KY
55382011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5539
5540 * linux-low.c (compare_ints, unique, list_threads, show_process,
5541 linux_core_of_thread): Delete.
5542 (linux_target_ops): Change linux_core_of_thread to
5543 linux_common_core_of_thread.
5544 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5545 * utils.c (malloc_failure): Change type of argument.
5546 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5547 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5548 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5549 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5550 (IPA_OBJS): Add common-utils-ipa.o.
5551 (ptid_h, linux_osdata_h): New macros.
5552 (server_h): Add common/common-utils.h, common/xml-utils.h,
5553 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5554 common/ptid.h.
5555 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5556 ptid.o, buffer.o): New rules.
5557 (linux-low.o): Add common/linux-osdata.h as a dependency.
5558 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5559 * configure.ac: Add AC_HEADER_DIRENT check.
5560 * config.in: Regenerate.
5561 * configure: Regenerate.
5562 * remote-utils.c (xml_escape_text): Delete.
5563 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5564 buffer_xml_printf): Move to common/buffer.c.
5565 * server.c (main): Remove call to initialize_inferiors.
5566 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5567 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5568 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5569 internal_error, gdb_assert, gdb_assert_fail): Delete.
5570 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5571 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5572 common/buffer.h.
5573 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5574 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5575 initialize_inferiors): Delete.
5576
2275a1a7
PA
55772011-07-20 Pedro Alves <pedro@codesourcery.com>
5578
5579 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5580 symbol error.
5581
0a5b1e09
PA
55822011-05-31 Pedro Alves <pedro@codesourcery.com>
5583
5584 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5585 assertion.
5586 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5587
6938fd34
YQ
55882011-05-26 Yao Qi <yao@codesourcery.com>
5589
5590 * Makefile.in (thread-db.o): Track dependence to
5591 common/gdb_thread_db.h.
5592 * thread-db.c: include gdb_thread_db.h from right place.
5593
b481f9e0
TT
55942011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5595
5596 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5597 __FILE__ and __LINE__ to internal_error.
5598
98a5dd13
DE
55992011-05-13 Doug Evans <dje@google.com>
5600
5601 * thread-db.c (try_thread_db_load_from_sdir): New function.
5602 (try_thread_db_load_from_dir): New function.
5603 (thread_db_load_search): Handle $sdir, ignore $pdir.
5604 Remove trying of system directories if search of
5605 libthread-db-search-path fails, that is now done via $sdir.
5606
d248b706
KY
56072011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5608
5609 * server.c (handle_query): Add EnableDisableTracepoints to the list
5610 of supported features.
43aaf8b6 5611 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5612 tracepoints.
43aaf8b6
PA
5613 (cmd_qtenable_disable): New.
5614 (cmd_qtstart): Install tracepoints even if disabled.
5615 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5616 receiving a QTEnable or QTDisable packet.
5617 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5618 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5619 tracepoints.
5620 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5621
84e578fb
DE
56222011-05-10 Doug Evans <dje@google.com>
5623
5624 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5625
71f55dd8
DE
56262011-05-04 Doug Evans <dje@google.com>
5627
5628 * linux-low.c (linux_join): Skip process lookup.
5629 * spu-low.c (spu_join): Ditto.
5630 * server.c (join_inferiors_callback): Delete.
5631 (process_serial_event): For 'D' packet (detach) call join_inferior
5632 directly.
5633
4d393d60
JM
56342011-05-04 Joseph Myers <joseph@codesourcery.com>
5635
5636 * README: Don't mention xscale*-*-linux*.
5637 * configure.srv (xscale*-*-linux*): Don't handle target.
5638
b00ad6ff
NF
56392011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5640
5641 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5642 casting pointers.
5643 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5644 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5645 (i386_emit_void_call_2): Likewise.
5646
af96c192
YQ
56472011-04-26 Yao Qi <yao@codesourcery.com>
5648
43aaf8b6
PA
5649 * linux-low.c: Move common macros to linux-ptrace.h.
5650 Include linux-ptrace.h.
af96c192
YQ
5651 * Makefile.in (linux_ptrace_h): New.
5652 (linux-low.o): Depends on linux-ptrace.h.
5653
03f2bd59
JK
56542011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5655
5656 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5657 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5658 (remote_prepare): New function with most of the TCP code from ...
5659 (remote_open): ... here. Detect PORT here unconditionally. Move also
5660 setting transport_is_reliable.
5661 * server.c (run_once): New variable.
5662 (gdbserver_usage): Document it.
5663 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5664 the first run if RUN_ONCE.
5665 * server.h (run_once, remote_prepare): New declarations.
5666
7a9dd1b2
TT
56672011-04-19 Tom Tromey <tromey@redhat.com>
5668
5669 * win32-low.c (handle_load_dll): Remove duplicate "the".
5670
81239425
PM
56712011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5672
5673 Remove support for old Cygwin 1.5 versions.
5674 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5675 function to avoid warning.
5676 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5677 warning.
5678
9e0627f1
PM
56792011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5680
5681 * gdbserver/server.h (Macro _): Define it if not available.
5682
588eebee
MS
56832011-03-14 Michael Snyder <msnyder@vmware.com>
5684
348af9f7 5685 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5686
43f70d4c
JB
56872011-03-10 Joel Brobecker <brobecker@adacore.com>
5688
5689 * Makefile.in (maintainer-clean realclean distclean): Remove
5690 "make ... subdir_do" command.
5691
348af9f7
MS
56922011-03-10 Michael Snyder <msnyder@vmware.com>
5693
5694 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5695
5696 * server.c (handle_v_run): Free alloced buffer on early return.
5697
e637a4f5
YQ
56982011-03-09 Yao Qi <yao@codesourcery.com>
5699
5700 Revert:
5701 2011-03-04 Yao Qi <yao@codesourcery.com>
5702
5703 * Makefile.in: Remove GNU make feature --directory.
5704
5705 2011-03-05 Yao Qi <yao@codesourcery.com>
5706
5707 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5708 (subdir_do): New make target. Copied from gdb/Makefile.
5709 (maintainer-clean, realclean, distclean, clean): Call corresponding
5710 make targets in common/Makefile.
5711
5712 2011-02-11 Yao Qi <yao@codesourcery.com>
5713
5714 * configure.ac: Call AC_PROG_RANLIB.
5715 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5716 * configure: Regenerate.
5717
e6edda56
JK
57182011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5719
5720 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5721
e5141119
JB
57222011-03-06 Yao Qi <yao@codesourcery.com>
5723
5724 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5725
64794aa4
JB
57262011-03-05 Yao Qi <yao@codesourcery.com>
5727
5728 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5729 (subdir_do): New make target. Copied from gdb/Makefile.
5730 (maintainer-clean, realclean, distclean, clean): Call corresponding
5731 make targets in common/Makefile.
5732
7a762829
YQ
57332011-03-04 Yao Qi <yao@codesourcery.com>
5734
5735 * Makefile.in: Remove GNU make feature --directory.
5736
348af9f7
MS
57372011-03-04 Michael Snyder <msnyder@vmware.com>
5738
5739 * server.c (queue_stop_reply): Call xmalloc not malloc.
5740
57412011-03-02 Michael Snyder <msnyder@vmware.com>
5742
5743 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5744
9f72fee2
MS
57452011-02-28 Michael Snyder <msnyder@vmware.com>
5746
588eebee
MS
5747 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5748 (cmd_qtframe): Ditto.
5749 (cmd_qtbuffer): Ditto.
5750 (cmd_bigqtbuffer): Ditto.
5751
9f72fee2
MS
5752 * utils.c (decimal2str): Initialize 'width' to nine, then
5753 don't mess with it.
5754
8040bd49
UW
57552011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5756
5757 * hostio.c (require_data): Free *data, not data.
5758
7e52cbd0
JK
57592011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5760
5761 * hostio.c (require_data): Use free, not xfree.
5762
9130f83e
MS
57632011-02-27 Michael Snyder <msnyder@vmware.com>
5764
4b812f4e
MS
5765 * server.c (handle_query): Discard unused value.
5766
9130f83e
MS
5767 * hostio.c (require_data): Free malloc memory before returning
5768 error.
5769
69d37113
MS
57702011-02-26 Michael Snyder <msnyder@vmware.com>
5771
5772 * linux-low.c (list_threads): Call closedir for dirent.
5773
35f5825a
MS
57742011-02-27 Michael Snyder <msnyder@vmware.com>
5775
2a589cef
MS
5776 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5777 a case statement falls through.
5778
0adea5f7
MS
5779 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5780
35f5825a
MS
5781 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5782 in comparison.
5783
238f1c74
MS
57842011-02-26 Michael Snyder <msnyder@vmware.com>
5785
5786 * utils.c (decimal2str): Eliminate dead code and dead param.
5787 (pulongest): Drop dead param from call to decimal2str.
5788 (plongest): Ditto.
5789
633ff500
JB
57902011-02-24 Joel Brobecker <brobecker@adacore.com>
5791
5792 Revert the following patch (not approved yet):
5793 2011-02-21 Hui Zhu <teawater@gmail.com>
5794 * tracepoint.c (tp_printf): New function.
5795 (eval_agent_expr): Handle gdb_agent_op_printf.
5796
f9c6ff72
HZ
57972011-02-21 Hui Zhu <teawater@gmail.com>
5798
5799 * tracepoint.c (tp_printf): New function.
5800 (eval_agent_expr): Handle gdb_agent_op_printf.
5801
94d5e490
TT
58022011-02-18 Tom Tromey <tromey@redhat.com>
5803
5804 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5805 (tracepoint.o): Likewise.
5806 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5807 (gdb_agent_op_names): Likewise.
5808
c7f96d2b
TT
58092011-02-18 Tom Tromey <tromey@redhat.com>
5810
5811 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5812 gdb_agent_op_rot>: New constants.
5813 (gdb_agent_op_names): Add pick and roll.
5814 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5815 cases.
5816
0feedb2c
JK
58172011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5818
5819 * aclocal.m4: Regenerated with aclocal-1.11.1.
5820
b3b9301e
PA
58212011-02-14 Pedro Alves <pedro@codesourcery.com>
5822
5823 * server.c (handle_qxfer_traceframe_info): New.
5824 (qxfer_packets): Register "traceframe-info".
5825 (handle_query): Report support for qXfer:traceframe-info:read+.
5826 * tracepoint.c (match_blocktype): New.
5827 (traceframe_find_block_type): Rename to ...
5828 (traceframe_walk_blocks): ... this. Add callback filter argument,
5829 and use it.
5830 (traceframe_find_block_type): New, reimplemented on top of
5831 traceframe_walk_blocks.
5832 (build_traceframe_info_xml): New.
5833 (traceframe_read_info): New.
5834 * server.h (traceframe_read_info): Declare.
5835
4f3e6fb7
YQ
58362011-02-11 Yao Qi <yao@codesourcery.com>
5837
5838 * configure.ac: Call AC_PROG_RANLIB.
5839 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5840 * configure: Regenerate.
5841
764880b7
PA
58422011-02-07 Pedro Alves <pedro@codesourcery.com>
5843
5844 * server.c (gdb_read_memory): Change return semantics to allow
5845 partial transfers.
5846 (handle_search_memory_1): Adjust.
5847 (process_serial_event) <'m' packet>: Handle partial transfers.
5848 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5849
1c79eb8a
PA
58502011-01-28 Pedro Alves <pedro@codesourcery.com>
5851
5852 * regcache.c (init_register_cache): Initialize
5853 regcache->register_status.
5854 (free_register_cache): Release regcache->register_status.
5855 (regcache_cpy): Copy register_status.
5856 (registers_to_string): Print 'x's for unavailable registers.
5857 (supply_register): Mark the register's status valid or
5858 unavailable, depending on whether a buffer was passed in or not.
5859 (supply_register_zeroed): New.
5860 (supply_regblock): Mark the registers' status valid or
5861 unavailable, depending on whether a buffer was passed in or not.
5862 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5863 (struct regcache): New `register_status' field.
5864 (supply_register_zeroed): Declare.
5865 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5866 supply_register_zeroed, rather than passing a NULL buffer to
5867 supply_register.
5868 * tracepoint.c (fetch_traceframe_registers): Update comment.
5869
85724a0e
PA
58702011-01-28 Pedro Alves <pedro@codesourcery.com>
5871
5872 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5873 buffer explicit.
5874
d08aafef
PA
58752011-01-25 Pedro Alves <pedro@codesourcery.com>
5876
5877 * server.h (decode_xfer_write): Change prototype.
5878 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5879 and don't extract the annex here.
5880 * server.c (decode_xfer_read): Remove `annex' parameter,
5881 and don't extract the annex here.
5882 (decode_xfer): New.
5883 (struct qxfer): New.
5884 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5885 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5886 (handle_qxfer_statictrace): New functions, abstracted out from
5887 handle_query, and made to use the struct qxfer interface.
5888 (handle_threads_qxfer_proper): Rename to ...
5889 (handle_qxfer_threads_proper): ... this.
5890 (handle_threads_qxfer): Rename to ...
5891 (handle_qxfer_threads): ... this. Adjust.
5892 (qxfer_packets): New array.
5893 (handle_qxfer): New function.
5894 (handle_query): Use handle_qxfer.
5895
493e2a69
MS
58962011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5897
5898 * gdbreplay.c: Shorten lines of >= 80 columns.
5899 * linux-low.c: Ditto.
5900 * linux-ppc-low.c: Ditto.
5901 * linux-s390-low.c: Ditto.
5902 * linux-sparc-low.c: Ditto.
5903 * linux-x86-low.c: Ditto.
5904 * linux-xtensa-low.c: Ditto.
5905 * mem-break.c: Ditto.
5906 * nto-low.c: Ditto.
5907 * regcache.h: Ditto.
5908 * remote-utils.c: Ditto.
5909 * server.c: Ditto.
5910 * server.h: Ditto.
5911 * thread-db.c: Ditto.
5912 * tracepoint.c: Ditto.
5913 * utils.c: Ditto.
5914 * win32-low.h: Ditto.
5915
44944448
JB
59162011-01-05 Joel Brobecker <brobecker@adacore.com>
5917
5918 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5919 update.
5920
71ce852c
JB
59212011-01-01 Joel Brobecker <brobecker@adacore.com>
5922
5923 * server.c (gdbserver_version): Update copyright year in version
5924 output.
5925 * gdbreplay.c (gdbreplay_version): Ditto.
5926
eb826dc6
MF
59272010-12-29 Jie Zhang <jie.zhang@analog.com>
5928
5929 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5930 * linux-bfin-low.c: New file.
5931 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5932 PT_DATA_ADDR for BFIN targets.
5933 * Makefile.in (SFILES): Add linux-bfin-low.c.
5934 (clean): Remove reg-bfin.c.
5935 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5936 * README: Mention supported Blackfin targets.
5937
39ab222a
MF
59382010-12-23 Mike Frysinger <vapier@gentoo.org>
5939
5940 * .gitignore: New file.
5941
a1f2ce7d
MF
59422010-11-16 Mike Frysinger <vapier@gentoo.org>
5943
5944 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5945
f474844c
JZ
59462010-10-22 Jie Zhang <jie@codesourcery.com>
5947
5948 * Makefile.in: Add FLAGS_TO_PASS variable.
5949 (install): Remove dependency of install-only and recursively
5950 invoke make for install-only.
5951
f1048712
DE
59522010-10-04 Doug Evans <dje@google.com>
5953
5954 * Makefile.in (uninstall): Use $(DESTDIR).
5955
b53a1623
PA
59562010-09-24 Pedro Alves <pedro@codesourcery.com>
5957
e6ee044d
PA
5958 PR gdb/11842
5959
b53a1623
PA
5960 * linux-x86-low.c (compat_siginfo_from_siginfo)
5961 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5962 si_code is < 0. Check for si_code == SI_TIMER before checking for
5963 si_code < 0.
5964
fa1bd1e4
JB
59652010-09-13 Joel Brobecker <brobecker@adacore.com>
5966
5967 * lynx-i386-low.c: New file.
5968 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5969
47fac8f8
JB
59702010-09-13 Joel Brobecker <brobecker@adacore.com>
5971
5972 * lynx-low.c (ptrace_request_to_str): Remove handling for
5973 request values that have been removed in LynxOS 5.x.
5974
1adfc54d
JB
59752010-09-13 Joel Brobecker <brobecker@adacore.com>
5976
5977 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5978 <ptrace.h>
5979
c2a66c29
NS
59802010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5981
5982 * configure.ac: Add --enable-inprocess-agent option.
5983 * configure: Rebuilt.
5984
32fcada3
YQ
59852010-09-06 Yao Qi <yao@codesourcery.com>
5986
5987 * linux-low.c (linux_kill): Remove unused variable.
5988 (linux_stabilize_threads): Likewise.
5989 * server.c (start_inferior): Likewise.
5990 (queue_stop_reply_callback): Likewise.
5991 * tracepoint.c (do_action_at_tracepoint): Likewise.
5992
0cccb683
YQ
59932010-09-06 Yao Qi <yao@codesourcery.com>
5994
5995 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5996 on return.
5997
423ec54c
JK
59982010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5999
6000 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6001
12ac6819
PA
60022010-09-06 Pedro Alves <pedro@codesourcery.com>
6003
6004 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6005 "$(IPA_DEPFILES)".
6006
8ed54b31
JB
60072010-09-01 Joel Brobecker <brobecker@adacore.com>
6008
6009 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6010 gdbserver/lynx-ppc-low.c: New files.
6011 * Makefile.in (lynx_low_h): New variable.
6012 (lynx-low.o, lynx-ppc-low.o): New rules.
6013 * configure.ac: On LynxOS, link with -lnetinet.
6014 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6015 * configure: regenerate.
6016
bb0116a4
JB
60172010-09-01 Joel Brobecker <brobecker@adacore.com>
6018
6019 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6020 * configure.ac: Add check for vasprintf and vsnprintf.
6021 * configure, config.in: Regenerate.
6022 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6023
a778ab81 60242010-09-01 Joel Brobecker <brobecker@adacore.com>
6025
6026 * gdbreplay.c: Move include of alloca.h up, next to include of
6027 malloc.h.
6028 * server.h: Add include of malloc.h.
6029 * mem-break.c: Remove include of malloc.h.
6030 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6031
8b034a19 60322010-09-01 Joel Brobecker <brobecker@adacore.com>
6033
6034 * Makefile.in (memmem.o): Build with -Wno-error.
6035
60362010-09-01 Joel Brobecker <brobecker@adacore.com>
6037
6038 * utils.c (xsnprintf): Make non-static.
6039 * server.h: Add xsnprintf declaration.
6040 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6041 replace calls to snprintf by calls to xsnprintf throughout.
6042
60432010-09-01 Joel Brobecker <brobecker@adacore.com>
6044
6045 * configure.ac: Add configure check for alloca.
6046 * configure, config.in: Regenerate.
6047 * server.h: Include alloca.h if it exists.
6048 * gdbreplay.c: Include alloca.h if it exists.
6049
1a981360
PA
60502010-08-28 Pedro Alves <pedro@codesourcery.com>
6051
6052 * linux-low.c (__SIGRTMIN): Define if not already defined.
6053 (linux_create_inferior): Check for __ANDROID__ rather than
6054 __SIGRTMIN.
6055 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6056 are already deferred.
6057 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6058 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6059 stopped and already has a pending signal to report.
6060 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6061 a pending signal to report or is moving out of a jump pad.
6062 (linux_init_signals): Check for __ANDROID__ rather than
6063 __SIGRTMIN.
6064
b4d51a55
PA
60652010-08-28 Pedro Alves <pedro@codesourcery.com>
6066
6067 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6068 debug_threads check. Avoid a linear search when not doing debug
6069 output.
6070
ec48365d
PA
60712010-08-27 Pedro Alves <pedro@codesourcery.com>
6072
6073 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6074 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6075 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6076 (process_event): Change local fd's type to gdb_fildes_t.
6077 (create_file_handler): Adjust prototype.
6078 (delete_file_handler): Adjust prototype.
6079 (handle_file_event): Adjust prototype. Use pfildes.
6080 (create_file_event): Adjsut prototype.
6081 * remote-utils.c (remote_desc, listen_desc): Change type to
6082 gdb_fildes_t.
6083 * server.h: New gdb_fildes_t typedef.
6084 [USE_WIN32API]: Include winsock2.h.
6085 (delete_file_handler, add_file_handler): Adjust prototypes.
6086 (pfildes): Declare.
6087 * utils.c (pfildes): New.
6088
854d88f0
PA
60892010-08-27 Pedro Alves <pedro@codesourcery.com>
6090
6091 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6092 * configure: Regenerate.
6093
0146f85b
PA
60942010-08-27 Pedro Alves <pedro@codesourcery.com>
6095
6096 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6097 (linux_done_accessing_memory): ... this.
6098 (linux_target_ops): Adjust.
6099 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6100 * nto-low.c (nto_target_ops): Adjust comment.
6101 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6102 * spu-low.c (spu_target_ops): Adjust comment.
6103 * target.h (target_ops): Rename unprepare_to_access_memory field
6104 to done_accessing_memory.
6105 (unprepare_to_access_memory): Rename to ...
6106 (done_accessing_memory): ... this.
6107
90d74c30
PA
61082010-08-26 Pedro Alves <pedro@codesourcery.com>
6109
6110 * linux-low.c (linux_prepare_to_access_memory): New.
6111 (linux_unprepare_to_access_memory): New.
6112 (linux_target_ops): Install them.
6113 * server.c (read_memory): Rename to ...
6114 (gdb_read_memory): ... this. Use
6115 prepare_to_access_memory/prepare_to_access_memory.
6116 (write_memory): Rename to ...
6117 (gdb_write_memory): ... this. Use
6118 prepare_to_access_memory/prepare_to_access_memory.
6119 (handle_search_memory_1): Adjust.
6120 (process_serial_event): Adjust.
6121 * target.h (struct target_ops): New fields
6122 prepare_to_access_memory and unprepare_to_access_memory.
6123 (prepare_to_access_memory, unprepare_to_access_memory): New.
6124 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6125 prepare_to_access_memory/prepare_to_access_memory.
6126 * nto-low.c (nto_target_ops): Adjust.
6127 * spu-low.c (spu_target_ops): Adjust.
6128 * win32-low.c (win32_target_ops): Adjust.
6129
fd467969
PA
61302010-08-26 Pedro Alves <pedro@codesourcery.com>
6131
6132 * Makefile.in (WARN_CFLAGS): Get it from configure.
6133 (WERROR_CFLAGS): New.
6134 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6135 * configure.ac: Introduce --enable-werror, which adds -Werror to
6136 the compiler command line. Enabled by default. Disable with
6137 --disable-werror. Add -Wdeclaration-after-statement
6138 Wpointer-arith and -Wformat-nonliteral to warning flags.
6139 * configure: Regenerate.
6140
331e2f5f
PA
61412010-08-26 Pedro Alves <pedro@codesourcery.com>
6142
6143 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6144
e581f2b4
PA
61452010-08-26 Pedro Alves <pedro@codesourcery.com>
6146
6147 * gdbreplay.c (remote_error): New.
6148 (gdbchar): New.
6149 (expect): Use gdbchar. Check for error reading from GDB.
6150 Clarify sync error output.
6151 (play): Check for errors writing to GDB.
6152 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6153 * remote-utils.c (getpkt): Check for errors writing to the remote
6154 descriptor.
6155
3c11dd79
PA
61562010-08-25 Pedro Alves <pedro@codesourcery.com>
6157
6158 * linux-low.c (linux_wait_1): Move non-debugging code out of
6159 `debug_threads' control.
6160
d20a8ad9
PA
61612010-08-25 Pedro Alves <pedro@codesourcery.com>
6162
6163 * linux-low.c (linux_wait_1): Don't set last_status here.
6164 * server.c (push_event, queue_stop_reply_callback): Assert we're
6165 not pushing a TARGET_WAITKIND_IGNORE event.
6166 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6167 (myresume, handle_target_event): Set the thread's last_resume_kind
6168 and last_status from the target returned status.
6169
964e4306
PA
61702010-08-25 Pedro Alves <pedro@codesourcery.com>
6171
6172 PR threads/10729
6173
6174 * linux-x86-low.c (update_debug_registers_callback): New.
6175 (i386_dr_low_set_addr): Use it.
6176 (i386_dr_low_get_addr): New.
6177 (i386_dr_low_set_control): Use update_debug_registers_callback.
6178 (i386_dr_low_get_control): New.
6179 (i386_dr_low_get_status): Adjust.
6180 * linux-low.c (linux_stop_lwp): New.
6181 * linux-low.h (linux_stop_lwp): Declare.
6182
6183 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6184 argument instead of a i386_debug_reg_state.
6185 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6186 a i386_debug_reg_state.
6187 (i386_insert_aligned_watchpoint): Adjust.
6188 (i386_remove_aligned_watchpoint): Adjust.
6189 (i386_low_stopped_data_address): Read the debug registers from the
6190 inferior instead of from the mirrors.
6191 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6192 (i386_dr_low_get_addr): Declare.
6193 (i386_dr_low_get_control): Declare.
6194 (i386_dr_low_get_status): Change prototype.
6195
6196 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6197 (i386_dr_low_get_addr): New.
6198 (i386_dr_low_get_control): New.
6199 (i386_dr_low_get_status): Adjust prototype. Return
6200 dr_status_mirror.
6201 (i386_initial_stuff): Clear dr_status_mirror and
6202 dr_control_mirror.
6203 (i386_get_thread_context): Adjust.
6204 (i386_set_thread_context): Adjust.
6205 (i386_thread_added): Adjust.
6206
5f21a75b
PA
62072010-08-24 Pedro Alves <pedro@codesourcery.com>
6208
6209 * linux-low.h (linux_thread_area): Delete declaration.
6210
3e4c1235
TS
62112010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6212
6213 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6214 after its termination.
6215
1971b033
PA
62162010-08-09 Pedro Alves <pedro@codesourcery.com>
6217
6218 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6219 (gdb_wants_all_stopped): Delete.
6220 (linux_wait_1): Don't call them.
6221 * server.c (handle_v_cont): Tag all threads as want-stopped.
6222 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6223 stopped as "client-wants-stopped".
6224
310444ac
PA
62252010-07-31 Pedro Alves <pedro@codesourcery.com>
6226
6227 * Makefile.in (signals_h): New.
6228 (server_h): Depend on it.
6229 (server.o): Don't depend on $(signals_def).
6230 (signals.o): Depend on $(signals_def).
6231
a19cae16
JK
62322010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6233
6234 * Makefile.in (signals_def): New.
6235 (server_h): Append include/gdb/signals.h and signals_def.
6236 (server.o): Append signals_def.
6237
30d50328
JK
62382010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6239
6240 * server.c (handle_target_event): Use target_signal_to_host for
6241 resume_info.sig initialization.
6242 * target.h (struct thread_resume) <sig>: New comment.
6243
5c3216e2
OS
62442010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6245
c6f46ca0
OS
6246 * server.c (handle_query): strcpy() the returned string from paddress()
6247 instead of sprintf().
5c3216e2
OS
6248 * utils.c (paddress): Return phex_nz().
6249
6bd31874
JB
62502010-07-07 Joel Brobecker <brobecker@adacore.com>
6251
6252 * server.c (handle_v_cont): Call mourn_inferior if process
6253 just exited.
6254 (myresume): Likewise.
6255
0fb4aa4b
PA
62562010-07-01 Pedro Alves <pedro@codesourcery.com>
6257
6258 Static tracepoints, and integration with UST.
6259
6260 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6261 * mem-break.c (uninsert_all_breakpoints)
6262 (reinsert_all_breakpoints): New.
6263 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6264 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6265 (gdb_agent_ust_loaded, helper_thread_id)
6266 (gdb_agent_helper_thread_id): New macros.
6267 (struct ipa_sym_addresses): Add addr_ust_loaded,
6268 addr_helper_thread_id, addr_cmd_buf.
6269 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6270 (in_process_agent_loaded_ust): New.
6271 (write_e_ust_not_loaded): New.
6272 (maybe_write_ipa_ust_not_loaded): New.
6273 (struct collect_static_trace_data_action): New.
6274 (enum tracepoint_type) <static_tracepoint>: New.
6275 (struct tracepoint) <handle>: Mention static tracepoints.
6276 (struct static_tracepoint_ctx): New.
6277 (CMD_BUF_SIZE): New.
6278 (add_tracepoint_action): Handle static tracepoint actions.
6279 (unprobe_marker_at): New.
6280 (clear_installed_tracepoints): Handle static tracepoints.
6281 (cmd_qtdp): Handle static tracepoints.
6282 (probe_marker_at): New.
6283 (cmd_qtstart): Handle static tracepoints.
6284 (response_tracepoint): Handle static tracepoints.
6285 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6286 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6287 (get_context_regcache): Handle static tracepoints.
6288 (do_action_at_tracepoint): Handle static tracepoint actions.
6289 (traceframe_find_block_type): Handle static trace data blocks.
6290 (traceframe_read_sdata): New.
6291 (download_tracepoints): Download static tracepoint actions.
6292 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6293 (GDB_PROBE_NAME): New.
6294 (ust_ops): New.
6295 (GET_UST_SYM): New.
6296 (USTF): New.
6297 (dlsym_ust): New.
6298 (ust_marker_to_static_tracepoint): New.
6299 (gdb_probe): New.
6300 (collect_ust_data_at_tracepoint): New.
6301 (gdb_ust_probe): New.
6302 (UNIX_PATH_MAX, SOCK_DIR): New.
6303 (gdb_ust_connect_sync_socket): New.
6304 (resume_thread, stop_thread): New.
6305 (run_inferior_command): New.
6306 (init_named_socket): New.
6307 (gdb_ust_socket_init): New.
6308 (cstr_to_hexstr): New.
6309 (next_st): New.
6310 (first_marker, next_marker): New.
6311 (response_ust_marker): New.
6312 (cmd_qtfstm, cmd_qtsstm): New.
6313 (unprobe_marker_at, probe_marker_at): New.
6314 (cmd_qtstmat, gdb_ust_thread): New.
6315 (gdb_ust_init): New.
6316 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6317 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6318 (ST_REGENTRY): New.
6319 (x86_64_st_collect_regmap): New.
6320 (X86_64_NUM_ST_COLLECT_GREGS): New.
6321 (AMD64_RIP_REGNUM): New.
6322 (supply_static_tracepoint_registers): New.
6323 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6324 (ST_REGENTRY): New.
6325 (i386_st_collect_regmap): New.
6326 (i386_NUM_ST_COLLECT_GREGS): New.
6327 (supply_static_tracepoint_registers): New.
6328 * server.c (handle_query): Handle qXfer:statictrace:read.
6329 <qSupported>: Report support for StaticTracepoints, and
6330 qXfer:statictrace:read features.
6331 * server.h (traceframe_read_sdata)
6332 (supply_static_tracepoint_registers): Declare.
6333 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6334 (unpack_varlen_hex): Include in IPA build.
6335 * Makefile.in (ustlibs, ustinc): New.
6336 (IPA_OBJS): Add remote-utils-ipa.o.
6337 ($(IPA_LIB)): Link -ldl and -lpthread.
6338 (UST_CFLAGS): New.
6339 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6340 * config.in, configure: Regenerate.
6341
9e4344e5
PA
63422010-06-20 Ian Lance Taylor <iant@google.com>
6343 Pedro Alves <pedro@codesourcery.com>
6344
6345 * linux-x86-low.c (always_true): Delete.
6346 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6347 trying to fool the compiler with always_true.
6348
c6beb2cb
PA
63492010-06-20 Pedro Alves <pedro@codesourcery.com>
6350
6351 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6352 conditions in gdbserver.
6353
d2ed6730
UW
63542010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6355
6356 * spu-low.c (spu_read_memory): Wrap around local store limit.
6357 (spu_write_memory): Likewise.
6358
4e29fb54
PA
63592010-06-15 Pedro Alves <pedro@codesourcery.com>
6360
6361 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6362 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6363 LONGEST uses.
6364 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6365 uses.
6366 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6367 uses with LONGEST uses.
6368
6a271cae
PA
63692010-06-14 Stan Shebs <stan@codesourcery.com>
6370 Pedro Alves <pedro@codesourcery.com>
6371
6372 Bytecode compiler.
6373
6374 * linux-x86-low.c: Include limits.h.
6375 (add_insns): New.
6376 (always_true): New.
6377 (EMIT_ASM): New.
6378 (EMIT_ASM32): New.
6379 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6380 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6381 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6382 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6383 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6384 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6385 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6386 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6387 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6388 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6389 (amd64_emit_void_call_2): New.
6390 (amd64_emit_ops): New.
6391 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6392 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6393 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6394 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6395 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6396 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6397 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6398 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6399 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6400 (i386_emit_stack_adjust, i386_emit_int_call_1)
6401 (i386_emit_void_call_2): New.
6402 (i386_emit_ops): New.
6403 (x86_emit_ops): New.
6404 (the_low_target): Install x86_emit_ops.
6405 * server.h (struct emit_ops): New.
6406 (get_raw_reg_func_addr): Declare.
6407 (current_insn_ptr, emit_error): Declare.
6408 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6409 (set_trace_state_variable_value): New defines.
6410 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6411 addr_get_trace_state_variable_value and
6412 addr_set_trace_state_variable_value.
6413 (symbol_list): New fields for get_raw_reg,
6414 get_trace_state_variable_value and set_trace_state_variable_value.
6415 (condfn): New typedef.
6416 (struct tracepoint): New field `compiled_cond'.
6417 (do_action_at_tracepoint): Clear compiled_cond.
6418 (get_trace_state_variable_value, set_trace_state_variable_value):
6419 Export in the IPA.
6420 (condition_true_at_tracepoint): If there's a compiled condition,
6421 run that.
6422 (current_insn_ptr, emit_error): New globals.
6423 (struct bytecode_address): New.
6424 (get_raw_reg_func_addr): New.
6425 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6426 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6427 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6428 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6429 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6430 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6431 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6432 (compile_tracepoint_condition, compile_bytecodes): New.
6433 * target.h (emit_ops): Forward declare.
6434 (struct target_ops): New field emit_ops.
6435 (target_emit_ops): New.
6436 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6437 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6438 * linux-low.c (linux_emit_ops): New.
6439 (linux_target_ops): Install it.
6440 * linux-low.h (struct linux_target_ops): New field emit_ops.
6441
92b72907
UW
64422010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6443
6444 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6445 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6446
fa593d66
PA
64472010-06-01 Pedro Alves <pedro@codesourcery.com>
6448 Stan Shebs <stan@codesourcery.com>
6449
6450 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6451 (all): Depend on $(extra_libraries).
6452 (install-only): Install the IPA.
6453 (IPA_OBJS, IPA_LIB): New.
6454 (clean): Remove the IPA lib.
6455 (IPAGENT_CFLAGS): New.
6456 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6457 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6458 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6459 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6460 * configure.ac: Check for atomic builtins support in the compiler.
6461 (IPA_DEPFILES, extra_libraries): Define.
6462 * configure.srv (ipa_obj): Add description.
6463 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6464 (i[34567]86-*-linux*): Set ipa_obj.
6465 (x86_64-*-linux*): Set ipa_obj.
6466 * linux-low.c (stabilizing_threads): New.
6467 (supports_fast_tracepoints): New.
6468 (linux_detach): Stabilize threads before detaching.
6469 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6470 the lwp is either not stabilizing, or is moving out of a jump pad.
6471 (linux_fast_tracepoint_collecting): New.
6472 (maybe_move_out_of_jump_pad): New.
6473 (enqueue_one_deferred_signal): New.
6474 (dequeue_one_deferred_signal): New.
6475 (linux_wait_for_event_1): If moving out of a jump pad, defer
6476 pending signals to later.
6477 (linux_stabilize_threads): New.
6478 (linux_wait_1): Check if threads need moving out of jump pads, and
6479 do it if so.
6480 (stuck_in_jump_pad_callback): New.
6481 (move_out_of_jump_pad_callback): New.
6482 (lwp_running): New.
6483 (linux_resume_one_lwp): Handle moving out of jump pads.
6484 (linux_set_resume_request): Dequeue deferred signals.
6485 (need_step_over_p): Also step over fast tracepoint jumps.
6486 (start_step_over): Also uninsert fast tracepoint jumps.
6487 (finish_step_over): Also reinsert fast tracepoint jumps.
6488 (linux_install_fast_tracepoint_jump): New.
6489 (linux_target_ops): Install linux_stabilize_threads and
6490 linux_install_fast_tracepoint_jump_pad.
6491 * linux-low.h (linux_target_ops) <get_thread_area,
6492 install_fast_tracepoint_jump_pad>: New fields.
6493 (struct lwp_info) <collecting_fast_tracepoint,
6494 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6495 (linux_get_thread_area): Declare.
6496 * linux-x86-low.c (jump_insn): New.
6497 (x86_get_thread_area): New.
6498 (append_insns): New.
6499 (push_opcode): New.
6500 (amd64_install_fast_tracepoint_jump_pad): New.
6501 (i386_install_fast_tracepoint_jump_pad): New.
6502 (x86_install_fast_tracepoint_jump_pad): New.
6503 (the_low_target): Install x86_get_thread_area and
6504 x86_install_fast_tracepoint_jump_pad.
6505 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6506 (struct fast_tracepoint_jump): New.
6507 (fast_tracepoint_jump_insn): New.
6508 (fast_tracepoint_jump_shadow): New.
6509 (find_fast_tracepoint_jump_at): New.
6510 (fast_tracepoint_jump_here): New.
6511 (delete_fast_tracepoint_jump): New.
6512 (set_fast_tracepoint_jump): New.
6513 (uninsert_fast_tracepoint_jumps_at): New.
6514 (reinsert_fast_tracepoint_jumps_at): New.
6515 (set_breakpoint_at): Use write_inferior_memory.
6516 (uninsert_raw_breakpoint): Use write_inferior_memory.
6517 (check_mem_read): Mask out fast tracepoint jumps.
6518 (check_mem_write): Mask out fast tracepoint jumps.
6519 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6520 (set_fast_tracepoint_jump): Declare.
6521 (delete_fast_tracepoint_jump)
6522 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6523 (reinsert_fast_tracepoint_jumps_at): Declare.
6524 * regcache.c: Don't compile many functions when building the
6525 in-process agent library.
6526 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6527 the register buffer in the heap.
6528 (free_register_cache): If the register buffer isn't owned by the
6529 regcache, don't free it.
6530 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6531 pre-existing register caches.
6532 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6533 type.
6534 (convert_ascii_to_int): : Constify `from' parameter type.
6535 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6536 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6537 the needed buffer in-place.
6538 (relocate_instruction): New.
6539 * server.c (handle_query) <qSymbols>: If the target supports
6540 tracepoints, give it a chance of looking up symbols. Report
6541 support for fast tracepoints.
6542 (handle_status): Stabilize threads.
6543 (process_serial_event): Adjust.
6544 * server.h (struct fast_tracepoint_jump): Forward declare.
6545 (struct process_info) <fast_tracepoint_jumps>: New field.
6546 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6547 (decode_X_packet, decode_M_packet): Adjust.
6548 (relocate_instruction): Declare.
6549 (in_process_agent_loaded): Declare.
6550 (tracepoint_look_up_symbols): Declare.
6551 (struct fast_tpoint_collect_status): Declare.
6552 (fast_tracepoint_collecting): Declare.
6553 (force_unlock_trace_buffer): Declare.
6554 (handle_tracepoint_bkpts): Declare.
6555 (initialize_low_tracepoint)
6556 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6557 * target.h (struct target_ops) <stabilize_threads,
6558 install_fast_tracepoint_jump_pad>: New fields.
6559 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6560 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6561 [HAVE_STDINT_H]: Include stdint.h.
6562 (trace_debug_1): Rename to ...
6563 (trace_vdebug): ... this.
6564 (trace_debug): Rename to ...
6565 (trace_debug_1): ... this. Add `level' parameter.
6566 (trace_debug): New.
6567 (ATTR_USED, ATTR_NOINLINE): New.
6568 (IP_AGENT_EXPORT): New.
6569 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6570 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6571 (about_to_request_buffer_space, trace_buffer_is_full)
6572 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6573 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6574 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6575 (traceframe_write_count, traceframes_created)
6576 (trace_state_variables)
6577 New renaming defines.
6578 (struct ipa_sym_addresses): New.
6579 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6580 (symbol_list): New.
6581 (ipa_sym_addrs): New.
6582 (all_tracepoint_symbols_looked_up): New.
6583 (in_process_agent_loaded): New.
6584 (write_e_ipa_not_loaded): New.
6585 (maybe_write_ipa_not_loaded): New.
6586 (tracepoint_look_up_symbols): New.
6587 (debug_threads) [IN_PROCESS_AGENT]: New.
6588 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6589 (UNKNOWN_SIDE_EFFECTS): New.
6590 (stop_tracing): New.
6591 (flush_trace_buffer): New.
6592 (stop_tracing_bkpt): New.
6593 (flush_trace_buffer_bkpt): New.
6594 (read_inferior_integer): New.
6595 (read_inferior_uinteger): New.
6596 (read_inferior_data_pointer): New.
6597 (write_inferior_data_pointer): New.
6598 (write_inferior_integer): New.
6599 (write_inferior_uinteger): New.
6600 (struct collect_static_trace_data_action): Delete.
6601 (enum tracepoint_type): New.
6602 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6603 <actions_str, step_actions, step_actions_str>: Only include in
6604 GDBserver.
fa593d66
PA
6605 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6606 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6607 (tracepoints): Use IP_AGENT_EXPORT.
6608 (last_tracepoint): Don't include in the IPA.
6609 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6610 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6611 (alloced_trace_state_variables): New.
6612 (trace_state_variables): Use IP_AGENT_EXPORT.
6613 (traceframe_t): Delete unused variable.
6614 (circular_trace_buffer): Don't include in the IPA.
6615 (trace_buffer_start): Delete.
6616 (struct trace_buffer_control): New.
6617 (trace_buffer_free): Delete.
6618 (struct ipa_trace_buffer_control): New.
6619 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6620 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6621 New.
6622 (trace_buffer_ctrl): New.
6623 (TRACE_BUFFER_CTRL_CURR): New.
6624 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6625 Reimplement as macros.
6626 (trace_buffer_wrap): Delete.
6627 (traceframe_write_count, traceframe_read_count)
6628 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6629 (struct tracepoint_hit_ctx) <type>: New field.
6630 (struct fast_tracepoint_ctx): New.
6631 (memory_barrier): New.
6632 (cmpxchg): New.
6633 (record_tracepoint_error): Update atomically in the IPA.
6634 (clear_inferior_trace_buffer): New.
6635 (about_to_request_buffer_space): New.
6636 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6637 updating the same buffer.
6638 (add_tracepoint): Default the tracepoint's type to trap
6639 tracepoint, and orig_size to -1.
6640 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6641 internal variables.
6642 (create_trace_state_variable): New parameter `gdb'. Handle it.
6643 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6644 (cmd_qtdp): Handle fast tracepoints.
6645 (cmd_qtdv): Adjust.
6646 (max_jump_pad_size): New.
6647 (gdb_jump_pad_head): New.
6648 (get_jump_space_head): New.
6649 (claim_jump_space): New.
6650 (sort_tracepoints): New.
6651 (MAX_JUMP_SIZE): New.
6652 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6653 IPA.
6654 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6655 support. Upload fast traceframes, and delete internal IPA
6656 breakpoints.
6657 (stop_tracing_handler): New.
6658 (flush_trace_buffer_handler): New.
6659 (cmd_qtstop): Upload fast tracepoints.
6660 (response_tracepoint): Handle fast tracepoints.
6661 (tracepoint_finished_step): Upload fast traceframes. Set the
6662 tracepoint hit context's tracepoint type.
6663 (handle_tracepoint_bkpts): New.
6664 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6665 type. Add comment about fast tracepoints.
6666 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6667 non-existing action_str field.
6668 (get_context_regcache): Handle fast tracepoints.
6669 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6670 to the regcache.
6671 (fast_tracepoint_from_jump_pad_address): New.
6672 (fast_tracepoint_from_ipa_tpoint_address): New.
6673 (collecting_t): New.
6674 (force_unlock_trace_buffer): New.
6675 (fast_tracepoint_collecting): New.
6676 (collecting): New.
6677 (gdb_collect): New.
6678 (write_inferior_data_ptr): New.
6679 (target_tp_heap): New.
6680 (target_malloc): New.
6681 (download_agent_expr): New.
6682 (UALIGN): New.
6683 (download_tracepoints): New.
6684 (download_trace_state_variables): New.
6685 (upload_fast_traceframes): New.
6686 (IPA_FIRST_TRACEFRAME): New.
6687 (IPA_NEXT_TRACEFRAME_1): New.
6688 (IPA_NEXT_TRACEFRAME): New.
6689 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6690 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6691 (gdb_jump_pad_buffer_end): New.
6692 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6693 (initialize_tracepoint): Adjust.
6694 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6695 buffer. Initialize the low module.
6696 * utils.c (PREFIX, TOOLNAME): New.
6697 (malloc_failure): Use PREFIX.
6698 (error): In the IPA, an error causes an exit.
6699 (fatal, warning): Use PREFIX.
6700 (internal_error): Use TOOLNAME.
6701 (NUMCELLS): Increase to 10.
6702 * configure, config.in: Regenerate.
6703
d149dd1d
PA
67042010-06-01 Pedro Alves <pedro@codesourcery.com>
6705
6706 * server.c (handle_query) <qSupported>: Do two passes over the
6707 qSupported string to avoid nesting strtok.
6708
f6528abd
JK
67092010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6710
6711 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6712 (CDEPS): New.
6713 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6714 -Wl,--dynamic-list.
6715 * configure: Regenerate.
6716 * proc-service.list: New.
6717
ca2a87a0
JK
67182010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6719
6720 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6721 New comment.
6722
363a6e9f
OS
67232010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6724
6725 * gdbreplay.c (remote_open): Check error return from socket() call by
6726 its equality to -1 not by it being negative.
6727 * remote-utils.c (remote_open): Likewise.
6728
d23b6cb1
PA
67292010-05-23 Pedro Alves <pedro@codesourcery.com>
6730
6731 * config.h: Regenerate.
6732
28d3cf85
MK
67332010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6734
6735 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6736 doesn't provide PTRACE_GET_THREAD_AREA.
6737
fea36a59
MK
67382010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6739
6740 * linux-m68k-low.c: Include <asm/ptrace.h>
6741 (ps_get_thread_area): Implement.
6742
24b066ba
DE
67432010-05-03 Doug Evans <dje@google.com>
6744
6745 * event-loop.c (struct callback_event): New struct.
6746 (callback_list): New global.
6747 (append_callback_event, delete_callback_event): New functions.
6748 (process_callback): New function.
6749 (start_event_loop): Call it.
6750 * remote-utils.c (NOT_SCHEDULED): Define.
6751 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6752 moved out of readchar.
6753 (readchar): Rewrite. Call reschedule before returning.
6754 (reset_readchar): New function.
6755 (remote_close): Call it.
6756 (process_remaining, reschedule): New functions.
6757 * server.h (callback_handler_func): New typedef.
6758 (append_callback_event, delete_callback_event): Declare.
6759
9836d6ea
PA
67602010-05-03 Pedro Alves <pedro@codesourcery.com>
6761
6762 * proc-service.c (ps_pglobal_lookup): Use
6763 thread_db_look_up_one_symbol.
6764 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6765 parameter. Use it instead of all_symbols_looked_up.
6766 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6767 field.
6768 (all_symbols_looked_up): Don't declare.
6769 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6770 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6771 field.
6772 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6773 Set all_symbols_looked_up here.
6774 (thread_db_look_up_one_symbol): New.
6775 (thread_db_get_tls_address): Adjust.
6776 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6777 thread_db object on the heap, and tentatively set it in the
6778 process structure.
6779 (thread_db_init): Don't set all_symbols_looked_up here.
6780 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6781
7984d532
PA
67822010-05-03 Pedro Alves <pedro@codesourcery.com>
6783
6784 * linux-low.c (linux_kill, linux_detach): Adjust.
6785 (status_pending_p_callback): Remove redundant statement. Check
6786 for !TARGET_WAITIKIND_IGNORE, instead of
6787 TARGET_WAITKIND_STOPPED.
6788 (handle_tracepoints): Make sure LWP is locked. Adjust.
6789 (linux_wait_for_event_1): Adjust.
6790 (linux_cancel_breakpoints): New.
6791 (unsuspend_one_lwp): New.
6792 (unsuspend_all_lwps): New.
6793 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6794 (send_sigstop_callback): Change return type to int, add new
6795 `except' parameter and handle it.
6796 (suspend_and_send_sigstop_callback): New.
6797 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6798 pass them down. If SUSPEND, also increment the lwp's suspend
6799 count.
6800 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6801 (need_step_over_p): Don't consider suspended LWPs.
6802 (start_step_over): Adjust.
6803 (proceed_one_lwp): Change return type to int, add new `except'
6804 parameter and handle it.
6805 (unsuspend_and_proceed_one_lwp): New.
6806 (proceed_all_lwps): Use find_inferior instead of
6807 for_each_inferior.
6808 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6809 also decrement the suspend count of LWPs. Pass `except' down,
6810 instead of hacking its suspend count.
6811 (linux_pause_all): Add `freeze' parameter. Adjust.
6812 (linux_unpause_all): New.
6813 (linux_target_ops): Install linux_unpause_all.
6814 * server.c (handle_status): Adjust.
6815 * target.h (struct target_ops): New fields `unpause_all' and
6816 `cancel_breakpoints'. Add new parameter to `pause_all'.
6817 (pause_all): Add new `freeze' parameter.
6818 (unpause_all): New.
6819 (cancel_breakpoints): New.
6820 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6821 cancel breakpoints.
6822 (cmd_qtstart): Pause threads.
6823 (stop_tracing): Pause threads, and cancel breakpoints.
6824 * win32-low.c (win32_target_ops): Adjust.
6825
e471f25b
PA
68262010-05-03 Pedro Alves <pedro@codesourcery.com>
6827
6828 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6829 the inferior right away from here...
6830 (linux_wait_1): ... to here, and adjust to check the thread's
6831 last_resume_kind instead of the lwp's step or stop_expected flags.
6832
1915ef4f
PA
68332010-05-02 Pedro Alves <pedro@codesourcery.com>
6834
6835 * README: Use consistent `GDB' and `GDBserver' spellings.
6836
f9e39928
PA
68372010-05-02 Pedro Alves <pedro@codesourcery.com>
6838
6839 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6840 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6841 (linux_detach_one_lwp): Assume the lwp is stopped.
6842 (any_thread_of): Delete.
6843 (linux_detach): Stop all lwps here. Don't blindly delete all
6844 breakpoints.
6845 (delete_lwp_callback): New.
6846 (linux_mourn): Delete all lwps of the process that is gone.
6847 (linux_wait_1): Don't delete the last lwp of the process here.
6848 * mem-break.h (mark_breakpoints_out): Declare.
6849 * mem-break.c (mark_breakpoints_out): New.
6850 (free_all_breakpoints): Use it.
6851 * server.c (handle_target_event): If the process is gone, mark
6852 breakpoints out.
6853 * thread-db.c (struct thread_db) <create_bp>: New field.
6854 (thread_db_enable_reporting): Fix prototype. Store a thread event
6855 breakpoint reference in the thread_db struct.
6856 (thread_db_load_search): Clear the thread_db object.
6857 (try_thread_db_load_1): Ditto.
6858 (switch_to_process): New.
6859 (disable_thread_event_reporting): Use it.
6860 (remove_thread_event_breakpoints): New.
6861 (thread_db_detach, thread_db_mourn): Use it.
6862
1e7fc18c
PA
68632010-05-01 Pedro Alves <pedro@codesourcery.com>
6864
6865 * linux-low.c (linux_enable_event_reporting): New.
6866 (linux_wait_for_event_1, handle_extended_wait): Use it.
6867
02fc4de7
PA
68682010-04-30 Pedro Alves <pedro@codesourcery.com>
6869
6870 * linux-low.c (linux_kill_one_lwp, linux_kill)
6871 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6872 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6873 SIGSTOP even if the LWP is stopped.
6874 (send_sigstop_callback): New.
6875 (stop_all_lwps): Use send_sigstop_callback instead.
6876 (linux_resume_one_thread): Adjust.
6877 (proceed_one_lwp): Still proceed an LWP that the client has
6878 requested to stop, if we haven't reported it as stopped yet. Make
6879 sure that LWPs the client want stopped, have a pending SIGSTOP.
6880
bc3b5632
DE
68812010-04-26 Doug Evans <dje@google.com>
6882
ae1ada35
DE
6883 * server.c (handle_general_set): Make static.
6884
bc3b5632
DE
6885 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6886 Print received char after testing for error/eof instead of before.
6887 (input_interrupt): Tweak comment.
6888
65730243
DE
68892010-04-23 Doug Evans <dje@google.com>
6890
6891 * server.c (start_inferior): Print inferior argv if --debug.
6892
a8ae7dc0
AR
68932010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6894
6895 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6896 * nto-x86-low.c: Include server.h
6897
1c07cc19
PM
68982010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6899
6900 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6901 be consistent with other sources of this directory.
6902 (init_registers_amd64): Correct name of source file of this function
6903 in the comment.
6904
e0a61e09
PM
69052010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6906
6907 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6908 64-bit executables.
6909
54709339
PM
69102010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6911
6912 * win32-i386-low.c: Add 64-bit support.
6913 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6914 (init_registers_amd64): Declare.
6915 (mappings): Add 64-bit version of array.
6916 (init_windows_x86): New function.
6917 (the_low_target): Change init_arch field to init_windows_x86.
6918
e8f0053d
PM
69192010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6920
6921 * win32-low.c: Adapt to support also 64-bit architecture.
6922 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6923 (get_image_name): Use SIZE_T type for local variable `done'.
6924 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6925 (toolhelp_get_dll_name): Idem.
6926 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6927 Use uintptr_t typecast to avoid warning.
6928 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6929 (handle_exception): Use phex_nz to avoid warning.
6930 (win32_wait): Remove unused local variable `process'.
6931
c481e77e
PM
69322010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6933
6934 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6935 `amd64-avx.o'.
6936
12ea4b69
PM
69372010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6938
6939 * configure.ac: Use `ws2_32' library for srv_mingw.
6940 * configure: Regenerate.
6941 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6942 * remote-utils.c: Likewise.
6943
f6d1620c
L
69442010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6945
6946 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6947 if __x86_64__ is defined.
6948
8e642873
PM
69492010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6950
6951 * configure: Regenerate.
6952
711e434b
PM
69532010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6954
6955 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6956 * target.h (target_ops): New get_tib_address field.
6957 * win32-low.h (win32_thread_info): Add thread_local_base field.
6958 * win32-low.c (child_add_thread): Add tlb argument.
6959 Set thread_local_base field to TLB.
6960 (get_child_debug_event): Adapt to child_add_thread change.
6961 (win32_get_tib_address): New function.
6962 (win32_target_ops): Set get_tib_address field to
6963 win32_get_tib_address.
6964 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6965
505106cd
PA
69662010-04-12 Pedro Alves <pedro@codesourcery.com>
6967
505106cd
PA
6968 * linux-low.c (linux_mourn): Also remove the process.
6969 * server.c (handle_target_event): Don't remove the process here.
6970 * nto-low.c (nto_mourn): New.
6971 (nto_target_ops): Install it.
6972 * spu-low.c (spu_mourn): New.
6973 (spu_target_ops): Install it.
6974 * win32-low.c (win32_mourn): New.
6975 (win32_target_ops): Install it.
6976
e8470a06
PA
69772010-04-12 Pedro Alves <pedro@codesourcery.com>
6978
6979 * server.h (buffer_xml_printf): Remove redundant `;'.
6980
45ba0d02
PA
69812010-04-12 Pedro Alves <pedro@codesourcery.com>
6982
6983 * regcache.c (set_register_cache): Invalidate regcaches before
6984 changing the register cache layout.
6985 (regcache_invalidate_one): Allow a NULL regcache.
6986 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6987 regcaches before changing the register cache layout or the target
6988 regsets.
6989
59e04013
L
69902010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6991
6992 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6993 variable warning on Linux/x86-64.
6994
8336d594
PA
69952010-04-11 Pedro Alves <pedro@codesourcery.com>
6996
6997 GDBserver disconnected tracing support.
6998
6999 * linux-low.c (linux_remove_process): Delete.
7000 (add_lwp): Don't set last_resume_kind here.
7001 (linux_kill): Use `mourn'.
7002 (linux_detach): Use `thread_db_detach', and `mourn'.
7003 (linux_mourn): New.
7004 (linux_attach_lwp_1): Adjust comment.
7005 (linux_attach): last_resume_kind moved the thread_info; adjust.
7006 (status_pending_p_callback): Adjust.
7007 (linux_wait_for_event_1): Adjust.
7008 (count_events_callback, select_singlestep_lwp_callback)
7009 (select_event_lwp_callback, cancel_breakpoints_callback)
7010 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7011 (proceed_one_lwp): Adjust.
7012 (linux_async): Add debug output.
7013 (linux_thread_stopped): New.
7014 (linux_pause_all): New.
7015 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7016 linux_pause_all.
7017 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7018 (thread_db_free): Delete declaration.
7019 (thread_db_detach, thread_db_mourn): Declare.
7020 * thread-db.c (thread_db_init): Use thread_db_mourn.
7021 (thread_db_free): Delete, split in two.
7022 (disable_thread_event_reporting): New.
7023 (thread_db_detach): New.
7024 (thread_db_mourn): New.
7025
7026 * server.h (struct thread_info) <last_resume_kind>: New field.
7027 <attached>: Add comment.
7028 <gdb_detached>: New field.
7029 (handler_func): Change return type to int.
7030 (handle_serial_event, handle_target_event): Ditto.
7031 (gdb_connected): Declare.
7032 (tracing): Delete.
7033 (disconnected_tracing): Declare.
7034 (stop_tracing): Declare.
7035
7036 * server.c (handle_query) <qSupported>: Report support for
7037 disconnected tracing.
7038 (queue_stop_reply_callback): Account for running threads.
7039 (gdb_wants_thread_stopped): New.
7040 (gdb_wants_all_threads_stopped): New.
7041 (gdb_reattached_process): New.
7042 (handle_status): Clear the `gdb_detached' flag of all processes.
7043 In all-stop, stop all threads.
7044 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7045 (process_serial_event): If the remote connection breaks, or if an
7046 exit was forced with "monitor exit", force an event loop exit.
7047 Handle disconnected tracing on detach.
7048 (handle_serial_event): Adjust.
7049 (handle_target_event): If GDB isn't connected, forward events back
7050 to the inferior, unless the last process exited, in which case,
7051 exit gdbserver. Adjust interface.
7052
7053 * remote-utils.c (remote_open): Don't block in accept. Instead
7054 register an event loop source on the listen socket file
7055 descriptor. Refactor bits into ...
7056 (listen_desc): ... this new global.
7057 (gdb_connected): ... this new function.
7058 (enable_async_notification): ... this new function.
7059 (handle_accept_event): ... this new function.
7060 (remote_close): Clear remote_desc.
7061
7062 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7063
7064 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7065 New fields.
7066 (mourn_inferior): Define.
7067 (target_process_qsupported): Avoid the dangling else problem.
7068 (thread_stopped): Define.
7069 (pause_all): Define.
7070 (target_waitstatus_to_string): Declare.
7071 * target.c (target_waitstatus_to_string): New.
7072
7073 * tracepoint.c (tracing): Make extern.
7074 (disconnected_tracing): New.
7075 (stop_tracing): Make extern. Handle tracing stops due to GDB
7076 disconnecting.
7077 (cmd_qtdisconnected): New.
7078 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7079 (handle_tracepoint_general_set): Handle QTDisconnected.
7080
7081 * event-loop.c (event_handler_func): Change return type to int.
7082 (process_event): Bail out if the event handler wants the event
7083 loop to stop.
7084 (handle_file_event): Ditto.
7085 (start_event_loop): Bail out if the event handler wants the event
7086 loop to stop.
7087
7088 * nto-low.c (nto_target_ops): Adjust.
7089 * spu-low.c (spu_wait): Don't remove the process here.
7090 (spu_target_ops): Adjust.
7091 * win32-low.c (win32_wait): Don't remove the process here.
7092 (win32_target_ops): Adjust.
7093
5d267c4c
PA
70942010-04-11 Pedro Alves <pedro@codesourcery.com>
7095
7096 * regcache.c (realloc_register_cache): Invalidate inferior's
7097 regcache before recreating it.
7098
623ccd72
PA
70992010-04-09 Pedro Alves <pedro@codesourcery.com>
7100
7101 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7102
219f2f23
PA
71032010-04-09 Stan Shebs <stan@codesourcery.com>
7104 Pedro Alves <pedro@codesourcery.com>
7105
7106 * server.h (LONGEST): New.
7107 (struct thread_info) <while_stepping>: New field.
7108 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7109 Declare.
7110 (initialize_tracepoint, handle_tracepoint_general_set)
7111 (handle_tracepoint_query, tracepoint_finished_step)
7112 (tracepoint_was_hit, release_while_stepping_state_list):
7113 (current_traceframe): Declare.
7114 * server.c (handle_general_set): Handle tracepoint packets.
7115 (read_memory): New.
7116 (write_memory): New.
7117 (handle_search_memory_1): Use read_memory.
7118 (handle_query): Report support for conditional tracepoints, trace
7119 state variables, and tracepoint sources. Handle tracepoint
7120 queries.
7121 (main): Initialize the tracepoints module.
7122 (process_serial_event): Handle traceframe reads/writes.
7123
7124 * linux-low.c (handle_tracepoints): New.
7125 (linux_wait_1): Call it.
7126 (linux_resume_one_lwp): Handle while-stepping.
7127 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7128 (linux_target_ops): Install them.
7129 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7130 New field.
7131 * linux-x86-low.c (x86_supports_tracepoints): New.
7132 (the_low_target). Install it.
7133
7134 * mem-break.h (delete_breakpoint): Declare.
7135 * mem-break.c (delete_breakpoint): Make external.
7136
7137 * target.h (struct target_ops): Add `supports_tracepoints',
7138 `read_pc', and `write_pc' fields.
7139 (target_supports_tracepoints): Define.
7140 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7141 (phex_nz): New.
7142
7143 * regcache.h (struct regcache) <registers_owned>: New field.
7144 (init_register_cache, regcache_cpy): Declare.
7145 (regcache_read_pc, regcache_write_pc): Declare.
7146 (register_cache_size): Declare.
7147 (supply_regblock): Declare.
7148 * regcache.c (init_register_cache): New.
7149 (new_register_cache): Use it.
7150 (regcache_cpy): New.
7151 (register_cache_size): New.
7152 (supply_regblock): New.
7153 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 7154
219f2f23
PA
7155 * tracepoint.c: New.
7156
7157 * Makefile.in (OBS): Add tracepoint.o.
7158 (tracepoint.o): New rule.
7159
3a13a53b
L
71602010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7161
7162 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7163 (i386-mmx.o): New.
7164 (i386-mmx.c): Likewise.
7165 (i386-mmx-linux.o): Likewise.
7166 (i386-mmx-linux.c): Likewise.
7167
7168 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7169 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7170 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7171 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7172
7173 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7174 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7175 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7176
1570b33e
L
71772010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7178
7179 * Makefile.in (clean): Updated.
7180 (i386-avx.o): New.
7181 (i386-avx.c): Likewise.
7182 (i386-avx-linux.o): Likewise.
7183 (i386-avx-linux.c): Likewise.
7184 (amd64-avx.o): Likewise.
7185 (amd64-avx.c): Likewise.
7186 (amd64-avx-linux.o): Likewise.
7187 (amd64-avx-linux.c): Likewise.
7188
7189 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7190 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7191 (srv_amd64_regobj): Add amd64-avx.o.
7192 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7193 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7194 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7195 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7196 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7197 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7198 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7199
7200 * i387-fp.c: Include "i386-xstate.h".
7201 (i387_xsave): New.
7202 (i387_cache_to_xsave): Likewise.
7203 (i387_xsave_to_cache): Likewise.
7204 (x86_xcr0): Likewise.
7205
7206 * i387-fp.h (i387_cache_to_xsave): Likewise.
7207 (i387_xsave_to_cache): Likewise.
7208 (x86_xcr0): Likewise.
7209
7210 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7211 * linux-crisv32-low.c (target_regsets): Likewise.
7212 * linux-m68k-low.c (target_regsets): Likewise.
7213 * linux-mips-low.c (target_regsets): Likewise.
7214 * linux-ppc-low.c (target_regsets): Likewise.
7215 * linux-s390-low.c (target_regsets): Likewise.
7216 * linux-sh-low.c (target_regsets): Likewise.
7217 * linux-sparc-low.c (target_regsets): Likewise.
7218 * linux-xtensa-low.c (target_regsets): Likewise.
7219
7220 * linux-low.c: Include <sys/uio.h>.
7221 (regsets_fetch_inferior_registers): Support nt_type.
7222 (regsets_store_inferior_registers): Likewise.
7223 (linux_process_qsupported): New.
7224 (linux_target_ops): Add linux_process_qsupported.
7225
7226 * linux-low.h (regset_info): Add nt_type.
7227 (linux_target_ops): Add process_qsupported.
7228
7229 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7230 and <sys/uio.h>.
7231 (init_registers_i386_avx_linux): New.
7232 (init_registers_amd64_avx_linux): Likewise.
7233 (xmltarget_i386_linux_no_xml): Likewise.
7234 (xmltarget_amd64_linux_no_xml): Likewise.
7235 (PTRACE_GETREGSET): Likewise.
7236 (PTRACE_SETREGSET): Likewise.
7237 (x86_fill_xstateregset): Likewise.
7238 (x86_store_xstateregset): Likewise.
7239 (use_xml): Likewise.
7240 (x86_linux_update_xmltarget): Likewise.
7241 (x86_linux_process_qsupported): Likewise.
7242 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7243 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7244 init_registers_i386_linux here. Call
7245 x86_linux_update_xmltarget.
7246 (the_low_target): Add x86_linux_process_qsupported.
7247
7248 * server.c (handle_query): Call target_process_qsupported.
7249
7250 * target.h (target_ops): Add process_qsupported.
7251 (target_process_qsupported): New.
7252
fc7238bb
PA
72532010-04-03 Pedro Alves <pedro@codesourcery.com>
7254
7255 * inferiors.c (add_thread): Set last_status kind to
7256 TARGET_WAITKIND_IGNORE.
7257 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7258 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7259 (linux_wait_1): Move `thread' local definition to block that uses
7260 it. Don't NULL initialize `event_child'.
7261 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7262 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7263 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7264
bdabb078
PA
72652010-04-01 Pedro Alves <pedro@codesourcery.com>
7266
7267 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7268 an extended waitstatus, or by a watchpoint.
7269 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7270 thread was stepping or has been stopped by a watchpoint.
7271
d3bbe7a0
PA
72722010-04-01 Pedro Alves <pedro@codesourcery.com>
7273
7274 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7275 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7276 of another, then delete the previous, and validate all
7277 breakpoints.
7278 (validate_inserted_breakpoint): New.
7279 (delete_disabled_breakpoints): New.
7280 (validate_breakpoints): New.
7281 (check_mem_read): Validate breakpoints before trusting their
7282 shadow. Delete disabled breakpoints.
7283 (check_mem_write): Validate breakpoints before trusting they
7284 should be inserted. Delete disabled breakpoints.
7285 * mem-break.h (validate_breakpoints):
7286 * server.c (handle_query): Validate breakpoints when we see a
7287 qSymbol query.
7288
8b07ae33
PA
72892010-04-01 Pedro Alves <pedro@codesourcery.com>
7290
7291 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7292 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7293 if we could tell there's a GDB breakpoint at stop_pc.
7294 (need_step_over_p): Don't do a step over if we find a GDB
7295 breakpoint at the resume PC.
7296
7297 * mem-break.c (struct raw_breakpoint): New.
7298 (enum bkpt_type): New type `gdb_breakpoint'.
7299 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7300 fields. New field `raw'.
7301 (find_raw_breakpoint_at): New.
7302 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7303 breakpoint instead.
7304 (set_breakpoint_at): Adjust.
7305 (delete_raw_breakpoint): New.
7306 (release_breakpoint): New.
7307 (delete_breakpoint): Rename to...
7308 (delete_breakpoint_1): ... this. Add proc parameter. Use
7309 release_breakpoint. Return ENOENT.
7310 (delete_breakpoint): Reimplement.
7311 (find_breakpoint_at): Delete.
7312 (find_gdb_breakpoint_at): New.
7313 (delete_breakpoint_at): Delete.
7314 (set_gdb_breakpoint_at): New.
7315 (delete_gdb_breakpoint_at): New.
7316 (gdb_breakpoint_here): New.
7317 (set_reinsert_breakpoint): Use release_breakpoint.
7318 (uninsert_breakpoint): Rename to ...
7319 (uninsert_raw_breakpoint): ... this.
7320 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7321 (reinsert_raw_breakpoint): Change parameter type to
7322 raw_breakpoint.
7323 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7324 instead.
7325 (check_breakpoints): Adjust. Use release_breakpoint.
7326 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7327 (breakpoint_inserted_here): Ditto.
7328 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7329 Don't trust the breakpoint's shadow if it is not inserted.
7330 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7331 (delete_all_breakpoints): Adjust.
7332 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7333 use delete_breakpoint_1.
7334
7335 * mem-break.h (breakpoints_supported): Delete declaration.
7336 (set_gdb_breakpoint_at): Declare.
7337 (gdb_breakpoint_here): Declare.
7338 (delete_breakpoint_at): Delete.
7339 (delete_gdb_breakpoint_at): Declare.
7340
7341 * server.h (struct raw_breakpoint): Forward declare.
7342 (struct process_info): New field `raw_breakpoints'.
7343
7344 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7345 breakpoints.
7346
6bf5e0ba
PA
73472010-03-24 Pedro Alves <pedro@codesourcery.com>
7348
7349 * linux-low.c (status_pending_p_callback): Fix comment.
7350 (linux_wait_for_event_1): Move most of the internal breakpoint
7351 handling from here...
7352 (linux_wait_1): ... to here.
7353 (count_events_callback): New.
7354 (select_singlestep_lwp_callback): New.
7355 (select_event_lwp_callback): New.
7356 (cancel_breakpoints_callback): New.
7357 (select_event_lwp): New.
7358 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7359 priority to all LWPs that have had events that should be reported
7360 to the client. Cancel breakpoints when about to reporting the
7361 event to the client, not while stopping lwps. No longer cancel
7362 finished single-steps here.
7363 (cancel_finished_single_step): Delete.
7364 (cancel_finished_single_steps): Delete.
7365
414a389f
PA
73662010-03-24 Pedro Alves <pedro@codesourcery.com>
7367
7368 * mem-break.c (enum bkpt_type): New.
7369 (struct breakpoint): New field `type'.
7370 (set_breakpoint_at): Change return type to struct breakpoint
7371 pointer. Set type to `other_breakpoint' by default.
7372 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7373 in the breakpoint list.
7374 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7375 (reinsert_breakpoint): Rename to ...
7376 (reinsert_raw_breakpoint): ... this.
7377 (reinsert_breakpoints_at): Adjust.
7378 * mem-break.h (struct breakpoint): Declare.
7379 (set_breakpoint_at): Change return type to struct breakpoint
7380 pointer.
7381
2280c721
PA
73822010-03-24 Pedro Alves <pedro@codesourcery.com>
7383
7384 * server.c (handle_query): Assign, not compare.
7385
d50171e4
PA
73862010-03-24 Pedro Alves <pedro@codesourcery.com>
7387
7388 Teach linux gdbserver to step-over-breakpoints.
7389
7390 * linux-low.c (can_hardware_single_step): New.
7391 (supports_breakpoints): New.
7392 (handle_extended_wait): If stopping threads, read the stop pc of
7393 the new cloned LWP.
7394 (get_pc): New.
7395 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7396 low target doesn't support retrieving the PC.
7397 (add_lwp): Set last_resume_kind to resume_continue.
7398 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7399 (linux_attach): Don't clear stop_expected. Set the lwp's
7400 last_resume_kind to resume_stop.
7401 (linux_detach_one_lwp): Don't check for removed breakpoints.
7402 (check_removed_breakpoint): Delete.
7403 (status_pending_p): Rename to ...
7404 (status_pending_p_callback): ... this. Don't check for removed
7405 breakpoints. Don't consider threads that are stopped from GDB's
7406 perspective.
7407 (linux_wait_for_lwp): Always read the stop_pc here.
7408 (cancel_breakpoint): New.
7409 (step_over_bkpt): New global.
7410 (linux_wait_for_event_1): Implement stepping over breakpoints.
7411 (gdb_wants_lwp_stopped): New.
7412 (gdb_wants_all_stopped): New.
7413 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7414 single-step traps here. Store the thread's last reported target
7415 wait status.
7416 (send_sigstop): Don't clear stop_expected. Always set it,
7417 instead.
7418 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7419 (cancel_finished_single_step): New.
7420 (cancel_finished_single_steps): New.
7421 (wait_for_sigstop): Don't cancel finished single-step traps here.
7422 (linux_resume_one_lwp): Don't check for removed breakpoints.
7423 Don't set `step' on non-hardware step archs.
7424 (linux_set_resume_request): Ignore resume_stop requests if already
7425 stopping or stopped. Set the lwp's last_resume_kind.
7426 (resume_status_pending_p): Don't check for removed breakpoints.
7427 (need_step_over_p): New.
7428 (start_step_over): New.
7429 (finish_step_over): New.
7430 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7431 requests. Clear the thread's last reported target waitstatus.
7432 Don't use the `suspended' flag. Don't consider pending breakpoints.
7433 (linux_resume): Start a step-over if necessary.
7434 (proceed_one_lwp): New.
7435 (proceed_all_lwps): New.
7436 (unstop_all_lwps): New.
7437 * linux-low.h (struct lwp_info): Rewrite comment for the
7438 `suspended' flag. Add the `stop_pc' field. Delete the
7439 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7440 Add `'last_resume_kind' and `need_step_over' fields.
7441 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7442 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7443 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7444 (set_raw_breakpoint_at): New.
7445 (set_breakpoint_at): Rewrite to use it.
7446 (reinsert_breakpoint_handler): Delete.
7447 (set_reinsert_breakpoint): New.
7448 (reinsert_breakpoint_by_bp): Delete.
7449 (delete_reinsert_breakpoints): New.
7450 (uninsert_breakpoint): Rewrite.
7451 (uninsert_breakpoints_at): New.
7452 (reinsert_breakpoint): Rewrite.
7453 (reinsert_breakpoints_at): New.
7454 (check_breakpoints): Rewrite.
7455 (breakpoint_here): New.
7456 (breakpoint_inserted_here): New.
7457 (check_mem_read): Adjust.
7458 * mem-break.h (breakpoints_supported, breakpoint_here)
7459 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7460 (reinsert_breakpoint_by_bp): Delete declaration.
7461 (delete_reinsert_breakpoints): Declare.
7462 (reinsert_breakpoint): Delete declaration.
7463 (reinsert_breakpoints_at): Declare.
7464 (uninsert_breakpoint): Delete declaration.
7465 (uninsert_breakpoints_at): Declare.
7466 (check_breakpoints): Adjust prototype.
7467 * server.h: Adjust include order.
7468 (struct thread_info): Declare here. Add a `last_status' field.
7469
30ba68cb
MS
74702010-03-23 Michael Snyder <msnyder@vmware.com>
7471
7472 * server.c (crc32): New function.
7473 (handle_query): Add handling for 'qCRC:' request.
7474
b9a881c2
PA
74752010-03-23 Pedro Alves <pedro@codesourcery.com>
7476
7477 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7478 lwp had been stopped by a watchpoint.
7479
e92d13d5
PA
74802010-03-16 Pedro Alves <pedro@codesourcery.com>
7481
7482 * server.h (internal_error): Declare.
7483 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7484 * utils.c (internal_error): New function.
7485
64daa791
AS
74862010-03-15 Andreas Schwab <schwab@redhat.com>
7487
7488 * configure.srv: Fix typo setting srv_regobj.
7489
f52cd8cd
PA
74902010-03-15 Pedro Alves <pedro@codesourcery.com>
7491
7492 * linux-low.c (fetch_register): Avoid passing a non string literal
7493 format to `error'.
7494 (usr_store_inferior_registers): Ditto.
7495
93ae6fdc
PA
74962010-03-14 Pedro Alves <pedro@codesourcery.com>
7497
7498 * linux-low.c (linux_write_memory): Bail out early if peeking
7499 memory failed.
7500
c3adc08c
PA
75012010-03-14 Pedro Alves <pedro@codesourcery.com>
7502
7503 * linux-low.h (struct lwp_info): New fields
7504 `stopped_by_watchpoint' and `stopped_data_address'.
7505 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7506 here, and cache them in the lwp object.
7507 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7508 directly.
7509 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7510 field.
7511 (linux_stopped_by_watchpoint): Rewrite.
7512 (linux_stopped_data_address): Rewrite.
7513
bce522a2
PA
75142010-03-06 Simo Melenius <simo.melenius@iki.fi>
7515
7516 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7517 switching the current inferior, not before.
7518
90884b2b
L
75192010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7520
7521 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7522 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7523 i386-linux.c and amd64-linux.c.
7524 (reg-i386.o): Removed.
7525 (reg-i386.c): Likewise.
7526 (reg-i386-linux.o): Likewise.
7527 (reg-i386-linux.c): Likewise.
7528 (reg-x86-64.o): Likewise.
7529 (reg-x86-64.c): Likewise.
7530 (reg-x86-64-linux.o): Likewise.
7531 (reg-x86-64-linux.c): Likewise.
7532 (i386.o): New.
7533 (i386.c): Likewise.
7534 (i386-linux.o): Likewise.
7535 (i386-linux.c): Likewise.
7536 (amd64.o): Likewise.
7537 (amd64.c): Likewise.
7538 (amd64-linux.o): Likewise.
7539 (amd64-linux.c): Likewise.
7540
7541 * configure.srv (srv_i386_regobj): New.
7542 (srv_i386_linux_regobj): Likewise.
7543 (srv_amd64_regobj): Likewise.
7544 (srv_amd64_linux_regobj): Likewise.
7545 (srv_i386_32bit_xmlfiles): Likewise.
7546 (srv_i386_64bit_xmlfiles): Likewise.
7547 (srv_i386_xmlfiles): Likewise.
7548 (srv_amd64_xmlfiles): Likewise.
7549 (srv_i386_linux_xmlfiles): Likewise.
7550 (srv_amd64_linux_xmlfiles): Likewise.
7551 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7552 srv_xmlfiles to $srv_i386_xmlfiles.
7553 (i[34567]86-*-mingw32ce*): Likewise.
7554 (i[34567]86-*-mingw*): Likewise.
7555 (i[34567]86-*-nto*): Likewise.
7556 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7557 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7558 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7559 (x86_64-*-linux*): Likewise.
7560
7561 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7562 (init_registers_amd64_linux): New.
7563 (x86_arch_setup): Replace init_registers_x86_64_linux with
7564 init_registers_amd64_linux.
7565
193f13e6
MK
75662010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7567
7568 * configure.ac: Check for libdl. If it is not available link against
7569 static libthread_db.
7570 * configure: Regenerate.
7571
85d721b8
PA
75722010-02-22 Pedro Alves <pedro@codesourcery.com>
7573
7574 PR9605
7575
7576 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7577 handing a read watchpoint.
7578 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7579
6076632b
DE
75802010-02-12 Doug Evans <dje@google.com>
7581
7582 * linux-low.c (linux_supports_tracefork_flag): Document.
7583 (linux_look_up_symbols): Add comment.
7584
3327ccf7
L
75852010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7586
7587 * regcache.c (supply_register): Clear regcache if buf is NULL.
7588
0718675c 75892010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7590 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7591
7592 * inferiors.c (find_inferior): Add function documentation.
7593 (unloaded_dll): Handle the case where the unloaded dll has not
7594 been previously registered in the dll list.
7595
177321bd
DJ
75962010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7597
7598 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7599 (thumb2_breakpoint): New.
7600 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7601
2b009048
DJ
76022010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7603
7604 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7605 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7606 breakpoints.
7607
3be029c7
PA
76082010-01-21 Pedro Alves <pedro@codesourcery.com>
7609
7610 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7611
18f5de3b
JK
76122010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7613
7614 * linux-s390-low.c (s390_collect_ptrace_register)
7615 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7616
3743bb4f
DE
76172010-01-21 Doug Evans <dje@google.com>
7618
14ce3065
DE
7619 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7620 (PTRACE_ARG4_TYPE): New macro.
7621 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7622 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7623 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7624 (usr_store_inferior_registers): Ditto.
7625 (linux_read_memory, linux_write_memory): Ditto.
7626 (linux_test_for_tracefork): Ditto.
7627
3743bb4f
DE
7628 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7629 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7630
8b315be5
PA
76312010-01-21 Pedro Alves <pedro@codesourcery.com>
7632
7633 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7634 target.
7635
85492558
PA
76362010-01-21 Pedro Alves <pedro@codesourcery.com>
7637
7638 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7639 prototype to take a regcache. Adjust.
7640
442ea881
PA
76412010-01-20 Pedro Alves <pedro@codesourcery.com>
7642
7643 * regcache.h (struct thread_info): Forward declare.
7644 (struct regcache): New.
7645 (new_register_cache): Adjust prototype.
7646 (get_thread_regcache): Declare.
7647 (free_register_cache): Adjust prototype.
7648 (registers_to_string, registers_from_string): Ditto.
7649 (supply_register, supply_register_by_name, collect_register)
7650 (collect_register_as_string, collect_register_by_name): Ditto.
7651 * regcache.c (struct inferior_regcache_data): Delete.
7652 (get_regcache): Rename to ...
7653 (get_thread_regcache): ... this. Adjust. Switch inferior before
7654 fetching registers.
7655 (regcache_invalidate_one): Adjust.
7656 (regcache_invalidate): Fix prototype.
7657 (new_register_cache): Return the new register cache.
7658 (free_register_cache): Change prototype.
7659 (realloc_register_cache): Adjust.
7660 (registers_to_string): Change prototype to take a regcache. Adjust.
7661 (registers_from_string): Ditto.
7662 (register_data): Ditto.
7663 (supply_register): Ditto.
7664 (supply_register_by_name): Ditto.
7665 (collect_register): Ditto.
7666 (collect_register_as_string): Ditto.
7667 (collect_register_by_name): Ditto.
7668 * server.c (process_serial_event): Adjust.
7669 * linux-low.h (regset_fill_func, regset_store_func): Change
7670 prototype.
7671 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7672 Change prototype.
7673 * linux-low.c (get_stop_pc): Adjust.
7674 (check_removed_breakpoint): Adjust.
7675 (linux_wait_for_event): Adjust.
7676 (linux_resume_one_lwp): Adjust.
7677 (fetch_register): Add regcache parameter. Adjust.
7678 (usr_store_inferior_registers): Ditto.
7679 (regsets_fetch_inferior_registers): Ditto.
7680 (regsets_store_inferior_registers): Ditto.
7681 (linux_fetch_registers, linux_store_registers): Ditto.
7682 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7683 regcache. Adjust.
43aaf8b6
PA
7684 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7685 Ditto.
442ea881
PA
7686 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7687 prototype to take a regcache.
7688 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7689 * remote-utils.c (convert_ascii_to_int, outreg)
7690 (prepare_resume_reply): Change prototype to take a regcache.
7691 Adjust.
7692 * target.h (struct target_ops) <fetch_registers, store_registers>:
7693 Change prototype to take a regcache.
7694 (fetch_inferior_registers, store_inferior_registers): Change
7695 prototype to take a regcache. Adjust.
7696 * proc-service.c (ps_lgetregs): Adjust.
7697 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7698 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7699 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7700 take a regcache. Adjust.
7701 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7702 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7703 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7704 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7705 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7706 (cris_cannot_fetch_register):
7707 (cris_breakpoint_at): Change prototype to take a regcache.
7708 Adjust.
7709 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7710 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7711 to take a regcache. Adjust.
7712 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7713 Adjust.
7714 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7715 take a regcache. Adjust.
7716 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7717 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7718 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7719 * linux-mips-low.c (mips_get_pc):
7720 (mips_set_pc): Change prototype to take a regcache. Adjust.
7721 (mips_reinsert_addr): Adjust.
7722 (mips_collect_register): Change prototype to take a regcache.
7723 Adjust.
7724 (mips_supply_register):
7725 (mips_collect_register_32bit, mips_supply_register_32bit)
7726 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7727 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7728 * linux-ppc-low.c (ppc_supply_ptrace_register)
7729 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7730 (parse_spufs_run): Adjust.
7731 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7732 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7733 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7734 take a regcache. Adjust.
7735 * linux-s390-low.c (s390_collect_ptrace_register)
7736 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7737 (s390_set_pc): Change prototype to take a regcache. Adjust.
7738 (s390_arch_setup): Adjust.
7739 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7740 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7741 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7742 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7743 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7744 regcache. Adjust.
7745 (sparc_breakpoint_at): Adjust.
7746 * linux-xtensa-low.c (xtensa_fill_gregset):
7747 (xtensa_store_gregset):
7748 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7749 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7750 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7751 prototype to take a regcache. Adjust.
7752 * win32-arm-low.c (arm_fetch_inferior_register)
7753 (arm_store_inferior_register): Change prototype to take a
7754 regcache. Adjust.
7755 * win32-i386-low.c (i386_fetch_inferior_register)
7756 (i386_store_inferior_register): Change prototype to take a
7757 regcache. Adjust.
7758 * win32-low.c (child_fetch_inferior_registers)
7759 (child_store_inferior_registers): Change prototype to take a
7760 regcache. Adjust.
7761 (win32_wait): Adjust.
7762 (win32_fetch_inferior_registers): Change prototype to take a
7763 regcache. Adjust.
7764 (win32_store_inferior_registers): Adjust.
7765 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7766 store_inferior_register>: Change prototype to take a regcache.
7767
60c3d7b0
DE
77682010-01-20 Doug Evans <dje@google.com>
7769
7770 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7771 #ifdef.
7772 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7773 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7774
dc146f7c
VP
77752010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7776
7777 * linux-low.c (linux_core_of_thread): New.
7778 (compare_ints, show_process, list_threads): New.
7779 (linux_qxfer_osdata): Report threads and cores.
7780 (linux_target_op): Register linux_core_of_thread.
7781 * remote-utils.c (prepare_resume_reply): Report the core.
7782 (buffer_xml_printf): Support %d specifier.
7783 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7784 New.
7785 (handle_query): Handle qXfer:threads. Announce availability
7786 thereof.
7787 * target.h (struct target_ops): New field core_of_thread.
7788
7803799a
UW
77892010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7790
7791 * Makefile.in (clean): Remove new generated files.
7792 (reg-s390.o, reg-s390.c): Remove rules.
7793 (reg-s390x.o, reg-s390x.c): Likewise.
7794 (s390-linux32.o, s390-linux32.c): Add rules.
7795 (s390-linux64.o, s390-linux64.c): Likewise.
7796 (s390x-linux64.o, s390x-linux64.c): Likewise.
7797 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7798 * linux-s390-low.c: Include <elf.h>.
7799 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7800 (init_registers_s390): Remove prototype.
7801 (init_registers_s390x): Likewise.
7802 (init_registers_s390_linux32): Add prototype.
7803 (init_registers_s390_linux64): Likewise.
7804 (init_registers_s390x_linux64): Likewise.
7805 (s390_num_regs_3264): New define.
7806 (s390_regmap_3264): New global variable.
7807 (s390_cannot_fetch_register): Remove obsolete check.
7808 (s390_cannot_store_register): Likewise.
7809 (s390_collect_ptrace_register): Handle upper/lower register halves.
7810 (s390_supply_ptrace_register): Likewise.
7811 (s390_fill_gregset): Update to register number changes.
7812 (s390_get_hwcap): New routine.
7813 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7814 Install appropriate regmap and register set.
7815
6e7ffa39
JB
78162010-01-01 Joel Brobecker <brobecker@adacore.com>
7817
7818 * server.c (gdbserver_version): Update copyright year to 2010.
7819 * gdbreplay.c (gdbreplay_version): Likewise.
7820
957f3f49
DE
78212009-12-28 Doug Evans <dje@google.com>
7822
7823 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7824 elf/external.h. Include <elf.h> instead but only if necessary.
7825
ca5c370d
PA
78262009-12-28 Pedro Alves <pedro@codesourcery.com>
7827
7828 * linux-low.c (linux_remove_process): Remove `detaching'
7829 parameter. Don't release/detach from thread_db here.
7830 (linux_kill): Release/detach from thread_db here, ...
7831 (linux_detach): ... and here, before actually detaching.
7832 (linux_wait_1): ... and here, when a process exits.
7833 * thread-db.c (any_thread_of): New.
7834 (thread_db_free): Switch the current inferior to a thread of the
7835 passed in process.
7836
4ee62156
DE
78372009-12-21 Doug Evans <dje@google.com>
7838
d90e6a88
DE
7839 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7840
c5f62d5f
DE
7841 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7842 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7843 warning ifndef __NR_tkill. Move setting of errno there too.
7844 Delete unnecessary resetting of errno after syscall.
7845 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7846
10e86dd7
DE
7847 * configure.ac: Check for dladdr.
7848 * config.in: Regenerate.
7849 * configure: Regenerate.
7850 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7851 (try_thread_db_load): Update.
7852
4ee62156
DE
7853 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7854
00f515da
DE
78552009-12-18 Doug Evans <dje@google.com>
7856
e9464885
DE
7857 * event-loop.c: Include unistd.h if it exists.
7858
07d4f67e
DE
7859 * linux-low.c (my_waitpid): Move definition away from being in
7860 between linux_tracefork_child/linux_test_for_tracefork.
7861
00f515da
DE
7862 * gdb_proc_service.h (psaddr_t): Fix type.
7863 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7864 signature to match glibc.
7865
1de1badb
DE
78662009-12-16 Doug Evans <dje@google.com>
7867
7868 * linux-low.c (linux_read_memory): Fix argument to read.
7869
aeeb81d1
PA
78702009-11-26 Pedro Alves <pedro@codesourcery.com>
7871
7872 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7873 events, don't leave current_inferior pointing at null.
7874
10357975
PA
78752009-11-26 Pedro Alves <pedro@codesourcery.com>
7876
7877 * win32-low.c (LOG): Delete.
7878 (OUTMSG): Output to stderr.
7879 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7880 on compile time LOG macro.
7881 (win32_wait): Fix debug output.
7882
cf6e3471
PA
78832009-11-26 Pedro Alves <pedro@codesourcery.com>
7884
7885 * win32-low.c (win32_add_one_solib): If the dll name is
7886 "ntdll.dll", prepend the system directory to the dll path.
7887
0c85e18e
MK
78882009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7889
7890 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7891
9ac544ce 78922009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7893 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7894
7895 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7896 * configure.ac: Check for __mcoldfire__ and set
7897 gdb_cv_m68k_is_coldfire.
7898 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7899 reg-cf.o and reg-m68k.o.
7900 * configure: Regenerated.
7901
fd7dd3e6
PA
79022009-11-16 Pedro Alves <pedro@codesourcery.com>
7903
7904 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7905 Pass it to thread_db_free.
7906 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7907 proper `detaching' argument to linux_remove_process.
7908 * linux-low.h (thread_db_free): Add `detaching' parameter.
7909 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7910 to thread_db_free.
7911 (thread_db_free): Add `detaching' parameter. Only
7912 call td_ta_clear_event if detaching from process.
7913
75aa492e
MK
79142009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7915
7916 * thread-db.c (thread_db_free): Fix typo.
7917
21e1bee4
PP
79182009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7919
7920 PR gdb/10838
7921 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7922
8838b45e
NS
79232009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7924
7925 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7926 with an i686 compiler.
7927 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7928 needed.
7929 * configure: Rebuilt.
7930
8a35fb51
SL
79312009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7932
7933 PR gdb/10783
7934
7935 * server.c (handle_search_memory_1): Correct read_addr initialization
7936 in loop for searching subsequent chunks.
7937
96f15937
PP
79382009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7939
7940 * configure.ac: New --with-libthread-db option.
7941 * thread-db.c: Allow direct dependence on libthread_db.
7942 (thread_db_free): Adjust.
7943 * config.in: Regenerate.
7944 * configure: Likewise.
889bf7c5 7945
5f7d1694
PP
79462009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7947
7948 PR gdb/10757
7949 * thread-db.c (attach_thread): New function.
7950 (maybe_attach_thread): Return success/failure.
7951 (find_new_threads_callback): Adjust.
889bf7c5
PA
7952 (thread_db_find_new_threads): Loop until no new threads.
7953
88e3b899
PA
79542009-10-13 Pedro Alves <pedro@codesourcery.com>
7955
7956 * proc-service.c (ps_lgetregs): Formatting.
7957
cdbfd419
PP
79582009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7959
7960 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7961 * configure.ac: Adjust.
7962 * linux-low.h (struct process_info_private): Move members to struct
7963 thread_db.
7964 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7965 * linux-low.c (linux_remove_process): Adjust.
7966 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7967 * server.c (handle_query): Move code ...
7968 (handle_monitor_command): ... here. New function.
7969 * target.h (struct target_ops): New member.
7970 * thread-db.c (struct thread_db): New.
7971 (libthread_db_search_path): New variable.
7972 (thread_db_create_event, thread_db_enable_reporting)
7973 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7974 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7975 (try_thread_db_load_1, dladdr_to_soname): New functions.
7976 (try_thread_db_load, thread_db_load_search): New functions.
7977 (thread_db_init): Search for libthread_db.
7978 (thread_db_free): New function.
7979 (thread_db_handle_monitor_command): Likewise.
7980 * config.in: Regenerate.
7981 * configure: Regenerate.
889bf7c5 7982
4168d2d6
UW
79832009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7984
7985 * spu-low.c (spu_kill): Wait for inferior to terminate.
7986 Call clear_inferiors.
7987 (spu_detach): Call clear_inferiors.
7988
81ecdfbb
RW
79892009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7990
7991 * aclocal.m4: Regenerate.
7992 * config.in: Likewise.
7993 * configure: Likewise.
7994
0b9ff2c0
UW
79952009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7996
7997 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7998 (parse_spufs_run): New function.
7999 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8000 (ppc_breakpoint_at): Handle SPU breakpoints.
8001
efcbbd14
UW
80022009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8003
8004 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8005 (SPUFS_MAGIC): Define.
8006 (spu_enumerate_spu_ids): New function.
8007 (linux_qxfer_spu): New function.
8008 (linux_target_ops): Install linux_qxfer_spu.
8009
f4d9bade
UW
80102009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8011
8012 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8013 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8014 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8015 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8016 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8017 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8018 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8019 (init_registers_powerpc_cell32l): Add prototype.
8020 (init_registers_powerpc_cell64l): Likewise.
8021 (ppc_arch_setup): Detect Cell/B.E. architecture.
8022
96e946ca
RW
80232009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8024
8025 * Makefile.in (datarootdir): New variable.
8026
58d6951d
DJ
80272009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8028
8029 * linux-low.c (linux_write_memory): Update debugging output.
8030 * Makefile.in (clean): Add new descriptions.
8031 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8032 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8033 * configure.srv: Add new files for arm*-*-linux*.
8034 * linux-arm-low.c: Add new declarations.
8035 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8036 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8037 (HWCAP_VFPv3D16): New.
8038 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8039 instead of __IWMMXT__.
8040 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8041 (arm_arch_setup): New.
8042 (target_regsets): Remove #ifdef. Add VFP regset.
8043 (the_low_target): Use arm_arch_setup.
8044
12b42a12
DJ
80452009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8046
8047 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8048 the main thread again.
8049
ac8c974e
AR
80502009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8051
8052 Adding Neutrino gdbserver.
8053 * configure: Regenerated.
8054 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8055 * configure.srv (i[34567]86-*-nto*): New target.
8056 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8057 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8058 (nto_comctrl) [__QNX__]: New function.
8059 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8060
4424e0c3 80612009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
8062
8063 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8064 srv_tgtobj.
8065
912cf4ba
PA
80662009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8067 Pedro Alves <pedro@codesourcery.com>
8068
8069 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8070 don't support CONTEXT_EXTENDED_REGISTERS.
8071 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8072 (the_low_target): Install them.
8073 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8074 failing with ERROR_PIPE_NOT_CONNECTED.
8075
aa5ca48f
DE
80762009-06-30 Doug Evans <dje@google.com>
8077 Pierre Muller <muller@ics.u-strasbg.fr>
8078
8079 Add h/w watchpoint support to x86-linux, win32-i386.
8080 * Makefile.in (SFILES): Add i386-low.c
8081 (i386_low_h): Define.
8082 (i386-low.o): Add dependencies.
8083 (linux-x86-low.o): Add i386-low.h dependency.
8084 (win32-i386-low.o): Ditto.
8085 * i386-low.c: New file.
8086 * i386-low.h: New file.
8087 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8088 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8089 * linux-low.c (linux_add_process): Initialize arch_private.
8090 (linux_remove_process): Free arch_private.
8091 (add_lwp): Initialize arch_private.
8092 (delete_lwp): Free arch_private.
8093 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8094 provided.
8095 * linux-low.h (process_info_private): New member arch_private.
8096 (lwp_info): New member arch_private.
8097 (linux_target_ops): New members new_process, new_thread,
8098 prepare_to_resume.
8099 (ptid_of): New macro.
8100 * linux-x86-low.c: Include stddef.h, i386-low.h.
8101 (arch_process_info): New struct.
8102 (arch_lwp_info): New struct.
8103 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8104 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8105 (i386_dr_low_get_status): New function.
8106 (x86_insert_point, x86_remove_point): New functions.
8107 (x86_stopped_by_watchpoint): New function.
8108 (x86_stopped_data_address): New function.
8109 (x86_linux_new_process, x86_linux_new_thread): New functions.
8110 (x86_linux_prepare_to_resume): New function.
8111 (the_low_target): Add entries for insert_point, remove_point,
8112 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8113 prepare_to_resume.
8114 * server.c (debug_hw_points): New global.
8115 (monitor_show_help): Document set debug-hw-points.
8116 (handle_query): Process "set debug-hw-points".
8117 * server.h (debug_hw_points): Declare.
8118 (paddress): Declare.
8119 * utils.c (NUMCELLS, CELLSIZE): New macros.
8120 (get_sell, xsnprintf, paddress): New functions.
8121 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8122 remove_point, stopped_by_watchpoint, stopped_data_address.
8123 * win32-i386-low.c: Include i386-low.h.
8124 (debug_reg_state): Replaces dr.
8125 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8126 (i386_dr_low_get_status): New function.
8127 (i386_insert_point, i386_remove_point): New functions.
8128 (i386_stopped_by_watchpoint): New function.
8129 (i386_stopped_data_address): New function.
8130 (i386_initial_stuff): Update.
8131 (get_thread_context,set_thread_context,i386_thread_added): Update.
8132 (the_low_target): Add entries for insert_point,
8133 remove_point, stopped_by_watchpoint, stopped_data_address.
8134 * win32-low.c (win32_insert_watchpoint): New function.
8135 (win32_remove_watchpoint): New function.
8136 (win32_stopped_by_watchpoint): New function.
8137 (win32_stopped_data_address): New function.
8138 (win32_target_ops): Add entries for insert_watchpoint,
8139 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8140 * win32-low.h (win32_target_ops): New members insert_point,
8141 remove_point, stopped_by_watchpoint, stopped_data_address.
8142
d993e290
PA
81432009-06-25 Pedro Alves <pedro@codesourcery.com>
8144
8145 * server.c (process_serial_event): Re-return unsupported, not
8146 error, if the type isn't recognized. Re-allow supporting only
8147 insert or remove packets. Also call require_running for
8148 breakpoints. Add missing break statement to default case. Tidy.
8149 * target.h (struct target_ops): Rename insert_watchpoint to
8150 insert_point, and remove_watchpoint to remove_point.
8151
8152 * linux-low.h (struct linux_target_ops): Likewise.
8153 * linux-low.c (linux_insert_watchpoint): Rename to ...
8154 (linux_insert_point): ... this. Adjust.
8155 (linux_remove_watchpoint): Rename to ...
8156 (linux_remove_point): ... this. Adjust.
8157 (linux_target_ops): Adjust.
8158 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8159 (cris_insert_point): ... this.
8160 (cris_remove_watchpoint): Rename to ...
8161 (cris_remove_point): ... this.
8162 (the_low_target): Adjust.
8163
0f54c268
PM
81642009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8165
8166 * server.c (handle_v_kill): Pass signal_pid to
8167 kill_inferior if multi_process is zero.
8168
c6314022
AR
81692009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8170
8171 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8172 * target.h (target_ops): Comment for *_watchpoint to make it clear
8173 the functions can get types '0' and '1'.
8174
4463ce24
AR
81752009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8176
8177 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8178 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8179 * regcache.c (get_regcache): Likewise.
8180 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8181 * win32-low.c (child_fetch_inferior_registers): Remove check for
8182 regno 0.
8183
cf8fd78b
PA
81842009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8185 Pedro Alves <pedro@codesourcery.com>
8186
8187 * target.h (struct target_ops) <supports_multi_process>: New
8188 callback.
8189 (target_supports_multi_process): New.
8190 * server.c (handle_query): Even if GDB reports support, only
8191 enable multi-process if the target also supports it. Report
8192 multi-process support only if the target backend supports it.
8193 * linux-low.c (linux_supports_multi_process): New function.
8194 (linux_target_ops): Install it as target_supports_multi_process
8195 callback.
8196
47c0c975
DE
81972009-05-24 Doug Evans <dje@google.com>
8198
e09875d4
DE
8199 Global renaming of find_thread_pid to find_thread_ptid.
8200 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8201 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8202 All callers updated.
8203
e27d73f6
DE
8204 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8205 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8206 directly.
8207
47c0c975
DE
8208 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8209 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8210 (linux_resume_one_lwp): Ditto.
8211
2acc282a
DE
82122009-05-23 Doug Evans <dje@google.com>
8213
8214 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8215 from struct inferior_list_entry * to struct lwp_info *.
8216 All callers updated.
8217
9f1036c1
DE
82182009-05-13 Doug Evans <dje@google.com>
8219
8220 * linux-x86-low.c: Don't include assert.h.
8221 (x86_siginfo_fixup): Use fatal, not assert.
8222 (x86_arch_setup): Fix comment.
8223
d0722149
DE
82242009-05-12 Doug Evans <dje@google.com>
8225
8226 Biarch support for i386/amd64 gdbserver.
8227 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8228 Add linux-x86-low.c.
8229 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8230 (linux-x86-low.o): Add.
8231 * linux-x86-64-low.c: Delete.
8232 * linux-i386-low.c: Delete.
8233 * linux-x86-low.c: New file.
8234 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8235 linux-x86-low.o.
8236 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8237 linux-x86-low.o.
8238 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8239 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8240 (linux_child_pid_to_exec_file): New function.
8241 (elf_64_header_p, elf_64_file_p): New functions.
8242 (siginfo_fixup): New function.
8243 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8244 give target a chance to convert layout.
8245 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8246 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8247
fdeb2a12
DE
82482009-05-07 Doug Evans <dje@google.com>
8249
8250 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8251 (regsets_store_inferior_registers): Ditto.
8252
a6dbe5df
PA
82532009-05-06 Pedro Alves <pedro@codesourcery.com>
8254
8255 PR server/10048
8256
8257 * linux-low.c (must_set_ptrace_flags): Delete.
8258 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8259 of the global.
8260 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8261 `lwp->must_set_ptrace_flags' instead.
ba42693b 8262 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8263 (linux_wait_1): ... not here.
8264
5091eb23
DE
82652009-04-30 Doug Evans <dje@google.com>
8266
9f767825
DE
8267 * inferiors.c (started_inferior_callback): New function.
8268 (attached_inferior_callback): New function.
8269 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8270 * server.c (print_started_pid, print_attached_pid): New functions.
8271 (detach_or_kill_for_exit): New function.
8272 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8273 * server.h (have_started_inferiors_p): Declare.
8274 (have_attached_inferiors_p): Declare.
8275
5091eb23
DE
8276 * inferiors.c (remove_process): Fix memory leak, free process.
8277 * linux-low.c (linux_remove_process): New function.
8278 (linux_kill): Call it instead of remove_process.
8279 (linux_detach, linux_wait_1): Ditto.
8280
155c8968
PA
82812009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8282
8283 * configure.srv: Add x86 Windows CE target.
8284
7fe519cb
UW
82852009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8286
8287 * inferiors.c (get_thread_process): Make global.
8288 * server.h (get_thread_process): Add prototype.
8289 * thread-db.c (find_one_thread): Use get_thread_process
8290 instead of current_process.
8291 (thread_db_get_tls_address): Do not crash if called when
8292 thread layer is not yet initialized.
8293
5472f405
UW
82942009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8295
8296 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8297 * spu-low.c (current_tid): Rename to ...
8298 (current_ptid): ... this.
8299 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8300 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8301 ptid_get_lwp (current_ptid) instead of current_tid.
8302 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8303 instead of current_tid. Use find_process_pid to verify pid
8304 argument is valid. Pass proper argument to remove_process.
8305 (spu_thread_alive): Compare current_ptid instead of current_tid.
8306 (spu_resume): Likewise.
8307
55ac2b99
PA
83082009-04-02 Pedro Alves <pedro@codesourcery.com>
8309
8310 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8311 variable.
8312
95954743
PA
83132009-04-01 Pedro Alves <pedro@codesourcery.com>
8314
8315 Implement the multiprocess extensions, and add linux multiprocess
8316 support.
8317
8318 * server.h (ULONGEST): Declare.
8319 (struct ptid, ptid_t): New.
8320 (minus_one_ptid, null_ptid): Declare.
8321 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8322 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8323 (struct inferior_list_entry): Change `id' type from unsigned from
8324 to ptid_t.
8325 (struct sym_cache, struct breakpoint, struct
8326 process_info_private): Forward declare.
8327 (struct process_info): Declare.
8328 (current_process): Declare.
8329 (all_processes): Declare.
8330 (initialize_inferiors): Declare.
8331 (add_thread): Adjust to use ptid_t.
8332 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8333 (add_process, remove_process, find_thread_pid): Declare.
8334 (find_inferior_id): Adjust to use ptid_t.
8335 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8336 (multi_process): Declare.
8337 (push_event): Adjust to use ptid_t.
8338 (read_ptid, write_ptid): Declare.
8339 (prepare_resume_reply): Adjust to use ptid_t.
8340 (clear_symbol_cache): Declare.
8341 * inferiors.c (all_processes): New.
8342 (null_ptid, minus_one_ptid): New.
8343 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8344 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8345 (add_thread): Change unsigned long to ptid. Remove gdb_id
8346 parameter. Adjust.
8347 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8348 (gdb_id_to_thread): Rename to ...
8349 (find_thread_pid): ... this. Change unsigned long to ptid.
8350 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8351 (loaded_dll, pull_pid_from_list): Adjust.
8352 (add_process, remove_process, find_process_pid)
8353 (get_thread_process, current_process, initialize_inferiors): New.
8354 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8355 (struct target_waitstatus) <related_pid>: Ditto.
8356 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8357 return type to int.
8358 (struct target_ops) <join>: Add `pid' argument.
8359 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8360 (struct target_ops) <wait>: Add `ptid' field. Change return type
8361 to ptid.
8362 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8363 (mywait): Add `ptid' argument. Change return type to ptid_t.
8364 (target_pid_to_str): Declare.
8365 * target.c (set_desired_inferior): Adjust to use ptids.
8366 (mywait): Add new `ptid' argument. Adjust.
8367 (target_pid_to_str): New.
8368 * mem-break.h (free_all_breakpoints): Declare.
8369 * mem-break.c (breakpoints): Delelete.
8370 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8371 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8372 to use per-process breakpoint list.
8373 (free_all_breakpoints): New.
8374 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8375 (symbol_cache, all_symbols_looked_up): Delete.
8376 (hexchars): New.
8377 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8378 read_ptid): New.
8379 (prepare_resume_reply): Change ptid argument's type from unsigned
8380 long to ptid_t. Adjust. Implement W;process and X;process.
8381 (free_sym_cache, clear_symbol_cache): New.
8382 (look_up_one_symbol): Adjust to per-process symbol cache. *
8383 * server.c (cont_thread, general_thread, step_thread): Change type
8384 to ptid_t.
8385 (attached): Delete.
8386 (multi_process): New.
8387 (last_ptid): Change type to ptid_t.
8388 (struct vstop_notif) <ptid>: Change type to ptid_t.
8389 (queue_stop_reply, push_event): Change `ptid' argument's type to
8390 ptid_t.
8391 (discard_queued_stop_replies): Add `pid' argument.
8392 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8393 changes. Don't reference the `attached' global.
8394 (attach_inferior): Adjust to mywait interface changes.
8395 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8396 features. Handle and report "multiprocess+". Handle
8397 "qAttached:PID".
8398 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8399 changes.
8400 (handle_v_kill): New.
8401 (handle_v_stopped): Adjust to use target_pid_to_str.
8402 (handle_v_requests): Allow multiple attaches and runs when
8403 multiprocess extensions are in effect. Handle "vKill".
8404 (myresume): Adjust to use ptids.
8405 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8406 (handle_status): Adjust to discard_queued_stop_replies interface
8407 change.
8408 (first_thread_of, kill_inferior_callback)
8409 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8410 (main): Call initialize_inferiors. Adjust to use ptids, killing
8411 and detaching from all inferiors. Handle multiprocess packet
8412 variants.
8413 * linux-low.h: Include gdb_proc_service.h.
8414 (struct process_info_private): New.
8415 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8416 <lwpid_of>: Use ptid_get_lwp.
8417 (get_lwp_thread): Adjust.
8418 (struct lwp_info): Add `dead' member.
8419 (find_lwp_pid): Declare.
8420 * linux-low.c (thread_db_active): Delete.
8421 (new_inferior): Adjust comment.
8422 (inferior_pid): Delete.
8423 (linux_add_process): New.
8424 (handle_extended_wait): Adjust.
8425 (add_lwp): Change unsigned long to ptid.
8426 (linux_create_inferior): Add process to processes table. Adjust
8427 to use ptids. Don't set new_inferior here.
8428 (linux_attach_lwp): Rename to ...
8429 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8430 it. Adjust to use ptids.
8431 (linux_attach_lwp): New.
8432 (linux_attach): Add process to processes table. Don't set
8433 new_inferior here.
8434 (struct counter): New.
8435 (second_thread_of_pid_p, last_thread_of_process_p): New.
8436 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8437 multiple processes.
8438 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8439 processes. Remove process from process table.
8440 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8441 to multiple processes.
8442 (any_thread_of): New.
8443 (linux_detach): Add `pid' argument, and handle it. Remove process
8444 from processes table.
8445 (linux_join): Add `pid' argument. Handle it.
8446 (linux_thread_alive): Change unsighed long argument to ptid_t.
8447 Consider dead lwps as not being alive.
8448 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8449 threads we're not interested in.
8450 (same_lwp, find_lwp_pid): New.
8451 (linux_wait_for_lwp): Change `pid' argument's type from int to
8452 ptid_t. Adjust.
8453 (linux_wait_for_event): Rename to ...
8454 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8455 from int to ptid_t. Adjust.
8456 (linux_wait_for_event): New.
8457 (linux_wait_1): Add `ptid' argument. Change return type to
8458 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8459 that exit from the process table.
8460 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8461 Adjust.
8462 (mark_lwp_dead): New.
8463 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8464 stopping all threads, mark its main lwp as dead.
8465 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8466 ptids.
8467 (fetch_register, usr_store_inferior_registers)
8468 (regsets_fetch_inferior_registers)
8469 (regsets_store_inferior_registers, linux_read_memory)
8470 (linux_write_memory): Inline `inferior_pid'.
8471 (linux_look_up_symbols): Adjust to use per-process
8472 `thread_db_active'.
8473 (linux_request_interrupt): Adjust to use ptids.
8474 (linux_read_auxv): Inline `inferior_pid'.
8475 (initialize_low): Don't reference thread_db_active.
8476 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8477 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8478 (ps_getpid): Return the pid of the current inferior.
8479 * thread-db.c (proc_handle, thread_agent): Delete.
8480 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8481 per-process data.
8482 (find_one_thread): Change argument type to ptid_t. Adjust to
8483 per-process data.
8484 (maybe_attach_thread): Adjust to per-process data and ptids.
8485 (thread_db_find_new_threads): Ditto.
8486 (thread_db_init): Ditto.
8487 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8488 processes table. Adjust to use ptids.
8489 (spu_kill, spu_detach): Adjust interface. Remove process from
8490 processes table.
8491 (spu_join, spu_thread_alive): Adjust interface.
8492 (spu_wait): Adjust interface. Remove process from processes
8493 table. Adjust to use ptids.
8494 * win32-low.c (current_inferior_tid): Delete.
8495 (current_inferior_ptid): New.
8496 (debug_event_ptid): New.
8497 (thread_rec): Take a ptid. Adjust.
8498 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8499 (child_delete_thread): Ditto.
8500 (do_initial_child_stuff): Add `attached' argument. Add process to
8501 processes table.
8502 (child_fetch_inferior_registers, child_store_inferior_registers):
8503 Adjust.
8504 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8505 (win32_attach): Pass 1 to do_initial_child_stuff.
8506 (win32_kill): Adjust interface. Remove process from processes
8507 table.
8508 (win32_detach): Ditto.
8509 (win32_join): Adjust interface.
8510 (win32_thread_alive): Take a ptid.
8511 (win32_resume): Adjust to use ptids.
8512 (get_child_debug_event): Ditto.
8513 (win32_wait): Adjust interface. Remove exiting process from
8514 processes table.
8515
bd99dc85
PA
85162009-04-01 Pedro Alves <pedro@codesourcery.com>
8517
8518 Non-stop mode support.
8519
8520 * server.h (non_stop): Declare.
8521 (gdb_client_data, handler_func): Declare.
8522 (delete_file_handler, add_file_handler, start_event_loop):
8523 Declare.
8524 (handle_serial_event, handle_target_event, push_event)
8525 (putpkt_notif): Declare.
8526 * target.h (enum resume_kind): New.
8527 (struct thread_resume): Replace `step' field by `kind' field.
8528 (TARGET_WNOHANG): Define.
8529 (struct target_ops) <wait>: Add `options' argument.
8530 <supports_non_stop, async, start_non_stop>: New fields.
8531 (target_supports_non_stop, target_async): New.
8532 (start_non_stop): Declare.
8533 (mywait): Add `options' argument.
8534 * target.c (mywait): Add `options' argument. Print child exit
8535 notifications here.
8536 (start_non_stop): New.
8537 * server.c (non_stop, own_buf, mem_buf): New globals.
8538 (struct vstop_notif): New.
8539 (notif_queue): New global.
8540 (queue_stop_reply, push_event, discard_queued_stop_replies)
8541 (send_next_stop_reply): New.
8542 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8543 interface changes.
8544 (attach_inferior): In non-stop mode, don't wait for the target
8545 here.
8546 (handle_general_set): Handle QNonStop.
8547 (handle_query): When handling qC, return the current general
8548 thread, instead of the first thread of the list.
8549 (handle_query): If the backend supports non-stop mode, include
8550 QNonStop+ in the qSupported query response.
8551 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8552 and non-stop mode.
8553 (handle_v_attach, handle_v_run): Handle non-stop mode.
8554 (handle_v_stopped): New.
8555 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8556 (myresume): Adjust to use resume_kind. Handle non-stop.
8557 (queue_stop_reply_callback): New.
8558 (handle_status): Handle non-stop mode.
8559 (main): Clear non_stop flag on reconnection. Use the event-loop.
8560 Refactor serial protocol handling from here ...
8561 (process_serial_event): ... to this new function. When GDB
8562 selects any thread, select one here. In non-stop mode, wait until
8563 GDB acks all pending events before exiting.
8564 (handle_serial_event, handle_target_event): New.
8565 * remote-utils.c (remote_open): Install remote_desc in the event
8566 loop.
8567 (remote_close): Remove remote_desc from the event loop.
8568 (putpkt_binary): Rename to...
8569 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8570 (putpkt_binary): New as wrapper around putpkt_binary_1.
8571 (putpkt_notif): New.
8572 (prepare_resume_reply): In non-stop mode, don't change the
8573 general_thread.
8574 * event-loop.c: New.
8575 * Makefile.in (OBJ): Add event-loop.o.
8576 (event-loop.o): New rule.
8577
8578 * linux-low.h (pid_of): Moved here.
8579 (lwpid_of): New.
8580 (get_lwp_thread): Use lwpid_of.
8581 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8582 * linux-low.c (pid_of): Delete.
8583 (inferior_pid): Use lwpid_of.
8584 (linux_event_pipe): New.
8585 (target_is_async_p): New.
8586 (delete_lwp): New.
8587 (handle_extended_wait): Use lwpid_of.
8588 (add_lwp): Don't set lwpid field.
8589 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8590 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8591 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8592 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8593 first. Adjust to linux_wait_for_event interface changes. Use
8594 lwpid_of.
8595 (linux_detach): Don't delete the main lwp here.
8596 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8597 (status_pending_p): Don't consider explicitly suspended lwps.
8598 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8599 pointer. Add OPTIONS argument. Change return type to int. Use
8600 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8601 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8602 pointer. Add status pointer argument. Return a pid instead of a
8603 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8604 changes. In non-stop mode, don't switch to a random thread.
8605 (linux_wait): Rename to...
8606 (linux_wait_1): ... this. Add target_options argument, and handle
8607 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8608 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8609 clean exit and signal exit code. Don't stop all threads in
8610 non-stop mode. In all-stop mode, only stop all threads when
8611 reporting a stop to GDB. Handle explicit thread stop requests.
8612 (async_file_flush, async_file_mark): New.
8613 (linux_wait): New.
8614 (send_sigstop): Use lwpid_of.
8615 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8616 interface changes. In non-stop mode, don't switch to a random
8617 thread.
8618 (linux_resume_one_lwp): Use lwpid_of.
8619 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8620 (linux_resume_one_thread): ... this. Handle resume_stop. In
8621 non-stop mode, don't look for pending flag in all threads.
8622 (resume_status_pending_p): Don't consider explicitly suspended
8623 threads.
8624 (my_waitpid): Reimplement. Emulate __WALL.
8625 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8626 Use lwpid_of.
8627 (sigchld_handler, linux_supports_non_stop, linux_async)
8628 (linux_start_non_stop): New.
8629 (linux_target_ops): Register linux_supports_non_stop, linux_async
8630 and linux_start_non_stop.
8631 (initialize_low): Install SIGCHLD handler.
8632 * thread-db.c (thread_db_create_event, find_one_thread)
8633 (thread_db_get_tls_address): Use lwpid_of.
8634 * win32-low.c (win32_detach): Adjust to use resume_kind.
8635 (win32_wait): Add `options' argument.
8636 * spu-low.c (spu_resume): Adjust to use resume_kind.
8637 (spu_wait): Add `options' argument.
8638
5b1c542e
PA
86392009-04-01 Pedro Alves <pedro@codesourcery.com>
8640
8641 Decouple target code from remote protocol.
8642
8643 * target.h (enum target_waitkind): New.
8644 (struct target_waitstatus): New.
8645 (struct target_ops) <wait>: Return an unsigned long. Take a
8646 target_waitstatus pointer instead of a char pointer.
8647 (mywait): Likewise.
8648 * target.c (mywait): Change prototype to return an unsigned long.
8649 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8650 * server.h (thread_from_wait, old_thread_from_wait): Delete
8651 declarations.
8652 (prepare_resume_reply): Change prototype to take a
8653 target_waitstatus.
8654 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8655 (last_status, last_ptid): New.
8656 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8657 pid instead of a signal.
8658 (attach_inferior): Remove "status" and "signal" parameters.
8659 Adjust.
8660 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8661 not as an address.
8662 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8663 (handle_v_requests, myresume): Remove "status" and "signal"
8664 parameters. Adjust.
8665 (handle_status): New.
8666 (main): Delete local `status'. Adjust.
8667 * remote-utils.c: Include target.h.
8668 (prepare_resume_reply): Change prototype to take a
8669 target_waitstatus. Adjust.
8670
8671 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8672 interface.
8673 * spu-low.c (spu_wait): Adjust.
8674 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8675 Delete.
8676 (win32_wait): Adjust.
8677
2bd7c093
PA
86782009-04-01 Pedro Alves <pedro@codesourcery.com>
8679
8680 * target.h (struct thread_resume): Delete leave_stopped member.
8681 (struct target_ops): Add a `n' argument to the `resume' callback.
8682 * server.c (start_inferior): Adjust.
8683 (handle_v_cont, myresume): Adjust.
8684 * linux-low.c (check_removed_breakpoint): Adjust to resume
8685 interface change, and to removed leave_stopped field.
8686 (resume_ptr): Delete.
8687 (struct thread_resume_array): New.
8688 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8689 resume interface change.
8690 (linux_continue_one_thread, linux_queue_one_thread)
8691 (resume_status_pending_p): Check if the resume field is NULL
8692 instead of checking the leave_stopped member.
8693 (linux_resume): Adjust to the target resume interface change.
8694 * spu-low.c (spu_resume): Adjust to the target resume interface
8695 change.
8696 * win32-low.c (win32_detach, win32_resume): Ditto.
8697
c35fafde
PA
86982009-04-01 Pedro Alves <pedro@codesourcery.com>
8699
8700 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8701 flag.
8702 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8703 pending.
8704 (linux_continue_one_thread): Only preserve the stepping flag if
8705 there's a pending breakpoint.
8706
0a59d50b
PA
87072009-03-31 Pedro Alves <pedro@codesourcery.com>
8708
8709 * server.c (main): After the inferior having exited, call
8710 remote_close before exiting gdbserver.
8711
f04c6d38
TJB
87122009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8713
8714 Fix size of FPSCR in Power 7 processors.
8715 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8716 (PPC_FEATURE_HAS_DFP): New #define.
8717 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8718 size of the FPSCR.
8719
78e5cee6
PA
87202009-03-23 Pedro Alves <pedro@codesourcery.com>
8721
8722 * server.c (handle_query) Whitespace and formatting.
8723
1b3f6016
PA
87242009-03-22 Pedro Alves <pedro@codesourcery.com>
8725
8726 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8727 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8728 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8729 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8730 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8731 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8732 Makefile.in, configure.ac: Fix whitespace throughout.
8733 * configure: Regenerate.
8734
a07b2135
PA
87352009-03-22 Pedro Alves <pedro@codesourcery.com>
8736
8737 * inferiors.c (find_inferior): Make it safe for the callback
8738 function to delete the currently iterated inferior.
8739
67cc2626
PA
87402009-03-22 Pedro Alves <pedro@codesourcery.com>
8741
8742 * Makefile.in (linuw_low_h): Move higher.
8743 (thread-db.o): Depend on $(linux_low_h).
8744
54a0b537
PA
87452009-03-17 Pedro Alves <pedro@codesourcery.com>
8746
8747 Rename "process" to "lwp" throughout.
8748
8749 * linux-low.c (all_processes): Rename to...
8750 (all_lwps): ... this.
8751 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8752 (add_process): Rename to ...
8753 (add_lwp): ... this. Adjust.
8754 (linux_create_inferior): Adjust.
8755 (linux_attach_lwp): Adjust.
8756 (linux_attach): Adjust.
8757 (linux_kill_one_process): Rename to ...
8758 (linux_kill_one_lwp): ... this. Adjust.
8759 (linux_kill): Adjust.
8760 (linux_detach_one_process): Rename to ...
8761 (linux_detach_one_lwp): ... this. Adjust.
8762 (linux_detach): Adjust.
8763 (check_removed_breakpoint): Adjust.
8764 (status_pending_p): Adjust.
8765 (linux_wait_for_process): Rename to ...
8766 (linux_wait_for_lwp): ... this. Adjust.
8767 (linux_wait_for_event): Adjust.
8768 (send_sigstop): Adjust.
8769 (wait_for_sigstop): Adjust.
8770 (stop_all_processes): Rename to ...
8771 (stop_all_lwps): ... this.
8772 (linux_resume_one_process): Rename to ...
8773 (linux_resume_one_lwp): ... this. Adjust.
8774 (linux_set_resume_request, linux_continue_one_thread)
8775 (linux_queue_one_thread, resume_status_pending_p)
8776 (usr_store_inferior_registers, regsets_store_inferior_registers)
8777 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8778 Adjust.
8779 * linux-low.h (get_process): Rename to ...
8780 (get_lwp): ... this. Adjust.
8781 (get_thread_process): Rename to ...
8782 (get_thread_lwp): ... this. Adjust.
8783 (get_process_thread): Rename to ...
8784 (get_lwp_thread): ... this. Adjust.
8785 (struct process_info): Rename to ...
8786 (struct lwp_info): ... this.
8787 (all_processes): Rename to ...
8788 (all_lwps): ... this.
8789 * proc-service.c (ps_lgetregs): Adjust.
8790 * thread-db.c (thread_db_create_event, find_one_thread)
8791 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8792
0b16c5cf
PA
87932009-03-14 Pedro Alves <pedro@codesourcery.com>
8794
8795 * server.c (handle_query): Handle "qAttached".
8796
32de4b9d
NS
87972009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8798
8799 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8800 GPLv3, update license URL.
8801
2aecd87f
DE
88022009-03-01 Doug Evans <dje@google.com>
8803
93efd302 8804 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8805 (server_h): Add gdb_signals.h.
8806 (signals.o): Update.
8807 * server.h (target_signal_from_host,target_signal_to_host_p)
8808 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8809
86b1f9c5
PM
88102009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8811
8812 * remote-utils.c (getpkt): Also generate remote-debug
8813 information if noack_mode is set.
8814
4aa995e1
PA
88152009-02-06 Pedro Alves <pedro@codesourcery.com>
8816
8817 * server.c (handle_query): Report qXfer:siginfo:read and
8818 qXfer:siginfo:write as supported and handle them.
8819 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8820 * linux-low.c (linux_xfer_siginfo): New.
8821 (linux_target_ops): Set it.
8822
62709adf
PA
88232009-01-26 Pedro Alves <pedro@codesourcery.com>
8824
8825 * server.c (gdbserver_usage): Mention --remote-debug.
8826 (main): Accept '--remote-debug' switch.
8827
aef93bd7
DE
88282009-01-18 Doug Evans <dje@google.com>
8829
8830 * regcache.c (new_register_cache): No need to check result of xcalloc.
8831 * server.c (handle_search_memory): Back out calls to xmalloc,
8832 result is checked and error is returned to user upon failure.
8833 (handle_query): Ditto. Add more checks for result of malloc.
8834 (handle_v_cont): Check result of malloc, report error back to
8835 user upon failure.
8836 (handle_v_run): Ditto. Call freeargv.
8837 * server.h (freeargv): Declare.
8838 * utils.c (freeargv): New fn.
8839
54363045
DE
88402009-01-15 Doug Evans <dje@google.com>
8841
f626972c
DE
8842 * gdbreplay.c (perror_with_name): Make arg const char *.
8843 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8844 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8845 * utils.c (perror_with_name): Make arg const char *.
54363045 8846
18aae699
PA
88472009-01-14 Pedro Alves <pedro@codesourcery.com>
8848
8849 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8850 when handling a EXIT_PROCESS_DEBUG_EVENT.
8851
ff703abe
JB
88522009-01-06 Joel Brobecker <brobecker@adacore.com>
8853
8854 * gdbreplay.c (gdbreplay_version): Update copyright year.
8855 * server.c (gdbserver_version): Likewise.
8856
f21cc1a2 88572009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8858
8859 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8860 (handle_extended_wait): Improve comment.
0e21c1ec 8861
bca929d3
DE
88622008-12-13 Doug Evans <dje@google.com>
8863
8864 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8865 * server.h (ATTR_MALLOC): New macro.
8866 (xmalloc,xcalloc,xstrdup): Declare.
8867 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8868 * inferiors.c: Ditto.
8869 * linux-low.c: Ditto.
8870 * mem-break.c: Ditto.
8871 * regcache.c: Ditto.
8872 * remote-utils.c: Ditto.
8873 * server.c: Ditto.
8874 * target.c: Ditto.
8875 * win32-low.c: Ditto.
8876
97438e3f
DE
88772008-12-12 Doug Evans <dje@google.com>
8878
896c7fbb
DE
8879 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8880 in debugging printf.
8881
97438e3f
DE
8882 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8883
e3b886f8
DE
88842008-12-09 Doug Evans <dje@google.com>
8885
8886 * linux-low.h (struct process_info): Delete member tid, unused.
8887 * thread-db.c (find_one_thread): Update.
8888 (maybe_attach_thread): Update.
8889
07e059b5
VP
88902008-12-02 Pedro Alves <pedro@codesourcery.com>
8891
889bf7c5
PA
8892 * target.h (struct target_ops): Add qxfer_osdata member.
8893 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8894 and dirent.h.
8895 (linux_qxfer_osdata): New functions.
8896 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8897 callback.
8898 * server.c (handle_query): Handle "qXfer:osdata:read:".
8899 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8900 (buffer_xml_printf): New functions.
8901 * server.h (struct buffer): New.
8902 (buffer_grow_str, buffer_grow_str0): New macros.
8903 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8904 (buffer_xml_printf): Declare.
07e059b5 8905
4cab47ab
DE
89062008-11-24 Doug Evans <dje@google.com>
8907
8908 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8909
f142445f
DJ
89102008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8911
8912 * server.c (handle_v_run): Always use the supplied argument list.
8913
d0107bb6 89142008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8915
d0107bb6
BW
8916 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8917 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8918
2c4ad781
TJB
89192008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8920
8921 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8922 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8923 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8924 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8925 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8926 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8927 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8928 XML target descriptions.
8929 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8930 when inferior is running on an ISA 2.05 or later processor. Add
8931 special case to return offset for full 64-bit slot of FPSCR when
8932 in 32-bits.
8933
dfb64f85
DJ
89342008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8935
8936 * Makefile.in (SFILES, clean): Added sparc64 files.
8937 (reg-sparc64.o, reg-sparc64.c): New.
8938 * configure.srv (sparc*-*-linux*): New configuration.
8939 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8940 syscall arguments for SPARC.
8941 (regsets_store_inferior_registers): Likewise.
8942 * linux-sparc-low.c: New file.
8943
66b6e1dd
DE
89442008-10-21 Doug Evans <dje@google.com>
8945
8946 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8947 (READLINE_DIR,READLINE_DEP): Delete.
8948 (INTERNAL_CFLAGS): Update.
8949 (LINTFLAGS): Update.
8950
9b710a42
PA
89512008-10-10 Pedro Alves <pedro@codesourcery.com>
8952
8953 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8954 whole argv from the last run, not just argv[0].
8955
5822d809
PA
89562008-09-08 Pedro Alves <pedro@codesourcery.com>
8957
8958 * regcache.c (new_register_cache): Return NULL if the register
8959 cache size isn't known yet.
8960 (free_register_cache): Avoid dereferencing a NULL regcache.
8961
74aac56f
DJ
89622008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8963
8964 * configure.srv: Merge MIPS and MIPS64.
8965
400b20f5
MR
89662008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8967
8968 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8969
677c5bb1
LM
89702008-08-18 Luis Machado <luisgpm@br.ibm.com>
8971
8972 * Makefile.in: Add required vsx dependencies.
8973
8974 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8975 Declare init_registers_powerpc_vsx32l.
8976 Declare init_registers_powerpc_vsx64l.
8977 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8978 (ppc_arch_setup): Check for VSX in hwcap.
8979 (ppc_fill_vsxregset): New function.
8980 (ppc_store_vsxregset): New function.
8981 Add new VSX entry in regset_info target_regsets.
8982
8983 * configure.srv: Add new VSX dependencies.
8984
a6f3e723
SL
89852008-08-12 Pedro Alves <pedro@codesourcery.com>
8986
8987 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8988 (remote_open): Set or clear transport_is_reliable.
8989 (putpkt_binary): Don't expect acks in noack mode.
8990 (getpkt): Don't send ack/nac in noack mode.
8991 * server.c (handle_general_set): Handle QStartNoAckMode.
8992 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8993 qSupported.
8994 (main): Reset noack_mode on every connection.
8995 * server.h (noack_mode): Declare.
8996
a417dc56
RW
89972008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8998
8999 * Makefile.in (GDBREPLAY_OBS): New variable.
9000 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9001
3221518c
UW
90022008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9003 Daniel Jacobowitz <dan@codesourcery.com>
9004
9005 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9006 (usr_store_inferior_registers): Likewise.
9007 (regsets_store_inferior_registers): Likewise.
9008
ec56be1b
PA
90092008-07-31 Rolf Jansen <rj@surtec.com>
9010 Pedro Alves <pedro@codesourcery.com>
9011
9012 * configure.ac: Check for memmem declaration.
9013 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9014 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9015 (disable_packet_qfThreadInfo): Unconditionally compile.
9016 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9017 * configure, config.in: Regenerate.
9018
2fe5e3ff
DE
90192008-07-28 Doug Kwan <dougkwan@google.com>
9020
9021 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9022 (linux_write_memory): Remove declaration of errno.
9023
836acd6d
UW
90242008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9025
9026 * linux-low.c (handle_extended_wait): Do not use "status"
9027 variable uninitialized.
9028
aeba519e
PA
90292008-07-07 Pedro Alves <pedro@codesourcery.com>
9030
9031 * server.c (handle_v_attach): Inhibit reporting dll changes.
9032
db42f210
PA
90332008-06-27 Pedro Alves <pedro@codesourcery.com>
9034
9035 * remote-utils.c (prepare_resume_reply): If requested, don't
9036 output "thread:TID" in the T stop reply.
9037
9038 * server.c (disable_packet_vCont, disable_packet_Tthread)
9039 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9040 (handle_query): If requested, disable support for qC, qfThreadInfo
9041 and qsThreadInfo.
9042 (handle_v_requests): If requested, disable support for vCont.
9043 (gdbserver_show_disableable): New.
9044 (main): Handle --disable-packet and --disable-packet=LIST.
9045
9046 * server.h (disable_packet_vCont, disable_packet_Tthread)
9047 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9048
8e4c5421
CD
90492008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9050
9051 * server.c (gdbserver_usage): Mention --version.
9052
6e23a804
DJ
90532008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9054
9055 * Makefile.in (gdbreplay.o): New rule.
9056
90aa6a40
JM
90572008-06-06 Joseph Myers <joseph@codesourcery.com>
9058
9059 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9060 message, not gdbserver.
9061
c16158bc 90622008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
9063 Nathan Sidwell <nathan@codesourcery.com>
9064 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
9065
9066 * acinclude.m4: Include ../../config/acx.m4.
9067 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9068 * configure, config.in: Regenerate.
9069 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9070 * server.c (gdbserver_version): Print PKGVERSION.
9071 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9072 (main): Adjust gdbserver_usage calls.
9073 * gdbreplay.c (version, host_name): Add declarations.
9074 (gdbreplay_version, gdbreplay_usage): New.
9075 (main): Accept --version and --help options.
9076
aeb75bf5
DJ
90772008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9078
9079 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9080 (arm_breakpoint_at): Handle Thumb.
9081 (the_low_target): Add comment.
9082
76b233dd
UW
90832008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9084
9085 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9086
08388c79
DE
90872008-05-09 Doug Evans <dje@google.com>
9088
a3c83fae
DE
9089 * server.h (decode_search_memory_packet): Declare.
9090 * remote-utils.c (decode_search_memory_packet): New fn.
9091 * server.c (handle_search_memory_1): New fn.
08388c79
DE
9092 (handle_search_memory): New fn.
9093 (handle_query): Process qSearch:memory packets.
9094
bb9c3d36
UW
90952008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9096
9097 * regcache.c (registers_length): Remove.
9098 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9099 full register packet.
9100 * regcache.h (registers_length): Remove prototype.
9101 * server.h (PBUFSIZ): Define to 16384.
9102
7284e1be
UW
91032008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9104
9105 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9106 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9107 powerpc-64l.o, and powerpc-altivec64l.o.
9108 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9109 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9110 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9111 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9112 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9113 to srv_xmlfiles.
9114
9115 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9116 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9117 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9118 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9119 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9120 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9121 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9122 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9123 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9124 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9125 (clean): Update.
9126
9127 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9128 (init_registers_powerpc_32l): ... this new prototype.
9129 (init_registers_powerpc_32): Remove, replace by ...
9130 (init_registers_powerpc_altivec32l): ... this new prototype.
9131 (init_registers_powerpc_e500): Remove, replace by ...
9132 (init_registers_powerpc_e500l): ... this new prototype.
9133 (init_registers_ppc64): Remove, replace by ...
9134 (init_registers_powerpc_64l): ... this new prototype.
9135 (init_registers_powerpc_64): Remove, replace by ...
9136 (init_registers_powerpc_altivec64l): ... this new prototype.
9137 (ppc_num_regs): Set to 73.
9138 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9139 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9140 (ppc_cannot_store_register): Handle orig_r3 and trap.
9141 (ppc_arch_setup): Update init_registers_... calls.
9142 (ppc_fill_gregset): Handle orig_r3 and trap.
9143
9144 * inferiors.c (clear_inferiors): Reset current_inferior.
9145
fdc59709
PB
91462008-04-23 Paolo Bonzini <bonzini@gnu.org>
9147
889bf7c5
PA
9148 * acinclude.m4: Add override.m4.
9149 * configure: Regenerate.
fdc59709 9150
c9b2f845
UW
91512008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9152
9153 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9154 initial call to init_register_ppc64.
9155
550512b8
UW
91562008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9157
43aaf8b6
PA
9158 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9159 single powerpc*-*-linux* case.
550512b8
UW
9160 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9161
b6430ec3
UW
91622008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9163
9164 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 9165 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
9166 from reg_xmlfiles.
9167 * linux-ppc-low.c: Include <elf.h>.
9168 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9169 (ppc_hwcap): New global variable.
9170 (ppc_regmap): Remove __SPE__ #ifdef sections.
9171 (ppc_regmap_e500): New global variable.
9172 (ppc_cannot_store_register): Update __SPE__ special case.
9173 (ppc_get_hwcap): New function.
9174 (ppc_arch_setup): Use it to determine whether inferior supports
9175 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9176 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9177 Do not access registers if target does not support AltiVec.
9178 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9179 Do not access registers if target does not support SPE.
9180 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9181
52fa2412
UW
91822008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9183
9184 * linux-low.c (disabled_regsets, num_regsets): New.
9185 (use_regsets_p): Delete.
9186 (linux_wait_for_process): Clear disabled_regsets.
9187 (regsets_fetch_inferior_registers): Check and set it.
9188 (regsets_store_inferior_registers): Likewise.
9189 (linux_fetch_registers, linux_store_registers): Do not use
9190 use_regsets_p.
9191 (initialize_low): Allocate disabled_regsets.
9192
e28b3332
DJ
91932008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9194
9195 * Makefile.in (LIBOBJS): New.
9196 (OBS): Use LIBOBJS.
9197 (memmem.o): New rule.
9198 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9199 * configure: Regenerated.
9200
4536995d
UW
92012008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9202
9203 * server.c (handle_query): Never return "unsupported" for
9204 qXfer:features:read queries.
9205
221c031f
UW
92062008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9207
9208 * server.c (get_features_xml): Fix inverted condition.
9209 (handle_query): Always support qXfer:feature:read.
9210
ccd213ac
DJ
92112008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9212
9213 * server.c (wrapper_argv): New.
9214 (start_inferior): Handle wrapper_argv. If set, expect an extra
9215 trap.
9216 (gdbserver_usage): Document --wrapper.
9217 (main): Parse --wrapper.
9218
6fe305f7
UW
92192008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9220
9221 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9222 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9223 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9224 (ppc_set_pc): Likewise.
9225 (ppc_arch_setup): New function.
9226 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9227 of collect_register.
889bf7c5 9228 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9229
5b0a002e
UW
92302008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9231
9232 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9233 instead of linux-ppc64-low.o.
9234 * linux-ppc64-low.c: Remove file.
9235 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9236 (linux-ppc64-low.o): Remove rule.
9237
9238 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9239 (init_registers_powerpc_64): Likewise.
9240 (ppc_regmap): Conditionally define depending on __powerpc64__.
9241 (ppc_cannot_store_register): Do not special-case "fpscr" when
9242 compiled on __powerpc64__.
9243 (ppc_collect_ptrace_register): New function.
9244 (ppc_supply_ptrace_register): New function.
9245 (ppc_breakpoint): Change type to "unsigned int".
9246 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9247 (the_low_target): Conditionally provide initializers for the
889bf7c5 9248 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9249 collect_ptrace_register and supply_ptrace_register members.
9250
9b4b61c8
UW
92512008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9252
9253 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9254 * server.c (gdbserver_xmltarget): Define.
9255 (get_features_xml): Use it to replace "target.xml" and arch_string.
9256
9257 * configure.srv: Remove srv_xmltarget. Add XML files that were
9258 mentioned there to srv_xmlfiles instead. Remove conditional tests
9259 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9260 srv_xmlfiles and srv_regobj to include all possible choices.
9261 * configure.ac (srv_xmltarget): Remove.
9262 (srv_xmlfiles): Do not add "target.xml".
9263 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9264 checks for supplementary target information.
9265 * configure: Regenerate.
9266 * Makefile.in (XML_TARGET): Remove.
9267 (target.xml): Remove rule.
9268 (clean): Do not clean up target.xml.
9269 (.PRECIOUS): Do not mention target.xml.
9270
9271 * target.h (struct target_ops): Remove arch_string member.
9272 * linux-low.c (linux_arch_string): Remove.
9273 (linux_target_ops): Remove arch_string initializer.
9274 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9275 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9276 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9277 * spu-low.c (spu_arch_string): Remove.
9278 (spu_target_ops): Remove arch_string initializer.
9279 * win32-low.c (win32_arch_string): Remove.
9280 (win32_target_ops): Remove arch_string initializer.
9281 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9282 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9283 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9284
ee1a7ae4
UW
92852008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9286
9287 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9288 by collect_ptrace_register and supply_ptrace_register hooks.
9289 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9290 instead of checking for the_low_target.left_pad_xfer.
9291 (usr_store_inferior_registers): Use collect_ptrace_register callback
9292 instead of checking for the_low_target.left_pad_xfer.
9293
9294 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9295 (s390_supply_ptrace_register): Likewise.
9296 (s390_fill_gregset): Call s390_collect_ptrace_register.
9297 (the_low_target): Update.
9298
9299 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9300 (ppc_supply_ptrace_register): Likewise.
9301 (the_low_target): Update.
9302
9303 * linux-i386-low.c (the_low_target): Update.
9304 * linux-x86-64-low.c (the_low_target): Update.
9305
d61ddec4
UW
93062008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9307
9308 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9309 reg-s390.o and reg-s390x.o.
9310
9311 * linux-low.c (new_inferior): New global variable.
9312 (linux_create_inferior, linux_attach): Set it.
9313 (linux_wait_for_process): Call the_low_target.arch_setup after the
9314 target has stopped for the first time.
9315 (initialize_low): Do not call the_low_target.arch_setup.
9316
9317 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9318 (s390_set_pc): Likewise.
9319 (s390_arch_setup): New function.
9320 (the_low_target): Use s390_arch_setup as arch_setup routine.
9321
9322 * regcache.c (realloc_register_cache): New function.
9323 (set_register_cache): Call it for each existing regcache.
9324
d05b4ac3
UW
93252008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9326
9327 * server.h (init_registers): Remove prototype.
9328
9329 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9330 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9331 instead of init_registers ().
9332 * linux-arm-low.c (init_registers_arm): Add prototype.
9333 (init_registers_arm_with_iwmmxt): Likewise.
9334 (the_low_target): Add initializer for arch_setup field.
9335 * linux-cris-low.c (init_registers_cris): Add prototype.
9336 (the_low_target): Add initializer for arch_setup field.
9337 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9338 (the_low_target): Add initializer for arch_setup field.
9339 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9340 (the_low_target): Add initializer for arch_setup field.
9341 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9342 (the_low_target): Add initializer for arch_setup field.
9343 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9344 (the_low_target): Add initializer for arch_setup field.
9345 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9346 (the_low_target): Add initializer for arch_setup field.
9347 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9348 (init_registers_mips64_linux): Likewise.
9349 (the_low_target): Add initializer for arch_setup field.
9350 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9351 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9352 (the_low_target): Add initializer for arch_setup field.
9353 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9354 (init_registers_powerpc_64): Likewise.
9355 (the_low_target): Add initializer for arch_setup field.
9356 * linux-s390-low.c (init_registers_s390): Add prototype.
9357 (init_registers_s390x): Likewise.
9358 (the_low_target): Add initializer for arch_setup field.
9359 * linux-sh-low.c (init_registers_sh): Add prototype.
9360 (the_low_target): Add initializer for arch_setup field.
9361 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9362 (the_low_target): Add initializer for arch_setup field.
9363 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9364 (the_low_target): Add initializer for arch_setup field.
9365
9366 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9367 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9368 instead of init_registers ().
9369 * win32-arm-low.c (init_registers_arm): Add prototype.
9370 (the_low_target): Add initializer for arch_setup field.
9371 * win32-i386-low.c (init_registers_i386): Add prototype.
9372 (the_low_target): Add initializer for arch_setup field.
9373
9374 * spu-low.c (init_registers_spu): Add prototype.
9375 (initialize_low): Call initialie_registers_spu () instead of
9376 initialize_registers ().
9377
fd96d250
PA
93782008-02-19 Pedro Alves <pedro@codesourcery.com>
9379
9380 * server.c (handle_v_requests): When handling the vRun and vAttach
9381 packets, if already debugging a process, don't kill it. Return an
9382 error instead.
9383
d41b6bb4
DJ
93842008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9385
9386 * server.c (handle_query): Correct length check.
9387
5ac588cf
PA
93882008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9389
9390 * win32-low.c (do_initial_child_stuff): Add process handle
9391 parameter. Set current_process_handle and current_process_id from the
9392 parameters. Clear globals.
9393 (win32_create_inferior): Don't set current_process_handle and
9394 current_process_id here. Instead pass them on the call to
9395 do_initial_child_stuff.
9396 (win32_attach): Likewise.
9397 (win32_clear_inferiors): New.
9398 (win32_kill): Don't close the current process handle or the
9399 current thread handle here. Instead call win32_clear_inferiors.
9400 (win32_detach): Don't open a new handle to the process. Call
9401 win32_clear_inferiors.
9402 (win32_join): Don't rely on current_process_handle; open a new
9403 handle using the process id.
9404 (win32_wait): Call win32_clear_inferiors when the inferior process
9405 has exited.
9406
ecd7ecbc
DJ
94072008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9408
9409 * server.c (monitor_show_help): Add "exit".
9410
1525d545
MG
94112008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9412
ecd7ecbc 9413 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9414 (clean): Add reg-xtensa.c.
9415 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9416 * configure.srv (xtensa*-*-linux*) New target.
9417 * linux-xtensa-low.c: New.
9418 * xtensa-xtregs.c: New.
1525d545 9419
59a016f0
PA
94202008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9421
9422 * hostio.c: Don't include errno.h.
9423 (errno_to_fileio_errno): Move to hostio-errno.
9424 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9425 error number outputting to the target->hostio_last_error callback.
9426 (hostio_packet_error): Use FILEIO_EINVAL directly.
9427 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9428 calls to hostio_error.
9429 * hostio-errno.c: New.
9430 * server.h (hostio_last_error_from_errno): Declare.
9431 * target.h (target_ops): Add hostio_last_error member.
9432 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9433 as hostio_last_error handler.
889bf7c5 9434 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9435 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9436 (wince_hostio_last_error): New functions.
9437 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9438 as hostio_last_error handler.
9439 (win32_target_ops) [!_WIN32_WCE]: Register
9440 hostio_last_error_from_errno as hostio_last_error handler.
9441 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9442 (hostio-errno.o): New rule.
9443 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9444 * configure.srv (srv_hostio_err_objs): New variable. Default to
9445 hostio-errno.o.
9446 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9447 * configure: Regenerate.
9448
2d717e4f
DJ
94492008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9450
9451 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9452 (linux_kill, linux_detach): Clean up the process list.
9453 * remote-utils.c (remote_open): Improve port number parsing.
9454 (putpkt_binary, input_interrupt): Only send interrupts if the target
9455 is running.
9456 * server.c (extended_protocol): Make static.
9457 (attached): Define earlier.
9458 (exit_requested, response_needed, program_argv): New variables.
9459 (target_running): New.
9460 (start_inferior): Clear attached here.
9461 (attach_inferior): Set attached here.
9462 (require_running): Define.
9463 (handle_query): Use require_running and target_running. Implement
9464 "monitor exit".
9465 (handle_v_attach, handle_v_run): New.
9466 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9467 (gdbserver_usage): Update.
9468 (main): Redo argument parsing. Handle --debug and --multi. Handle
9469 --attach along with other options or after the port. Save
9470 program_argv. Support no initial program. Resynchronize
9471 communication with GDB after an error. Handle "monitor exit".
9472 Use require_running and target_running. Always allow the extended
9473 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9474 restart in extended mode.
9475 * README: Refer to the GDB manual. Update --attach usage.
9476
7407e2de
AS
94772007-12-20 Andreas Schwab <schwab@suse.de>
9478
9479 * linux-low.c (STACK_SIZE): Define.
9480 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9481 (linux_test_for_tracefork): Likewise.
9482
b65d95c5
DJ
94832007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9484
9485 * linux-low.c (linux_wait_for_event): Update messages. Do not
9486 reinsert auto-delete breakpoints.
9487 * mem-break.c (struct breakpoint): Change return type of handler to
9488 int.
9489 (set_breakpoint_at): Update handler type.
9490 (reinsert_breakpoint_handler): Return 1 instead of calling
9491 delete_breakpoint.
9492 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9493 setting a new one.
9494 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9495 * mem-break.h (set_breakpoint_at): Update handler type.
9496 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9497 * win32-low.c (auto_delete_breakpoint): New.
9498 (get_child_debug_event): Use it.
9499
4e799345
DJ
95002007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9501
9502 * configure.ac: Check for pread and pwrite.
9503 * hostio.c (handle_pread): Fall back to lseek and read.
9504 (handle_pwrite): Fall back to lseek and write.
9505 * config.in, configure: Regenerated.
9506
27524b67
DJ
95072007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9508
9509 * server.c (myresume): Add own_buf argument.
9510 (main): Update calls.
9511
a20d5e98
DJ
95122007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9513
9514 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9515 * remote-utils.c (remote_open): Do not call disable_async_io.
9516 (block_async_io): Delete.
9517 (unblock_async_io): Make static.
9518 (initialize_async_io): New.
9519 * server.c (handle_v_cont): Handle async I/O here.
9520 (myresume): Likewise. Move other common resume tasks here...
9521 (main): ... from here. Call initialize_async_io. Disable async
9522 I/O before the main loop.
9523 * server.h (initialize_async_io): Declare.
9524 (block_async_io, unblock_async_io): Delete prototypes.
9525 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9526
b79d787e
DJ
95272007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9528
9529 * remote-utils.c (readchar): Allow binary data in received messages.
9530
d97903b2
PA
95312007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9532
9533 * win32-low.c (attaching): New global.
9534 (win32_create_inferior): Clear the `attaching' global.
9535 (win32_attach): Set the `attaching' global.
9536 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9537 attaching. Only set a breakpoint at the entry point if not
9538 attaching.
9539
311de423
PA
95402007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9541
9542 * server.c (main): Don't report dll events on the initial
9543 connection on attaches.
9544
6c2d16d2
PA
95452007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9546
9547 * server.c (main): Relax numerical bases supported for the pid of
9548 the --attach command line argument.
9549
5ca906e6
PA
95502007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9551
9552 * win32-low.c (win32_attach): Call OpenProcess before
9553 DebugActiveProcess, not after. Add last error output to error
9554 call.
9555
9c6c8194
PA
95562007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9557
9558 * win32-low.c (win32_get_thread_context)
9559 (win32_set_thread_context): New functions.
9560 (thread_rec): Use win32_get_thread_context.
9561 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9562 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9563 field.
9564
4d5d1aaa
PA
95652007-12-03 Leo Zayas
9566 Pedro Alves <pedro_alves@portugalmail.pt>
9567
9568 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9569 global variables.
9570 (child_add_thread): Minor cleanup.
9571 (child_continue): Resume artificially suspended threads before
9572 calling ContinueDebugEvent.
9573 (suspend_one_thread): New.
9574 (fake_breakpoint_event): New.
9575 (get_child_debug_event): Change return type to int. Check here if
9576 gdb sent an interrupt request. If a soft interrupt was requested,
9577 fake a breakpoint event. Return 0 if there is no event to handle,
9578 and 1 otherwise.
9579 (win32_wait): Don't check here if gdb sent an interrupt request.
9580 Ensure there is a valid event to handle.
9581 (win32_request_interrupt): Add soft interruption method as last
9582 resort.
9583
c436e841
PA
95842007-12-03 Leo Zayas
9585 Pedro Alves <pedro_alves@portugalmail.pt>
9586
9587 * win32-low.h (win32_thread_info): Add descriptions to the
9588 structure members. Replace `suspend_count' counter by a
9589 `suspended' flag.
9590 * win32-low.c (thread_rec): Update condition of when to get the
9591 context from the inferior. Rely on ContextFlags being set if it
9592 has already been retrieved. Only suspend the inferior thread if
9593 we haven't already. Warn if that fails.
9594 (continue_one_thread): s/suspend_count/suspended/. Only call
9595 ResumeThread once. Warn if that fails.
9596
e7b5fa67
PA
95972007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9598
9599 * win32-low.c (win32_wait): Don't read from the inferior when it
9600 has already exited.
9601
a385171d
PA
96022007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9603
9604 * Makefile.in (win32_low_h): New variable.
9605 (win32-low.o): Add dependency on $(win32_low_h).
9606 (win32-arm-low.o, win32-i386-low.o): New rules.
9607
f80c84b3
DJ
96082007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9609
9610 * hostio.c: Correct copyright year.
9611
a6b151f1
DJ
96122007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9613
9614 * Makefile.in (OBS): Add hostio.o.
9615 (hostio.o): New rule.
9616 * server.h (handle_vFile): Declare.
9617 * hostio.c: New file.
9618 * server.c (handle_v_requests): Take packet_len and new_packet_len
9619 for binary packets. Call handle_vFile.
9620 (main): Update call to handle_v_requests.
9621
f9387fc3
DJ
96222007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9623
9624 * linux-low.c: Include <sched.h>.
9625
51c2684e
DJ
96262007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9627
9628 * linux-low.c (linux_tracefork_grandchild): New.
9629 (linux_tracefork_child): Use clone.
9630 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9631
75f83163
JB
96322007-10-31 Joel Brobecker <brobecker@adacore.com>
9633
9634 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9635
da5898ce
DJ
96362007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9637
9638 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9639
24a09b5f
DJ
96402007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9641
9642 * inferiors.c (change_inferior_id): Delete.
9643 (add_pid_to_list, pull_pid_from_list): New.
9644 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9645 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9646 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9647 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9648 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9649 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9650 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9651 (using_threads): Always set to 1.
9652 (handle_extended_wait): New.
9653 (add_process): Do not set TID.
9654 (linux_create_inferior): Set must_set_ptrace_flags.
9655 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9656 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9657 (linux_thread_alive): Rename TID argument to LWPID.
9658 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9659 (linux_wait_for_event): Do not use TID or check using_threads. Update
9660 call to dead_thread_notify. Call handle_extended_wait.
9661 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9662 (send_sigstop): Delete sigstop_sent.
9663 (wait_for_sigstop): Avoid TID.
9664 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9665 (linux_test_for_tracefork): New.
9666 (linux_lookup_signals): Use thread_db_active and
9667 linux_supports_tracefork_flag.
9668 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9669 * linux-low.h (get_process_thread): Avoid TID.
9670 (struct process_ifo): Move thread_known and tid to the end. Remove
9671 sigstop_sent.
9672 (linux_attach_lwp, thread_db_init): Update prototypes.
9673 * server.h (change_inferior_id): Delete prototype.
9674 (add_pid_to_list, pull_pid_from_list): New prototypes.
9675 * thread-db.c (thread_db_use_events): New.
9676 (find_first_thread): Rename to...
9677 (find_one_thread): ...this. Update callers and messages. Do not
9678 call fatal. Check thread_db_use_events. Do not call
9679 change_inferior_id or new_thread_notify.
9680 (maybe_attach_thread): Update. Do not call new_thread_notify.
9681 (thread_db_init): Set thread_db_use_events. Check use_events.
9682 * utils.c (fatal, warning): Correct message prefix.
9683
30ed0a8f
DJ
96842007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9685
9686 * Makefile.in (clean): Remove new files.
9687 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9688 (powerpc-64.o, powerpc-64.c): New rules.
9689 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9690 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9691 with SPE.
9692 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9693 SPE targets.
9694 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9695 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9696 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9697 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9698 (target_regsets): Add AltiVec and SPE register sets.
9699 * configure.ac: Check for AltiVec and SPE.
9700 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9701 (ppc_fill_vrregset, ppc_store_vrregset): New.
9702 (target_regsets): Add AltiVec register set.
9703 * configure: Regenerated.
9704
fd462a61
DJ
97052007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9706
9707 * linux-low.c (O_LARGEFILE): Define.
9708 (linux_read_memory): Use /proc/PID/mem.
9709 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9710 * configure, config.in: Regenerated.
9711
69f223ed
DJ
97122007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9713
9714 * linux-low.c (linux_wait_for_event): Do not pass signals while
9715 single-stepping.
9716
aec18585
PA
97172007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9718
9719 * win32-low.c (create_process): New.
9720 (win32_create_inferior): Use create_process instead of
9721 CreateProcess. If create_process failed retry appending an ".exe"
9722 suffix. Store the GetLastError result immediatelly after
9723 create_process calls and use it on the call to error.
9724
34d86ddd
PA
97252007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9726
9727 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9728
5a0e3bd0
JB
97292007-08-23 Joel Brobecker <brobecker@adacore.com>
9730
9731 * configure.ac: Switch license to GPLv3.
9732
f88c79e6
MS
97332007-08-01 Michael Snyder <msnyder@access-company.com>
9734
9735 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9736
6b3d9b83
PA
97372007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9738
9739 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9740 typedef.
9741 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9742 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9743 CloseToolhelp32Snapshot.
9744 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9745 CloseToolhelp32Snapshot.
9746
c588c53c
MS
97472007-07-27 Michael Snyder <michael.snyder@access-company.com>
9748
9749 * server.c (main): Check for inferior exit before main loop.
9750
aa0403d9
PA
97512007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9752
9753 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9754 instead of on tmp_desc.
9755
255e7678
DJ
97562007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9757 Daniel Jacobowitz <dan@codesourcery.com>
9758
9759 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9760 (add_thread): Minor cleanups.
9761 (clear_inferiors): Move lower in the file. Clear the DLL
9762 list.
9763 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9764 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9765 (xml_escape_text): New.
9766 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9767 for qSupported.
9768 (handle_v_cont): Report errors.
9769 (gdbserver_version): Update.
9770 (main): Correct size of own_buf. Do not report initial DLL events.
9771 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9772 (unloaded_dll, xml_escape_text): New.
9773 * win32-low.c (enum target_waitkind): Update comments.
9774 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9775 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9776 (win32_EnumProcessModules, win32_GetModuleInformation)
9777 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9778 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9779 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9780 (win32_Module32First, win32_Module32Next, load_toolhelp)
9781 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9782 (get_child_debug_event): Handle DLL events.
9783 (win32_wait): Likewise.
9784
0d37add9
DJ
97852007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9786
9787 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9788 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9789
45e2715e
PA
97902007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9791
9792 * win32-low.c (handle_output_debug_string): Ignore event if not
9793 waiting.
9794
c5674cf1
PA
97952007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9796
9797 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9798
2bbe3cc1
DJ
97992007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9800
9801 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9802
ae13219e
DJ
98032007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9804
9805 * inferiors.c (change_inferior_id): Add comment.
9806 * linux-low.c (check_removed_breakpoint): Add an early
9807 prototype. Improve debug output.
9808 (linux_attach): Doc update.
9809 (linux_detach_one_process, linux_detach): Clean up before releasing
9810 each process.
9811 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9812 * linux-low.h (struct process_info): Doc improvement.
9813 * mem-break.c (delete_all_breakpoints): New.
9814 * mem-break.h (delete_all_breakpoints): New prototype.
9815 * thread-db.c (find_first_thread): New.
9816 (thread_db_create_event): Call it instead of
9817 thread_db_find_new_threads. Clean up unused variables.
9818 (maybe_attach_thread): Remove first thread handling.
9819 (thread_db_find_new_threads): Use find_first_thread.
9820 (thread_db_get_tls_address): Likewise.
9821
4105de34
DJ
98222007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9823
9824 * thread-db.c (thread_db_find_new_threads): Add prototype.
9825 (thread_db_create_event): Check for the main thread before adding
9826 a new thread.
9827 (maybe_attach_thread): Only enable event reporting if TID == 0.
9828 (thread_db_get_tls_address): Check for new threads.
9829
2b876972
DJ
98302007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9831
9832 * linux-low.c (linux_create_inferior): Try execv before execvp.
9833 * spu-low.c (spu_create_inferior): Likewise.
9834
7a245884
DJ
98352007-06-13 Mike Frysinger <vapier@gentoo.org>
9836
9837 * linux-low.c (linux_create_inferior): Change execv to execvp.
9838 * spu-low.c (spu_create_inferior): Likewies.
9839
117ce543
DJ
98402007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9841
9842 * Makefile.in (clean): Clean new files instead of deleted ones.
9843 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9844 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9845 rules.
9846 * configure.srv: Specify XML files and new regformats for MIPS and
9847 MIPS64 GNU/Linux.
9848 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9849 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9850 an entry for the restart register.
9851 (mips_cannot_fetch_register, mips_cannot_store_register)
9852 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9853 register names to match the XML descriptions.
9854 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9855 restart register instead of $0.
9856
0e7f50da
UW
98572007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9858 Markus Deuling <deuling@de.ibm.com>
9859
9860 * remote-utils.c (decode_xfer_write): New function.
9861 * server.h (decode_xfer_write): Add prototype.
9862 * server.c (handle_query): Add PACKET_LEN argument. Support
9863 qXfer:spu:read and qXfer:spu:write packets.
9864 (main): Pass packet_len to handle_query.
9865 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9866 * target.h (target_ops): Add qxfer_spu.
9867
374c1d38
UW
98682007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9869
9870 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9871 accessing non-seekable spufs files.
9872
bb63802a
UW
98732007-05-16 Markus Deuling <deuling@de.ibm.com>
9874
889bf7c5 9875 * server.c (handle_query): Add reply for qC packet.
bb63802a 9876
7390519e
PA
98772007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9878 Leo Zayas <lerele@champenstudios@com>
9879
9880 * server.h (check_remote_input_interrupt_request): New function.
9881 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9882 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9883 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9884 (check_remote_input_interrupt_request): New function.
9885 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9886 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9887 winapi_GenerateConsoleCtrlEvent): New typedefs.
9888 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9889 to 250 ms.
9890 (win32_wait): Check for remote interrupt request
9891 with check_remote_input_interrupt_request.
9892 (win32_request_interrupt): New function.
9893 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9894
34b34921
PA
98952007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9896
9897 * win32-low.c (debug_registers_changed,
9898 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9899 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9900 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9901 (thread_rec): Get context using the low target.
9902 (child_add_thread): Call thread_added on the low target,
9903 which does the same thing.
9904 (regptr): Delete.
9905 (do_initial_child_stuff): Remove debug registers references.
9906 Set context using the low target. Resume threads after
9907 setting the contexts.
9908 (child_continue): Remove dead variable. Remove debug
9909 registers references.
9910 (child_fetch_inferior_registers): Go through the low target.
9911 (do_child_store_inferior_registers): Remove.
9912 (child_store_inferior_registers): Go through the low target.
9913 (win32_resume): Remove debug registers references.
9914 Set context using the low target.
9915 (handle_exception): Change return type to void. Don't record
9916 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9917 first chance exception.
889bf7c5 9918 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9919 goto loop. Always return after waiting for debug event.
9920 (win32_wait): Convert to switch statement. Handle spurious
9921 events.
9922
9923 * win32-i386-low.c (debug_registers_changed,
9924 debug_registers_used): New.
9925 (initial_stuff): Rename to ...
9926 (i386_initial_stuff): ... this. Clear debug registers
9927 state variables.
9928 (store_debug_registers): Delete.
9929 (i386_get_thread_context): New.
9930 (load_debug_registers): Delete.
9931 (i386_set_thread_context): New.
9932 (i386_thread_added): New.
9933 (single_step): Rename to ...
9934 (i386_single_step): ... this.
9935 (do_fetch_inferior_registers): Rename to ...
9936 (i386_fetch_inferior_register): ... this.
9937 (i386_store_inferior_register): New.
9938 (the_low_target): Adapt to new interface.
9939
9940 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9941 (arm_get_thread_context): New.
9942 (arm_set_thread_context): New.
9943 (regptr): New.
9944 (do_fetch_inferior_registers): Rename to ...
9945 (arm_fetch_inferior_register): ... this.
9946 (arm_store_inferior_register): New.
9947 (arm_wince_breakpoint): Reimplement as unsigned long.
9948 (arm_wince_breakpoint_len): Define.
9949 (the_low_target): Adapt to new interface.
9950
9951 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9952 load_debug_registers. Add get_thread_context, set_thread_context,
9953 thread_added and store_inferior_register. Rename
9954 fetch_inferior_registers to fetch_inferior_register.
9955 (regptr): Remove declaration.
9956
dd6953e1
PA
99572007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9958
9959 * linux-low.c (linux_detach): Change return type to int. Return 0.
9960 * spu-low.c (spu_detach): Likewise.
9961
444d6139
PA
99622007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9963
9964 * target.h (target_ops): Change return type of detach to int.
9965 Add join.
9966 (join_inferior): New.
9967 * server.c (main): Don't skip detach support on mingw32.
9968 If the inferior doesn't support detaching return error.
9969 Call join_inferior instead of using waitpid.
9970 * linux-low.c (linux_join): New.
9971 (linux_target_op): Add linux_join.
9972 * spu-low.c (spu_join): New.
9973 (spu_target_ops): Add spu_join.
9974 * win32-low.c (win32_detach): Adapt to new interface.
9975 Reopen current_process_handle before detaching. Issue a child
9976 resume before detaching.
9977 (win32_join): New.
9978 (win32_target_op): Add win32_join.
9979
1d5315fe
PA
99802007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9981
9982 * win32-low.c (win32-attach): Fix return value.
9983 * target.h (target_ops): Describe ATTACH return values.
9984
bf914831
PA
99852007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9986
9987 * win32-low.c (GETPROCADDRESS): Define.
9988 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9989 (winapi_DebugSetProcessKillOnExit): Likewise.
9990 (win32_create_inferior): Force usage of ansi CreateProcessA.
9991 (win32_attach): Use GETPROCADDRESS.
9992 (win32_detach): Likewise.
9993
f72f3e60
PA
99942007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9995
9996 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9997
ed50f18f
PA
99982007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9999
10000 * win32-low.c: Commit leftover changes from 2007-03-29.
10001
0c2ead7e
DJ
100022007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10003
10004 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10005 fields short instead of int. Add explicit padding.
10006 (i387_cache_to_fsave): Remove unnecessary casts.
10007 (i387_fsave_to_cache): Doc fix.
10008 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10009
73725ff3
DJ
100102007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10011
10012 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10013 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10014
d99f33d8
PA
100152007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10016
10017 * configure.srv (arm*-*-mingw32ce*): Move near the other
10018 arm targets.
10019
68070c10
PA
100202007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10021
2482afc6 10022 * configure.ac: Add errno checking.
68070c10
PA
10023 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10024 sys/file.h and malloc.h.
10025 (AC_CHECK_DECLS): Add perror.
10026 (srv_mingwce): Handle.
2482afc6 10027 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
10028 win32-i386-low.o to srv_tgtobj.
10029 (i[34567]86-*-mingw*): Likewise.
10030 (arm*-*-mingw32ce*): Add case.
10031 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10032 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10033 [__MINGW32CE__] (strerror): New function.
10034 [__MINGW32CE__] (errno): Define to GetLastError.
10035 [__MINGW32CE__] (COUNTOF): New macro.
10036 (remote_open): Remove extra close call.
10037 * mem-break.c (delete_breakpoint_at): New function.
10038 * mem-break.h (delete_breakpoint_at): Declare.
10039 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10040 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10041 [USE_WIN32API] (read, write): Add char* casts.
10042 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10043 * server.h: Include wincecompat.h on Windows CE.
10044 [HAVE_ERRNO_H]: Check.
10045 (perror): Declare if not declared.
10046 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10047 (perror_with_name): Remove errno declaration.
10048 * wincecompat.h: New.
10049 * wincecompat.c: New.
10050 * win32-low.h: New.
10051 * win32-arm-low.c: New.
10052 * win32-i386-low.c: New.
10053 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10054 (OUTMSG2): Make it safe.
10055 (_T): New macro.
10056 (COUNTOF): New macro.
10057 (NUM_REGS): Get it from the low target.
10058 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10059 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10060 (thread_rec): Let low target handle debug registers.
10061 (child_add_thread): Likewise.
10062 (child_init_thread_list): Likewise.
10063 (continue_one_thread): Likewise.
10064 (regptr): New.
10065 (do_child_fetch_inferior_registers): Move to ...
10066 * win32-i386-low.c: ... here, and rename to ...
10067 (do_fetch_inferior_registers): ... this.
889bf7c5 10068 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
10069 Go through the low target.
10070 (do_child_store_inferior_registers): Use regptr.
10071 (strwinerror): New function.
10072 (win32_create_inferior): Handle Windows CE.
10073 Use strwinerror instead of strerror on Windows error
10074 codes. Add program to the error output.
10075 Don't close the main thread handle on Windows CE.
10076 (win32_attach): Use coredll.dll on Windows CE.
10077 (win32_kill): Close current process and current
10078 thread handles.
10079 (win32_detach): Use coredll.dll on Windows CE.
10080 (win32_resume): Let low target handle debug registers, and
10081 step request.
10082 (handle_exception): Add/Remove initial breakpoint. Avoid
10083 non-existant WSTOPSIG on Windows CE.
10084 (win32_read_inferior_memory): Cast to remove warning.
10085 (win32_arch_string): Go through the low target.
10086 (initialize_low): Call set_breakpoint_data with the low
10087 target's breakpoint.
10088 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10089 FOP_REGNUM, mappings): Move to ...
10090 * win32-i386-low.c: ... here.
10091 * win32-low.c (win32_thread_info): Move to ...
10092 * win32-low.h: ... here.
10093 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10094 win32-arm-low.c and wincecompat.c.
10095 (all:): Add $EXEEXT.
10096 (install-only:): Likewise.
10097 (gdbserver:): Likewise.
10098 (gdbreplay:): Likewise.
10099 * config.in: Regenerate.
10100 * configure: Regenerate.
10101
41093d81
PA
101022007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10103
10104 * win32-low.c: Rename typedef thread_info to
10105 win32_thread_info throughout.
10106
544afa54
PA
101072007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10108
10109 * win32-i386-low.c: Rename to ...
10110 * win32-low.c: ... this.
10111 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10112 * Makefile.in: Likewise.
10113
bce7165d
PA
101142007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10115
10116 * remote-utils.c (monitor_output): Constify msg parameter.
10117 * server.h (monitor_output): Likewise.
10118 * win32-i386-low.c (handle_output_debug_string): New.
10119 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10120 handle_output_debug_string.
10121 (get_child_debug_event): Likewise.
10122
506c7aa0
DJ
101232007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10124
10125 * server.c (main): Correct strtoul check.
10126
42c81e2a
DJ
101272007-03-27 Jon Ringle <jon@ringle.org>
10128
10129 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10130
9453113a
DJ
101312007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10132
10133 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10134
64a69107
DJ
101352007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10136
10137 * terminal.h: Check HAVE_SGTTY_H.
10138
101392007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
10140
10141 * remote-utils.c (remote_open): Print out the assigned port number.
10142
c74d0ad8
DJ
101432007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10144
10145 * remote-utils.c (monitor_output): New function.
10146 * server.c (debug_threads): Define here.
10147 (monitor_show_help): New function.
10148 (handle_query): Handle qRcmd.
10149 (main): Do not handle 'd' packet.
10150 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10151 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10152 of debug_threads.
10153
de7c3b4a
PA
101542007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10155
10156 * Makefile.in (EXEEXT): New.
10157 (clean): Use $(EXEEXT).
10158
ef57601b
PA
101592007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10160
10161 * target.h (target_ops): Rename send_signal to request_interrupt,
10162 and remove enum target_signal parameter.
10163 * linux-low.c (linux_request_interrupt): Rename from
10164 linux_send_signal, and always send SIGINT.
10165 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10166 and always send SIGINT.
10167 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10168 of send_signal.
10169 (input_interrupt): Likewise.
10170
820f2bda
PA
101712007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10172
10173 * server.c (get_features_xml): Check if target implemented
10174 arch_string.
10175 * win32-i386-low.c (win32_arch_string): New.
10176 (win32_target_ops): Add win32_arch_string as arch_string member.
10177
ab39bf24
UW
101782007-02-22 Markus Deuling <deuling@de.ibm.com>
10179
10180 * spu-low.c (spu_arch_string): New.
10181 (spu_target_ops): Add spu_arch_string.
10182
61ff6e04
DJ
101832007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10184
10185 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10186 * configure.ac: Do not check for terminal.h.
10187 * configure, config.in: Regenerated.
10188
fb1e4ffc
DJ
101892007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10190
10191 * Makefile.in (OBS): Add $(XML_BUILTIN).
10192 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10193 (clean): Update.
10194 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10195 (arm-with-iwmmxt.c): New.
10196 * config.in, configure: Regenerate.
10197 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10198 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10199 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10200 (arm*-*-linux*): Add iWMMXt and regset support.
10201 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10202 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10203 (arm_store_wmmxregset, target_regsets): New.
10204 * server.c (get_features_xml): Take annex argument. Check builtin
10205 XML documents.
10206 (handle_query): Handle multiple annexes.
10207
0f48aa01
DJ
102082007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10209
10210 * remote-utils.c [USE_WIN32API] (read, write): Define.
10211 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10212 write.
10213
23181151
DJ
102142007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10215
10216 * linux-i386-low.c (the_low_target): Set arch_string.
10217 * linux-x86-64-low.c (the_low_target): Likewise.
10218 * linux-low.c (linux_arch_string): New.
10219 (linux_target_ops): Add it.
10220 * linux-low.h (struct linux_target_ops): Add arch_string.
10221 * server.c (write_qxfer_response): Use const void * for DATA.
10222 (get_features_xml): New.
10223 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10224 * target.h (struct target_ops): Add arch_string method.
10225
9d606399
DJ
102262007-01-03 Denis Pilat <denis.pilat@st.com>
10227 Daniel Jacobowitz <dan@codesourcery.com>
10228
10229 * linux-low.c (linux_kill): Handle being called with no threads.
10230 * win32-i386-low.c (win32_kill): Likewise.
10231 (get_child_debug_event): Clear current_process_handle.
10232
102332006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10234 Daniel Jacobowitz <dan@codesourcery.com>
10235
10236 * remote-utils.c (remote_open): Check the type of specified
10237 serial port devices before opening them.
10238 * server.c (main): Kill the inferior if an error occurs during
10239 the first remote_open.
10240
a5e13d24
DJ
102412006-12-05 Markus Deuling <deuling@de.ibm.com>
10242
10243 * README: Update supported targets.
10244
186947f7
DJ
102452006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10246
10247 * Makefile.in (clean): Remove reg-mips64.c.
10248 (reg-mips64.c, reg-mips64.o): New rules.
10249 * configure.srv: Handle mips64. Include regset support for mips.
10250 * linux-mips-low.c (union mips_register): New.
10251 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10252 (mips_breakpoint, mips_breakpoint_at): Use int.
10253 (mips_collect_register, mips_supply_register)
10254 (mips_collect_register_32bit, mips_supply_register_32bit)
10255 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10256 (mips_store_fpregset, target_regsets): New.
10257 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10258
a13e2c95
UW
102592006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10260
10261 * configure.srv: Add target "spu*-*-*".
10262 * Makefile.in (clean): Remove reg-spu.c.
10263 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10264 * spu-low.c: New file.
10265
cb7283db
DJ
102662006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10267
10268 * configure.ac: Correct td_thr_tls_get_addr test.
10269 * configure: Regenerated.
10270
89be2091
DJ
102712006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10272
10273 * linux-low.c (linux_wait_for_event): Reformat. Use the
10274 pass_signals array.
10275 * remote-utils.c (decode_address_to_semicolon): New.
10276 * server.c (pass_signals, handle_general_set): New.
10277 (handle_query): Mention QPassSignals for qSupported.
10278 (main): Call handle_general_set.
10279 * server.h (pass_signals, decode_address_to_semicolon): New.
10280
000ef4f0
DJ
102812006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10282
10283 * server.c (handle_query): Correct error handling for read_auxv.
10284
b7149293
UW
102852005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10286
10287 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10288 and srv_linux_thread_db to yes.
10289 * linux-s390-low.c (s390_fill_gregset): New function.
10290 (target_regsets): Define data structure.
10291
dae5f5cf
DJ
102922006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10293
10294 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10295 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10296 * config.in, configure: Regenerated.
10297 * inferiors.c (gdb_id_to_thread): New function.
10298 (gdb_id_to_thread_id): Use it.
10299 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10300 * linux-low.h (struct process_info): Add th member.
10301 (thread_db_get_tls_address): New prototype.
10302 * remote-utils.c (decode_address): Make non-static.
10303 * server.c (handle_query): Handle qGetTLSAddr.
10304 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10305 * target.h (struct target_ops): Add get_tls_address.
10306 * thread-db.c (maybe_attach_thread): Save the thread handle.
10307 (thread_db_get_tls_address): New.
10308
32ca6d61
DJ
103092006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10310
10311 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10312 (linux_resume_one_process): Take a siginfo_t *. Update all
10313 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10314 (struct pending_signals): Add a siginfo_t.
10315 (linux_wait_for_process): Always set last_status.
10316 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10317 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10318 * linux-low.h (struct process_info): Add last_status.
10319
5ffff7c1
DJ
103202006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10321
10322 * remote-utils.c (try_rle): New function.
10323 (putpkt_binary): Use it.
10324
8695c747
DJ
103252006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10326
10327 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10328 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10329 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10330 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10331 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10332 point registers.
10333
290fadea
RS
103342006-08-08 Richard Sandiford <richard@codesourcery.com>
10335
10336 * server.c (terminal_fd): New variable.
10337 (old_foreground_pgrp): Likewise.
10338 (restore_old_foreground_pgrp): New function.
10339 (start_inferior): Record the terminal file descriptor in terminal_fd
10340 and its original foreground group in old_foreground_pgrp. Register
10341 restore_old_foreground_pgrp with atexit().
10342
9f2e1e63
DJ
103432006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10344
10345 * server.c (handle_query): Correct qPart to qXfer.
10346
b80864fb
DJ
103472006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10348
10349 * configure.ac: Check for more headers which are missing on
10350 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10351 * configure.srv: Add Cygwin and mingw32.
10352 * remote-utils.c: Don't include headers unconditionally which
10353 are missing on mingw32. Include <winsock.h> for mingw32.
10354 (remote_open): Adjust for mingw32 support. Flush
10355 standard error after writing to it.
10356 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10357 (unblock_async_io, enable_async_io, disable_async_io)
10358 (readchar, getpkt): Update for Winsock support.
10359 (prepare_resume_reply): Expect a protocol signal number.
10360 * server.c: Disable <sys/wait.h> on mingw32.
10361 (start_inferior): Adjust for mingw32 support. Flush
10362 standard error after writing to it.
10363 (attach_inferior): Likewise. Use protocol signal
10364 numbers.
10365 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10366 and names.
10367 * win32-i386-low.c: New file.
10368 * Makefile.in (XM_CLIBS): Set.
10369 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10370 (win32-i386-low.o): New dependency rule.
10371 * linux-low.c (linux_wait): Use target signal numbers.
10372 * target.h (struct target_ops): Doc fix.
10373 * server.h (target_signal_to_name): New prototype.
10374 * gdbreplay.c: Don't include headers unconditionally which
10375 are missing on mingw32. Include <winsock.h> for mingw32.
10376 (remote_close, remote_open): Adjust for Winsock support.
10377 * configure, config.in: Regenerated.
10378
0876f84a
DJ
103792006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10380
10381 * server.c (decode_xfer_read, write_qxfer_response): New.
10382 (handle_query): Take a packet length argument. Handle
10383 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10384 the qSupported response.
10385 (main): Update call to handle_query.
10386
01f9e8fa
DJ
103872006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10388
10389 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10390 (putpkt_binary): Renamed from putpkt and adjusted for binary
10391 data.
10392 (putpkt): New wrapper for putpkt_binary.
10393 (readchar): Don't mask off the high bit.
10394 (decode_X_packet): New function.
10395 * server.c (main): Call putpkt_binary if a handler sets the packet
10396 length. Save the length of the incoming packet. Handle 'X'.
10397 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10398
be2a5f71
DJ
103992006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10400
10401 * server.c (handle_query): Handle qSupported.
10402
ea025f5f
DJ
104032006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10404
10405 * remote-utils.c (all_symbols_looked_up): New variable.
10406 (look_up_one_symbol): Check it.
10407 * server.h (look_up_one_symbol): New declaration.
10408 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10409
9308fc88
DJ
104102006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10411
10412 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10413 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10414 (PTRACE_GET_THREAD_AREA): Define.
10415 (ps_get_thread_area): New function.
10416
52fb6437
NS
104172006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10418
10419 * configure.srv (m68k*-*-uclinux*): New target.
10420 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10421 (linux_resume_one_process): Remove extraneous cast.
10422 (linux_read_offsets): New.
10423 (linux_target_op): Add linux_read_offsets on mmuless systems.
10424 * server.c (handle_query): Add qOffsets logic.
10425 * target.h (struct target_ops): Add read_offsets.
10426
21b0f40c
DJ
104272006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10428
10429 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10430 (PTRACE_GET_THREAD_AREA): Define.
10431 (ps_get_thread_area): New function.
10432 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10433 (linux-x86-64-low.o): Update.
10434
0050a760
DJ
104352006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10436
10437 * configure.ac: Remove checks for prfpregset_t.
10438 * gdb_proc_service.h: New file.
10439 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10440 new "gdb_proc_service.h".
10441 * proc-service.c: Likewise.
10442 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10443 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10444 * Makefile.in (gdb_proc_service_h): Updated.
10445 * configure, config.in: Regenerated.
10446
b92a518e
DJ
104472006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10448
10449 * remote-utils.c (prepare_resume_reply): Move declaration
10450 of gdb_id_from_wait to the top of the block.
10451
545587ee
DJ
104522006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10453
10454 * linux-low.c (regsets_store_inferior_registers): Read the regset
10455 from the target before filling it.
10456
9db87ebd
DJ
104572006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10458
10459 * server.c (attach_inferior): Return SIGTRAP for a successful
10460 attach.
10461
dd24457d
DJ
104622006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10463
10464 * Makefile.in (OBS): Add version.o.
10465 (STAGESTUFF): Delete.
10466 (version.o): Add dependencies.
10467 (version.c): Replace rule.
10468 (clean): Remove version.c.
10469 * server.c (gdbserver_version): New.
10470 (gdbserver_usage): Use printf.
10471 (main): Handle --version and --help.
10472 * server.h (version, host_name): Add declarations.
10473
6f0f660e
EZ
104742005-12-23 Eli Zaretskii <eliz@gnu.org>
10475
889bf7c5
PA
10476 * linux-arm-low.c:
10477 * linux-arm-low.c:
10478 * inferiors.c:
10479 * i387-fp.h:
10480 * i387-fp.c:
10481 * gdbreplay.c:
10482 * regcache.c:
10483 * proc-service.c:
10484 * mem-break.h:
10485 * mem-break.c:
10486 * linux-x86-64-low.c:
10487 * linux-sh-low.c:
10488 * linux-s390-low.c:
10489 * linux-ppc64-low.c:
10490 * linux-ppc-low.c:
10491 * linux-mips-low.c:
10492 * linux-m68k-low.c:
10493 * linux-m32r-low.c:
10494 * linux-low.h:
10495 * linux-low.c:
10496 * linux-ia64-low.c:
10497 * linux-i386-low.c:
10498 * linux-crisv32-low.c:
10499 * thread-db.c:
10500 * terminal.h:
10501 * target.h:
10502 * target.c:
10503 * server.h:
10504 * server.c:
10505 * remote-utils.c:
10506 * regcache.h:
10507 * utils.c:
10508 * Makefile.in:
10509 * configure.ac:
6f0f660e
EZ
10510 * gdbserver.1: Add (C) after Copyright. Update the FSF
10511 address.
10512
9d1fb177
DJ
105132005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10514
10515 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10516 (arm_breakpoint_at): Recognize both breakpoints.
10517 (the_low_target): Use the correct breakpoint instruction.
10518
011a70c2
DJ
105192005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10520
10521 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10522 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10523 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10524 (the_low_target): Update.
10525
7fb85e41
AS
105262005-10-25 Andreas Schwab <schwab@suse.de>
10527
10528 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10529
10530 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10531 (ia64_num_regs): Reduce to 462.
10532
3db0444b
DJ
105332005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10534
10535 * acinclude.m4: Correct quoting.
10536 * aclocal.m4: Regenerated.
10537
10538 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10539 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10540 (thread_db_init): Call thread_db_err_str.
10541 * configure.ac: Check for TD_VERSION.
10542 * config.in, configure: Regenerated.
10543
bee0189a
DJ
105442005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10545
10546 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10547
e9d25b98
DJ
105482005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10549
10550 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10551 is not available. Define HAVE_PTRACE_GETREGS if it is.
10552 * config.in, configure: Regenerated.
10553 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10554 * linux-i386-low.c, linux-m68k-low.c: Update to use
10555 HAVE_PTRACE_GETREGS.
10556 * linux-low.c (regsets_fetch_inferior_registers)
10557 (regsets_store_inferior_registers): Only return 0 if we processed
10558 GENERAL_REGS.
10559 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10560 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10561
a06660f7
DJ
105622005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10563
10564 * inferiors.c (struct thread_info): Add gdb_id.
10565 (add_thread): Add gdb_id argument.
10566 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10567 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10568 calls to add_thread.
10569 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10570 * server.c (handle_query): Use thread_to_gdb_id.
10571 (handle_v_cont, main): Use gdb_id_to_thread_id.
10572 * server.h (add_thread): Update prototype.
10573 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10574 prototypes.
10575
5a1f5858
DJ
105762005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10577
10578 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10579 left-padded registers.
10580 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10581 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10582
e122f1f5
SE
105832005-07-01 Steve Ellcey <sje@cup.hp.com>
10584
10585 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10586 * configure: Regenerate.
10587 * config.in: Regenerate.
10588 * server.h (NEED_DECLARATION_STRERROR):
10589 Replace with !HAVE_DECL_STRERROR.
10590
d592fa2f
DJ
105912005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10592
10593 * linux-low.c (linux_wait, linux_send_signal): Don't test
10594 an unsigned long variable for > 0 if it could be MAX_ULONG.
10595 * server.c (myresume): Likewise.
10596 * target.c (set_desired_inferior): Likewise.
10597
ccbd4912
MK
105982005-06-13 Mark Kettenis <kettenis@gnu.org>
10599
10600 * configure.ac: Simplify and improve check for socklen_t.
10601 * configure, config.in: Regenerate.
10602
f450004a
DJ
106032005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10604
10605 * acconfig.h: Remove.
10606 * configure.ac: Add a test for socklen_t. Use three-argument
10607 AC_DEFINE throughout.
10608 * config.in: Regenerated using autoheader 2.59.
10609 * configure: Regenerated.
10610
10611 * gdbreplay.c (socklen_t): Provide a default.
10612 (remote_open): Use socklen_t.
10613 * remote-utils.c (socklen_t): Provide a default.
10614 (remote_open): Use socklen_t.
10615 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10616 unsigned char.
10617
10618 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10619 char for buffers.
10620 * linux-low.c (linux_read_memory, linux_write_memory)
10621 (linux_read_auxv): Likewise.
10622 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10623 (check_mem_write): Likewise.
10624 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10625 Likewise.
10626 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10627 (registers_from_string, register_data): Likewise.
10628 * server.c (handle_query, main): Likewise.
10629 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10630 (decode_M_packet): Likewise.
10631 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10632 * target.h (struct target_ops): Update read_memory, write_memory,
10633 and read_auxv.
10634 (read_inferior_memory, write_inferior_memory): Update.
10635 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10636 to unsigned char *.
10637 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10638 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10639 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10640 linux-s390-low.c, linux-sh-low.c: Update for changes in
10641 read_inferior_memory and the_low_target->breakpoint.
10642
eee84df1
DJ
106432005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10644
10645 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10646 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10647 * configure.srv: Add powerpc64-*-linux*.
10648 * linux-ppc64-low.c: New file.
10649
45b134e5
OF
106502005-05-23 Orjan Friberg <orjanf@axis.com>
10651
10652 * linux-cris-low.c: New file with support for CRIS.
10653 * linux-crisv32-low.c: Ditto for CRISv32.
10654 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10655 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10656 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10657 reg-crisv32.o, and reg-crisv32.c to make rules.
10658 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10659 recognized targets.
10660
48d93c75
UW
106612005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10662
10663 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10664 of sizeof (PTRACE_XFER_TYPE).
10665 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10666
e013ee27
OF
106672005-05-12 Orjan Friberg <orjanf@axis.com>
10668
889bf7c5 10669 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10670 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10671 pointers for hardware watchpoint support.
10672 * linux-low.h (struct linux_target_ops): Ditto.
10673 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10674 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10675 to linux_target_ops.
10676 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10677 reply packet.
10678 * server.c (main): Recognize 'Z' and 'z' packets.
10679
b0ded00b
UW
106802005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10681
10682 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10683 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10684 (the_low_target): Add new members.
10685
8643e2ad
DJ
106862005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10687
10688 * proc-service.c (ps_lgetregs): Search all_processes instead of
10689 all_threads.
10690
fc620387
DJ
106912005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10692
10693 * server.c (start_inferior): Change return type to int.
10694 (attach_inferior): Change sigptr to int *.
10695 (handle_v_cont, handle_v_requests): Change signal to int *.
10696 (main): Change signal to int.
10697
106982005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10699
10700 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10701 * configure.srv: Add m32r*-*-linux*.
10702 * linux-m32r-low.c: New file.
10703
e0e76420
DJ
107042005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10705
10706 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10707
a1928bad
DJ
107082005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10709
10710 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10711 Take unsigned long arguments for PIDs.
10712 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10713 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10714 (wait_for_sigstop, linux_resume_one_process)
10715 (regsets_fetch_inferior_registers, linux_send_signal)
10716 (linux_read_auxv): Likewise. Update the types of variables holding
10717 PIDs. Update format string specifiers.
10718 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10719 * remote-utils.c (prepare_resume_reply): Likewise.
10720 * server.c (cont_thread, general_thread, step_thread)
10721 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10722 unsigned long.
10723 (handle_query): Update format specifiers.
10724 (handle_v_cont, main): Use strtoul for thread IDs.
10725 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10726 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10727 (general_thread, step_thread, thread_from_wait)
10728 (old_thread_from_wait): Update.
10729 * target.h (struct thread_resume): Use unsigned long for THREAD.
10730 (struct target_ops): Use unsigned long for arguments to attach and
10731 thread_alive.
10732
dcdb98d2
DJ
107332005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10734
10735 * acinclude.m4: Include bfd/bfd.m4 directly.
10736 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10737 <agriffis@toolchain.org>.
10738 * aclocal.m4, configure: Regenerated.
10739
bec39cab
AC
107402005-01-07 Andrew Cagney <cagney@gnu.org>
10741
10742 * configure.ac: Rename configure.in, require autoconf 2.59.
10743 * configure: Re-generate.
10744
434c4c77
DJ
107452004-12-08 Daniel Jacobowitz <dan@debian.org>
10746
10747 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10748 LIBS when finished.
10749 * aclocal.m4: Regenerated.
10750 * configure: Regenerated.
10751
db1d3e1b
AS
107522004-11-21 Andreas Schwab <schwab@suse.de>
10753
10754 * linux-m68k-low.c (m68k_num_gregs): Define.
10755 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10756 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10757 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10758 (m68k_breakpoint_at): New. Add to the_low_target.
10759
10760 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10761 srv_linux_thread_db to yes.
10762
43360365
JB
107632004-10-20 Joel Brobecker <brobecker@gnat.com>
10764
10765 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10766 (ARCH_SET_FS): Likewise.
10767 (ARCH_GET_FS): Likewise.
10768 (ARCH_GET_GS): Likewise.
10769
fd500816
DJ
107702004-10-16 Daniel Jacobowitz <dan@debian.org>
10771
10772 * linux-i386-low.c (ps_get_thread_area): New.
10773 * linux-x86-64-low.c (ps_get_thread_area): New.
10774 * linux-low.c: Include <sys/syscall.h>.
10775 (linux_kill_one_process): Don't kill the first thread here.
10776 (linux_kill): Kill the first thread here.
10777 (kill_lwp): New function.
10778 (send_sigstop, linux_send_signal): Use it.
10779 * proc-service.c: Clean up #ifdefs.
10780 (fpregset_info): Delete.
10781 (ps_lgetregs): Update and enable implementation.
10782 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10783 implementations.
10784 * remote-utils.c (struct sym_cache, symbol_cache): New.
10785 (input_interrupt): Print a clearer message.
10786 (async_io_enabled): New variable.
10787 (enable_async_io, disable_async_io): Use it. Update comments.
10788 (look_up_one_symbol): Use the symbol cache.
10789 * thread-db.c (thread_db_look_up_symbols): New function.
10790 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10791
f6de3c42
DJ
107922004-10-16 Daniel Jacobowitz <dan@debian.org>
10793
10794 * configure.in: Test for -rdynamic.
10795 * configure: Regenerated.
10796 * Makefile (INTERNAL_LDFLAGS): New.
10797 (gdbserver, gdbreplay): Use it.
10798
2c0fc042
AC
107992004-09-02 Andrew Cagney <cagney@gnu.org>
10800
10801 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10802
075b3282
DJ
108032004-03-23 Daniel Jacobowitz <drow@mvista.com>
10804
10805 * linux-low.c (linux_wait): Clear all_processes list also.
10806
fa6a77dc
DJ
108072004-03-12 Daniel Jacobowitz <drow@mvista.com>
10808
10809 * linux-low.c: Include <errno.h>. Remove extern declaration of
10810 errno.
10811
6d782a97
DJ
108122004-03-12 Daniel Jacobowitz <drow@mvista.com>
10813
10814 * gdbreplay.c, server.h, utils.c: Update copyright years.
10815
3a7fb99b
DJ
108162004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10817
10818 * server.c (main): Print child status or termination signal from
10819 variable 'signal', not 'sig'.
10820
c3e735a6
DJ
108212004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10822
10823 * linux-low.c (linux_read_memory): Change return type to
10824 int. Check for and return error from ptrace().
10825 * target.c (read_inferior_memory): Change return type to int. Pass
10826 back return status from the_target->read_memory().
10827 * target.h (struct target_ops): Adapt *read_memory() prototype.
10828 Update comment.
10829 (read_inferior_memory): Adapt prototype.
10830 * server.c (main): Return an error packet if
10831 read_inferior_memory() returns an error.
10832
a59d1c82
DJ
108332004-03-04 Daniel Jacobowitz <drow@mvista.com>
10834
10835 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10836 Unify with other clean targets.
10837
dc3f8883
DJ
108382004-02-29 Daniel Jacobowitz <drow@mvista.com>
10839
10840 * server.c (handle_v_cont): Call set_desired_inferior.
10841
89a208da
DJ
108422004-02-29 Daniel Jacobowitz <drow@mvista.com>
10843
10844 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10845
62ea82f5
DJ
108462004-02-29 Daniel Jacobowitz <drow@mvista.com>
10847
10848 * linux-low.c (linux_wait): Unblock async I/O.
10849 (linux_resume): Block and enable async I/O.
10850 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10851 * server.h (block_async_io, unblock_async_io): Add prototypes.
10852
6910d122
DJ
108532004-02-29 Daniel Jacobowitz <drow@mvista.com>
10854
10855 * remote-utils.c (remote_open): Print a status notice after
10856 opening a TCP port.
10857 * server.c (attach_inferior): Print a status notice after
10858 attaching.
10859
108602004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10861
10862 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10863
c89dc5d4
DJ
108642004-02-26 Daniel Jacobowitz <drow@mvista.com>
10865
10866 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10867 error packet.
10868 * server.c, target.h: Update copyright years.
10869
4b8dad4a
RM
108702004-02-25 Roland McGrath <roland@redhat.com>
10871
10872 * target.h (struct target_ops): New member `read_auxv'.
10873 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10874 * linux-low.c (linux_read_auxv): New function.
10875 (linux_target_ops): Initialize `read_auxv' member to that.
10876
d7446758
JB
108772004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10878
10879 Committed by Jim Blandy <jimb@redhat.com>.
10880
10881 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10882 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10883 instead of GPR_SIZE to distiguish s390 and s390x targets.
10884
5544ad89
DJ
108852004-01-31 Daniel Jacobowitz <drow@mvista.com>
10886
10887 * linux-low.c: Update copyright year.
10888 (check_removed_breakpoint): Clear pending_is_breakpoint.
10889 (linux_set_resume_request, linux_queue_one_thread)
10890 (resume_status_pending_p): New functions.
10891 (linux_continue_one_thread): Use process->resume.
10892 (linux_resume): Only resume threads if there are no pending events.
10893 * linux-low.h (struct process_info): Add resume request
10894 pointer.
10895
2a68b70e
DJ
108962004-01-30 Daniel Jacobowitz <drow@mvista.com>
10897
10898 * regcache.c (new_register_cache): Clear the allocated register
10899 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10900
64386c31
DJ
109012003-10-13 Daniel Jacobowitz <drow@mvista.com>
10902
10903 * linux-low.c (linux_resume): Take a struct thread_resume *
10904 argument.
10905 (linux_wait): Update call.
10906 (resume_ptr): New static variable.
10907 (linux_continue_one_thread): Renamed from
10908 linux_continue_one_process. Use resume_ptr.
10909 (linux_resume): Use linux_continue_one_thread.
10910 * server.c (handle_v_cont, handle_v_requests): New functions.
10911 (myresume): New function.
10912 (main): Handle 'v' case.
10913 * target.h (struct thread_resume): New type.
10914 (struct target_ops): Change argument of "resume" to struct
10915 thread_resume *.
10916 (myresume): Delete macro.
10917
c938e9b0
L
109182003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10919
10920 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10921 (uninstall): Support DESTDIR.
10922
7f313d07
BC
10923Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10924
10925 * configure.srv: Add xscale*linux copy of arm*linux entry.
10926
3b2fc2ea
DJ
109272003-07-24 Daniel Jacobowitz <drow@mvista.com>
10928
10929 * linux-arm-low.c (arm_reinsert_addr): New function.
10930 (the_low_target): Add arm_reinsert_addr.
10931
1c0a559e
MK
109322003-07-08 Mark Kettenis <kettenis@gnu.org>
10933
10934 * mem-break.c: Remove whitespace at end of file.
10935
43d5792c
DJ
109362003-06-28 Daniel Jacobowitz <drow@mvista.com>
10937
10938 * configure.in: Check whether we need to prototype strerror.
10939 * server.h: Optionally prototype strerror.
10940 * gdbreplay.c (perror_with_name): Use strerror.
10941 * linux-low.c (linux_attach_lwp): Use strerror.
10942 * utils.c (perror_with_name): Use strerror.
10943 * config.in, configure: Regenerated.
10944
c8a86edf
DJ
109452003-06-28 Daniel Jacobowitz <drow@mvista.com>
10946
10947 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10948 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10949
73d37363
DJ
109502003-06-20 Daniel Jacobowitz <drow@mvista.com>
10951
10952 * Makefile.in (SFILES): Update.
10953 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10954 low-sun3.c: Remove files.
10955
6ad8ae5c
DJ
109562003-06-17 Daniel Jacobowitz <drow@mvista.com>
10957
10958 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10959 (linux_detach_one_process, linux_detach): New functions.
10960 (linux_target_ops): Add linux_detach.
10961 * server.c (main): Handle 'D' packet.
10962 * target.h (struct target_ops): Add "detach" member.
10963 (detach_inferior): Define.
10964
1581182a
MK
109652003-06-13 Mark Kettenis <kettenis@gnu.org>
10966
10967 From Kelley Cook <kelleycook@wideopenwest.com>:
10968 * configure.srv: Accept i[34567]86 variants.
10969
e5379b03
DJ
109702003-06-05 Daniel Jacobowitz <drow@mvista.com>
10971
10972 * linux-low.c (linux_wait_for_event): Correct comment typos.
10973 (linux_resume_one_process): Call check_removed_breakpoint.
10974 (linux_send_signal): New function.
10975 (linux_target_ops): Add linux_send_signal.
10976 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10977 of kill.
10978 * target.h (struct target_ops): Add send_signal.
10979
2ff29de4
JB
109802003-05-29 Jim Blandy <jimb@redhat.com>
10981
10982 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10983 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10984 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10985 away part of the register's value.
10986
254787d4
DJ
109872003-03-26 Daniel Jacobowitz <drow@mvista.com>
10988
10989 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10990 (linux_wait_for_event, linux_init_signals): Likewise.
10991
94e10508
DJ
109922003-03-17 Daniel Jacobowitz <drow@mvista.com>
10993
10994 * configure.in: Check for stdlib.h.
10995 * configure: Regenerated.
10996 * config.in: Regenerated.
10997
4c0711e0
DJ
109982003-01-04 Andreas Schwab <schwab@suse.de>
10999
11000 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11001
ef66e766
AC
110022003-01-02 Andrew Cagney <ac131313@redhat.com>
11003
11004 * Makefile.in: Remove obsolete code.
11005
a1358604
DJ
110062002-11-20 Daniel Jacobowitz <drow@mvista.com>
11007
11008 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11009 defined(PT_FPR0_HI).
11010
23ce3b1c
DJ
110112002-11-17 Stuart Hughes <seh@zee2.com>
11012
11013 * linux-arm-low.c (arm_num_regs): Increase.
11014 (arm_regmap): Include status register.
11015
110162002-11-17 Daniel Jacobowitz <drow@mvista.com>
11017
11018 * linux-low.c (register_addr): Remove incorrect -1 check.
11019
a9fa9f7d
DJ
110202002-08-29 Daniel Jacobowitz <drow@mvista.com>
11021
11022 * linux-low.c (linux_create_inferior): Call setpgid. Return
11023 the new PID.
11024 (unstopped_p, linux_signal_pid): Remove.
11025 (linux_target_ops): Remove linux_signal_pid.
11026 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11027 global instead of target method.
11028 * target.h (struct target_ops): Remove signal_pid. Update comment
11029 for create_inferior.
11030 * server.c (signal_pid): New variable.
11031 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 11032 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
11033 (attach_inferior): Set signal_pid.
11034
17574093
DJ
110352002-08-23 Daniel Jacobowitz <drow@mvista.com>
11036
11037 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11038
110392002-08-20 Jim Blandy <jimb@redhat.com>
11040
11041 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11042 default for this.
11043
110442002-08-01 Andrew Cagney <cagney@redhat.com>
11045
11046 * Makefile.in: Make chill references obsolete.
11047
110482002-07-24 Kevin Buettner <kevinb@redhat.com>
11049
11050 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11051 * configure: Regenerate.
11052 * config.in: Regenerate.
11053
110542002-07-09 David O'Brien <obrien@FreeBSD.org>
11055
11056 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11057 (perror_with_name, remote_close, remote_open, expect, play): Static.
11058
110592002-07-04 Michal Ludvig <mludvig@suse.cz>
11060
4b8dad4a 11061 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
11062 byte offsets instead of an array of indexes.
11063 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11064
110652002-06-13 Daniel Jacobowitz <drow@mvista.com>
11066
11067 * regcache.c: Add comment.
11068
110692002-06-11 Daniel Jacobowitz <drow@mvista.com>
11070
11071 * thread-db.c: New file.
11072 * proc-service.c: New file.
11073 * acinclude.m4: New file.
11074 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11075 proc-service.o, and thread-db.o.
11076 (linux-low.o): Add USE_THREAD_DB.
11077 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11078 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11079 * aclocal.m4: Regenerated.
11080 * config.in: Regenerated.
11081 * configure: Regenerated.
11082 * configure.in: Check for proc_service.h, sys/procfs.h,
11083 thread_db.h, and linux/elf.h headrs.
11084 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11085 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11086 Check for -lthread_db and thread support.
11087 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11088 PowerPC, and SuperH.
11089 * i387-fp.c: Constify arguments.
11090 * i387-fp.h: Likewise.
11091 * inferiors.c: (struct thread_info): Renamed from
11092 `struct inferior_info'. Remove PID member. Use generic inferior
11093 list header. All uses updated.
11094 (inferiors, signal_pid): Removed.
11095 (all_threads): New variable.
11096 (get_thread): Define.
11097 (add_inferior_to_list): New function.
11098 (for_each_inferior): New function.
11099 (change_inferior_id): New function.
11100 (add_inferior): Removed.
11101 (remove_inferior): New function.
11102 (add_thread): New function.
11103 (free_one_thread): New function.
11104 (remove_thread): New function.
11105 (clear_inferiors): Use for_each_inferior and free_one_thread.
11106 (find_inferior): New function.
11107 (find_inferior_id): New function.
11108 (inferior_target_data): Update argument type.
11109 (set_inferior_target_data): Likewise.
11110 (inferior_regcache_data): Likewise.
11111 (set_inferior_regcache_data): Likewise.
11112 * linux-low.c (linux_bp_reinsert): Remove.
11113 (all_processes, stopping_threads, using_thrads)
11114 (struct pending_signals, debug_threads, pid_of): New.
11115 (inferior_pid): Replace with macro.
11116 (struct inferior_linux_data): Remove.
11117 (get_stop_pc, add_process): New functions.
11118 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11119 Use add_process and add_thread.
11120 (linux_attach_lwp): New function, based on old linux_attach. Use
11121 add_process and add_thread. Set stop_expected for new threads.
11122 (linux_attach): New function.
11123 (linux_kill_one_process): New function.
11124 (linux_kill): Kill all LWPs.
11125 (linux_thread_alive): Use find_inferior_id.
11126 (check_removed_breakpoints, status_pending_p): New functions.
11127 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11128 Update. Use WNOHANG. Wait for cloned processes also. Update process
11129 struct for the found process.
11130 (linux_wait_for_event): New function.
11131 (linux_wait): Use it. Support LWPs.
11132 (send_sigstop, wait_for_sigstop, stop_all_processes)
11133 (linux_resume_one_process, linux_continue_one_process): New functions.
11134 (linux_resume): Support LWPs.
11135 (REGISTER_RAW_SIZE): Remove.
11136 (fetch_register): Use register_size instead. Call supply_register.
11137 (usr_store_inferior_registers): Likewise. Call collect_register.
11138 Fix recursive case.
11139 (regsets_fetch_inferior_registers): Improve error message.
11140 (regsets_store_inferior_registers): Add debugging.
11141 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11142 (unstopped_p, linux_signal_pid): New functions.
11143 (linux_target_ops): Add linux_signal_pid.
11144 (linux_init_signals): New function.
11145 (initialize_low): Call it. Initialize using_threads.
11146 * regcache.c (inferior_regcache_data): Add valid
11147 flag.
11148 (get_regcache): Fetch registers lazily. Add fetch argument
11149 and update all callers.
11150 (regcache_invalidate_one, regcache_invalidate): New
11151 functions.
11152 (new_register_cache): Renamed from create_register_cache.
11153 Return the new regcache.
11154 (free_register_cache): Change argument to a void *.
11155 (registers_to_string, registers_from_string): Call get_regcache
11156 with fetch flag set.
11157 (register_data): Make static. Pass fetch flag to get_regcache.
11158 (supply_register): Call get_regcache with fetch flag clear.
11159 (collect_register): Call get_regcache with fetch flag set.
11160 (collect_register_as_string): New function.
11161 * regcache.h: Update.
11162 * remote-utils.c (putpkt): Flush after debug output and use
11163 stderr.
11164 Handle input interrupts while waiting for an ACK.
11165 (input_interrupt): Use signal_pid method.
11166 (getpkt): Flush after debug output and use stderr.
11167 (outreg): Use collect_register_as_string.
11168 (new_thread_notify, dead_thread_notify): New functions.
11169 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11170 and general_thread.
11171 (look_up_one_symbol): Flush after debug output.
11172 * server.c (step_thread, server_waiting): New variables.
11173 (start_inferior): Don't use signal_pid. Update call to mywait.
11174 (attach_inferior): Update call to mywait.
11175 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11176 (main): Don't fetch/store registers explicitly. Use
11177 set_desired_inferior. Support proposed ``Hs'' packet. Update
11178 calls to mywait.
11179 * server.h: Update.
11180 (struct inferior_list, struct_inferior_list_entry): New.
11181 * target.c (set_desired_inferior): New.
11182 (write_inferior_memory): Constify.
11183 (mywait): New function.
11184 * target.h: Update.
11185 (struct target_ops): New signal_pid method.
11186 (mywait): Removed macro, added prototype.
11187
11188 * linux-low.h (regset_func): Removed.
11189 (regset_fill_func, regset_store_func): New.
11190 (enum regset_type): New.
11191 (struct regset_info): Add type field. Use new operation types.
11192 (struct linux_target_ops): stop_pc renamed to get_pc.
11193 Add decr_pc_after_break and breakpoint_at.
11194 (get_process, get_thread_proess, get_process_thread)
11195 (strut process_info, all_processes, linux_attach_lwp)
11196 (thread_db_init): New.
11197
11198 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11199 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11200 (the_low_target): Add new members.
11201 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11202 (i386_store_fpxregset): Constify.
11203 (target_regsets): Add new kind identifier.
11204 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11205 (i386_set_pc): Add debugging.
11206 (i386_breakpoint_at): New function.
11207 (the_low_target): Add new members.
11208 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11209 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11210 (mips_breakpoint_at): New.
11211 (the_low_target): Add new members.
11212 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11213 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11214 (the_low_target): Add new members.
11215 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11216 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11217 (the_low_target): Add new members.
11218 * linux-x86-64-low.c (target_regsets): Add new kind
11219 identifier.
11220
112212002-05-15 Daniel Jacobowitz <drow@mvista.com>
11222
11223 From Martin Pool <mbp@samba.org>:
11224 * server.c (gdbserver_usage): New function.
11225 (main): Call it.
11226
112272002-05-14 Daniel Jacobowitz <drow@mvista.com>
11228
11229 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11230 stop_at -> stop_pc.
11231
112322002-05-04 Andrew Cagney <ac131313@redhat.com>
11233
11234 * Makefile.in: Remove obsolete code.
11235
112362002-04-24 Michal Ludvig <mludvig@suse.cz>
11237
11238 * linux-low.c (regsets_fetch_inferior_registers),
11239 (regsets_store_inferior_registers): Removed cast to int from
11240 ptrace() calls.
11241 * regcache.h: Added declaration of struct inferior_info.
11242
112432002-04-20 Daniel Jacobowitz <drow@mvista.com>
11244
11245 * inferiors.c (struct inferior_info): Add regcache_data.
11246 (add_inferior): Call create_register_cache.
11247 (clear_inferiors): Call free_register_cache.
11248 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11249 * regcache.c (struct inferior_regcache_data): New.
11250 (registers): Remove.
11251 (get_regcache): New function.
11252 (create_register_cache, free_register_cache): New functions.
11253 (set_register_cache): Don't initialize the register cache here.
11254 (registers_to_string, registers_from_string, register_data): Call
11255 get_regcache.
11256 * regcache.h: Add prototypes.
11257 * server.h: Likewise.
11258
112592002-04-20 Daniel Jacobowitz <drow@mvista.com>
11260
11261 * mem-break.c: New file.
11262 * mem-break.h: New file.
11263 * Makefile.in: Add mem-break.o rule; update server.h
11264 dependencies.
11265 * inferiors.c (struct inferior_info): Add target_data
11266 member.
11267 (clear_inferiors): Free target_data member if set.
11268 (inferior_target_data, set_inferior_target_data): New functions.
11269 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11270 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11271 * linux-low.c (linux_bp_reinsert): New variable.
11272 (struct inferior_linux_data): New.
11273 (linux_create_inferior): Use set_inferior_target_data.
11274 (linux_attach): Likewise. Call add_inferior.
11275 (linux_wait_for_one_inferior): New function.
11276 (linux_wait): Call it.
11277 (linux_write_memory): Add const.
11278 (initialize_low): Call set_breakpoint_data.
11279 * linux-low.h (struct linux_target_ops): Add breakpoint
11280 handling members.
11281 * server.c (attach_inferior): Remove extra add_inferior
11282 call.
11283 * server.h: Include mem-break.h. Update inferior.c
11284 prototypes.
11285 * target.c (read_inferior_memory)
11286 (write_inferior_memory): New functions.
11287 * target.h (read_inferior_memory)
11288 (write_inferior_memory): Change macros to prototypes.
11289 (struct target_ops): Update comments. Add const to write_memory
11290 definition.
11291
112922002-04-11 Daniel Jacobowitz <drow@mvista.com>
11293
11294 * linux-low.c (usr_store_inferior_registers): Support
11295 registers which are allowed to fail to store.
11296 * linux-low.h (linux_target_ops): Likewise.
11297 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11298 (ppc_cannot_store_register): FPSCR may not be storable.
11299
113002002-04-09 Daniel Jacobowitz <drow@mvista.com>
11301
11302 * server.h: Include <string.h> if HAVE_STRING_H.
11303 * ChangeLog: Correct paths in last ChangeLog entry.
11304
113052002-04-09 Daniel Jacobowitz <drow@mvista.com>
11306
11307 * linux-low.h: Remove obsolete prototypes.
11308 (struct linux_target_ops): New.
11309 (extern the_low_target): New.
11310 * linux-low.c (num_regs, regmap): Remove declarations.
11311 (register_addr): Use the_low_target explicitly.
11312 (fetch_register): Likewise.
11313 (usr_fetch_inferior_registers): Likewise.
11314 (usr_store_inferior_registers): Likewise.
11315 * linux-arm-low.c (num_regs): Remove.
11316 (arm_num_regs): Define.
11317 (arm_regmap): Renamed from regmap, made static.
11318 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11319 made static.
11320 (arm_cannot_store_register): Renamed from cannot_store_register,
11321 made static.
11322 (the_low_target): New.
11323 * linux-i386-low.c (num_regs): Remove.
11324 (i386_num_regs): Define.
11325 (i386_regmap): Renamed from regmap, made static.
11326 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11327 made static.
11328 (i386_cannot_store_register): Renamed from cannot_store_register,
11329 made static.
11330 (the_low_target): New.
11331 * linux-ia64-low.c (num_regs): Remove.
11332 (ia64_num_regs): Define.
11333 (ia64_regmap): Renamed from regmap, made static.
11334 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11335 made static.
11336 (ia64_cannot_store_register): Renamed from cannot_store_register,
11337 made static.
11338 (the_low_target): New.
11339 * linux-m68k-low.c (num_regs): Remove.
11340 (m68k_num_regs): Define.
11341 (m68k_regmap): Renamed from regmap, made static.
11342 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11343 made static.
11344 (m68k_cannot_store_register): Renamed from cannot_store_register,
11345 made static.
11346 (the_low_target): New.
11347 * linux-mips-low.c (num_regs): Remove.
11348 (mips_num_regs): Define.
11349 (mips_regmap): Renamed from regmap, made static.
11350 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11351 made static.
11352 (mips_cannot_store_register): Renamed from cannot_store_register,
11353 made static.
11354 (the_low_target): New.
11355 * linux-ppc-low.c (num_regs): Remove.
11356 (ppc_num_regs): Define.
11357 (ppc_regmap): Renamed from regmap, made static.
11358 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11359 made static.
11360 (ppc_cannot_store_register): Renamed from cannot_store_register,
11361 made static.
11362 (the_low_target): New.
11363 * linux-s390-low.c (num_regs): Remove.
11364 (s390_num_regs): Define.
11365 (s390_regmap): Renamed from regmap, made static.
11366 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11367 made static.
11368 (s390_cannot_store_register): Renamed from cannot_store_register,
11369 made static.
11370 (the_low_target): New.
11371 * linux-sh-low.c (num_regs): Remove.
11372 (sh_num_regs): Define.
11373 (sh_regmap): Renamed from regmap, made static.
11374 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11375 made static.
11376 (sh_cannot_store_register): Renamed from cannot_store_register,
11377 made static.
11378 (the_low_target): New.
11379 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11380 (the_low_target): New.
11381
113822002-04-09 Daniel Jacobowitz <drow@mvista.com>
11383
11384 * Makefile.in: Add stamp-h target.
11385 * configure.in: Create stamp-h.
11386 * configure: Regenerated.
11387
113882002-04-09 Daniel Jacobowitz <drow@mvista.com>
11389
11390 * inferiors.c: New file.
11391 * target.c: New file.
11392 * target.h: New file.
11393 * Makefile.in: Add target.o and inferiors.o. Update
11394 dependencies.
11395 * linux-low.c (inferior_pid): New static variable,
11396 moved from server.c.
11397 (linux_create_inferior): Renamed from create_inferior.
11398 Call add_inferior. Return 0 on success instead of a PID.
11399 (linux_attach): Renamed from myattach.
11400 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11401 (linux_thread_alive): Renamed from mythread_alive.
11402 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11403 child dies.
11404 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11405 (regsets_store_inferior_registers): Correct error message.
11406 Add missing ``return 0''.
11407 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11408 (linux_store_registers): Renamed from store_inferior_registers.
11409 (linux_read_memory): Renamed from read_inferior_memory.
11410 (linux_write_memory): Renamed from write_inferior_memory.
11411 (linux_target_ops): New structure.
11412 (initialize_low): Call set_target_ops ().
11413 * remote-utils.c (unhexify): New function.
11414 (hexify): New function.
11415 (input_interrupt): Send signals to ``signal_pid''.
11416 * server.c (inferior_pid): Remove.
11417 (start_inferior): Update create_inferior call.
11418 (attach_inferior): Call add_inferior.
11419 (handle_query): New function.
11420 (main): Call handle_query for `q' packets.
11421 * server.h: Include "target.h". Remove obsolete prototypes.
11422 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11423
114242002-04-09 Daniel Jacobowitz <drow@mvista.com>
11425
11426 * Makefile.in: Add WARN_CFLAGS. Update configury
11427 dependencies.
11428 * configure.in: Check for <string.h>
11429 * configure: Regenerate.
11430 * config.in: Regenerate.
11431 * gdbreplay.c: Include needed system headers.
11432 (remote_open): Remove strchr prototype.
11433 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11434 * regcache.c (supply_register): Change buf argument to const void *.
11435 (supply_register_by_name): Likewise.
11436 (collect_register): Change buf argument to void *.
11437 (collect_register_by_name): Likewise.
11438 * regcache.h: Add missing prototypes.
11439 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11440 * server.c (handle_query): New function.
11441 (attached): New static variable, moved out of main.
11442 (main): Quiet longjmp clobber warnings.
11443 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11444 * utils.c (error): Remove NORETURN.
11445 (fatal): Likewise.
This page took 1.469446 seconds and 4 git commands to generate.