]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Move gdb_ptrace.h to nat/
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
eb7aa561
PA
12015-07-24 Pedro Alves <palves@redhat.com>
2
3 * acinclude.m4: Include ../ptrace.m4.
4 * configure.ac: Call GDB_AC_PTRACE.
5 * config.in, configure: Regenerate.
6
55d7b841
YQ
72015-07-24 Yao Qi <yao.qi@linaro.org>
8
9 * linux-low.c (linux_create_inferior): Remove setting to
10 proc->priv->new_inferior.
11 (linux_attach): Likewise.
12 (linux_low_filter_event): Likewise.
13 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
14
c06cbd92
YQ
152015-07-24 Yao Qi <yao.qi@linaro.org>
16
17 * linux-low.c (linux_arch_setup): New function.
18 (linux_low_filter_event): If proc->tdesc is NULL and
19 proc->attached is true, call the_low_target.arch_setup.
20 Otherwise, keep status pending, and return.
21 (linux_resume_one_lwp_throw): Don't call get_pc if
22 thread->while_stepping isn't NULL. Don't call
23 get_thread_regcache if proc->tdesc is NULL.
24 (need_step_over_p): Return 0 if proc->tdesc is NULL.
25 (linux_target_ops): Install arch_setup.
26 * server.c (start_inferior): Call the_target->arch_setup.
27 * target.h (struct target_ops) <arch_setup>: New field.
28 (target_arch_setup): New marco.
29 * lynx-low.c (lynx_target_ops): Update.
30 * nto-low.c (nto_target_ops): Update.
31 * spu-low.c (spu_target_ops): Update.
32 * win32-low.c (win32_target_ops): Update.
33
5ae3ebba
YQ
342015-07-24 Yao Qi <yao.qi@linaro.org>
35
36 * linux-low.c (linux_add_process): Don't set
37 proc->priv->new_inferior.
38 (linux_create_inferior): Set proc->priv->new_inferior to 1.
39 (linux_attach): Likewise.
40
eb97750b
YQ
412015-07-24 Yao Qi <yao.qi@linaro.org>
42
43 * server.c (start_inferior): Code refactor.
44
51aee833
YQ
452015-07-24 Yao Qi <yao.qi@linaro.org>
46
47 * server.c (process_serial_event): Set general_thread.
48
af1b22f3
YQ
492015-07-21 Yao Qi <yao.qi@linaro.org>
50
51 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
52 aarch64_linux_get_debug_reg_capacity.
53
554717a3
YQ
542015-07-17 Yao Qi <yao.qi@linaro.org>
55
56 * Makefile.in (aarch64-linux-hw-point.o): New rule.
57 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
58 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
59 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
60 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
61 (AARCH64_HWP_ALIGNMENT): Likewise.
62 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
63 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
64 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
65 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
66 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
67 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
68 (struct aarch64_debug_reg_state): Likewise.
69 (struct arch_lwp_info): Likewise.
70 (aarch64_align_watchpoint): Likewise.
71 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
72 (aarch64_watchpoint_length): Likewise.
73 (aarch64_point_encode_ctrl_reg): Likewise
74 (aarch64_point_is_aligned): Likewise.
75 (aarch64_align_watchpoint): Likewise.
76 (aarch64_linux_set_debug_regs):
77 (aarch64_dr_state_insert_one_point): Likewise.
78 (aarch64_dr_state_remove_one_point): Likewise.
79 (aarch64_handle_breakpoint): Likewise.
80 (aarch64_handle_aligned_watchpoint): Likewise.
81 (aarch64_handle_unaligned_watchpoint): Likewise.
82 (aarch64_handle_watchpoint): Likewise.
83
c67ca4de
YQ
842015-07-17 Yao Qi <yao.qi@linaro.org>
85
86 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
87 and don't aarch64_get_debug_reg_state. All callers update.
88 (aarch64_handle_aligned_watchpoint): Likewise.
89 (aarch64_handle_unaligned_watchpoint): Likewise.
90 (aarch64_handle_watchpoint): Likewise.
91 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
92 (aarch64_remove_point): Likewise.
93
25abf979
YQ
942015-07-17 Yao Qi <yao.qi@linaro.org>
95
96 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
97 debug_printf.
98 (aarch64_handle_unaligned_watchpoint): Likewise.
99
db1ff28b
JK
1002015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
101
102 Revert the previous 3 commits:
103 Move gdb_regex* to common/
104 Move linux_find_memory_regions_full & co.
105 gdbserver build-id attribute generator
106
700ca40f
JK
1072015-07-15 Aleksandar Ristovski <aristovski@qnx.com
108 Jan Kratochvil <jan.kratochvil@redhat.com>
109
110 gdbserver build-id attribute generator.
111 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
112 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
113 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
114 (find_phdr): New.
115 (get_dynamic): Use find_pdhr to traverse program headers.
116 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
117 (compare_mapping_entry_range, struct find_memory_region_callback_data)
118 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
119 (get_hex_build_id): New.
120 (linux_qxfer_libraries_svr4): Add optional build-id attribute
121 to reply XML document.
122
9904185c
JK
1232015-07-15 Aleksandar Ristovski <aristovski@qnx.com
124 Jan Kratochvil <jan.kratochvil@redhat.com>
125
126 * target.c: Include target/target-utils.h and fcntl.h.
127 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
128 (target_fileio_read_stralloc): New functions.
129
6e5b4429
JK
1302015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
131
132 * Makefile.in (OBS): Add gdb_regex.o.
133 (gdb_regex.o): New.
134 * config.in: Rebuilt.
135 * configure: Rebuilt.
136
ddc98fbf
JK
1372015-07-15 Aleksandar Ristovski <aristovski@qnx.com
138 Jan Kratochvil <jan.kratochvil@redhat.com>
139
140 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
141 * Makefile.in (OBS): Add target-utils.o.
142 (linux-maps.o, target-utils.o): New.
143 * configure.srv (srv_linux_obj): Add linux-maps.o.
144
e57bb7a0
PL
1452015-07-15 Pierre Langlois <pierre.langlois@arm.com>
146
147 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
148 function, return 1.
149 (the_low_target): Install it.
150
586b02a9
PA
1512015-07-14 Pedro Alves <palves@redhat.com>
152
153 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
154 Instead, ignore ECHILD, and throw an error for other errnos.
155
58c1b36c
PA
1562015-07-10 Pedro Alves <palves@redhat.com>
157
158 * event-loop.c (struct callback_event) <data>: Change type to
159 gdb_client_data instance instead of gdb_client_data pointer.
160 (append_callback_event): Adjust.
161
421530db
PL
1622015-07-10 Pierre Langlois <pierre.langlois@arm.com>
163
164 * linux-aarch64-low.c: Add comments for each linux_target_ops
165 method. Remove comments already covered in target_ops and
166 linux_target_ops definitions.
167 (the_low_target): Add comments for each unimplemented method.
168
c2d65f38
YQ
1692015-07-09 Yao Qi <yao.qi@linaro.org>
170
171 * linux-aarch64-low.c (aarch64_regmap): Remove.
172 (aarch64_usrregs_info): Remove.
173 (regs_info): Set field usrregs to NULL.
174
b20a6524
MM
1752015-07-02 Markus Metzger <markus.t.metzger@intel.com>
176
177 * linux-low.c: Include "rsp-low.h"
178 (linux_low_encode_pt_config, linux_low_encode_raw): New.
179 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
180 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
181 (handle_btrace_enable_pt): New.
182 (handle_btrace_general_set): Support "pt".
183 (handle_btrace_conf_general_set): Support "pt:size".
184
96c97461
PL
1852015-06-29 Pierre Langlois <pierre.langlois@arm.com>
186
187 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
188 Z_PACKET_SW_BP.
189
37d66942
PL
1902015-06-29 Pierre Langlois <pierre.langlois@arm.com>
191
192 * linux-aarch64-low.c: Remove comment about endianness.
193 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
194 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
195 memcmp.
196
dc06243f
GB
1972015-06-24 Gary Benson <gbenson@redhat.com>
198
199 * linux-i386-ipa.c (stdint.h): Do not include.
200 * lynx-i386-low.c (stdint.h): Likewise.
201 * lynx-ppc-low.c (stdint.h): Likewise.
202 * mem-break.c (stdint.h): Likewise.
203 * thread-db.c (stdint.h): Likewise.
204 * tracepoint.c (stdint.h): Likewise.
205 * win32-low.c (stdint.h): Likewise.
206
124e13d9
SM
2072015-06-18 Simon Marchi <simon.marchi@ericsson.com>
208
209 * server.c (write_qxfer_response): Update call to
210 remote_escape_output.
211
909c2cda
JK
2122015-06-15 Aleksandar Ristovski <aristovski@qnx.com
213 Jan Kratochvil <jan.kratochvil@redhat.com>
214
215 Merge multiple hex conversions.
216 * gdbreplay.c (tohex): Rename to 'fromhex'.
217 (logchar): Use fromhex.
218
24c05f46
JK
2192015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
220
221 * server.c (handle_qxfer_libraries): Set `version' attribute for
222 <library-list>.
223
14d2069a
GB
2242015-06-10 Gary Benson <gbenson@redhat.com>
225
226 * target.h (struct target_ops) <multifs_open>: New field.
227 <multifs_unlink>: Likewise.
228 <multifs_readlink>: Likewise.
229 * linux-low.c (nat/linux-namespaces.h): New include.
230 (linux_target_ops): Initialize the_target->multifs_open,
231 the_target->multifs_unlink and the_target->multifs_readlink.
232 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
233 * hostio.c (hostio_fs_pid): New static variable.
234 (hostio_handle_new_gdb_connection): New function.
235 (handle_setfs): Likewise.
236 (handle_open): Use the_target->multifs_open as appropriate.
237 (handle_unlink): Use the_target->multifs_unlink as appropriate.
238 (handle_readlink): Use the_target->multifs_readlink as
239 appropriate.
240 (handle_vFile): Handle vFile:setfs packets.
241 * server.c (handle_query): Call hostio_handle_new_gdb_connection
242 after target_handle_new_gdb_connection.
243
4b8b5e72
GB
2442015-06-10 Gary Benson <gbenson@redhat.com>
245
246 * configure.ac (AC_CHECK_FUNCS): Add setns.
247 * config.in: Regenerate.
248 * configure: Likewise.
249 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
250 (linux-namespaces.o): New rule.
251 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
252
3ac2e371
GB
2532015-06-09 Gary Benson <gbenson@redhat.com>
254
255 * hostio.c (handle_open): Process mode argument with
256 fileio_to_host_mode.
257
ca9b78ce
YQ
2582015-06-01 Yao Qi <yao.qi@linaro.org>
259
260 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
261 * linux-x86-low.c: Likewise.
262
bfacd19d
DB
2632015-05-28 Don Breazeal <donb@codesourcery.com>
264
265 * linux-low.c (handle_extended_wait): Initialize
266 thread_info.last_resume_kind for new fork children.
267
452003ef
PA
2682015-05-15 Pedro Alves <palves@redhat.com>
269
270 * target.h (target_handle_new_gdb_connection): Rewrite using if
271 wrapped in do/while.
272
1041a03c
JB
2732015-05-14 Joel Brobecker <brobecker@adacore.com>
274
275 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
276 * configure, config.in: Regenerate.
277 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
278 Declare typedef.
279
c269dbdb
DB
2802015-05-12 Don Breazeal <donb@codesourcery.com>
281
282 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
283 PTRACE_EVENT_VFORK_DONE.
284 (linux_low_ptrace_options, extended_event_reported): Add vfork
285 events.
286 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
287 and "vforkdone" for RSP 'T' Stop Reply Packet.
288 * server.h (report_vfork_events): Declare
289 global variable.
290
3a8a0396
DB
2912015-05-12 Don Breazeal <donb@codesourcery.com>
292
293 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
294 (the_low_target) <new_fork>: Initialize new member.
295 * linux-arm-low.c (arm_new_fork): New function.
296 (the_low_target) <new_fork>: Initialize new member.
297 * linux-low.c (handle_extended_wait): Call new target function
298 new_fork.
299 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
300 * linux-mips-low.c (mips_add_watchpoint): New function
301 extracted from mips_insert_point.
302 (the_low_target) <new_fork>: Initialize new member.
303 (mips_linux_new_fork): New function.
304 (mips_insert_point): Call mips_add_watchpoint.
305 * linux-x86-low.c (x86_linux_new_fork): New function.
306 (the_low_target) <new_fork>: Initialize new member.
307
de0d863e
DB
3082015-05-12 Don Breazeal <donb@codesourcery.com>
309
310 * linux-low.c (handle_extended_wait): Implement return value,
311 rename argument 'event_child' to 'event_lwp', handle
312 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
313 (linux_low_ptrace_options): New function.
314 (linux_low_filter_event): Call linux_low_ptrace_options,
315 use different argument fo linux_enable_event_reporting,
316 use return value from handle_extended_wait.
317 (extended_event_reported): New function.
318 (linux_wait_1): Call extended_event_reported and set
319 status to report fork events.
320 (linux_write_memory): Add pid to debug message.
321 (reset_lwp_ptrace_options_callback): New function.
322 (linux_handle_new_gdb_connection): New function.
323 (linux_target_ops): Initialize new structure member.
324 * linux-low.h (struct lwp_info) <waitstatus>: New member.
325 * lynx-low.c: Initialize new structure member.
326 * remote-utils.c (prepare_resume_reply): Implement stop reason
327 "fork" for "T" stop message.
328 * server.c (handle_query): Call handle_new_gdb_connection.
329 * server.h (report_fork_events): Declare global flag.
330 * target.h (struct target_ops) <handle_new_gdb_connection>:
331 New member.
332 (target_handle_new_gdb_connection): New macro.
333 * win32-low.c: Initialize new structure member.
334
ddcbc397
DB
3352015-05-12 Don Breazeal <donb@codesourcery.com>
336
337 * mem-break.c (APPEND_TO_LIST): Define macro.
338 (clone_agent_expr): New function.
339 (clone_one_breakpoint): New function.
340 (clone_all_breakpoints): New function.
341 * mem-break.h: Declare new functions.
342
89245bc0
DB
3432015-05-12 Don Breazeal <donb@codesourcery.com>
344
345 * linux-low.c (linux_supports_fork_events): New function.
346 (linux_supports_vfork_events): New function.
347 (linux_target_ops): Initialize new structure members.
348 (initialize_low): Call linux_check_ptrace_features.
349 * lynx-low.c (lynx_target_ops): Initialize new structure
350 members.
351 * server.c (report_fork_events, report_vfork_events):
352 New global flags.
353 (handle_query): Add new features to qSupported packet and
354 response.
355 (captured_main): Initialize new global variables.
356 * target.h (struct target_ops) <supports_fork_events>:
357 New member.
358 <supports_vfork_events>: New member.
359 (target_supports_fork_events): New macro.
360 (target_supports_vfork_events): New macro.
361 * win32-low.c (win32_target_ops): Initialize new structure
362 members.
363
835205d0
GB
3642015-05-12 Gary Benson <gbenson@redhat.com>
365
366 * server.c (handle_qxfer_exec_file): Use current process
367 if annex is empty.
368
21e94bd9
SL
3692015-05-08 Sandra Loosemore <sandra@codesourcery.com>
370
371 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
372 Remove HAVE_PTRACE_GETREGS conditionals.
373 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
374 instead of PTRACE_GETREGS and PTRACE_SETREGS.
375
45614f15
YQ
3762015-05-08 Yao Qi <yao.qi@linaro.org>
377
378 * linux-low.c (linux_supports_conditional_breakpoints): New
379 function.
380 (linux_target_ops): Install new target method.
381 * lynx-low.c (lynx_target_ops): Install NULL hook for
382 supports_conditional_breakpoints.
383 * nto-low.c (nto_target_ops): Likewise.
384 * spu-low.c (spu_target_ops): Likewise.
385 * win32-low.c (win32_target_ops): Likewise.
386 * server.c (handle_query): Check
387 target_supports_conditional_breakpoints.
388 * target.h (struct target_ops) <supports_conditional_breakpoints>:
389 New field.
390 (target_supports_conditional_breakpoints): New macro.
391
80ad801e
PA
3922015-05-06 Pedro Alves <palves@redhat.com>
393
394 PR server/18081
395 * server.c (start_inferior): If the process exits, mourn it.
396
819843c7
GB
3972015-04-21 Gary Benson <gbenson@redhat.com>
398
399 * hostio.c (fileio_open_flags_to_host): Factored out to
400 fileio_to_host_openflags in common/fileio.c. Single use
401 updated.
402
a2d5a9d7
MF
4032015-04-17 Max Filippov <jcmvbkbc@gmail.com>
404
405 * linux-xtensa-low.c (xtensa_fill_gregset)
406 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
407 XCHAL_HAVE_LOOP.
408
deb44829
MF
4092015-04-17 Max Filippov <jcmvbkbc@gmail.com>
410
411 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
412 (regs_info): Replace usrregs pointer with NULL.
413
e57f1de3
GB
4142015-04-17 Gary Benson <gbenson@redhat.com>
415
416 * target.h (struct target_ops) <pid_to_exec_file>: New field.
417 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
418 * server.c (handle_qxfer_exec_file): New function.
419 (qxfer_packets): Add exec-file entry.
420 (handle_query): Report qXfer:exec-file:read as supported packet.
421
62828379
RN
4222015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
423
424 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
425
b88bb450
GB
4262015-04-09 Gary Benson <gbenson@redhat.com>
427
428 * hostio-errno.c (errno_to_fileio_error): Remove function.
429 Update caller to use remote_fileio_to_fio_error.
430
c8f4bfdd
YQ
4312015-04-09 Yao Qi <yao.qi@linaro.org>
432
433 * linux-low.c (linux_insert_point): Call
434 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
435 (linux_remove_point): Call remove_memory_breakpoint if type is
436 raw_bkpt_type_sw.
437 * linux-x86-low.c (x86_insert_point): Don't call
438 insert_memory_breakpoint.
439 (x86_remove_point): Don't call remove_memory_breakpoint.
440
41f98f02
PA
4412015-04-01 Pedro Alves <palves@redhat.com>
442 Cleber Rosa <crosa@redhat.com>
443
444 * server.c (gdbserver_usage): Reorganize and extend the usage
445 message.
446
2bf6fb9d
PA
4472015-03-24 Pedro Alves <palves@redhat.com>
448
449 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
450 output. Also dump TRAP_TRACE.
451 (linux_low_filter_event): In debug output, distinguish a
452 resume_stop SIGSTOP from a delayed SIGSTOP.
453
369f6daa
GB
4542015-03-24 Gary Benson <gbenson@redhat.com>
455
456 * linux-x86-low.c (x86_linux_new_thread): Moved to
457 nat/x86-linux.c.
458 (x86_linux_prepare_to_resume): Likewise.
459
8e5d4070
GB
4602015-03-24 Gary Benson <gbenson@redhat.com>
461
462 * Makefile.in (x86-linux-dregs.o): New rule.
463 * configure.srv: Add x86-linux-dregs.o to relevant targets.
464 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
465 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
466 (x86_linux_dr_get): Likewise.
467 (x86_linux_dr_set): Likewise.
468 (update_debug_registers_callback): Likewise.
469 (x86_linux_dr_set_addr): Likewise.
470 (x86_linux_dr_get_addr): Likewise.
471 (x86_linux_dr_set_control): Likewise.
472 (x86_linux_dr_get_control): Likewise.
473 (x86_linux_dr_get_status): Likewise.
474 (x86_linux_update_debug_registers): Likewise.
475
2b95d440
GB
4762015-03-24 Gary Benson <gbenson@redhat.com>
477
478 * linux-x86-low.c (x86_linux_update_debug_registers):
479 New function, factored out from...
480 (x86_linux_prepare_to_resume): ...this.
481
14b0bc68
GB
4822015-03-24 Gary Benson <gbenson@redhat.com>
483
484 * linux-x86-low.c (x86_linux_dr_get): Update comments.
485 (x86_linux_dr_set): Likewise.
486 (update_debug_registers_callback): Likewise.
487 (x86_linux_dr_set_addr): Likewise.
488 (x86_linux_dr_get_addr): Likewise.
489 (x86_linux_dr_set_control): Likewise.
490 (x86_linux_dr_get_control): Likewise.
491 (x86_linux_dr_get_status): Likewise.
492 (x86_linux_prepare_to_resume): Likewise.
493
5dfe6ca8
GB
4942015-03-24 Gary Benson <gbenson@redhat.com>
495
496 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
497 Use perror_with_name. Pass string through gettext.
498 (x86_linux_dr_set): Likewise.
499
d33472ad
GB
5002015-03-24 Gary Benson <gbenson@redhat.com>
501
502 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
503 (x86_linux_dr_set_addr): ...this.
504 (x86_dr_low_get_addr): Rename to...
505 (x86_linux_dr_get_addr): ...this.
506 (x86_dr_low_set_control): Rename to...
507 (x86_linux_dr_set_control): ...this.
508 (x86_dr_low_get_control): Rename to...
509 (x86_linux_dr_get_control): ...this.
510 (x86_dr_low_get_status): Rename to...
511 (x86_linux_dr_get_status): ...this.
512 (x86_dr_low): Update with new function names.
513
4b134ca1
GB
5142015-03-24 Gary Benson <gbenson@redhat.com>
515
516 * Makefile.in (x86-linux.o): New rule.
517 * configure.srv: Add x86-linux.o to relevant targets.
518 * linux-low.c (lwp_set_arch_private_info): New function.
519 (lwp_arch_private_info): Likewise.
520 * linux-x86-low.c: Include nat/x86-linux.h.
521 (arch_lwp_info): Removed structure.
522 (update_debug_registers_callback):
523 Use lwp_set_debug_registers_changed.
524 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
525 and lwp_set_debug_registers_changed.
526 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
527
34c703da
GB
5282015-03-24 Gary Benson <gbenson@redhat.com>
529
530 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
531 * linux-arm-low.c (arm_new_thread): Likewise.
532 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
533 * linux-mips-low.c (mips_linux_new_thread): Likewise.
534 * linux-x86-low.c (x86_linux_new_thread): Likewise.
535 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
536
cff068da
GB
5372015-03-24 Gary Benson <gbenson@redhat.com>
538
539 * linux-low.c (ptid_of_lwp): New function.
540 (lwp_is_stopped): Likewise.
541 (lwp_stop_reason): Likewise.
542 * linux-x86-low.c (update_debug_registers_callback):
543 Use lwp_is_stopped.
544 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
545 lwp_stop_reason.
546
b2f7c7e8
GB
5472015-03-24 Gary Benson <gbenson@redhat.com>
548
549 * linux-low.h (linux_stop_lwp): Remove declaration.
550
6d4ee8c6
GB
5512015-03-24 Gary Benson <gbenson@redhat.com>
552
553 * linux-low.h: Include nat/linux-nat.h.
554 * linux-low.c (iterate_over_lwps_args): New structure.
555 (iterate_over_lwps_filter): New function.
556 (iterate_over_lwps): Likewise.
557 * linux-x86-low.c (update_debug_registers_callback):
558 Update signature to what iterate_over_lwps expects.
559 Remove PID check that iterate_over_lwps now performs.
560 (x86_dr_low_set_addr): Use iterate_over_lwps.
561 (x86_dr_low_set_control): Likewise.
562
70a0bb6b
GB
5632015-03-24 Gary Benson <gbenson@redhat.com>
564
565 * linux-x86-low.c (x86_debug_reg_state): New function.
566 (x86_linux_prepare_to_resume): Use the above.
567
7b669087
GB
5682015-03-24 Gary Benson <gbenson@redhat.com>
569
570 * linux-low.c (current_lwp_ptid): New function.
571 * linux-x86-low.c: Include nat/linux-nat.h.
572 (x86_dr_low_get_addr): Use current_lwp_ptid.
573 (x86_dr_low_get_control): Likewise.
574 (x86_dr_low_get_status): Likewise.
575
eef49a3d
PA
5762015-03-20 Pedro Alves <palves@redhat.com>
577
578 * tracepoint.c (cmd_qtstatus): Make "str" const.
579
b2333d22
PA
5802015-03-20 Pedro Alves <palves@redhat.com>
581
582 * server.c (handle_general_set): Make "req_str" const.
583
23f238d3
PA
5842015-03-19 Pedro Alves <palves@redhat.com>
585
586 * linux-low.c (linux_resume_one_lwp): Rename to ...
587 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
588 instead call perror_with_name.
589 (check_ptrace_stopped_lwp_gone): New function.
590 (linux_resume_one_lwp): Reimplement as wrapper around
591 linux_resume_one_lwp_throw that swallows errors if the LWP is
592 gone.
593
91baf43f
PA
5942015-03-19 Pedro Alves <palves@redhat.com>
595
596 * linux-low.c (count_events_callback, select_event_lwp_callback):
597 No longer check whether the thread has resume_stop as last resume
598 kind.
599
8bf3b159
PA
6002015-03-19 Pedro Alves <palves@redhat.com>
601
602 * linux-low.c (count_events_callback, select_event_lwp_callback):
603 Use the lwp's status_pending_p field, not the thread's.
604
b90fc188
PA
6052015-03-19 Pedro Alves <palves@redhat.com>
606
607 * linux-low.c (select_event_lwp_callback): Update comments to
608 no longer mention SIGTRAP.
609
464b0089
GB
6102015-03-18 Gary Benson <gbenson@redhat.com>
611
612 * server.c (handle_query): Do not report vFile:fstat as supported.
613
aa9e327f
GB
6142015-03-11 Gary Benson <gbenson@redhat.com>
615
616 * hostio.c (sys/types.h): New include.
617 (sys/stat.h): Likewise.
618 (common-remote-fileio.h): Likewise.
619 (handle_fstat): New function.
620 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 621
791c0056
GB
6222015-03-11 Gary Benson <gbenson@redhat.com>
623
624 * configure.ac (AC_CHECK_MEMBERS): Add checks for
625 struct stat.st_blocks and struct stat.st_blksize.
626 * configure: Regenerate.
627 * config.in: Likewise.
628 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
629 (OBS): Add common-remote-fileio.o.
630 (common-remote-fileio.o): New rule.
631
9a9df970
PA
6322015-03-09 Pedro Alves <palves@redhat.com>
633
634 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
635 'struct sockaddr' pointer in 'accept' call.
636
9eb1356e
PA
6372015-03-09 Pedro Alves <palves@redhat.com>
638
639 Revert:
640 2015-03-07 Pedro Alves <palves@redhat.com>
641 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
642 or <winsock2.h> here. Instead include "gdb_socket.h".
643 (remote_open): Use union gdb_sockaddr_u.
644 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
645 or <winsock2.h> here. Instead include "gdb_socket.h".
646 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
647 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
648 or <sys/un.h>.
649 (init_named_socket, gdb_agent_helper_thread): Use union
650 gdb_sockaddr_u.
651
aac331e4
PA
6522015-03-07 Pedro Alves <palves@redhat.com>
653
654 * configure.ac (build_warnings): Move
655 -Wdeclaration-after-statement to the C-specific set.
656 * configure: Regenerate.
657
366c75fc
PA
6582015-03-07 Pedro Alves <palves@redhat.com>
659
660 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
661 or <winsock2.h> here. Instead include "gdb_socket.h".
662 (remote_open): Use union gdb_sockaddr_u.
663 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
664 or <winsock2.h> here. Instead include "gdb_socket.h".
665 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
666 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
667 or <sys/un.h>.
668 (init_named_socket, gdb_agent_helper_thread): Use union
669 gdb_sockaddr_u.
670
492d29ea
PA
6712015-03-07 Pedro Alves <palves@redhat.com>
672
673 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
674 instead.
675
60a191ed
YQ
6762015-03-06 Yao Qi <yao.qi@linaro.org>
677
678 * linux-aarch64-low.c (aarch64_insert_point): Use
679 show_debug_regs as a boolean.
680 (aarch64_remove_point): Likewise.
681
f5771b1d
PA
6822015-03-05 Pedro Alves <palves@redhat.com>
683
684 * lynx-low.c (lynx_target_ops): Install NULL hooks for
685 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
686 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
687 * nto-low.c (nto_target_ops): Likewise.
688 * spu-low.c (spu_target_ops): Likewise.
689 * win32-low.c (win32_target_ops): Likewise.
690
3e572f71
PA
6912015-03-04 Pedro Alves <palves@redhat.com>
692
72f4393d 693 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
694 Decide whether a breakpoint triggered based on the SIGTRAP's
695 siginfo.si_code.
72f4393d
L
696 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
697 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
698 (linux_low_filter_event): Check for breakpoints before checking
699 watchpoints.
700 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
701 siginfo.si_code.
72f4393d
L
702 (linux_stopped_by_sw_breakpoint)
703 (linux_supports_stopped_by_sw_breakpoint)
704 (linux_stopped_by_hw_breakpoint)
705 (linux_supports_stopped_by_hw_breakpoint): New functions.
706 (linux_target_ops): Install new target methods.
3e572f71 707
1ec68e26
PA
7082015-03-04 Pedro Alves <palves@redhat.com>
709
710 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
711 * server.c (swbreak_feature, hwbreak_feature): New globals.
712 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
713 (captured_main): Clear swbreak_feature and hwbreak_feature.
714 * server.h (swbreak_feature, hwbreak_feature): Declare.
715 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
716 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
717 supports_stopped_by_hw_breakpoint>: New fields.
718 (target_supports_stopped_by_sw_breakpoint)
719 (target_stopped_by_sw_breakpoint)
720 (target_supports_stopped_by_hw_breakpoint)
721 (target_stopped_by_hw_breakpoint): Declare.
722
15c66dd6
PA
7232015-03-04 Pedro Alves <palves@redhat.com>
724
725 enum lwp_stop_reason -> enum target_stop_reason
726 * linux-low.c (check_stopped_by_breakpoint): Adjust.
727 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
728 (linux_wait_1, stuck_in_jump_pad_callback)
729 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
730 (linux_stopped_by_watchpoint):
731 * linux-low.h (enum lwp_stop_reason): Delete.
732 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
733 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
734
98fc70d6
YQ
7352015-03-04 Yao Qi <yao.qi@linaro.org>
736
737 * Makefile.in (SFILES): Add linux-aarch64-low.c.
738
dd2ac174
GB
7392015-03-03 Gary Benson <gbenson@redhat.com>
740
741 * hostio.c (handle_vFile): Fix prefix lengths.
742
d68e53f4
MM
7432015-03-03 Markus Metzger <markus.t.metzger@intel.com>
744
745 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
746 ptr_bits.
747
bf2d68ab
AA
7482015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
749
750 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
751 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
752 (clean): Add "rm -f" for above C files.
753 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
754 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
755 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
756 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
757 * linux-s390-low.c (HWCAP_S390_VX): New macro.
758 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
759 (init_registers_s390x_vx_linux64)
760 (init_registers_s390x_tevx_linux64)
761 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
762 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
763 declarations.
764 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
765 (s390_store_vxrs_high): New functions.
766 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
767 NT_S390_VXRS_HIGH.
768 (s390_arch_setup): Add logic for selecting one of the new target
769 descriptions. Activate the new vector regsets if applicable.
770 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
771 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
772 and init_registers_s390x_tevx_linux64.
773
c966a859
PA
7742015-03-01 Pedro Alves <palves@redhat.com>
775
776 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
777 parameter.
778
4180215b
PA
7792015-02-27 Pedro Alves <palves@redhat.com>
780
781 * linux-x86-low.c (u_debugreg_offset): New function.
782 (x86_linux_dr_get, x86_linux_dr_set): Use it.
783
749bab01
PA
7842015-02-27 Pedro Alves <palves@redhat.com>
785
786 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
787 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
788 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
789 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
790 (ps_lsetfpregs, ps_getpid)
791 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
792 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
793 (ps_lsetxregs, ps_plog): Declare.
794
3c14e5a3
PA
7952015-02-27 Pedro Alves <palves@redhat.com>
796
797 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
798 IP_AGENT_EXPORT_FUNC.
799 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
800 IP_AGENT_EXPORT_FUNC.
801 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
802 (IP_AGENT_EXPORT): Delete.
803 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
804 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
805 (gdb_trampoline_buffer_error, collecting, gdb_collect)
806 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
807 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
808 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
809 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
810 (traceframe_read_count, traceframe_write_count)
811 (traceframes_created, trace_state_variables, get_raw_reg)
812 (get_trace_state_variable_value, set_trace_state_variable_value)
813 (ust_loaded, helper_thread_id, cmd_buf): Use
814 IPA_SYM_EXPORTED_NAME.
815 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
816 (tracepoints) Use IP_AGENT_EXPORT_VAR.
817 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
818 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
819 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
820 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
821 EXTERN_C_PUSH/EXTERN_C_POP.
822 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
823 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
824 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
825 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
826 (traceframe_write_count, traceframe_read_count)
827 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
828 (about_to_request_buffer_space, get_trace_state_variable_value)
829 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
830 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
831 EXTERN_C_PUSH/EXTERN_C_POP.
832 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
833 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
834 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
835 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
836 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
837 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
838 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
839 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
840 Define.
841 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
842 (IP_AGENT_EXPORT_VAR_DECL): Define.
843 (tracing): Declare.
844 (gdb_agent_get_raw_reg): Declare.
845
fe978cb0
PA
8462015-02-27 Tom Tromey <tromey@redhat.com>
847 Pedro Alves <palves@redhat.com>
848
849 Rename symbols whose names are reserved C++ keywords throughout.
850
3bc3d82a
PA
8512015-02-27 Pedro Alves <palves@redhat.com>
852
853 * Makefile.in (COMPILER): New, get it from autoconf.
854 (CXX): Get from autoconf instead.
855 (COMPILE.pre): Use COMPILER.
856 (CC-LD): Rename to ...
857 (CC_LD): ... this. Use COMPILER.
858 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
859 (CXX_FOR_TARGET): Default to g++ instead of gcc.
860 * acinclude.m4: Include build-with-cxx.m4.
861 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
862 Disable -Werror by default if building in C++ mode.
863 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
864 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
865 the C++ compiler. Save/restore CXXFLAGS too.
866 * configure: Regenerate.
867
07697489
PA
8682015-02-27 Pedro Alves <palves@redhat.com>
869
870 * acinclude.m4: Include libiberty.m4.
871 * configure.ac: Call libiberty_INIT.
872 * config.in, configure: Regenerate.
873
9beb7c4e
PA
8742015-02-26 Pedro Alves <palves@redhat.com>
875
876 * linux-low.c (linux_wait_1): When incrementing the PC past a
877 program breakpoint always use the_low_target.breakpoint_len as
878 increment, rather than the maximum between that and
879 the_low_target.decr_pc_after_break.
880
8090aef2
PA
8812015-02-23 Pedro Alves <palves@redhat.com>
882
883 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
884 thread was doing a step-over; always adjust the PC if
885 we stepped over a permanent breakpoint.
886 (linux_wait_1): If we stepped over breakpoint that was on top of a
887 permanent breakpoint, manually advance the PC past it.
888
bc9540e8
PA
8892015-02-23 Pedro Alves <palves@redhat.com>
890
891 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
892 modes.
893 (x86_fill_gregset, x86_store_gregset): Use it when handling
894 $orig_eax.
895
2db9a427
PA
8962015-02-20 Pedro Alves <palves@redhat.com>
897
898 * thread-db.c: Include "nat/linux-procfs.h".
899 (thread_db_init): Skip listing new threads if the kernel supports
900 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
901
afa8d396
PA
9022015-02-20 Pedro Alves <palves@redhat.com>
903
904 * linux-low.c (status_pending_p_callback): Use ptid_match.
905
c9587f88
AT
9062015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
907
908 PR breakpoints/16812
909 * linux-low.c (wstatus_maybe_breakpoint): Remove.
910 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
911 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
912
b05ec7a5
AT
9132015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
914
915 PR breakpoints/15956
916 * tracepoint.c (cmd_qtinit): Add check for current_thread.
917
d33501a5
MM
9182015-02-09 Markus Metzger <markus.t.metzger@intel.com>
919
920 * linux-low.c (linux_low_btrace_conf): Print size.
921 * server.c (handle_btrace_conf_general_set): New.
922 (hanle_general_set): Call handle_btrace_conf_general_set.
923 (handle_query): Report Qbtrace-conf:bts:size as supported.
924
f4abbc16
MM
9252015-02-09 Markus Metzger <markus.t.metzger@intel.com>
926
927 * linux-low.c (linux_low_enable_btrace): Update parameters.
928 (linux_low_btrace_conf): New.
929 (linux_target_ops)<to_btrace_conf>: Initialize.
930 * server.c (current_btrace_conf): New.
931 (handle_btrace_enable): Rename to ...
932 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
933 to target_enable_btrace. Update comment. Update users.
934 (handle_qxfer_btrace_conf): New.
935 (qxfer_packets): Add btrace-conf entry.
936 (handle_query): Report qXfer:btrace-conf:read as supported packet.
937 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
938 (target_ops)<read_btrace_conf>: New.
939 (target_enable_btrace): Update parameters.
940 (target_read_btrace_conf): New.
941
043c3577
MM
9422015-02-09 Markus Metzger <markus.t.metzger@intel.com>
943
944 * server.c (handle_btrace_general_set): Remove call to
945 target_supports_btrace.
946 (supported_btrace_packets): New.
947 (handle_query): Call supported_btrace_packets.
948 * target.h: include btrace-common.h.
949 (btrace_target_info): Removed.
950 (supports_btrace, target_supports_btrace): Update parameters.
951
734b0e4b
MM
9522015-02-09 Markus Metzger <markus.t.metzger@intel.com>
953
954 * Makefile.in (SFILES): Add common/btrace-common.c.
955 (OBS): Add common/btrace-common.o.
956 (btrace-common.o): Add build rules.
957 * linux-low: Include btrace-common.h.
958 (linux_low_read_btrace): Use struct btrace_data. Call
959 btrace_data_init and btrace_data_fini.
960
d6c146e9
PA
9612015-02-06 Pedro Alves <palves@redhat.com>
962
963 * thread-db.c (find_new_threads_callback): Add debug output.
964
20ba1ce6
PA
9652015-02-04 Pedro Alves <palves@redhat.com>
966
967 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
968 (resume_stopped_resumed_lwps): New function.
969 (linux_wait_for_event_filtered): Use it.
970
8cc73a39
SDJ
9712015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
972
973 * Makefile.in (SFILES): Add linux-personality.c.
974 (linux-personality.o): New rule.
975 * configure.srv (srv_linux_obj): Add linux-personality.o to the
976 list of objects to be built.
977 * linux-low.c: Include nat/linux-personality.h.
978 (linux_create_inferior): Remove code to disable address space
979 randomization (moved to ../nat/linux-personality.c). Create
980 cleanup to disable address space randomization.
981
fb23d554
SDJ
9822015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
983
984 * Makefile.in (posix-strerror.o): New rule.
985 (mingw-strerror.o): Likewise.
986 * configure: Regenerated.
987 * configure.ac: Source file ../common/common.host. Initialize new
988 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
989
cdf43629
YQ
9902015-01-14 Yao Qi <yao@codesourcery.com>
991
992 * Makefile.in (SFILES): Add nat/ppc-linux.c.
993 (ppc-linux.o): New rule.
994 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
995 * configure.ac: AC_CHECK_FUNCS(getauxval).
996 * config.in: Re-generated.
997 * configure: Re-generated.
998 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
999 ppc64_64bit_inferior_p
1000
514c5338
YQ
10012015-01-14 Yao Qi <yao@codesourcery.com>
1002
1003 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1004 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1005 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1006 (PT_ORIG_R3, PT_TRAP): Likewise.
1007 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1008 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1009 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1010
3368c1e5
JB
10112015-01-10 Joel Brobecker <brobecker@adacore.com>
1012
1013 * i387-fp.c (i387_cache_to_xsave): In look over
1014 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1015 zmmh_low_space field by use of zmmh_high_space.
1016
582511be
PA
10172015-01-09 Pedro Alves <palves@redhat.com>
1018
1019 * linux-low.c (step_over_bkpt): Move higher up in the file.
1020 (handle_extended_wait): Don't store the stop_pc here.
1021 (get_stop_pc): Adjust comments and rename to ...
1022 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1023 stopped for a software breakpoint or hardware breakpoint.
1024 (thread_still_has_status_pending_p): New function.
1025 (status_pending_p_callback): Use
1026 thread_still_has_status_pending_p. If the event is no longer
1027 interesting, resume the LWP.
1028 (handle_tracepoints): Add assert.
1029 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1030 (wstatus_maybe_breakpoint): New function.
1031 (cancel_breakpoint): Delete function.
1032 (check_stopped_by_watchpoint): New function, factored out from
1033 linux_low_filter_event.
1034 (lp_status_maybe_breakpoint): Delete function.
1035 (linux_low_filter_event): Remove filter_ptid argument.
1036 Leave thread group exits pending here. Store the LWP's stop PC.
1037 Always leave events pending.
1038 (linux_wait_for_event_filtered): Pull all events out of the
1039 kernel, and leave them all pending.
1040 (count_events_callback, select_event_lwp_callback): Consider all
1041 events.
1042 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1043 (select_event_lwp): Only give preference to the stepping LWP in
1044 all-stop mode. Adjust comments.
1045 (ignore_event): New function.
1046 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1047 references to cancel_breakpoints. Adjust to renames. Also give
1048 equal priority to all LWPs that have had events in non-stop mode.
1049 If reporting a software breakpoint event, unadjust the LWP's PC.
1050 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1051 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1052 Adjust.
1053 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1054 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1055 (linux_stopped_by_watchpoint): Adjust.
1056 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1057 * linux-low.h (enum lwp_stop_reason): New.
1058 (struct lwp_info) <stop_pc>: Adjust comment.
1059 <stopped_by_watchpoint>: Delete field.
1060 <stop_reason>: New field.
1061 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1062 * mem-break.c (software_breakpoint_inserted_here)
1063 (hardware_breakpoint_inserted_here): New function.
1064 * mem-break.h (software_breakpoint_inserted_here)
1065 (hardware_breakpoint_inserted_here): Declare.
1066 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1067 (cancel_breakpoints): Delete.
1068 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1069 (upload_fast_traceframes): Remove references to
1070 cancel_breakpoints.
1071
a33e3959
PA
10722015-01-09 Pedro Alves <palves@redhat.com>
1073
1074 * thread-db.c (find_new_threads_callback): Ignore thread if the
1075 kernel thread ID is -1.
1076
8784d563
PA
10772015-01-09 Pedro Alves <palves@redhat.com>
1078
1079 * linux-low.c (linux_attach_fail_reason_string): Move to
1080 nat/linux-ptrace.c, and rename.
1081 (linux_attach_lwp): Update comment.
1082 (attach_proc_task_lwp_callback): New function.
1083 (linux_attach): Adjust to rename and use
1084 linux_proc_attach_tgid_threads.
1085 (linux_attach_fail_reason_string): Delete declaration.
1086
76f2b779
JB
10872015-01-01 Joel Brobecker <brobecker@adacore.com>
1088
1089 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1090 * server.c (gdbserver_version): Likewise.
1091
fafcc06a
SDJ
10922014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1093
1094 * remote-utils.c: Include ctype.h.
1095 (input_interrupt): Explicitly handle the case when the char
1096 received is the NUL byte. Improve the printing of non-ASCII
1097 characters.
1098
beed38b8
JB
10992014-12-16 Joel Brobecker <brobecker@adacore.com>
1100
1101 * linux-low.c (linux_low_filter_event): Update call to
1102 linux_enable_event_reporting following the addition of
1103 a new parameter to that function.
1104
bf330350
CU
11052014-12-16 Catalin Udma <catalin.udma@freescale.com>
1106
1107 PR server/17457
1108 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1109 (AARCH64_FPCR_REGNO): Likewise.
1110 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1111 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1112 (aarch64_store_fpregset): Likewise.
1113
5227d625
JB
11142014-12-15 Joel Brobecker <brobecker@adacore.com>
1115
1116 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1117 Remove FIXME comment about assumption about N.
1118
f93b65a0
JB
11192014-12-13 Joel Brobecker <brobecker@adacore.com>
1120
1121 * configure.ac: If large-file support is disabled in GDBserver,
1122 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1123 * configure: Regenerate.
1124
e5a9158d
AA
11252014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1126
1127 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1128 warning upon ENODATA from ptrace.
1129 * linux-s390-low.c (s390_store_tdb): New.
1130 (s390_regsets): Add regset for NT_S390_TDB.
1131
feea5f36
AA
11322014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1133
1134 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1135 without a fill_function.
1136 * linux-s390-low.c (s390_fill_last_break): Remove.
1137 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1138 (s390_arch_setup): Use regset's size instead of fill_function for
1139 loop end condition.
1140
098dbe61
AA
11412014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1142
1143 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1144 the regset's store function when ptrace returned an error.
1145 * regcache.c (get_thread_regcache): Invalidate register cache
1146 before fetching inferior's registers.
1147
28eef672
AA
11482014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1149
1150 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1151 while-loop as for-loop.
1152 (regsets_store_inferior_registers): Likewise.
1153
bdca27a2
YQ
11542014-11-28 Yao Qi <yao@codesourcery.com>
1155
1156 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1157 * config.in, configure: Re-generate.
1158 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1159 is defined.
1160
9c232dda
YQ
11612014-11-21 Yao Qi <yao@codesourcery.com>
1162
1163 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1164 (AC_CHECK_HEADERS): Remove malloc.h.
1165 * configure: Re-generated.
1166 * config.in: Re-generated.
1167 * server.h: Don't include alloca.h and malloc.h.
1168 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1169 Don't include malloc.h.
1170
43968415
JB
11712014-11-17 Joel Brobecker <brobecker@adacore.com>
1172
1173 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1174 corresponding ERRNO check in same block.
1175
40e91bc7
PA
11762014-11-12 Pedro Alves <palves@redhat.com>
1177
1178 * server.c (cont_thread): Update comment.
1179 (start_inferior, attach_inferior): No longer clear cont_thread.
1180 (handle_v_cont): No longer set cont_thread.
1181 (captured_main): Clear cont_thread each time a GDB connects.
1182
c2c118cf
PA
11832014-11-12 Pedro Alves <palves@redhat.com>
1184
1185 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1186 thread, and don't resume all threads if the Hc thread has exited.
1187
78708b7c
PA
11882014-11-12 Pedro Alves <palves@redhat.com>
1189
1190 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1191 the process group instead of to a specific LWP.
1192
a2abc7de
PA
11932014-10-15 Pedro Alves <palves@redhat.com>
1194
1195 PR server/17487
1196 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1197 parameter.
1198 (arm_set_thread_context): Delete.
1199 (the_low_target): Adjust.
1200 * win32-i386-low.c (debug_registers_changed)
1201 (debug_registers_used): Delete.
1202 (update_debug_registers_callback): New function.
1203 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1204 needing to update their debug registers.
1205 (win32_get_current_dr): New function.
1206 (x86_dr_low_get_addr, x86_dr_low_get_control)
1207 (x86_dr_low_get_status): Fetch the debug register from the thread
1208 record's context.
1209 (i386_initial_stuff): Adjust.
1210 (i386_get_thread_context): Remove current_event parameter. Don't
1211 clear debug_registers_changed nor copy DR values to
1212 debug_reg_state.
1213 (i386_set_thread_context): Delete.
1214 (i386_prepare_to_resume): New function.
1215 (i386_thread_added): Mark the thread as needing to update irs
1216 debug registers.
1217 (the_low_target): Remove i386_set_thread_context and install
1218 i386_prepare_to_resume.
1219 * win32-low.c (win32_get_thread_context): Adjust.
1220 (win32_set_thread_context): Use SetThreadContext
1221 directly.
1222 (win32_prepare_to_resume): New function.
1223 (win32_require_context): New function, factored out from ...
1224 (thread_rec): ... this.
1225 (continue_one_thread): Call win32_prepare_to_resume on each thread
1226 we're about to continue.
1227 (win32_resume): Call win32_prepare_to_resume on the event thread.
1228 * win32-low.h (struct win32_thread_info)
1229 <debug_registers_changed>: New field.
1230 (struct win32_target_ops): Change prototype of set_thread_context,
1231 delete set_thread_context and add prepare_to_resume.
1232 (win32_require_context): New declaration.
1233
a442d071
GB
12342014-10-08 Gary Benson <gbenson@redhat.com>
1235
1236 * server.h: Do not include common-exceptions.h.
1237
6f1947e8
GB
12382014-10-08 Gary Benson <gbenson@redhat.com>
1239
1240 * server.h: Do not include cleanups.h.
1241
63b434a4
JH
12422014-09-30 James Hogan <james.hogan@imgtec.com>
1243
1244 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1245 mips64-dsp-linux.c.
1246
c4d9ceb6
YQ
12472014-09-23 Yao Qi <yao@codesourcery.com>
1248
1249 * linux-low.c (lp_status_maybe_breakpoint): New function.
1250 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1251 (count_events_callback): Likewise.
1252 (select_event_lwp_callback): Likewise.
1253 (cancel_breakpoints_callback): Likewise.
1254
89a5711c
DB
12552014-09-19 Don Breazeal <donb@codesourcery.com>
1256
1257 * linux-low.c (handle_extended_wait): Call
1258 linux_ptrace_get_extended_event.
1259 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1260 linux_is_extended_waitstatus.
1261
bffc0964
JB
12622014-09-16 Joel Brobecker <brobecker@adacore.com>
1263
1264 * Makefile.in (CPPFLAGS): Define.
1265 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1266 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1267
0bfdf32f
GB
12682014-09-16 Gary Benson <gbenson@redhat.com>
1269
1270 * inferiors.h (current_inferior): Renamed as...
1271 (current_thread): New variable. All uses updated.
1272 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1273 (maybe_move_out_of_jump_pad): Likewise.
1274 (cancel_breakpoint): Likewise.
1275 (linux_low_filter_event): Likewise.
1276 (wait_for_sigstop): Likewise.
1277 (linux_resume_one_lwp): Likewise.
1278 (need_step_over_p): Likewise.
1279 (start_step_over): Likewise.
1280 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1281 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1282 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1283 and save_inferior as saved_thread.
1284 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1285 saved_thread.
1286 (regcache_invalidate_thread): Likewise.
1287 * remote-utils.c (prepare_resume_reply): Likewise.
1288 * thread-db.c (thread_db_get_tls_address): Likewise.
1289 (disable_thread_event_reporting): Likewise.
1290 (remove_thread_event_breakpoints): Likewise.
1291 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1292 as saved_thread.
1293 * target.h (set_desired_inferior): Renamed as...
1294 (set_desired_thread): New declaration. All uses updated.
1295 * server.c (myresume): Updated comment to reference thread instead
1296 of inferior.
1297 (handle_serial_event): Likewise.
1298 (handle_target_event): Likewise.
1299
361c8ade
GB
13002014-09-12 Tom Tromey <tromey@redhat.com>
1301 Gary Benson <gbenson@redhat.com>
1302
1303 * regcache.h: Include common-regcache.h.
1304 (regcache_read_pc): Don't declare.
1305 * regcache.c (get_thread_regcache_for_ptid): New function.
1306
bd9269f7
GB
13072014-09-11 Tom Tromey <tromey@redhat.com>
1308 Gary Benson <gbenson@redhat.com>
1309
1310 * symbol.c: New file.
1311 * Makefile.in (SFILES): Add symbol.c.
1312 (OBS): Add symbol.o.
1313
f8c1d06b
GB
13142014-09-11 Gary Benson <gbenson@redhat.com>
1315
1316 * target.c (target_stop_ptid, target_continue_ptid): New
1317 functions.
1318
721ec300
GB
13192014-09-11 Tom Tromey <tromey@redhat.com>
1320 Gary Benson <gbenson@redhat.com>
1321
1322 * target.h: Include target/target.h.
1323 * target.c (target_read_memory, target_read_uint32)
1324 (target_write_memory): New functions.
1325
c5e92cca
GB
13262014-09-11 Gary Benson <gbenson@redhat.com>
1327
1328 * server.h (debug_hw_points): Don't declare.
1329 * server.c (debug_hw_points): Don't define. Replace all uses
1330 with show_debug_regs.
1331 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1332 all uses with show_debug_regs.
1333
2e4bb98a
EBM
13342014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1335
1336 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1337 endianness into account.
1338 (ppc_supply_ptrace_register): Likewise.
1339
ac740bc7
JH
13402014-09-03 James Hogan <james.hogan@imgtec.com>
1341
1342 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1343 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1344
97ea6506
GB
13452014-09-03 Gary Benson <gbenson@redhat.com>
1346
1347 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1348 ALL_DEBUG_ADDRESS_REGISTERS.
1349
df7e5265
GB
13502014-09-02 Gary Benson <gbenson@redhat.com>
1351
1352 * i386-low.h: Renamed as...
1353 * x86-low.h: New file. All type, function and variable name
1354 prefixes changed from "i386_" to "x86_". All references updated.
1355 * i386-low.c: Renamed as...
1356 * x86-low.c: New file. All type, function and variable name
1357 prefixes changed from "i386_" to "x86_". All references updated.
1358
ed859da7
GB
13592014-09-02 Gary Benson <gbenson@redhat.com>
1360
1361 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1362 (x86_linux_new_thread): Likewise.
1363
860789c7
GB
13642014-08-29 Gary Benson <gbenson@redhat.com>
1365
1366 * server.h (setjmp.h): Do not include.
1367 (toplevel): Do not declare.
1368 (common-exceptions.h): Include.
1369 (cleanups.h): Likewise.
1370 * server.c (toplevel): Do not define.
1371 (exit_code): New static global.
1372 (detach_or_kill_for_exit_cleanup): New function.
1373 (main): New function. Original main renamed to...
1374 (captured_main): New function.
1375 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1376
ff55e1b5
GB
13772014-08-29 Gary Benson <gbenson@redhat.com>
1378
1379 * Makefile.in (SFILES): Add common/common-exceptions.c.
1380 (OBS): Add common-exceptions.o.
1381 (common-exceptions.o): New rule.
1382 * utils.c (prepare_to_throw_exception): New function.
1383
e9bcb658
GB
13842014-08-29 Gary Benson <gbenson@redhat.com>
1385
1386 * config.in: Regenerate.
1387 * configure: Likewise.
1388
e3180625
GB
13892014-08-29 Gary Benson <gbenson@redhat.com>
1390
1391 * Makefile.in (SFILES): Add common/cleanups.c.
1392 (OBS): cleanups.o.
1393 (cleanups.o): New rule.
1394
e3d6ba5d
GB
13952014-08-29 Gary Benson <gbenson@redhat.com>
1396
1397 * utils.c (internal_vwarning): New function.
1398
7096e886
GB
13992014-08-28 Gary Benson <gbenson@redhat.com>
1400
1401 * utils.h (fatal): Remove declaration.
1402 * utils.c (fatal): Remove function.
1403
14ce3192
GB
14042014-08-28 Gary Benson <gbenson@redhat.com>
1405
1406 * tracepoint.c (gdb_agent_init): Replace fatal with
1407 perror_with_name.
1408 (initialize_tracepoint): Likewise.
1409
50278d59
GB
14102014-08-28 Gary Benson <gbenson@redhat.com>
1411
1412 * remote-utils.c (remote_prepare): Replace fatal with error.
1413
aa96c426
GB
14142014-08-28 Gary Benson <gbenson@redhat.com>
1415
1416 * linux-low.c (linux_async): Replace fatal with warning.
1417 Tidy up and return.
1418 (linux_start_non_stop): Return -1 if linux_async failed.
1419
f7160e97
GB
14202014-08-28 Gary Benson <gbenson@redhat.com>
1421
1422 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1423 gdb_assert.
1424 (i386_dr_low_get_addr): Remove vague comment.
1425 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1426 gdb_assert.
1427
38e08fca
GB
14282014-08-28 Gary Benson <gbenson@redhat.com>
1429
1430 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1431 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1432 internal_error.
1433 (linux_resume_one_lwp): Likewise.
1434 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1435 gdb_assert.
1436 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1437 with internal_error.
1438 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1439 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1440 (find_register_by_name): Replace fatal with internal_error.
1441 (find_regno): Likewise.
1442 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1443 * thread-db.c (thread_db_create_event): Likewise.
1444 (thread_db_load_search): Likewise.
1445 (try_thread_db_load_1): Likewise.
1446 * tracepoint.c (get_jump_space_head): Replace fatal with
1447 internal_error.
1448 (claim_trampoline_space): Likewise.
1449 (have_fast_tracepoint_trampoline_buffer): Likewise.
1450 (cmd_qtstart): Likewise.
1451 (stop_tracing): Likewise.
1452 (fast_tracepoint_collecting): Likewise.
1453 (target_malloc): Likewise.
1454 (download_tracepoint): Likewise.
1455 (download_trace_state_variables): Replace check with gdb_assert.
1456 (upload_fast_traceframes): Replace fatal with internal_error.
1457
34abf635
GB
14582014-08-19 Tom Tromey <tromey@redhat.com>
1459 Gary Benson <gbenson@redhat.com>
1460
1461 * Makefile.in (SFILES): Add common/common-debug.c.
1462 (OBS): Add common-debug.o.
1463 (common-debug.o): New rule.
1464 * debug.h (debug_printf): Don't declare.
1465 * debug.c (debug_printf): Renamed and rewritten as...
1466 (debug_vprintf): New function.
1467
f6e94d78
GB
14682014-08-19 Gary Benson <gbenson@redhat.com>
1469
1470 * utils.h: Do not include print-utils.h.
1471
9239eeab
GB
14722014-08-19 Tom Tromey <tromey@redhat.com>
1473 Gary Benson <gbenson@redhat.com>
1474
1475 * server.h: Add static assertion.
1476 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1477
ef87c8bb
GB
14782014-08-19 Tom Tromey <tromey@redhat.com>
1479 Gary Benson <gbenson@redhat.com>
1480
1481 * Makefile.in (SFILES): Add common/errors.c.
1482 (OBS): Add errors.o.
1483 (IPA_OBS): Add errors-ipa.o.
1484 (errors.o): New rule.
1485 (errors-ipa.o): Likewise.
1486 * utils.h (perror_with_name, error, warning): Don't declare.
1487 * utils.c (warning): Renamed and rewritten as...
1488 (vwarning): New function.
1489 (error): Renamed and rewritten as...
1490 (verror): New function.
1491 (internal_error): Renamed and rewritten as...
1492 (internal_verror): New function.
1493
bb974a24
GB
14942014-08-07 Gary Benson <gbenson@redhat.com>
1495
1496 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1497 * configure: Regenerate.
1498 * config.in: Likewise.
1499 * server.h: Do not include errno.h.
1500 * event-loop.c: Likewise.
1501 * hostio-errno.c: Likewise.
1502 * linux-low.c: Likewise.
1503 * remote-utils.c: Likewise.
1504 * spu-low.c: Likewise.
1505 * utils.c: Likewise.
1506 * gdbreplay.c: Unconditionally include errno.h.
1507
6d3d12eb
GB
15082014-08-07 Gary Benson <gbenson@redhat.com>
1509
1510 * server.h: Do not include string.h.
1511 * event-loop.c: Likewise.
1512 * linux-low.c: Likewise.
1513 * regcache.c: Likewise.
1514 * remote-utils.c: Likewise.
1515 * spu-low.c: Likewise.
1516 * utils.c: Likewise.
1517
dccbb609
GB
15182014-08-07 Gary Benson <gbenson@redhat.com>
1519
1520 * server.h: Do not include gdb_assert.h.
1521
e76df0d0
GB
15222014-08-07 Gary Benson <gbenson@redhat.com>
1523
1524 * server.h: Do not include common-utils.h.
1525
4cb9c816
GB
15262014-08-07 Gary Benson <gbenson@redhat.com>
1527
1528 * server.h: Do not include ptid.h.
1529 * notif.h: Likewise.
1530
3995eeee
GB
15312014-08-07 Gary Benson <gbenson@redhat.com>
1532
1533 * server.h: Do not include gdb_locale.h.
1534
cb9f1a9b
GB
15352014-08-07 Gary Benson <gbenson@redhat.com>
1536
1537 * server.h: Do not include gdb/signals.h.
1538 * win32-low.c: Likewise.
1539
a5fceff8
GB
15402014-08-07 Gary Benson <gbenson@redhat.com>
1541
1542 * server.h: Do not include pathmax.h.
1543
b9391142
GB
15442014-08-07 Gary Benson <gbenson@redhat.com>
1545
1546 * server.h: Do not include libiberty.h.
1547 * linux-bfin-low.c: Likewise.
1548
0e443c87
GB
15492014-08-07 Gary Benson <gbenson@redhat.com>
1550
1551 * server.h: Do not include ansidecl.h.
1552
8ebb3f56
GB
15532014-08-07 Gary Benson <gbenson@redhat.com>
1554
1555 * linux-x86-low.c: Do not include stddef.h.
1556 * lynx-ppc-low.c: Likewise.
1557 * tracepoint.c: Likewise.
1558
8980bdf6
GB
15592014-08-07 Gary Benson <gbenson@redhat.com>
1560
1561 * server.h: Do not include stdarg.h.
1562 * nto-low.c: Likewise.
1563
d7096f71
GB
15642014-08-07 Gary Benson <gbenson@redhat.com>
1565
1566 * server.h: Do not include stdlib.h.
1567 * inferiors.c: Likewise.
1568 * linux-low.c: Likewise.
1569 * regcache.c: Likewise.
1570 * spu-low.c: Likewise.
1571 * tracepoint.c: Likewise.
1572 * utils.c: Likewise.
1573
d02f550d
GB
15742014-08-07 Gary Benson <gbenson@redhat.com>
1575
1576 * server.h: Do not include stdio.h.
1577 * linux-low.c: Likewise.
1578 * remote-utils.c: Likewise.
1579 * spu-low.c: Likewise.
1580 * utils.c: Likewise.
1581 * wincecompat.c: Likewise.
1582
87f6c4e3
GB
15832014-08-06 Gary Benson <gbenson@redhat.com>
1584
1585 * regcache.c (init_register_cache): Move conditionals inside if.
1586
7089dca4
GB
15872014-08-06 Gary Benson <gbenson@redhat.com>
1588
1589 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1590
462f517e
GB
15912014-07-31 Gary Benson <gbenson@redhat.com>
1592
1593 * ax.h: Do not include server.h.
1594 * gdbthread.h: Likewise.
1595 * lynx-low.h: Likewise.
1596 * notif.h: Likewise.
1597
976411d6
GB
15982014-07-30 Gary Benson <gbenson@redhat.com>
1599
1600 * server.h: Include common-defs.h.
1601 Do not include config.h or build-gnulib-gdbserver/config.h.
1602
d41f6d8e
GB
16032014-07-30 Gary Benson <gbenson@redhat.com>
1604
1605 * hostio-errno.c: Move server.h to top of includes list.
1606 * inferiors.c: Likewise.
1607 * linux-x86-low.c: Likewise.
1608 * notif.c: Include server.h.
1609
314c6a35
TT
16102014-07-24 Tom Tromey <tromey@redhat.com>
1611 Gary Benson <gbenson@redhat.com>
1612
1613 * server.h (CORE_ADDR): Now unsigned.
1614
69ff6be5
PA
16152014-07-16 Pedro Alves <palves@redhat.com>
1616
1617 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1618
ce9e3fe7
PA
16192014-07-15 Pedro Alves <palves@redhat.com>
1620
1621 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1622 copy.
1623
e76126e8
PA
16242014-07-11 Pedro Alves <palves@redhat.com>
1625
1626 * linux-low.c (kill_wait_lwp): New function, based on
1627 kill_one_lwp_callback, but use my_waitpid directly.
1628 (kill_one_lwp_callback, linux_kill): Use it.
1629
8e9db26e
PA
16302014-06-23 Pedro Alves <palves@redhat.com>
1631
1632 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1633 before setting DR0..DR3.
1634
698b3e08
GB
16352014-06-20 Gary Benson <gbenson@redhat.com>
1636
1637 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1638 * configure: Regenerated.
1639 * config.in: Likewise.
1640
125f8a3d
GB
16412014-06-20 Gary Benson <gbenson@redhat.com>
1642
1643 * Makefile.in (SFILES): Update locations for files moved
1644 from common to nat.
1645 (object file files): Reordered.
1646
42995dbd
GB
16472014-06-20 Gary Benson <gbenson@redhat.com>
1648
1649 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1650 (i386_dr_low_set_addr): Likewise.
1651 (i386_dr_low_get_addr): Likewise.
1652 (i386_dr_low_can_set_control): Likewise.
1653 (i386_dr_low_set_control): Likewise.
1654 (i386_dr_low_get_control): Likewise.
1655 (i386_dr_low_get_status): Likewise.
1656 (i386_get_debug_register_length): Likewise.
1657 * linux-x86-low.c (i386_dr_low_set_addr):
1658 Changed signature. Made static.
1659 (i386_dr_low_get_addr): Likewise.
1660 (i386_dr_low_set_control): Likewise.
1661 (i386_dr_low_get_control): Likewise.
1662 (i386_dr_low_get_status): Likewise.
1663 (i386_dr_low): New global variable.
1664 * win32-i386-low.c (i386_dr_low_set_addr):
1665 Changed signature. Made static.
1666 (i386_dr_low_get_addr): Likewise.
1667 (i386_dr_low_set_control): Likewise.
1668 (i386_dr_low_get_control): Likewise.
1669 (i386_dr_low_get_status): Likewise.
1670 (i386_dr_low): New global variable.
1671
e1d2394b
MS
16722014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1673
1674 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1675 * Makefile.in (AR, AR_FLAGS): Define.
1676 * configure: Regenerate.
1677
3a8ee006
GB
16782014-06-19 Gary Benson <gbenson@redhat.com>
1679
1680 * Makefile.in (i386-dregs.o): New rule.
1681 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1682 * i386-low.c (target.h): Remove include.
1683 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1684 (DR_CONTROL_SHIFT): Likewise.
1685 (DR_CONTROL_SIZE): Likewise.
1686 (DR_RW_EXECUTE): Likewise.
1687 (DR_RW_WRITE): Likewise.
1688 (DR_RW_READ): Likewise.
1689 (DR_RW_IORW): Likewise.
1690 (DR_LEN_1): Likewise.
1691 (DR_LEN_2): Likewise.
1692 (DR_LEN_4): Likewise.
1693 (DR_LEN_8): Likewise.
1694 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1695 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1696 (DR_ENABLE_SIZE): Likewise.
1697 (DR_LOCAL_SLOWDOWN): Likewise.
1698 (DR_GLOBAL_SLOWDOWN): Likewise.
1699 (DR_CONTROL_RESERVED): Likewise.
1700 (I386_DR_CONTROL_MASK): Likewise.
1701 (I386_DR_VACANT): Likewise.
1702 (I386_DR_LOCAL_ENABLE): Likewise.
1703 (I386_DR_GLOBAL_ENABLE): Likewise.
1704 (I386_DR_DISABLE): Likewise.
1705 (I386_DR_SET_RW_LEN): Likewise.
1706 (I386_DR_GET_RW_LEN): Likewise.
1707 (I386_DR_WATCH_HIT): Likewise.
1708 (i386_wp_op_t): Likewise.
1709 (i386_show_dr): Likewise.
1710 (i386_length_and_rw_bits): Likewise.
1711 (i386_insert_aligned_watchpoint): Likewise.
1712 (i386_remove_aligned_watchpoint): Likewise.
1713 (i386_handle_nonaligned_watchpoint): Likewise.
1714 i386_update_inferior_debug_regs(): Likewise.
1715 (i386_dr_insert_watchpoint): Likewise.
1716 (i386_dr_remove_watchpoint): Likewise.
1717 (i386_dr_region_ok_for_watchpoint): Likewise.
1718 (i386_dr_stopped_data_address): Likewise.
1719 (i386_dr_stopped_by_watchpoint): Likewise.
1720
8f26655c
GB
17212014-06-19 Gary Benson <gbenson@redhat.com>
1722
1723 * i386-low.c (i386_dr_show): Renamed to
1724 i386_show_dr and made static. All uses updated.
1725 (i386_dr_length_and_rw_bits): Renamed to
1726 i386_length_and_rw_bits and made static.
1727 All uses updated.
1728 (i386_dr_insert_aligned_watchpoint): Renamed to
1729 i386_insert_aligned_watchpoint and made static.
1730 All uses updated.
1731 (i386_dr_remove_aligned_watchpoint): Renamed to
1732 i386_remove_aligned_watchpoint and made static.
1733 All uses updated.
1734 (i386_dr_update_inferior_debug_regs): Renamed to
1735 i386_update_inferior_debug_regs and made static.
1736 All uses updated.
1737
b9228891
GB
17382014-06-18 Gary Benson <gbenson@redhat.com>
1739
5171def3
GB
1740 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1741 (i386_dr_low_can_set_control): Likewise.
1742 (i386_get_debug_register_length): Likewise.
1743 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1744 (i386_dr_low_can_set_control): Likewise.
1745 (i386_get_debug_register_length): Likewise.
1746
17472014-06-17 Gary Benson <gbenson@redhat.com>
1748
b9228891
GB
1749 * i386-low.h (i386-dregs.h): New include.
1750 (DR_FIRSTADDR): Now in i386-dregs.h.
1751 (DR_LASTADDR): Likewise.
1752 (DR_NADDR): Likewise.
1753 (DR_STATUS): Likewise.
1754 (DR_CONTROL): Likewise.
1755 (i386_debug_reg_state): Likewise.
1756 (i386_dr_insert_watchpoint): Likewise.
1757 (i386_dr_remove_watchpoint): Likewise.
1758 (i386_dr_region_ok_for_watchpoint): Likewise.
1759 (i386_dr_stopped_data_address): Likewise.
1760 (i386_dr_stopped_by_watchpoint): Likewise.
1761 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1762
4be83cc2
GB
17632014-06-18 Gary Benson <gbenson@redhat.com>
1764
1765 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1766 i386_dr_insert_watchpoint.
1767 (i386_low_remove_watchpoint): Renamed to
1768 i386_dr_remove_watchpoint.
1769 (i386_low_region_ok_for_watchpoint): Renamed to
1770 i386_dr_region_ok_for_watchpoint.
1771 (i386_low_stopped_data_address): Renamed to
1772 i386_dr_stopped_data_address.
1773 (i386_low_stopped_by_watchpoint): Renamed to
1774 i386_dr_stopped_by_watchpoint.
1775 * i386-low.c (i386_show_dr): Renamed to
1776 i386_dr_show and made nonstatic. All uses updated.
1777 (i386_length_and_rw_bits): Renamed to
1778 i386_dr_length_and_rw_bits and made nonstatic.
1779 All uses updated.
1780 (i386_insert_aligned_watchpoint): Renamed to
1781 i386_dr_insert_aligned_watchpoint and made nonstatic.
1782 All uses updated.
1783 (i386_remove_aligned_watchpoint): Renamed to
1784 i386_dr_remove_aligned_watchpoint and made nonstatic.
1785 All uses updated.
1786 (i386_update_inferior_debug_regs): Renamed to
1787 i386_dr_update_inferior_debug_regs and made nonstatic.
1788 All uses updated.
1789 (i386_low_insert_watchpoint): Renamed to
1790 i386_dr_insert_watchpoint. All uses updated.
1791 (i386_low_remove_watchpoint): Renamed to
1792 i386_dr_remove_watchpoint. All uses updated.
1793 (i386_low_region_ok_for_watchpoint): Renamed to
1794 i386_dr_region_ok_for_watchpoint. All uses updated.
1795 (i386_low_stopped_data_address): Renamed to
1796 i386_dr_stopped_data_address. All uses updated.
1797 (i386_low_stopped_by_watchpoint): Renamed to
1798 i386_dr_stopped_by_watchpoint. All uses updated.
1799
131aa0d4
GB
18002014-06-18 Gary Benson <gbenson@redhat.com>
1801
1802 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1803 (i386_dr_low_can_set_control): Likewise.
1804 (i386_insert_aligned_watchpoint): New check.
1805
d9305f7f
GB
18062014-06-18 Gary Benson <gbenson@redhat.com>
1807
1808 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1809 Renamed to state.
1810
e927c9fc
GB
18112014-06-18 Gary Benson <gbenson@redhat.com>
1812
1813 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1814 instead of fatal and error.
1815 (i386_handle_nonaligned_watchpoint): Likewise.
1816
1b6d4134
GB
18172014-06-18 Gary Benson <gbenson@redhat.com>
1818
1819 * i386-low.c (i386_get_debug_register_length): New macro.
1820 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1821 (i386_show_dr): Use debug_printf instead of fprintf. Use
1822 phex to format values.
1823
6e62758f
GB
18242014-06-18 Gary Benson <gbenson@redhat.com>
1825
1826 * i386-low.h: Comment changes.
1827 * i386-low.c: Likewise.
1828
fc6e2f03
GB
18292014-06-18 Gary Benson <gbenson@redhat.com>
1830
1831 * i386-low.c: Whitespace changes.
1832
f9d1eeed
TT
18332014-06-12 Tom Tromey <tromey@redhat.com>
1834
1835 * utils.c (freeargv): Remove.
1836
0b04e523
TT
18372014-06-12 Tom Tromey <tromey@redhat.com>
1838
1839 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1840 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1841 (parse_debug_format_options): Likewise.
1842 (gdbserver_usage): Likewise.
1843 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1844 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1845 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1846 against libiberty.
1847 ($(LIBGNU)): Depend on libiberty.
1848 (all-lib): Recurse into all subdirs.
1849 (install-only): Invoke "install" target in subdirs.
1850 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1851 targets.
1852 * configure: Rebuild.
1853 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1854 for vasprintf, vsnprintf, or gettimeofday.
1855 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1856 srv_tgtobj.
1857
270c9937
JB
18582014-06-05 Joel Brobecker <brobecker@adacore.com>
1859
1860 * development.sh: Delete.
1861 * Makefile.in (config.status): Adjust dependency on development.sh.
1862 * configure.ac: Adjust development.sh source call.
1863 * configure: Regenerate.
1864
0a261ed8
PA
18652014-06-02 Pedro Alves <palves@redhat.com>
1866
1867 * ax.c (gdb_free_agent_expr): New function.
1868 * ax.h (gdb_free_agent_expr): New declaration.
1869 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1870 list.
1871 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1872 static.
1873 (clear_breakpoint_conditions_and_commands): New function.
1874 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1875 (clear_breakpoint_conditions_and_commands): New declaration.
1876
e9dae05e
RR
18772014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1878
1879 * linux-aarch64-low.c (asm/ptrace.h): Include.
1880
5876f503
JK
18812014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1882
1883 Fix TLS access for -static -pthread.
1884 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1885 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1886 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1887
802e8e6d
PA
18882014-05-20 Pedro Alves <palves@redhat.com>
1889
1890 * linux-aarch64-low.c (aarch64_insert_point)
1891 (aarch64_remove_point): No longer check whether the type is
1892 supported here. Adjust to new interface.
1893 (the_low_target): Install aarch64_supports_z_point_type as
1894 supports_z_point_type method.
1895 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1896 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1897 instead of a Z packet char. Adjust.
1898 (arm_supports_z_point_type): New function.
1899 (arm_insert_point, arm_remove_point): Adjust to new interface.
1900 (the_low_target): Install arm_supports_z_point_type.
1901 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1902 (cris_insert_point, cris_remove_point): Adjust to new interface.
1903 Don't check whether the type is supported here.
1904 (the_low_target): Install cris_supports_z_point_type.
1905 * linux-low.c (linux_supports_z_point_type): New function.
1906 (linux_insert_point, linux_remove_point): Adjust to new interface.
1907 * linux-low.h (struct linux_target_ops) <insert_point,
1908 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1909 raw_breakpoint pointer parameter.
1910 <supports_z_point_type>: New method.
1911 * linux-mips-low.c (mips_supports_z_point_type): New function.
1912 (mips_insert_point, mips_remove_point): Adjust to new interface.
1913 Use mips_supports_z_point_type.
1914 (the_low_target): Install mips_supports_z_point_type.
1915 * linux-ppc-low.c (the_low_target): Install NULL as
1916 supports_z_point_type method.
1917 * linux-s390-low.c (the_low_target): Install NULL as
1918 supports_z_point_type method.
1919 * linux-sparc-low.c (the_low_target): Install NULL as
1920 supports_z_point_type method.
1921 * linux-x86-low.c (x86_supports_z_point_type): New function.
1922 (x86_insert_point): Adjust to new insert_point interface. Use
1923 insert_memory_breakpoint. Adjust to new
1924 i386_low_insert_watchpoint interface.
1925 (x86_remove_point): Adjust to remove_point interface. Use
1926 remove_memory_breakpoint. Adjust to new
1927 i386_low_remove_watchpoint interface.
1928 (the_low_target): Install x86_supports_z_point_type.
1929 * lynx-low.c (lynx_target_ops): Install NULL as
1930 supports_z_point_type callback.
1931 * nto-low.c (nto_supports_z_point_type): New.
1932 (nto_insert_point, nto_remove_point): Adjust to new interface.
1933 (nto_target_ops): Install nto_supports_z_point_type.
1934 * mem-break.c: Adjust intro comment.
1935 (struct raw_breakpoint) <raw_type, size>: New fields.
1936 <inserted>: Update comment.
1937 <shlib_disabled>: Delete field.
1938 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1939 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1940 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1941 (raw_bkpt_type_to_target_hw_bp_type): New function.
1942 (find_enabled_raw_code_breakpoint_at): New function.
1943 (find_raw_breakpoint_at): New type and size parameters. Use them.
1944 (insert_memory_breakpoint): New function, based off
1945 set_raw_breakpoint_at.
1946 (remove_memory_breakpoint): New function.
1947 (set_raw_breakpoint_at): Reimplement.
1948 (set_breakpoint): New, based on set_breakpoint_at.
1949 (set_breakpoint_at): Reimplement.
1950 (delete_raw_breakpoint): Go through the_target->remove_point
1951 instead of assuming memory breakpoints.
1952 (find_gdb_breakpoint_at): Delete.
1953 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1954 (find_gdb_breakpoint): New function.
1955 (set_gdb_breakpoint_at): Delete.
1956 (z_type_supported): New function.
1957 (set_gdb_breakpoint_1): New function, loosely based off
1958 set_gdb_breakpoint_at.
1959 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1960 (delete_gdb_breakpoint_at): Delete.
1961 (delete_gdb_breakpoint_1): New function, loosely based off
1962 delete_gdb_breakpoint_at.
1963 (delete_gdb_breakpoint): New function.
1964 (clear_gdb_breakpoint_conditions): Rename to ...
1965 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1966 breakpoint.
1967 (add_condition_to_breakpoint): Make static.
1968 (add_breakpoint_condition): Take a struct breakpoint pointer
1969 instead of an address. Adjust.
1970 (gdb_condition_true_at_breakpoint): Rename to ...
1971 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1972 z_type parameter.
1973 (gdb_condition_true_at_breakpoint): Reimplement.
1974 (add_breakpoint_commands): Take a struct breakpoint pointer
1975 instead of an address. Adjust.
1976 (gdb_no_commands_at_breakpoint): Rename to ...
1977 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1978 parameter. Return true if no breakpoint was found. Change debug
1979 output.
1980 (gdb_no_commands_at_breakpoint): Reimplement.
1981 (run_breakpoint_commands): Rename to ...
1982 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1983 and change return type to boolean.
1984 (run_breakpoint_commands): New function.
1985 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1986 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1987 breakpoint. Go through the_target->remove_point instead of
1988 assuming memory breakpoint.
1989 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1990 software and hardware breakpoints.
1991 (reinsert_raw_breakpoint): Go through the_target->insert_point
1992 instead of assuming memory breakpoint.
1993 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1994 software and hardware breakpoints.
1995 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1996 Check both software and hardware breakpoints.
1997 (validate_inserted_breakpoint): Assert the breakpoint is a
1998 software breakpoint. Set the inserted flag to -1 instead of
1999 setting shlib_disabled.
2000 (delete_disabled_breakpoints): Adjust.
2001 (validate_breakpoints): Only validate software breakpoints.
2002 Adjust to inserted flag change.
2003 (check_mem_read, check_mem_write): Skip breakpoint types other
2004 than software breakpoints. Adjust to inserted flag change.
2005 * mem-break.h (enum raw_bkpt_type): New enum.
2006 (raw_breakpoint, struct process_info): Forward declare.
2007 (Z_packet_to_target_hw_bp_type): Delete declaration.
2008 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2009 (set_gdb_breakpoint, delete_gdb_breakpoint)
2010 (clear_breakpoint_conditions): New declarations.
2011 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2012 (breakpoint_inserted_here): Update comment.
2013 (add_breakpoint_condition, add_breakpoint_commands): Replace
2014 address parameter with a breakpoint pointer parameter.
2015 (gdb_breakpoint_here): Update comment.
2016 (delete_gdb_breakpoint_at): Delete.
2017 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2018 * server.c (process_point_options): Take a struct breakpoint
2019 pointer instead of an address. Adjust.
2020 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2021 delete_gdb_breakpoint.
2022 * spu-low.c (spu_target_ops): Install NULL as
2023 supports_z_point_type method.
2024 * target.h: Include mem-break.h.
2025 (struct target_ops) <prepare_to_access_memory>: Update comment.
2026 <supports_z_point_type>: New field.
2027 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2028 instead of a char. Also take a raw breakpoint pointer.
2029 * win32-arm-low.c (the_low_target): Install NULL as
2030 supports_z_point_type.
2031 * win32-i386-low.c (i386_supports_z_point_type): New function.
2032 (i386_insert_point, i386_remove_point): Adjust to new interface.
2033 (the_low_target): Install i386_supports_z_point_type.
2034 * win32-low.c (win32_supports_z_point_type): New function.
2035 (win32_insert_point, win32_remove_point): Adjust to new interface.
2036 (win32_target_ops): Install win32_supports_z_point_type.
2037 * win32-low.h (struct win32_target_ops):
2038 <supports_z_point_type>: New method.
2039 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2040 instead of a char. Also take a raw breakpoint pointer.
2041
932539e3
PA
20422014-05-20 Pedro Alves <palves@redhat.com>
2043
2044 * mem-break.h: Include break-common.h.
2045 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2046 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2047 (Z_packet_to_target_hw_bp_type): New declaration.
2048 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2049 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2050 (Z_PACKET_ACCESS_WP): Delete macros.
2051 (Z_packet_to_hw_type): Delete function.
2052 * i386-low.h: Don't include break-common.h here.
2053 (Z_packet_to_hw_type): Delete declaration.
2054 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2055 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2056 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2057 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2058 * linux-aarch64-low.c: Don't include break-common.h here.
2059 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2060 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2061 (Z_packet_to_target_hw_bp_type): Delete function.
2062 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2063 function.
2064 (mips_insert_point, mips_remove_point): Use
2065 Z_packet_to_target_hw_bp_type.
2066
4ff0d3d8
PA
20672014-05-20 Pedro Alves <palves@redhat.com>
2068
2069 * linux-aarch64-low.c: Include break-common.h.
2070 (enum target_point_type): Delete.
2071 (Z_packet_to_point_type): Rename to ...
2072 (Z_packet_to_target_hw_bp_type): ... this, and return a
2073 target_hw_bp_type instead.
2074 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2075 instead of an enum target_point_type.
2076 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2077 breakpoint type.
2078 (aarch64_dr_state_insert_one_point)
2079 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2080 (aarch64_handle_aligned_watchpoint)
2081 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2082 Take an enum target_hw_bp_type instead of an enum
2083 target_point_type.
2084 (aarch64_supports_z_point_type): New function.
2085 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2086 use Z_packet_to_target_hw_bp_type.
2087
786dc519
JB
20882014-05-20 Joel Brobecker <brobecker@adacore.com>
2089
2090 * configure.ac: Only use -Werror by default when DEVELOPMENT
2091 is true.
2092 * configure: Regenerate.
2093
9e0aa64f
JK
20942014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2095
2096 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2097 * linux-x86-low.c (X86_64_USER_REGS): New.
2098 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2099
2b577b92
YQ
21002014-04-28 Yao Qi <yao@codesourcery.com>
2101
2102 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2103 name.
2104
94611da2
PA
21052014-04-25 Pedro Alves <palves@redhat.com>
2106
2107 PR server/16255
2108 * linux-low.c (linux_attach_fail_reason_string): New function.
2109 (linux_attach_lwp): Delete.
2110 (linux_attach_lwp_1): Rename to ...
2111 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2112 argument. Remove "initial" parameter. Return int instead of
2113 void. Don't error or warn here.
2114 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2115 failure to attach to the tgid. Call warning when failing to
2116 attach to an lwp.
2117 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2118 argument. Remove "initial" parameter. Return int instead of
2119 void. Don't error or warn here.
2120 (linux_attach_fail_reason_string): New declaration.
2121 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2122 interface change. Use linux_attach_fail_reason_string.
2123
01f9f808
MS
21242014-04-24 Michael Sturm <michael.sturm@mintel.com>
2125 Walfred Tedeschi <walfred.tedeschi@intel.com>
2126
2127 * Makefile.in: Added rules to handle new files
2128 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2129 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2130 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2131 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2132 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2133 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2134 x32-avx512-linux.o.
2135 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2136 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2137 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2138 i386/x32-avx512.xml.
2139 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2140 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2141 i386/x32-avx512-linux.xml.
2142 * i387-fp.c (num_avx512_k_registers): New constant for number
2143 of K registers.
2144 (num_avx512_zmmh_low_registers): New constant for number of
2145 lower ZMM registers (0-15).
2146 (num_avx512_zmmh_high_registers): New constant for number of
2147 higher ZMM registers (16-31).
2148 (num_avx512_ymmh_registers): New contant for number of higher
2149 YMM registers (ymm16-31 added by avx521 on x86_64).
2150 (num_avx512_xmm_registers): New constant for number of higher
2151 XMM registers (xmm16-31 added by AVX512 on x86_64).
2152 (struct i387_xsave): Add space for AVX512 registers.
2153 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2154 Add code to handle AVX512 registers.
2155 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2156 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2157 prototypei from generated file.
2158 (tdesc_amd64_avx512_linux): Likewise.
2159 (init_registers_x32_avx512_linux): Likewise.
2160 (tdesc_x32_avx512_linux): Likewise.
2161 (init_registers_i386_avx512_linux): Likewise.
2162 (tdesc_i386_avx512_linux): Likewise.
2163 (x86_64_regmap): Add AVX512 registers.
2164 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2165 mask.
2166 (initialize_low_arch): Add code to initialize AVX512 registers.
2167
51aa91f9
PA
21682014-04-23 Pedro Alves <palves@redhat.com>
2169
2170 * mem-break.c (find_gdb_breakpoint_at): Make static.
2171 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2172
a4165e94
PA
21732014-04-23 Pedro Alves <palves@redhat.com>
2174
2175 * i386-low.c: Don't include break-common.h here.
2176 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2177 prototype to take target_hw_bp_type as argument instead of a Z
2178 packet char.
2179 * i386-low.h: Include break-common.h here.
2180 (Z_packet_to_hw_type): Declare.
2181 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2182 prototypes.
2183 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2184 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2185 (x86_remove_point): Convert the packet number to a
2186 target_hw_bp_type before calling i386_low_remove_watchpoint.
2187 * win32-i386-low.c (i386_insert_point): Convert the packet number
2188 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2189 (i386_remove_point): Convert the packet number to a
2190 target_hw_bp_type before calling i386_low_remove_watchpoint.
2191
b8acf843
PA
21922014-04-23 Pedro Alves <palves@redhat.com>
2193
2194 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2195
d708bcd1
PA
21962014-04-10 Pedro Alves <palves@redhat.com>
2197
2198 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2199 Check if the condition or command is NULL before checking if the
2200 breakpoint is known. On success, return true.
2201 * mem-break.h (add_breakpoint_condition): Document return.
2202 (add_breakpoint_commands): Add describing comment.
2203 * server.c (skip_to_semicolon): New function.
2204 (process_point_options): Use it.
2205
2eec7d5b
PA
22062014-04-09 Pedro Alves <palves@redhat.com>
2207
2208 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2209 to lwpid_of.
2210
fa96cb38
PA
22112014-02-27 Pedro Alves <palves@redhat.com>
2212
2213 PR 12702
2214 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2215 macros.
2216 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2217 output.
2218 (last_thread_of_process_p): Take a PID argument instead of a
2219 thread pointer.
2220 (linux_wait_for_lwp): Delete.
2221 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2222 functions.
2223 (linux_low_filter_event): New function, party factored out from
2224 linux_wait_for_event.
2225 (linux_wait_for_event): Rename to ...
2226 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2227 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2228 sigsuspend. Check for zombie leaders.
2229 (linux_wait_for_event): Reimplement as wrapper around
2230 linux_wait_for_event_filtered.
2231 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2232 a normal or signal exit is seen, it's the whole process exiting.
2233 (wait_for_sigstop): No longer a for_each_inferior callback.
2234 Rewrite on top of linux_wait_for_event_filtered.
2235 (stop_all_lwps): Call wait_for_sigstop directly.
2236 * server.c (resume, handle_target_event): Handle
2237 TARGET_WAITKIND_NO_RESUMED.
2238
d763de10
JB
22392014-02-26 Joel Brobecker <brobecker@adacore.com>
2240
2241 * win32-low.c (psapi_get_dll_name,
2242 * win32_CreateToolhelp32Snapshot): Delete.
2243 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2244 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2245 Delete.
2246 (handle_load_dll): Add function description.
2247 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2248
850a0f76
JB
22492014-02-26 Joel Brobecker <brobecker@adacore.com>
2250
2251 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2252 Add comment.
2253 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2254 base address when calling win32_add_one_solib.
2255 (handle_load_dll): Delete local variable load_addr.
2256 Remove 0x1000 offset applied to DLL base address when calling
2257 win32_add_one_solib.
2258 (handle_unload_dll): Add comment.
2259
f25b3fc3
JB
22602014-02-26 Joel Brobecker <brobecker@adacore.com>
2261
2262 * win32-low.c (win32_add_all_dlls): Renames
2263 win32_ensure_ntdll_loaded. Rewrite function documentation.
2264 Adjust implementation to always load all DLLs.
2265 Add 0x1000 offset to DLL base address when calling
2266 win32_add_one_solib.
2267 (child_initialization_done): New static global.
2268 (do_initial_child_stuff): Set child_initialization_done to
2269 zero during child initialization, and 1 after. Replace call
2270 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2271 Add comment.
2272 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2273 (handle_unload_dll): Add function documentation.
2274 (get_child_debug_event): Ignore load and unload DLL events
2275 during child initialization.
2276
d86d4aaf
DE
22772014-02-20 Doug Evans <dje@google.com>
2278
3bc32da3 2279 Remove global all_lwps.
d86d4aaf
DE
2280 * inferiors.h (ptid_of): Move here from linux-low.h.
2281 (pid_of, lwpid_of): Ditto.
2282 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2283 parameter is a struct thread_info * now.
2284 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2285 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2286 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2287 directly.
2288 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2289 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2290 * linux-arm-low.c (update_registers_callback): Update, "entry"
2291 parameter is a struct thread_info * now.
2292 Fetch lwpid from current_inferior directly.
2293 (arm_insert_point): Pass &all_threads to find_inferior instead of
2294 &all_lwps.
2295 (arm_remove_point): Ditto.
2296 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2297 (arm_prepare_to_resume): Fetch pid from thread.
2298 (arm_read_description): Fetch lwpid from current_inferior directly.
2299 * linux-low.c (all_lwps): Delete.
2300 (delete_lwp): Delete call to remove_inferior.
2301 (handle_extended_wait): Fetch lwpid from thread.
2302 (add_lwp): Don't set lwp->entry.id. Remove call to
2303 add_inferior_to_list.
2304 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2305 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2306 (kill_one_lwp_callback): Ditto.
2307 (linux_kill): Don't dereference NULL pointer.
2308 Fetch ptid,lwpid from thread.
2309 (get_detach_signal): Fetch ptid from thread.
2310 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2311 Simplify call to regcache_invalidate_thread.
2312 (delete_lwp_callback): Update, "entry" parameter is a
2313 struct thread_info * now. Fetch pid from thread.
2314 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2315 (status_pending_p_callback): Update, "entry" parameter is a
2316 struct thread_info * now. Fetch ptid from thread.
2317 (find_lwp_pid): Update, "entry" parameter is a
2318 struct thread_info * now.
2319 (linux_wait_for_lwp): Fetch pid from thread.
2320 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2321 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2322 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2323 (dequeue_one_deferred_signal): Ditto.
2324 (cancel_breakpoint): Fetch ptid from current_inferior.
2325 (linux_wait_for_event): Pass &all_threads to find_inferior,
2326 not &all_lwps. Fetch ptid, lwpid from thread.
2327 (count_events_callback): Update, "entry" parameter is a
2328 struct thread_info * now.
2329 (select_singlestep_lwp_callback): Ditto.
2330 (select_event_lwp_callback): Ditto.
2331 (cancel_breakpoints_callback): Ditto.
2332 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2333 not &all_lwps.
2334 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2335 (unsuspend_one_lwp): Update, "entry" parameter is a
2336 struct thread_info * now.
2337 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2338 not &all_lwps.
2339 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2340 Fetch lwpid from thread, not lwp.
2341 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2342 Pass &all_threads to find_inferior, not &all_lwps.
2343 (send_sigstop): Fetch lwpid from thread, not lwp.
2344 (send_sigstop_callback): Update, "entry" parameter is a
2345 struct thread_info * now.
2346 (suspend_and_send_sigstop_callback): Ditto.
2347 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2348 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2349 struct thread_info * now.
2350 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2351 from thread, lwp.
2352 (lwp_running): Update, "entry" parameter is a
2353 struct thread_info * now.
2354 (stop_all_lwps): Fetch ptid from thread.
2355 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2356 (linux_resume_one_lwp): Fetch lwpid from thread.
2357 (linux_set_resume_request): Update, "entry" parameter is a
2358 struct thread_info * now. Fetch pid, lwpid from thread.
2359 (resume_status_pending_p): Update, "entry" parameter is a
2360 struct thread_info * now.
2361 (need_step_over_p): Ditto. Fetch lwpid from thread.
2362 (start_step_over): Fetch lwpid from thread.
2363 (linux_resume_one_thread): Update, "entry" parameter is a
2364 struct thread_info * now. Fetch lwpid from thread.
2365 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2366 (proceed_one_lwp): Update, "entry" parameter is a
2367 struct thread_info * now. Fetch lwpid from thread.
2368 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2369 struct thread_info * now.
2370 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2371 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2372 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2373 directly.
2374 (regsets_store_inferior_registers): Ditto.
2375 (fetch_register, store_register): Ditto.
2376 (linux_read_memory, linux_write_memory): Ditto.
2377 (linux_request_interrupt): Ditto.
2378 (linux_read_auxv): Ditto.
2379 (linux_xfer_siginfo): Ditto.
2380 (linux_qxfer_spu): Ditto.
2381 (linux_qxfer_libraries_svr4): Ditto.
2382 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2383 moved to inferiors.h.
2384 (get_lwp): Delete.
2385 (get_thread_lwp): Update.
2386 (struct lwp_info): Delete member "entry". Simplify comment for
2387 member "thread".
2388 (all_lwps): Delete.
2389 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2390 current_inferior directly.
2391 (update_watch_registers_callback): Update, "entry" parameter is a
2392 struct thread_info * now. Fetch pid from thread.
2393 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2394 (mips_insert_point): Fetch lwpid from current_inferior.
2395 Pass &all_threads to find_inferior, not &all_lwps.
2396 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2397 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2398 directly.
2399 (mips_stopped_data_address): Ditto.
2400 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2401 directly.
2402 * linux-tile-low.c (tile_arch_setup): Ditto.
2403 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2404 (update_debug_registers_callback): Update, "entry" parameter is a
2405 struct thread_info * now. Fetch pid from thread.
2406 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2407 Pass &all_threads to find_inferior, not &all_lwps.
2408 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2409 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2410 Pass &all_threads to find_inferior, not &all_lwps.
2411 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2412 (i386_dr_low_get_status): Ditto.
2413 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2414 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2415 (x86_linux_read_description): Ditto.
2416 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2417
3b8361aa
DE
24182014-02-20 Doug Evans <dje@google.com>
2419
2420 * inferiors.c (get_first_inferior): Fix buglet.
2421
f7667f0d
DE
24222014-02-19 Doug Evans <dje@google.com>
2423
2424 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2425 * inferiors.c (add_thread): Change result type to struct thread_info *.
2426 All callers updated.
2427 (add_lwp): Call add_thread here instead of in callers.
2428 All callers updated.
2429 * linux-low.h (get_lwp_thread): Rewrite.
2430 (struct lwp_info): New member "thread".
2431
b3312d80
DE
24322014-02-19 Doug Evans <dje@google.com>
2433
2434 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2435 All callers updated.
2436
ecc6f45c
DE
24372014-02-19 Doug Evans <dje@google.com>
2438
2439 * inferiors.c (add_thread): Fix whitespace.
2440
649ebbca
DE
24412014-02-19 Doug Evans <dje@google.com>
2442
2443 * dll.c (clear_dlls): Replace accessing list implemention details
2444 with API function.
2445 * gdbthread.h (get_first_thread): Declare.
2446 * inferiors.c (for_each_inferior_with_data): New function.
2447 (get_first_thread): New function.
2448 (find_thread_ptid): Simplify.
2449 (get_first_inferior): New function.
2450 (clear_list): Delete.
2451 (one_inferior_p): New function.
2452 (clear_inferior_list): New function.
2453 (clear_inferiors): Update.
2454 * inferiors.h (for_each_inferior_with_data): Declare.
2455 (clear_inferior_list): Declare.
2456 (one_inferior_p): Declare.
2457 (get_first_inferior): Declare.
2458 * linux-low.c (linux_wait_for_event): Replace accessing list
2459 implemention details with API function.
2460 * server.c (target_running): Ditto.
2461 (accumulate_file_name_length): New function.
2462 (emit_dll_description): New function.
2463 (handle_qxfer_libraries): Replace accessing list implemention
2464 details with API function.
2465 (handle_qxfer_threads_worker): New function.
2466 (handle_qxfer_threads_proper): Replace accessing list implemention
2467 details with API function.
2468 (handle_query): Ditto.
2469 (visit_actioned_threads_callback_ftype): New typedef.
2470 (visit_actioned_threads_data): New struct.
2471 (visit_actioned_threads): Rewrite to be find_inferior callback.
2472 (resume): Call find_inferior.
2473 (handle_status): Replace accessing list implemention
2474 details with API function.
2475 (process_serial_event): Replace accessing list implemention details
2476 with API function.
2477 * target.c (set_desired_inferior): Replace accessing list implemention
2478 details with API function.
2479 * tracepoint.c (same_process_p): New function.
2480 (gdb_agent_about_to_close): Replace accessing list implemention
2481 details with API function.
2482 * win32-low.c (child_delete_thread): Replace accessing list
2483 implemention details with API function.
2484 (match_dll_by_basename): New function.
2485 (dll_is_loaded_by_basename): New function.
2486 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2487 details call to dll_is_loaded_by_basename.
2488
80894984
DE
24892014-02-19 Doug Evans <dje@google.com>
2490
2491 * dll.h (struct dll_info): Add comment.
2492 * gdbthread.h (struct thread_info): Add comment.
2493 (current_ptid): Simplify.
2494 * inferiors.c (add_process): Update.
2495 (remove_process): Update.
2496 * inferiors.h (struct process_info): Rename member "head" to "entry".
2497 * linux-low.c (delete_lwp): Update.
2498 (add_lwp): Update.
2499 (last_thread_of_process_p): Update.
2500 (kill_one_lwp_callback, linux_kill): Update.
2501 (status_pending_p_callback): Update.
2502 (wait_for_sigstop): Update. Simplify read of ptid.
2503 (start_step_over): Update.
2504 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2505 (get_lwp_thread): Update.
2506 (struct lwp_info): Rename member "head" to "entry".
2507 * regcache.h (inferior_list_entry): Delete.
2508 * server.c (kill_inferior_callback): Update.
2509 (detach_or_kill_inferior_callback): Update.
2510 (print_started_pid): Update.
2511 (print_attached_pid): Update.
2512 (process_serial_event): Simplify read of ptid.
2513 * thread-db.c (thread_db_create_event): Update.
2514 (thread_db_get_tls_address): Update.
2515 * win32-low.c (current_inferior_ptid): Simplify.
2516
46917d26
TT
25172014-02-19 Tom Tromey <tromey@redhat.com>
2518
2519 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2520 argument.
2521 (target_supports_btrace): Update.
2522
0759a81e
YQ
25232014-02-14 Yao Qi <yao@codesourcery.com>
2524
2525 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2526 (rsp-low-ipa.o): New target.
2527
a7191e8b
TT
25282014-02-12 Tom Tromey <tromey@redhat.com>
2529
2530 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2531 convert_ascii_to_int.
2532 * regcache.c (registers_to_string): Likewise.
2533 * remote-utils.c (decode_M_packet): Likewise.
2534 * server.c (process_serial_event): Likewise.
2535
ff0e980e
TT
25362014-02-12 Tom Tromey <tromey@redhat.com>
2537
2538 * server.c (handle_query, handle_v_run): Use hex2bin, not
2539 unhexify.
2540 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2541
e9371aff
TT
25422014-02-12 Tom Tromey <tromey@redhat.com>
2543
2544 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2545 convert_int_to_ascii.
2546 * regcache.c (registers_to_string, collect_register_as_string):
2547 Likewise.
2548 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2549 Likewise.
2550 * server.c (process_serial_event): Likewise.
2551 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2552 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2553
971dc0b8
TT
25542014-02-12 Tom Tromey <tromey@redhat.com>
2555
2556 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2557 bin2hex, not hexify.
2558 * tracepoint.c (cmd_qtstatus): Likewise.
2559
0a822afb
TT
25602014-02-12 Tom Tromey <tromey@redhat.com>
2561
2562 * remote-utils.c (monitor_output): Pass explicit length to
2563 hexify.
2564
9c3d6531
TT
25652014-02-12 Tom Tromey <tromey@redhat.com>
2566
2567 * tracepoint.c: Include rsp-low.h.
2568 * server.c: Include rsp-low.h.
2569 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2570 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2571 declare.
2572 * remote-utils.c: Include rsp-low.h.
2573 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2574 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2575 (convert_int_to_ascii, convert_ascii_to_int): Move to
2576 common/rsp-low.c.
2577 * regcache.c: Include rsp-low.h.
2578 * ax.c: Include rsp-low.h.
2579 * Makefile.in (SFILES): Add common/rsp-low.c.
2580 (OBS): Add rsp-low.o.
2581 (rsp-low.o): New target.
2582
01fd3ea5
TT
25832014-02-12 Tom Tromey <tromey@redhat.com>
2584
2585 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2586 Include print-utils.h.
2587 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2588 (plongest, thirty_two, phex_nz): Remove.
2589 * Makefile.in (SFILES): Add common/print-utils.c.
2590 (OBS): Add print-utils.o.
2591 (print-utils-ipa.o): New target.
2592 (print-utils.o): New target.
2593 (IPA_OBJS): Add print-utils-ipa.o.
2594
e99dc820
TT
25952014-02-06 Tom Tromey <tromey@redhat.com>
2596
2597 * Makefile.in (SFILES): Fix indentation.
2598
ee1e2d4f
DE
25992014-02-05 Doug Evans <dje@google.com>
2600
2601 * linux-low.c (linux_wait_for_event): Improve comment.
2602 (linux_wait_1): Keep current_inferior in sync with event_child.
2603
f5a02773
DE
26042014-01-22 Doug Evans <dje@google.com>
2605
2606 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2607
87ce2a04
DE
26082014-01-22 Doug Evans <dje@google.com>
2609
2610 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2611 * configure: Regenerate.
2612 * config.in: Regenerate.
2613 * Makefile.in (SFILES): Add debug.c.
2614 (OBS): Add debug.o.
2615 * debug.c: New file.
2616 * debug.h: New file.
2617 * linux-aarch64-low.c (*): Update all debugging printfs to use
2618 debug_printf instead of fprintf.
2619 * linux-arm-low.c (*): Ditto.
2620 * linux-cris-low.c (*): Ditto.
2621 * linux-crisv32-low.c (*): Ditto.
2622 * linux-m32r-low.c (*): Ditto.
2623 * linux-sparc-low.c (*): Ditto.
2624 * linux-x86.c (*): Ditto.
2625 * linux-low.c (*): Ditto.
2626 (linux_wait_1): Add calls to debug_enter, debug_exit.
2627 (linux_wait): Remove redundant debugging printf.
2628 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2629 (linux_resume, unstop_all_lwps): Ditto.
2630 * mem-break.c (*): Update all debugging printfs to use
2631 debug_printf instead of fprintf.
2632 * remote-utils.c (*): Ditto.
2633 * thread-db.c (*): Ditto.
2634 * server.c #include <ctype.h>, "gdb_vecs.h".
2635 (debug_threads): Moved to debug.c.
2636 (*): Update all debugging printfs to use debug_printf instead of
2637 fprintf.
2638 (start_inferior): Replace call to fflush with call to debug_flush.
2639 (monitor_show_help): Mention set debug-format.
2640 (parse_debug_format_options): New function.
2641 (handle_monitor_command): Handle "monitor set debug-format".
2642 (gdbserver_usage): Mention --debug-format.
2643 (main): Parse --debug-format.
2644 * server.h (debug_threads): Declaration moved to debug.h.
2645 #include "debug.h".
2646 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2647 trace_debug_1 that uses debug_printf.
2648 (tracepoint_look_up_symbols): Update all debugging printfs to use
2649 debug_printf instead of fprintf.
2650
e671835b
BS
26512014-01-20 Baruch Siach <baruch@tkos.co.il>
2652
2653 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2654 sys/ptrace.h.
2655
b5737fa9
PA
26562014-01-17 Pedro Alves <palves@redhat.com>
2657
ea38d2a9 2658 PR build/16445
c7faa97a
PA
2659 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2660 defined after including gdb_proc_service.h.
b5737fa9 2661
40ed484e
DE
26622014-01-16 Doug Evans <dje@google.com>
2663
2664 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2665 (match_dll): Use it.
2666
969c39fb
MM
26672014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2668
2669 * target.h (target_ops) <read_btrace>: Change parameters and
2670 return type to allow error reporting.
2671 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2672 trace reading errors on.
2673 * linux-low.c (linux_low_read_btrace): Pass trace reading
2674 errors on.
2675 (linux_low_disable_btrace): New.
2676
ab7f45ba
DE
26772014-01-15 Doug Evans <dje@google.com>
2678
2679 * inferiors.c (thread_id_to_gdb_id): Delete.
2680 * inferiors.h (thread_id_to_gdb_id): Delete.
2681
66af0f44
EZ
26822014-01-13 Eli Zaretskii <eliz@gnu.org>
2683
2684 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2685 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2686 versions.
2687
9939e131
PA
26882014-01-08 Pedro Alves <palves@redhat.com>
2689
2690 * server.c (handle_status): Don't discard previous queued stop
2691 replies or thread's pending status here.
2692 (main) <disconnection>: Do it here instead.
2693
b7ea362b
PA
26942014-01-08 Pedro Alves <palves@redhat.com>
2695
2696 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2697 * server.c (visit_actioned_threads, handle_pending_status): New
2698 function.
2699 (handle_v_cont): Factor out parts to ...
2700 (resume): ... this new function. If in all-stop, and a thread
2701 being resumed has a pending status, report it without actually
2702 resuming.
2703 (myresume): Adjust to use the new 'resume' function.
2704 (clear_pending_status_callback, set_pending_status_callback)
2705 (find_status_pending_thread_callback): New functions.
2706 (handle_status): Handle the case of multiple threads having
2707 interesting statuses to report. Report threads' real last signal
2708 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2709 with an interesting thread to report the status for, instead of
2710 always reporting the status of the first thread.
2711
28498c42
JB
27122014-01-01 Joel Brobecker <brobecker@adacore.com>
2713
2714 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2715 * gdbreplay.c (gdbreplay_version): Likewise.
2716
f45c82da
YZ
27172013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2718
2719 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2720 iov.iov_len with the real length in use.
2721
379a5e2d
JB
27222013-12-13 Joel Brobecker <brobecker@adacore.com>
2723
2724 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2725 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2726 for all targets that use win32-low.c.
2727 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2728 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2729
4210d83e
PA
27302013-12-13 Pedro Alves <palves@redhat.com>
2731
2732 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2733 if equal to TARGET_WAITKIND_LOADED.
2734 * win32-low.c (cached_status): New static global.
2735 (win32_wait): Add declaration.
2736 (do_initial_child_stuff): Flush all initial pending debug events
2737 up to the initial breakpoint.
2738 (win32_wait): If CACHED_STATUS was set, return that instead
2739 of doing a real wait. Remove the code resuming the execution
2740 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2741 during the initial phase. Also remove the code changing
2742 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2743 TARGET_WAITKIND_STOPPED.
2744
e7f0d979
YQ
27452013-12-11 Yao Qi <yao@codesourcery.com>
2746
2747 * notif.c (handle_notif_ack): Return 0 if no notification
2748 matches.
2749
ebcf782c
DE
27502013-11-20 Doug Evans <dje@google.com>
2751
2752 * linux-low.c (linux_set_resume_request): Fix comment.
2753
20ad9378
DE
27542013-11-20 Doug Evans <dje@google.com>
2755
2756 * linux-low.c (resume_status_pending_p): Tweak comment.
2757
a196ebeb
WT
27582013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2759
2760 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2761 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2762 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2763 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2764 (srv_amd64_regobj): Add amd64-mpx.o.
2765 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2766 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2767 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2768 * i387-fp.c (num_pl_bnd_register) Added constant.
2769 (num_pl_bnd_cfg_registers) Added constant.
2770 (struct i387_xsave) Added reserved area and MPX fields.
2771 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2772 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2773 function.
2774 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2775 (init_registers_amd64_mpx_linux): Declare new function.
2776 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2777 (x86_64_regmap): Add MPX registers.
2778 (x86_linux_read_description): Add MPX case.
2779 (initialize_low_arch): Initialize MPX targets.
2780
0080a2f6
TT
27812013-11-18 Tom Tromey <tromey@redhat.com>
2782
2783 * configure: Rebuild.
2784 * configure.ac: Don't check for stdlib.h.
2785 * gdbreplay.c: Unconditionally include stdlib.h.
2786
2978b111
TT
27872013-11-18 Tom Tromey <tromey@redhat.com>
2788
2789 * config.in: Rebuild.
2790 * configure: Rebuild.
2791 * configure.ac: Don't use AC_HEADER_DIRENT.
2792
a3d08894
TT
27932013-11-18 Tom Tromey <tromey@redhat.com>
2794
2795 * server.h: Don't check HAVE_STRING_H.
2796 * gdbreplay.c: Don't check HAVE_STRING_H.
2797 * configure: Rebuild.
2798
0a5dd17d
TT
27992013-11-18 Tom Tromey <tromey@redhat.com>
2800
2801 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2802 LIBGNU.
2803
1bd2f0ba
TT
28042013-11-08 Tom Tromey <tromey@redhat.com>
2805
2806 * configure, config.in: Rebuild.
2807 * configure.ac: Remove unused configury.
2808
3266f10b
TT
28092013-11-08 Tom Tromey <tromey@redhat.com>
2810
2811 * acinclude.m4: Include common.m4, codeset.m4.
2812 * configure, config.in: Rebuild.
2813 * configure.ac: Use GDB_AC_COMMON.
2814
6682d959
AA
28152013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2816
2817 * linux-s390-low.c (HWCAP_S390_TE): New define.
2818 (s390_arch_setup): Consider the TE field in the HWCAP for
2819 determining 'have_regset_tdb'.
2820
fd0a4d76
SDJ
28212013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2822
2823 PR gdb/16014
2824 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2825 call to sizeof.
2826
1a3d890b
PA
28272013-10-02 Pedro Alves <palves@redhat.com>
2828
2829 * server.c (process_serial_event): Don't output "GDBserver
2830 exiting" if GDB is connected through stdio.
2831 * target.c (mywait): Likewise, be silent if GDB is connected
2832 through stdio.
2833
97ad4581
JB
28342013-10-01 Joel Brobecker <brobecker@adacore.com>
2835
2836 * lynx-low.c (lynx_add_threads_after_attach): New function.
2837 (lynx_attach): Remove call to add_thread. Add call to
2838 lynx_add_threads_after_attach instead.
2839
5b4e221c
MF
28402013-09-28 Mike Frysinger <vapier@gentoo.org>
2841
2842 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2843 * config.in, configure: Regenerated.
2844
ee47b2f8
YQ
28452013-09-18 Yao Qi <yao@codesourcery.com>
2846
2847 PR server/15959
2848 * server.c (start_inferior): Clear 'resume_info'.
2849
d6707650 28502013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2851
d6707650
JW
2852 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2853 for each register.
2854
9243dd0e 28552013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2856
9243dd0e
JW
2857 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2858 linux-tile-low.o to srv_tgtobj.
2859
c623a6ef
WN
28602013-09-16 Will Newton <will.newton@linaro.org>
2861
2862 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2863 out regs.
2864
fb71d39e
PA
28652013-09-06 Pedro Alves <palves@redhat.com>
2866
2867 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2868 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2869 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2870 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2871 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2872 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2873
8e7e9910
PA
28742013-09-06 Pedro Alves <palves@redhat.com>
2875
2876 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2877 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2878
7c3a12ca
PA
28792013-09-06 Pedro Alves <palves@redhat.com>
2880
2881 * linux-amd64-ipa.c: Include tracepoint.h.
2882 * linux-i386-ipa.c: Include tracepoint.h.
2883
8eb3d7b6
RW
28842013-09-06 Ricard Wanderlof <ricardw@axis.com>
2885
2886 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2887 (ps_get_thread_area): New function.
2888
eddddb9d
RW
28892013-09-06 Ricard Wanderlof <ricardw@axis.com>
2890
2891 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2892 (initialize_low_arch): Call init_registers_crisv32 rather than
2893 init_register_crisv32.
2894
533b0600
PA
28952013-09-05 Pedro Alves <palves@redhat.com>
2896
2897 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2898 to ...
2899 * hostio.h: ... this new file.
2900 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2901 win32-low.c: Include hostio.h.
2902
0ce3d3b5
PA
29032013-09-05 Pedro Alves <palves@redhat.com>
2904
2905 * server.h (gdb_client_data, handler_func, callback_handler_func)
2906 (delete_file_handler, add_file_handler, append_callback_event)
2907 (delete_callback_event, start_event_loop, initialize_event_loop):
2908 Move to event-loop.h and include it.
2909 * event-loop.h: New file.
2910
799cdc37
PA
29112013-09-05 Pedro Alves <palves@redhat.com>
2912
2913 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2914 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2915 (loaded_dll, unloaded_dll): Move to ...
2916 * dll.h: ... this new file.
2917 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2918
6a6bbd9d
PA
29192013-09-05 Pedro Alves <palves@redhat.com>
2920
2921 * server.h (current_process, get_thread_process, all_processes)
2922 (add_inferior_to_list, for_each_inferior, current_inferior)
2923 (remove_inferior, add_process, remove_process, find_process_pid)
2924 (have_started_inferiors_p, have_attached_inferiors_p)
2925 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2926 (clear_inferiors, find_inferior, find_inferior_id)
2927 (inferior_target_data, set_inferior_target_data)
2928 (inferior_regcache_data, set_inferior_regcache_data): Move to
2929 inferiors.h, and include it.
2930 * inferiors.h: New file.
2931
f699aaba
PA
29322013-09-05 Pedro Alves <palves@redhat.com>
2933
2934 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2935 Move ...
72f4393d 2936 * ax.h: ... here.
f699aaba 2937
c144c7a0
PA
29382013-09-05 Pedro Alves <palves@redhat.com>
2939
2940 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2941 tracepoint.h.
2942 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2943 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2944 (handle_tracepoint_general_set, handle_tracepoint_query)
2945 (tracepoint_finished_step, tracepoint_was_hit)
2946 (release_while_stepping_state_list, current_traceframe)
2947 (in_readonly_region, traceframe_read_mem)
2948 (fetch_traceframe_registers, traceframe_read_sdata)
2949 (traceframe_read_info, struct fast_tpoint_collect_status)
2950 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2951 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2952 (supply_fast_tracepoint_registers)
2953 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2954 (ipa_tdesc, claim_trampoline_space)
2955 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2956 (agent_mem_read, agent_get_trace_state_variable_value)
2957 (agent_set_trace_state_variable_value, agent_tsv_read)
2958 (agent_mem_read_string, get_raw_reg_func_addr)
2959 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2960 * tracepoint.h: ... this new file.
2961
ff42e6ab
PA
29622013-09-05 Pedro Alves <palves@redhat.com>
2963
2964 * server.h (perror_with_name, error, fatal, warning, paddress)
2965 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2966 include it.
2967 * utils.h: New file.
2968
541af0f4
PA
29692013-09-05 Pedro Alves <palves@redhat.com>
2970
2971 * server.h (remote_debug, noack_mode, transport_is_reliable)
2972 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2973 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2974 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2975 (write_enn, initialize_async_io, enable_async_io)
2976 (disable_async_io, check_remote_input_interrupt_request)
2977 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2978 (dead_thread_notify, prepare_resume_reply)
2979 (decode_address_to_semicolon, decode_address, decode_m_packet)
2980 (decode_M_packet, decode_X_packet, decode_xfer_write)
2981 (decode_search_memory_packet, unhexify, hexify)
2982 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2983 (look_up_one_symbol, relocate_instruction)
2984 (monitor_output): Move to remote-utils.h, and include it.
2985 * remote-utils.h: New file.
2986
eebdf26b
PA
29872013-09-05 Pedro Alves <palves@redhat.com>
2988
2989 * server.h (_): Delete.
2990
3aafd2ff
PA
29912013-09-02 Pedro Alves <palves@redhat.com>
2992
2993 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2994 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2995 allocated.
2996 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2997
cee83bcb
PM
29982013-09-02 Pierre Muller <muller@sourceware.org>
2999
3000 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3001 or WriteProcessMemory complete successfully and handle
3002 ERROR_PARTIAL_COPY error.
3003
9a13b2fa
PA
30042013-09-02 Pedro Alves <palves@redhat.com>
3005
3006 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3007 error instead of EIO.
3008
602e3198
JK
30092013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3010
3011 PR server/15604
3012 * linux-low.c: Include filestuff.h.
3013 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3014 * lynx-low.c: Include filestuff.h.
3015 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3016 * server.c: Include filestuff.h.
3017 (main): Call notice_open_fds.
3018 * spu-low.c: Include filestuff.h.
3019 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3020
96d7229d
LM
30212013-08-22 Luis Machado <lgustavo@codesourcery.com>
3022
3023 * Makefile.in: Explain why ../target and ../nat are not
3024 listed as include file search paths.
3025 (linux-waitpid.o): New object file rule.
3026 * configure.srv (srv_native_linux_obj): New variable.
3027 Replace all occurrences of linux native object files with
3028 $srv_native_linux_obj.
3029 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3030 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3031 (linux_enable_event_reporting): Remove declaration.
3032 (my_waitpid): Moved to common/linux-waitpid.c.
3033 (linux_wait_for_event): Pass ptid when calling
3034 linux_enable_event_reporting.
3035 (linux_supports_tracefork_flag): Remove.
3036 (linux_enable_event_reporting): Likewise.
3037 (linux_tracefork_grandchild): Remove.
3038 (STACK_SIZE): Moved to common/linux-ptrace.c.
3039 (linux_tracefork_child): Remove.
3040 (linux_test_for_tracefork): Remove.
3041 (linux_look_up_symbols): Call linux_supports_traceclone.
3042 (initialize_low): Remove call to linux_test_for_tracefork.
3043 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3044 common/linux-ptrace.h.
3045 (PTRACE_TYPE_ARG4): Likewise.
3046 Include linux-ptrace.h.
3047
32940073
PA
30482013-08-21 Pedro Alves <palves@redhat.com>
3049
3050 * config.in: Renegerate.
3051
33b60d58 30522013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 3053
33b60d58
LM
3054 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3055 (SFILES): Remove $(srcdir)/common/target-common.c and
3056 add $(srcdir)/target/waitstatus.c.
3057 (OBS): Remove target-common.o and add waitstatus.o.
3058 (server_h): Remove $(srcdir)/../common/target-common.h and
3059 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3060 and $(srcdir)/../target/waitstatus.h.
3061 (target-common.o): Remove.
3062 (waitstatus.o): New target object file.
3063 * target.h: Do not include target-common.h and
3064 include target/resume.h, target/wait.h and
3065 target/waitstatus.h.
3066
b8e1b30e
LM
30672013-08-13 Luis Machado <lgustavo@codesourcery.com>
3068
3069 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3070 to PTRACE_TYPE_ARG3.
3071 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3072 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3073 PTRACE_TYPE_ARG4.
3074 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3075 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3076
7a60ad40
YQ
30772013-07-27 Jie Zhang <jie@codesourcery.com>
3078 Daniel Jacobowitz <dan@codesourcery.com>
3079 Yao Qi <yao@codesourcery.com>
3080
3081 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3082 (mips-linux-watch.o): New rule.
3083 (mips_linux_watch_h): New variable.
3084 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3085 srv_tgtobj.
3086 * linux-mips-low.c: Include mips-linux-watch.h.
3087 (struct arch_process_info, struct arch_lwp_info): New.
3088 (update_watch_registers_callback): New function.
3089 (mips_linux_new_process, mips_linux_new_thread) New functions.
3090 (mips_linux_prepare_to_resume, mips_insert_point): New
3091 functions.
3092 (mips_remove_point, mips_stopped_by_watchpoint): New
3093 functions.
3094 (rsp_bp_type_to_target_hw_bp_type): New function.
3095 (mips_stopped_data_address): New function.
3096 (the_low_target): Add watchpoint support functions.
3097
de6f69ad
YQ
30982013-07-27 Yao Qi <yao@codesourcery.com>
3099
3100 * i386-low.c: Include break-common.h.
3101 (enum target_hw_bp_type): Remove.
3102
3360c0bf
LM
31032013-07-24 Luis Machado <lgustavo@codesourcery.com>
3104
3105 * Makefile.in (SFILES): /common/target-common.c.
3106 (OBS): Add target-common.o.
3107 (server_h): Add $(srcdir)/../common/target-common.h.
3108 (target-common.o): New target.
3109 * server.c (queue_stop_reply_callback): Free
3110 status string after use.
3111 * target.c (target_waitstatus_to_string): Remove.
3112 * target.h: Include target-common.h.
3113 (resume_kind): Likewise.
3114 (target_waitkind): Likewise.
3115 (target_waitstatus): Likewise.
3116 (TARGET_WNOHANG): Likewise.
3117
bd885420
YQ
31182013-07-04 Yao Qi <yao@codesourcery.com>
3119
3120 * Makefile.in (host_alias): Use @host_noncanonical@.
3121 (target_alias): Use @target_noncanonical@.
3122 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3123 ACX_NONCANONICAL_HOST.
3124 * configure: Regenerated.
3125
3126 Revert:
3127 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3128
3129 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3130 * configure: Rebuild.
3131 * Makefile.in (version_host, version_target): Get from configure.
3132 (version.c): Use $(version_host) and $(version_target).
3133
17ef446e
PA
31342013-07-03 Pedro Alves <palves@redhat.com>
3135
3136 * Makefile.in (config.status): Depend on development.sh.
3137 * acinclude.m4: Include libmcheck.m4.
3138 * configure: Regenerate.
3139
7a9a7487
MG
31402013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3141
3142 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3143 attribute inside the parentheses.
3144 (winapi_DebugSetProcessKillOnExit): Ditto.
3145 (winapi_DebugBreakProcess): Ditto.
3146 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 3147
49b64de6
MG
31482013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3149
3150 * notif.h (notif_event): Add a dummy member to avoid compiler
3151 errors.
3152
d5749ee7
PA
31532013-07-01 Pedro Alves <palves@redhat.com>
3154
3155 * hostio.c (HOSTIO_PATH_MAX): Define.
3156 (require_filename, handle_open, handle_unlink, handle_readlink):
3157 Use it.
3158
d8d2a3ee
PA
31592013-07-01 Pedro Alves <palves@redhat.com>
3160
3161 * server.h: Include "pathmax.h".
3162 * linux-low.c: Don't include sys/param.h.
3163 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3164 MAXPATHLEN.
3165 * win32-low.c: Don't include sys/param.h.
3166 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3167
bc7dea8d
PA
31682013-07-01 Pedro Alves <palves@redhat.com>
3169
3170 * event-loop.c: Don't check HAVE_UNISTD_H before including
3171 <unistd.h>.
3172 * gdbreplay.c: Likewise.
3173 * remote-utils.c: Likewise.
3174 * server.c: Likewise.
3175 * configure.ac: Don't check for unistd.h.
3176 * configure: Regenerate.
3177
d6c2da54
TT
31782013-06-28 Tom Tromey <tromey@redhat.com>
3179
3180 * Makefile.in (version.c): Use version.in, not
3181 common/version.in.
3182
257b6bec
MG
31832013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3184
3185 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3186 * configure: Rebuild.
3187 * Makefile.in (version_host, version_target): Get from configure.
3188 (version.c): Use $(version_host) and $(version_target).
3189
86ebe149
DK
31902013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3191
3192 Fix trace-status to output user name without trailing colon.
3193 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3194
f30aa5af
DK
31952013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3196
3197 Fix trace-status to output proper start-time and stop-time.
3198 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3199 output start time and stop time in hex as gdb expects.
3200
28a93511
YQ
32012013-06-26 Pedro Alves <pedro@codesourcery.com>
3202
3203 * tracepoint.c (build_traceframe_info_xml): Output trace state
3204 variables present in the trace buffer.
3205
01208463
TT
32062013-06-24 Tom Tromey <tromey@redhat.com>
3207
3208 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3209 create-version.sh.
3210 (version.o): Remove.
3211 * gdbreplay.c: Include version.h.
3212 (version, host_name): Don't declare.
3213 * server.h: Include version.h.
3214 (version, host_name): Don't declare.
3215
760256f9
PA
32162013-06-12 Pedro Alves <palves@redhat.com>
3217
3218 * linux-x86-low.c (linux_is_elf64): Delete global.
3219 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3220 with local linux_pid_exe_is_elf_64_file use.
3221
030031ee
PA
32222013-06-11 Pedro Alves <palves@redhat.com>
3223
3224 * linux-low.c (regset_disabled, disable_regset): New functions.
3225 (regsets_fetch_inferior_registers)
3226 (regsets_store_inferior_registers): Use them.
3227 (initialize_regsets_info); Don't allocate the disabled_regsets
3228 array here.
3229 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3230 comment.
3231
5da6eb0a
PA
32322013-06-11 Pedro Alves <palves@redhat.com>
3233
3234 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3235 xmalloc.
3236
7e5aaa09
PA
32372013-06-11 Pedro Alves <palves@redhat.com>
3238
3239 * linux-x86-low.c (initialize_low_arch): Call
3240 init_registers_x32_avx_linux.
3241
d878444c
JK
32422013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3243
3244 Fix compatibility with Android Bionic.
3245 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3246 it is not empty.
3247
3aee8918
PA
32482013-06-07 Pedro Alves <palves@redhat.com>
3249
5f2b57b5 3250 PR server/14823
3aee8918
PA
3251 * Makefile.in (OBS): Add tdesc.o.
3252 (IPA_OBJS): Add tdesc-ipa.o.
3253 (tdesc-ipa.o): New rule.
3254 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3255 interface.
3256 * linux-low.c (new_inferior): Delete.
3257 (disabled_regsets, num_regsets): Delete.
3258 (linux_add_process): Adjust to set the new per-process
3259 new_inferior flag.
3260 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3261 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3262 was a stop. When calling arch_setup, switch the current inferior
3263 to the thread that got an event.
3264 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3265 (regsets_fetch_inferior_registers)
3266 (regsets_store_inferior_registers): New regsets_info parameter.
3267 Adjust to use it.
3268 (linux_register_in_regsets): New regs_info parameter. Adjust to
3269 use it.
3270 (register_addr, fetch_register, store_register): New usrregs_info
3271 parameter. Adjust to use it.
3272 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3273 parameter regs_info. Adjust to use it.
3274 (linux_fetch_registers): Get the current inferior's regs_info, and
3275 adjust to use it.
3276 (linux_store_registers): Ditto.
3277 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3278 (initialize_low): Don't initialize the target_regsets here. Call
3279 initialize_low_arch.
3280 * linux-low.h (target_regsets): Delete declaration.
3281 (struct regsets_info): New.
3282 (struct usrregs_info): New.
3283 (struct regs_info): New.
3284 (struct process_info_private) <new_inferior>: New field.
3285 (struct linux_target_ops): Delete the num_regs, regmap, and
3286 regset_bitmap fields. New field regs_info.
3287 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3288 * i387-fp.c (num_xmm_registers): Delete.
3289 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3290 calls to new interface.
3291 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3292 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3293 Infer the number of xmm registers from the regcache's target
3294 description.
3295 * i387-fp.h (num_xmm_registers): Delete.
3296 * inferiors.c (add_thread): Don't install the thread's regcache
3297 here.
3298 * proc-service.c (gregset_info): Fetch the current inferior's
3299 regs_info. Adjust to use it.
3300 * regcache.c: Include tdesc.h.
3301 (register_bytes, reg_defs, num_registers)
3302 (gdbserver_expedite_regs): Delete.
3303 (get_thread_regcache): If the thread doesn't have a regcache yet,
3304 create one, instead of aborting gdbserver.
3305 (regcache_invalidate_one): Rename to ...
3306 (regcache_invalidate_thread): ... this.
3307 (regcache_invalidate_one): New.
3308 (regcache_invalidate): Only invalidate registers of the current
3309 process.
3310 (init_register_cache): Add target_desc parameter, and use it.
3311 (new_register_cache): Ditto. Assert the target description has a
3312 non zero registers_size.
3313 (regcache_cpy): Add assertions. Adjust.
3314 (realloc_register_cache, set_register_cache): Delete.
3315 (registers_to_string, registers_from_string): Adjust.
3316 (find_register_by_name, find_regno, find_register_by_number)
3317 (register_cache_size): Add target_desc parameter, and use it.
3318 (free_register_cache_thread, free_register_cache_thread_one)
3319 (regcache_release, register_cache_size): New.
3320 (register_size): Add target_desc parameter, and use it.
3321 (register_data, supply_register, supply_register_zeroed)
3322 (supply_regblock, supply_register_by_name, collect_register)
3323 (collect_register_as_string, collect_register_by_name): Adjust.
3324 * regcache.h (struct target_desc): Forward declare.
3325 (struct regcache) <tdesc>: New field.
3326 (init_register_cache, new_register_cache): Add target_desc
3327 parameter.
3328 (regcache_invalidate_thread): Declare.
3329 (regcache_invalidate_one): Delete declaration.
3330 (regcache_release): Declare.
3331 (find_register_by_number, register_cache_size, register_size)
3332 (find_regno): Add target_desc parameter.
3333 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3334 declarations.
3335 * remote-utils.c: Include tdesc.h.
3336 (outreg, prepare_resume_reply): Adjust.
3337 * server.c: Include tdesc.h.
3338 (gdbserver_xmltarget): Delete declaration.
3339 (get_features_xml, process_serial_event): Adjust.
3340 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3341 declare.
3342 (struct process_info) <tdesc>: New field.
3343 (ipa_tdesc): Declare.
3344 * tdesc.c: New file.
3345 * tdesc.h: New file.
3346 * tracepoint.c: Include tdesc.h.
3347 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3348 (get_context_regcache): Adjust to pass ipa_tdesc down.
3349 (do_action_at_tracepoint): Adjust to get the register cache size
3350 from the context regcache's description.
3351 (traceframe_walk_blocks): Adjust to get the register cache size
3352 from the current trace frame's description.
3353 (traceframe_get_pc): Adjust to get current trace frame's
3354 description and pass it down.
3355 (gdb_collect): Adjust to get the register cache size from the
3356 IPA's description.
3357 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3358 (gdbserver_xmltarget): Delete.
3359 (initialize_low_tracepoint): Set the ipa's target description.
3360 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3361 (initialize_low_tracepoint): Set the ipa's target description.
3362 * linux-x86-low.c: Include tdesc.h.
3363 [__x86_64__] (is_64bit_tdesc): New.
3364 (ps_get_thread_area, x86_get_thread_area): Use it.
3365 (i386_cannot_store_register): Rename to ...
3366 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3367 (i386_cannot_fetch_register): Rename to ...
3368 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3369 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3370 to new interface.
3371 (target_regsets): Rename to ...
3372 (x86_regsets): ... this.
3373 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3374 interface.
3375 (x86_siginfo_fixup): Use is_64bit_tdesc.
3376 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3377 (tdesc_x32_avx_linux, tdesc_x32_linux)
3378 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3379 Declare.
3380 (x86_linux_update_xmltarget): Delete.
3381 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3382 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3383 (AMD64_LINUX_USER64_CS): New.
3384 (x86_linux_read_description): New, based on
3385 x86_linux_update_xmltarget.
3386 (same_process_callback): New.
3387 (x86_arch_setup_process_callback): New.
3388 (x86_linux_update_xmltarget): New.
3389 (x86_regsets_info): New.
3390 (amd64_linux_regs_info): New.
3391 (i386_linux_usrregs_info): New.
3392 (i386_linux_regs_info): New.
3393 (x86_linux_regs_info): New.
3394 (x86_arch_setup): Reimplement.
3395 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3396 (x86_emit_ops): Ditto.
3397 (the_low_target): Adjust. Install x86_linux_regs_info,
3398 x86_cannot_fetch_register, and x86_cannot_store_register.
3399 (initialize_low_arch): New.
3400 * linux-ia64-low.c (tdesc_ia64): Declare.
3401 (ia64_fetch_register): Adjust.
3402 (ia64_usrregs_info, regs_info): New globals.
3403 (ia64_regs_info): New function.
3404 (the_low_target): Adjust.
3405 (initialize_low_arch): New function.
3406 * linux-sparc-low.c (tdesc_sparc64): Declare.
3407 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3408 Adjust.
3409 (sparc_arch_setup): New function.
3410 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3411 (the_low_target): Adjust.
3412 (initialize_low_arch): New function.
3413 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3414 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3415 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3416 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3417 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3418 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3419 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3420 (tdesc_powerpc_isa205_vsx64l): Declare.
3421 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3422 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3423 (ppc_set_pc, ppc_get_hwcap): Adjust.
3424 (ppc_usrregs_info): Forward declare.
3425 (!__powerpc64__) ppc_regmap_adjusted: New global.
3426 (ppc_arch_setup): Adjust to the current process'es target
3427 description.
3428 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3429 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3430 (ppc_store_evrregset): Adjust.
3431 (target_regsets): Rename to ...
3432 (ppc_regsets): ... this, and make static.
3433 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3434 (ppc_regs_info): New function.
3435 (the_low_target): Adjust.
3436 (initialize_low_arch): New function.
3437 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3438 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3439 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3440 (tdesc_s390x_linux64v2): Declare.
3441 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3442 (s390_fill_gregset, s390_store_last_break): Adjust.
3443 (target_regsets): Rename to ...
3444 (s390_regsets): ... this, and make static.
3445 (s390_get_pc, s390_set_pc): Adjust.
3446 (s390_get_hwcap): New target_desc parameter, and use it.
3447 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3448 (s390_arch_setup): Adjust to set the current process'es target
3449 description. Don't adjust the regmap.
3450 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3451 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3452 (regs_info_3264): New globals.
3453 (s390_regs_info): New function.
3454 (the_low_target): Adjust.
3455 (initialize_low_arch): New function.
3456 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3457 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3458 [__mips64] (init_registers_mips_linux)
3459 (init_registers_mips_dsp_linux): Delete defines.
3460 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3461 (have_dsp): New global.
3462 (mips_read_description): New, based on mips_arch_setup.
3463 (mips_arch_setup): Reimplement.
3464 (get_usrregs_info): New function.
3465 (mips_cannot_fetch_register, mips_cannot_store_register)
3466 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3467 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3468 (target_regsets): Rename to ...
3469 (mips_regsets): ... this, and make static.
3470 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3471 (dsp_regs_info, regs_info): New globals.
3472 (mips_regs_info): New function.
3473 (the_low_target): Adjust.
3474 (initialize_low_arch): New function.
3475 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3476 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3477 Declare.
3478 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3479 (arm_read_description): New, with bits factored from
3480 arm_arch_setup.
3481 (arm_arch_setup): Reimplement.
3482 (target_regsets): Rename to ...
3483 (arm_regsets): ... this, and make static.
3484 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3485 (arm_regs_info): New function.
3486 (the_low_target): Adjust.
3487 (initialize_low_arch): New function.
3488 * linux-m68k-low.c (tdesc_m68k): Declare.
3489 (target_regsets): Rename to ...
3490 (m68k_regsets): ... this, and make static.
3491 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3492 (m68k_regs_info): New function.
3493 (m68k_arch_setup): New function.
3494 (the_low_target): Adjust.
3495 (initialize_low_arch): New function.
3496 * linux-sh-low.c (tdesc_sharch): Declare.
3497 (target_regsets): Rename to ...
3498 (sh_regsets): ... this, and make static.
3499 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3500 (sh_regs_info, sh_arch_setup): New functions.
3501 (the_low_target): Adjust.
3502 (initialize_low_arch): New function.
3503 * linux-bfin-low.c (tdesc_bfin): Declare.
3504 (bfin_arch_setup): New function.
3505 (bfin_usrregs_info, regs_info): New globals.
3506 (bfin_regs_info): New function.
3507 (the_low_target): Adjust.
3508 (initialize_low_arch): New function.
3509 * linux-cris-low.c (tdesc_cris): Declare.
3510 (cris_arch_setup): New function.
3511 (cris_usrregs_info, regs_info): New globals.
3512 (cris_regs_info): New function.
3513 (the_low_target): Adjust.
3514 (initialize_low_arch): New function.
3515 * linux-cris-low.c (tdesc_crisv32): Declare.
3516 (cris_arch_setup): New function.
3517 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3518 (cris_regs_info): New function.
3519 (the_low_target): Adjust.
3520 (initialize_low_arch): New function.
3521 * linux-m32r-low.c (tdesc_m32r): Declare.
3522 (m32r_arch_setup): New function.
3523 (m32r_usrregs_info, regs_info): New globals.
3524 (m32r_regs_info): Adjust.
3525 (initialize_low_arch): New function.
3526 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3527 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3528 (tic6x_usrregs_info): Forward declare.
3529 (tic6x_read_description): New function, based on ...
3530 (tic6x_arch_setup): ... this. Reimplement.
3531 (target_regsets): Rename to ...
3532 (tic6x_regsets): ... this, and make static.
3533 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3534 (tic6x_regs_info): New function.
3535 (the_low_target): Adjust.
3536 (initialize_low_arch): New function.
3537 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3538 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3539 (target_regsets): Rename to ...
3540 (xtensa_regsets): ... this, and make static.
3541 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3542 globals.
3543 (xtensa_arch_setup, xtensa_regs_info): New functions.
3544 (the_low_target): Adjust.
3545 (initialize_low_arch): New function.
3546 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3547 (nios2_arch_setup): Set the current process'es tdesc.
3548 (target_regsets): Rename to ...
3549 (nios2_regsets): ... this.
3550 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3551 (nios2_regs_info): New function.
3552 (the_low_target): Adjust.
3553 (initialize_low_arch): New function.
a261b8f5
PA
3554 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3555 (aarch64_arch_setup): Set the current process'es tdesc.
3556 (target_regsets): Rename to ...
3557 (aarch64_regsets): ... this.
3558 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3559 (aarch64_regs_info): New function.
3560 (the_low_target): Adjust.
3561 (initialize_low_arch): New function.
3aee8918
PA
3562 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3563 globals.
3564 (target_regsets): Rename to ...
3565 (tile_regsets): ... this.
3566 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3567 (tile_regs_info): New function.
3568 (tile_arch_setup): Set the current process'es tdesc.
3569 (the_low_target): Adjust.
3570 (initialize_low_arch): New function.
3571 * spu-low.c (tdesc_spu): Declare.
3572 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3573 * win32-arm-low.c (tdesc_arm): Declare.
3574 (arm_arch_setup): New function.
3575 (the_low_target): Install arm_arch_setup instead of
3576 init_registers_arm.
3577 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3578 (init_windows_x86): Rename to ...
3579 (i386_arch_setup): ... this. Set `win32_tdesc'.
3580 (the_low_target): Adjust.
3581 * win32-low.c (win32_tdesc): New global.
3582 (child_add_thread): Don't create the thread cache here.
3583 (do_initial_child_stuff): Set the new process'es tdesc.
3584 * win32-low.h (struct target_desc): Forward declare.
3585 (win32_tdesc): Declare.
3586 * lynx-i386-low.c (tdesc_i386): Declare global.
3587 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3588 * lynx-low.c (lynx_tdesc): New global.
3589 (lynx_add_process): Set the new process'es tdesc.
3590 * lynx-low.h (struct target_desc): Forward declare.
3591 (lynx_tdesc): Declare global.
3592 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3593 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3594 * nto-low.c (nto_tdesc): New global.
3595 (do_attach): Set the new process'es tdesc.
3596 * nto-low.h (struct target_desc): Forward declare.
3597 (nto_tdesc): Declare.
3598 * nto-x86-low.c (tdesc_i386): Declare.
3599 (nto_x86_arch_setup): Set `nto_tdesc'.
3600
b1fbec62
GB
36012013-06-04 Gary Benson <gbenson@redhat.com>
3602
3603 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3604 to qSupported response when appropriate.
3605 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3606 with nonzero-length annex.
3607 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3608 arguments supplied in annex.
3609
d1ec4ce7
DE
36102013-05-31 Doug Evans <dje@google.com>
3611
ac44adcb 3612 PR server/15594
d1ec4ce7
DE
3613 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3614 64 bits in 64-cross-32 environment.
3615
9b25f2d3
PA
36162013-05-28 Pedro Alves <palves@redhat.com>
3617
3618 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3619 (aarch64-without-fpu.c): Delete rule.
3620 * configure.srv (aarch64*-*-linux*): Remove references to
3621 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3622 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3623 declaration.
3624
6740dc9c
PA
36252013-05-24 Pedro Alves <palves@redhat.com>
3626
3627 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3628 instead of strchr/decode_address. Error if the range isn't split
3629 with a ','. Don't assume there's be a ':' in the action.
3630
c2d6af84
PA
36312013-05-23 Yao Qi <yao@codesourcery.com>
3632 Pedro Alves <palves@redhat.com>
3633
3634 * linux-low.c (lwp_in_step_range): New function.
3635 (linux_wait_1): If the thread was range stepping and stopped
3636 outside the stepping range, report the stop to GDB. Otherwise,
3637 continue stepping. Add range stepping debug output.
3638 (linux_set_resume_request): Copy the step range from the resume
3639 request to the lwp.
3640 (linux_supports_range_stepping): New.
3641 (linux_target_ops) <supports_range_stepping>: Set to
3642 linux_supports_range_stepping.
3643 * linux-low.h (struct linux_target_ops)
3644 <supports_range_stepping>: New field.
3645 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3646 * linux-x86-low.c (x86_supports_range_stepping): New.
3647 (the_low_target) <supports_range_stepping>: Set to
3648 x86_supports_range_stepping.
3649 * server.c (handle_v_cont): Handle 'r' action.
3650 (handle_v_requests): Append ";r" if the target supports range
3651 stepping.
3652 * target.h (struct thread_resume) <step_range_start,
3653 step_range_end>: New fields.
3654 (struct target_ops) <supports_range_stepping>:
3655 New field.
3656 (target_supports_range_stepping): New macro.
3657
58794e1a
JB
36582013-05-17 Joel Brobecker <brobecker@adacore.com>
3659
3660 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3661 confusion in comment.
3662
d631c5a7
JB
36632013-05-17 Joel Brobecker <brobecker@adacore.com>
3664
3665 * lynx-low.c (struct process_info_private): New type.
3666 (lynx_add_process): New function.
3667 (lynx_create_inferior, lynx_attach): Replace calls to
3668 add_process by calls to lynx_add_process.
3669 (lynx_resume): If PTID is null, then try using
3670 current_process()->private->last_wait_event_ptid.
3671 Add comments.
3672 (lynx_clear_inferiors): Delete. The contents of that function
3673 has been inlined in lynx_mourn;
3674 (lynx_wait_1): Save the ptid in the process's private data.
3675 (lynx_mourn): Free the process' private data. Replace call
3676 to lynx_clear_inferiors by call to clear_inferiors.
3677
96f7a20f
YQ
36782013-05-17 Yao Qi <yao@codesourcery.com>
3679
3680 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3681 the right place.
3682
db0dfaa0
LM
36832013-05-16 Luis Machado <lgustavo@codesourcery.com>
3684
3685 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3686 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3687 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3688 PT_TEXT_END_ADDR guards. Update comments.
3689 (linux_target_op) <read_offsets>: Conditionally define to
3690 linux_read_offsets if the target is UCLIBC and if it defines
3691 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3692
68f5f838
SL
36932013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3694 Andrew Jenner <andrew@codesourcery.com>
3695
3696 * Makefile.in (SFILES): Add linux-nios2-low.c.
3697 (clean): Add action to delete nios2-linux.c.
3698 (nios2-linux.c): New rule.
3699 * configure.srv: Add nios2*-*-linux*.
3700 * linux-nios2-low.c: New.
3701
1ebff1fd
HAQ
37022013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3703
3704 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3705
f6150862
HZ
37062013-04-25 Hui Zhu <hui@codesourcery.com>
3707
3708 PR gdb/15186
f6150862
HZ
3709 * ax.c (ax_printf): Add fflush.
3710
614c279d
TT
37112013-04-22 Tom Tromey <tromey@redhat.com>
3712
3713 * Makefile.in (SFILES): Add filestuff.c.
3714 (OBS): Add filestuff.o.
3715 (filestuff.o): New target.
3716 * config.in, configure: Rebuild.
3717 * configure.ac: Check for fdwalk, pipe2.
3718
7d4e5717
PA
37192013-04-17 Pedro Alves <palves@redhat.com>
3720
3721 * configure.ac (USE_THREAD_DB): Delete variable.
3722 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3723 Don't AC_SUBST USE_THREAD_DB.
3724 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3725 * config.in, configure: Regenerate.
3726
d5c93e41
PA
37272013-04-16 Pedro Alves <palves@redhat.com>
3728
3729 * linux-low.h (struct lwp_info) <thread_known>: Move under
3730 the USE_THREAD_DB #ifdef.
3731
04f5fe89
PA
37322013-04-16 Pedro Alves <palves@redhat.com>
3733
3734 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3735 (linux-low.o): Delete rule.
3736 * linux-low.h: Always include "gdb_thread_db.h" instead of
3737 conditionally including thread_db.h.
3738 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3739 HAVE_THREAD_DB_H.
3740
480b27bf
JK
37412013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3742
3743 * Makefile.in (install-only): Fix make install regression.
3744
43662968
JK
37452013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3746
3747 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3748 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3749 installation.
3750 * gdbserver.1: Remove.
3751
3e74e146
PA
37522013-03-22 Pedro Alves <palves@redhat.com>
3753
3754 * linux-low.c (handle_extended_wait): Don't call
3755 linux_enable_event_reporting.
3756
a8347a2a
TT
37572013-03-15 Tony Theodore <tonyt@logyst.com>
3758
3759 PR build/9098:
3760 * Makefile.in (SHELL): Use @SHELL@.
3761
eeb56fa7
SDJ
37622013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3763
3764 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3765 compiler warning.
3766
4fa7e2ff
JB
37672013-03-13 Joel Brobecker <brobecker@adacore.com>
3768
3769 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3770 Remove extraneous NULL element.
3771
8ddb1965
YQ
37722013-03-13 Yao Qi <yao@codesourcery.com>
3773
3774 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3775 'V' block in trace frame.
3776
9accd112
MM
37772013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3778
3779 * target.h (struct target_ops): Add btrace ops.
3780 (target_supports_btrace): New macro.
3781 (target_enable_btrace): New macro.
3782 (target_disable_btrace): New macro.
3783 (target_read_btrace): New macro.
3784 * gdbthread.h (struct thread_info): Add btrace field.
3785 * server.c: Include btrace-common.h.
3786 (handle_btrace_general_set): New function.
3787 (handle_btrace_enable): New function.
3788 (handle_btrace_disable): New function.
3789 (handle_general_set): Call handle_btrace_general_set.
3790 (handle_qxfer_btrace): New function.
3791 (struct qxfer qxfer_packets[]): Add btrace entry.
3792 * inferiors.c (remove_thread): Disable btrace.
3793 * linux-low: Include linux-btrace.h.
3794 (linux_low_enable_btrace): New function.
3795 (linux_low_read_btrace): New function.
3796 (linux_target_ops): Add btrace ops.
3797 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3798 Add srv_linux_btrace=yes.
3799 (x86_64-*-linux*): Add linux-btrace.o.
3800 Add srv_linux_btrace=yes.
3801 * configure.ac: Define HAVE_LINUX_BTRACE.
3802 * config.in: Regenerated.
3803 * configure: Regenerated.
3804
5cc22e4c
MM
38052013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3806
3807 * server.c (handle_qxfer): Preserve error message if -3 is
3808 returned.
3809 (qxfer): Document the -3 return value.
3810
7c97f91e
MM
38112013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3812
3813 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3814 (linux_btrace_h): New variable.
3815 (linux-btrace.o): New rule.
3816
be9a119c 38172013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3818 Hafiz Abid Qadeer <abidh@codesourcery.com>
3819
3820 * tracepoint.c (trace_buffer_size): New global.
3821 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3822 (init_trace_buffer): Change to one-argument function. Allocate
3823 trace buffer memory.
3824 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3825 handle QTBuffer:size packet.
3826 (cmd_bigqtbuffer_size): New function.
3827 (initialize_tracepoint): Call init_trace_buffer with
3828 DEFAULT_TRACE_BUFFER_SIZE.
3829 * server.c (handle_query): Add QTBuffer:size in the
3830 supported packets.
3831
e64f7499
YQ
38322013-03-07 Yao Qi <yao@codesourcery.com>
3833
3834 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3835 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3836 of -1.
3837 (cmd_qtsp): Adjust condition. Do post increment.
3838 Set cur_action and cur_step_action back to 0.
3839
f0ae6fc3
PA
38402013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3841
3842 PR server/15236
3843 * linux-low.c (linux_write_memory): Return early success if LEN is
3844 zero.
3845
b5b0b0af
CV
38462013-03-05 Corinna Vinschen <vinschen@redhat.de>
3847
334ad4a8 3848 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3849
589bc927
TT
38502013-02-28 Tom Tromey <tromey@redhat.com>
3851
3852 * configure.ac: Invoke AC_SYS_LARGEFILE.
3853 * configure, config.in: Rebuild.
3854
dfe07582
CV
38552013-02-28 Corinna Vinschen <vinschen@redhat.com>
3856
3857 * win32-low.c: Throughout, fix format strings and casts of
3858 printf-like functions to avoid type related warnings on all
3859 platforms.
3860 (get_child_debug_event): Print dwDebugEventCode as hex since
3861 that's how it's usually documented.
3862
736cd585
YQ
38632013-02-28 Yao Qi <yao@codesourcery.com>
3864
3865 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3866 pulongest.
3867
e1f58301
JW
38682013-02-27 Jiong Wang <jiwang@tilera.com>
3869
3870 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3871 (reg-tilegx32.c): New rule.
3872 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3873 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3874 different register info initializer according to elf class.
3875 (init_registers_tilgx32): New function. The tilegx32 register info
3876 initializer.
3877 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3878 (tile_store_gregset): Likewise.
3879
d171ca78
YQ
38802013-02-27 Yao Qi <yao@codesourcery.com>
3881
3882 * server.c (process_point_options): Print debug message when
3883 debug_threads is true.
3884
282bbdf3
YQ
38852013-02-26 Yao Qi <yao@codesourcery.com>
3886
3887 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3888
aca22551
PA
38892013-02-19 Pedro Alves <palves@redhat.com>
3890 Kai Tietz <ktietz@redhat.com>
3891
3892 PR gdb/15161
3893
3894 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3895 instead of strtoul to extract address from packet.
3896 (process_serial_event) <'z'>: Likewise.
3897
4f3cee1c
YQ
38982013-02-18 Yao Qi <yao@codesourcery.com>
3899
3900 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3901
8e1d55a3
PA
39022013-02-14 Pedro Alves <palves@redhat.com>
3903
3904 Plug memory leak.
3905
3906 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3907 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3908
458820da
PA
39092013-02-14 Pedro Alves <palves@redhat.com>
3910
3911 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3912
baea0dae
PA
39132013-02-14 Pedro Alves <palves@redhat.com>
3914
3915 * tracepoint.c (save_string): Delete.
3916 (add_tracepoint_action): Use savestring instead of save_string.
3917
0b1afbb3
PA
39182013-02-12 Pedro Alves <palves@redhat.com>
3919
3920 * linux-xtensa-low.c: Ditto.
3921 * xtensa-xtregs.c: Ditto.
3922
8a4ac37e
PA
39232013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3924
3925 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3926 thread_db.
3927
148de6bb
MS
39282013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3929
3930 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3931 aarch64_num_wp_regs and aarch64_num_bp_regs to
3932 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3933
55fac6e0
MS
39342013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3935
3936 * linux-aarch64-low.c (ps_get_thread_area): Replace
3937 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3938
176eb98c
MS
39392013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3940 Marcus Shawcroft <marcus.shawcroft@arm.com>
3941 Nigel Stephens <nigel.stephens@arm.com>
3942 Yufeng Zhang <yufeng.zhang@arm.com>
3943
3944 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3945 (aarch64.c, aarch64-without-fpu.c): New targets.
3946 * configure.srv (aarch64*-*-linux*): New.
3947 * linux-aarch64-low.c: New file.
3948
56f7af9c
MS
39492013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3950
43aaf8b6 3951 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3952 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3953 (dequeue_one_deferred_signal, linux_resume_one_thread)
3954 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3955 (linux_tracefork_grandchild, linux_test_for_tracefork)
3956 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3957 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3958 where the argument is 0.
3959
60f662b0
YQ
39602013-01-25 Yao Qi <yao@codesourcery.com>
3961
3962 * event-loop.c: Include "queue.h".
3963 (gdb_event_p): New typedef.
3964 (struct gdb_event) <next_event>: Remove.
3965 (event_queue): Change to QUEUE(gdb_event_p).
3966 (async_queue_event): Remove.
3967 (gdb_event_xfree): New.
3968 (initialize_event_loop): New.
3969 (process_event): Use API from QUEUE.
3970 (wait_for_event): Likewise.
3971 * server.c (main): Call initialize_event_loop.
3972 * server.h (initialize_event_loop): Declare.
3973
5ae4861a
YQ
39742013-01-18 Yao Qi <yao@codesourcery.com>
3975
3976 * ax.h (struct eval_agent_expr_context): New.
3977 (gdb_eval_agent_expr): Update declaration.
3978 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3979 TFRAME. Add new argument CTX.
3980 * server.h (struct eval_agent_expr_context): Declare.
3981 (agent_mem_read, agent_tsv_read): Update declaration.
3982 (agent_mem_read_string): Likewise.
3983 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3984 (add_traceframe_block): Add new argument TPOINT.
3985 Increase TPOINT->traceframe_usage.
3986 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3987 eval_tracepoint_agent_expr.
3988 (condition_true_at_tracepoint): Likewise.
3989 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3990 (agent_mem_read_string, agent_tsv_read): Likewise.
3991
85e00e85
YQ
39922013-01-16 Yao Qi <yao@codesourcery.com>
3993
3994 * linux-low.c (linux_resume_one_lwp): Don't check
3995 'lwp->bp_reinsert != 0'.
3996
4039cf45
JB
39972013-01-07 Joel Brobecker <brobecker@adacore.com>
3998 Pedro Alves <palves@redhat.com>
3999
4000 * lynx-low.c (ptrace_request_to_str): Define a temporary
4001 macro and use it to simplify this function's implementation.
4002
9044dee2
JB
40032013-01-07 Joel Brobecker <brobecker@adacore.com>
4004
4005 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4006 sets errno.
4007
e6352c8f
JB
40082013-01-07 Joel Brobecker <brobecker@adacore.com>
4009
4010 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4011
50681a27
JB
40122013-01-07 Joel Brobecker <brobecker@adacore.com>
4013
4014 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4015
3f6e77ef
JB
40162013-01-07 Joel Brobecker <brobecker@adacore.com>
4017
4018 * lynx-low.c (lynx_resume): Use the resume_info parameter
4019 to determine the ptid for the lynx_ptrace call, unless
4020 it is equal to minus_one_ptid, in which case we use the
4021 ptid of the current_inferior.
4022 (lynx_wait_1): After having received a thread create/exit
4023 event, resume the inferior's execution using the signaling
4024 thread's ptid, rather than the old ptid.
4025
7fda33ae
JB
40262013-01-07 Joel Brobecker <brobecker@adacore.com>
4027
4028 * lynx-low.c (lynx_resume): Delete variable ret.
4029
b9786c74
JB
40302013-01-01 Joel Brobecker <brobecker@adacore.com>
4031
4032 * gdbreplay.c (gdbreplay_version): Update copyright year.
4033 * server.c (gdbserver_version): Likewise.
4034
8b93d60f
JB
40352012-12-17 Joel Brobecker <brobecker@adacore.com>
4036
4037 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4038 new thread.
4039
037335a7
JB
40402012-12-17 Joel Brobecker <brobecker@adacore.com>
4041
4042 * lynx-low.c (ptrace_request_to_str): Add handling for
4043 PTRACE_GETTRACESIG.
4044
52d4cbd8
JB
40452012-12-17 Joel Brobecker <brobecker@adacore.com>
4046
4047 * lynx-low.c (lynx_attach): Delete variable new_process.
4048
ab8f6ca9
JB
40492012-12-17 Joel Brobecker <brobecker@adacore.com>
4050
4051 * lynx-low.c (lynx_create_inferior): Delete variable
4052 new_process.
4053
78cbc024
JB
40542012-12-17 Joel Brobecker <brobecker@adacore.com>
4055
4056 * lynx-low.c (ptrace_request_to_str): Do not handle
4057 PTRACE_GETTHREADLIST if this macro does not exist.
4058
14a00470
YQ
40592012-12-15 Yao Qi <yao@codesourcery.com>
4060
4061 * Makefile.in (OBS): Add notif.o.
4062 * notif.c, notif.h: New.
4063 * server.c: Include "notif.h".
4064 (struct vstop_notif) <next>: Remove.
4065 <base>: New field.
4066 (queue_stop_reply): Update.
4067 (push_event, send_next_stop_reply): Remove.
4068 (discard_queued_stop_replies): Update.
4069 (notif_stop): New variable.
4070 (handle_v_stopped): Remove.
4071 (handle_v_requests): Don't call handle_v_stopped. Call
4072 handle_ack_notif instead.
4073 (queue_stop_reply_callback): Call notif_event_enque instead
4074 of queue_stop_reply.
4075 (handle_status): Don't call send_next_stop_reply, call
4076 notif_write_event instead.
4077 (kill_inferior_callback): Likewise.
4078 (detach_or_kill_inferior_callback): Likewise.
4079 (main): Call initialize_notif.
4080 (process_serial_event): Call QUEUE_is_empty.
4081 (handle_target_event): Call notif_push instead of push event.
4082 * server.h (push_event): Remove declaration.
4083
61c125b9
TT
40842012-12-10 Tom Tromey <tromey@redhat.com>
4085
4086 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4087 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4088 macros.
4089 (.c.o): Rewrite.
4090 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4091 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4092 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4093 (amd64-linux-ipa.o, ax.o): Rewrite.
4094 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4095 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4096 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4097 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4098 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4099 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4100 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4101 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4102 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4103 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4104 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4105 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4106 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4107 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4108 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4109 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4110 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4111 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4112 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4113 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4114 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4115 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4116 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4117 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4118 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4119 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4120 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4121 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4122 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4123 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4124 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4125 (reg-tilegx.o): Remove.
4126 (all_object_files): New macro.
4127 Include .deps files.
4128 * aclocal.m4, configure: Rebuild.
4129 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4130 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4131 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4132
e90e9ad9
TT
41332012-12-05 Tom Tromey <tromey@redhat.com>
4134
4135 PR gdb/14917:
4136 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4137
02d403bf 41382012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
4139
4140 * configure.ac: Check for linux/perf_event.h.
4141 * config.in: Regenerated.
4142 * configure: Regenerated.
4143
0270a750
PA
41442012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4145
4146 * hostio.c (handle_readlink): Decrease buffer size
4147 parameter passed to readlink by one byte.
4148
8c29b58e
YQ
41492012-11-26 Yao Qi <yao@codesourcery.com>
4150
4151 * configure.ac (build_warnings): Append '-Wempty-body'.
4152 * configure: Regenerated.
4153 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4154 body.
4155
8bdce1ff
PM
41562012-11-15 Pierre Muller <muller@sourceware.org>
4157
4158 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4159 * config.in: Regenerate.
4160 * configure: Regenerate.
4161 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4162 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4163 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4164 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4165 header.
4166 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4167 instead of <sys/wait.h> header.
4168 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4169
02d403bf 41702012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
4171
4172 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4173 (various make rules): Remove -DGDBSERVER
4174
fbd5db48
YQ
41752012-11-09 Yao Qi <yao@codesourcery.com>
4176
4177 * spu-low.c (current_ptid): Move it to ..
4178 * gdbthread.h: ... here. New.
4179 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4180 * server.c (myresume, process_serial_event): Likewise.
4181 * thread-db.c (thread_db_find_new_threads): Likewise.
4182 * tracepoint.c (run_inferior_command): Likewise.
4183
b3dc46ff
AB
41842012-10-01 Andrew Burgess <aburgess@broadcom.com>
4185
4186 * server.c (handle_search_memory_1): Include access length in
4187 warning message.
4188
07c04788
HPN
41892012-09-05 Michael Brandt <michael.brandt@axis.com>
4190
4191 * linux-crisv32-low.c: Fix compile errors.
4192
918d227b
YQ
41932012-09-04 Yao Qi <yao@codesourcery.com>
4194
4195 * tracepoint.c (cmd_qtsv): Adjust debug message.
4196 Don't check CUR_TPOINT.
4197
18c1b81a
YQ
41982012-08-28 Yao Qi <yao@codesourcery.com>
4199
4200 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4201 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4202 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4203 Remove declarations of xmalloc, xreallloc, xstrdup and
4204 freeargv.
4205 * Makefile.in (libiberty_h): New.
4206 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4207 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4208
dc82f37b
YQ
42092012-08-23 Yao Qi <yao@codesourcery.com>
4210
4211 * server.h: Remove declaration of 'xsnprintf'.
4212
406b1477
KS
42132012-08-22 Keith Seitz <keiths@redhat.com>
4214
4215 * server.h: Include build-gnulib-gbserver/config.h.
4216 * gdbreplay.c: Likewise.
4217
e6712ff1
DE
42182012-08-08 Doug Evans <dje@google.com>
4219
4220 * Makefile.in (SFILES): Add gdb_vecs.c.
4221 (OBS): Add gdb_vecs.o.
4222 (gdb_vecs_h, host_defs_h): New variables.
4223 (thread-db.o): Add $(gdb_vecs_h) dependency.
4224 (gdb_vecs.o): New rule.
4225 * thread-db.c: #include "gdb_vecs.h".
4226 (thread_db_load_search): Use a vector to iterate over path elements.
4227 Handle text appearing after "$pdir".
4228
4229 * configure.ac: Add check for strstr.
4230 * config.in: Regenerate.
4231 * configure: Regenerate.
4232
7c3270ae
UW
42332012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4234
4235 * hostio.c (handle_pread): If pread fails, fall back to attempting
4236 lseek/read.
4237 (handle_pwrite): Likewise for pwrite.
4238
b62e2b27
UW
42392012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4240
4241 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4242 between unsupported TYPE and unimplementable ADDR/LEN combination.
4243 (arm_insert_point): Act on new return value.
4244
78a99e91
PA
42452012-07-31 Pedro Alves <palves@redhat.com>
4246
4247 * server.c (process_point_options): Only skip tokens if we find
4248 one that is unrecognized. Don't treat 'X' specially while
4249 skipping unrecognized tokens.
4250
fcf303ab
UW
42512012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4252
4253 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4254 to 4-byte-align HW breakpoint addresses for Thumb.
4255
7255706c
YQ
42562012-07-27 Yao Qi <yao@codesourcery.com>
4257
4258 PR remote/14161.
4259
4260 * server.h: Declare gdb_agent_about_to_close.
4261 * target.c (kill_inferior): Include "agent.h".
4262 New. Send command 'kill'.
4263 * target.h (kill_inferior): Removed macro.
4264 * tracepoint.c (gdb_agent_about_to_close): New.
4265 (gdb_agent_helper_thread): Handle command 'close'.
4266 Wait endlessly until the inferior stops.
4267 Install gdb_agent_remove_socket to atexit hook.
4268 (agent_socket_name): New static variable.
4269 (gdb_agent_socket_init): Replace local variable 'name' with
4270 'agent_socket_name'.
4271 (gdb_agent_remove_socket): New.
4272
5a3f286f
YQ
42732012-07-27 Yao Qi <yao@codesourcery.com>
4274
4275 * server.c (process_point_options): Stop at 'X' when parsing.
4276
961bd387
ME
42772012-07-19 Michael Eager <eager@eagercon.com>
4278
a261b8f5 4279 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
4280 to hw_execute.
4281 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4282 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4283 hardware breakpoint.
4284
aa7c7447
JK
42852012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4286
4287 * gdbserver/linux-low.c (initialize_low): Call
4288 linux_ptrace_init_warnings.
4289
7f216e7c
DE
42902012-07-02 Doug Evans <dje@google.com>
4291
4292 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4293 pointer to int.
4294
d3ce09f5
SS
42952012-07-02 Stan Shebs <stan@codesourcery.com>
4296
4297 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4298 (ax.o): Add it to build rule.
4299 (ax-ipa.o): Ditto.
4300 (OBS): Add format.o.
4301 (IPA_OBS): Add format.o.
4302 * server.c (handle_query): Claim support for breakpoint commands.
4303 (process_point_options): Add command case.
4304 (process_serial_event): Leave running if there are printfs in
4305 effect.
4306 * mem-break.h (any_persistent_commands): Declare.
4307 (add_breakpoint_commands): Declare.
4308 (gdb_no_commands_at_breakpoint): Declare.
4309 (run_breakpoint_commands): Declare.
4310 * mem-break.c (struct point_command_list): New struct.
4311 (struct breakpoint): New field command_list.
4312 (any_persistent_commands): New function.
4313 (add_commands_to_breakpoint): New function.
4314 (add_breakpoint_commands): New function.
4315 (gdb_no_commands_at_breakpoint): New function.
4316 (run_breakpoint_commands): New function.
4317 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4318 locally.
4319 * ax.c: Include format.h.
4320 (ax_printf): New function.
4321 (gdb_eval_agent_expr): Add printf opcode.
4322
2f8f6aed
YQ
43232012-06-13 Yao Qi <yao@codesourcery.com>
4324
4325 * server.c (start_inferior): Remove duplicated writes to fields
4326 'last_resume_kind' and 'last_status' of 'current_inferior'.
4327
0c9070b3
YQ
43282012-06-12 Yao Qi <yao@codesourcery.com>
4329 Pedro Alves <palves@redhat.com>
4330
4331 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4332 comment.
4333 * server.c (handle_v_cont): Extend comment.
4334
c52daf70
YQ
43352012-06-11 Yao Qi <yao@codesourcery.com>
4336
4337 * linux-low.c (linux_attach): Add 'static'.
4338
d38bbb0a
YQ
43392012-06-06 Yao Qi <yao@codesourcery.com>
4340
4341 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4342
89dc0afd
JK
43432012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4344
4345 Fix gcc -flto compilation warning.
4346 * server.c (main): Make variable multi_mode and attach volatile.
4347
75f62ce7
TJB
43482012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4349
4350 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4351 if the platform doesn't know about it.
4352
65f479b6
PA
43532012-05-30 Jeff Kenton <jkenton@tilera.com>
4354
4355 * Makefile.in (SFILES): Add linux-tile-low.c.
4356 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4357 * configure.srv: Handle tilegx-*-linux*.
4358 * linux-tile-low.c: New file.
4359
0c5bf5a9
JK
43602012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4361
4362 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4363
a493e3e2
PA
43642012-05-24 Pedro Alves <palves@redhat.com>
4365
4366 PR gdb/7205
4367
43aaf8b6 4368 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4369
2ea28649
PA
43702012-05-24 Pedro Alves <palves@redhat.com>
4371
4372 PR gdb/7205
4373
4374 Replace target_signal with gdb_signal throughout.
4375
8d409d16
MR
43762012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4377
4378 * linux-low.c (linux_store_registers): Avoid the copying sequence
4379 when no data has been retrieved by ptrace.
4380
23512c01
MGD
43812012-05-22 Will Deacon <will.deacon@arm.com>
4382
4383 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4384 Include asm/ptrace.h.
4385 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4386 already defined.
4387
4934b29e
MR
43882012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4389
4390 * linux-low.c (linux_store_registers): Don't re-retrieve data
4391 with ptrace that has already been obtained from /proc. Always
4392 copy any data retrieved with ptrace to the buffer supplied.
4393
bde24c0a
PA
43942012-05-11 Yao Qi <yao@codesourcery.com>
4395 Pedro Alves <palves@redhat.com>
4396
4397 * linux-low.c (enum stopping_threads_kind): New.
4398 (stopping_threads): Change type to `enum stopping_threads_kind'.
4399 (handle_extended_wait): If stopping and suspending threads, leave
4400 the new_lwp suspended too.
4401 (linux_wait_for_event): Adjust.
4402 (stop_all_lwps): Set `stopping_threads' to
4403 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4404 whether we're suspending threads or just stopping them. Assert no
4405 recursion happens.
4406
623b6bdf
YQ
44072012-04-29 Yao Qi <yao@codesourcery.com>
4408
4409 * server.h: Move some code to ...
4410 * gdbthread.h: ... here. New.
4411 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4412 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4413 (nto-low.o, win32-low.o): Likewise.
4414 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4415 * regcache.c, remote-utils.c, server.c: Likewise.
4416 * target.c, tracepoint.c, win32-low.c: Likewise.
4417
f15f9948
TJB
44182012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4419
4420 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4421 (PTRACE_ARG4_TYPE): Likewise.
4422 (PTRACE_XFER_TYPE): Likewise.
4423 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4424 ptrace to PTRACE_ARG3_TYPE.
4425 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4426 (PTRACE_ARG4_TYPE): Likewise.
4427 (PTRACE_XFER_TYPE): Likewise.
4428 (linux_detach_one_lwp): Cast fourth argument of
4429 ptrace to long then PTRACE_ARG4_TYPE.
4430 (regsets_fetch_inferior_registers): Cast third argument of
4431 ptrace to long then PTRACE_ARG3_TYPE.
4432 (regsets_store_inferior_registers): Likewise.
4433
38ea300a
PA
44342012-04-20 Pedro Alves <palves@redhat.com>
4435
4436 * configure: Regenerate.
4437
c971b7fa
PA
44382012-04-19 Pedro Alves <palves@redhat.com>
4439
43aaf8b6 4440 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4441 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4442 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4443 (all, install-only, uninstall, clean-info, all-lib, clean): No
4444 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4445 (maintainer-clean realclean distclean): Use subdir_do.
4446 (subdir_do): New.
4447 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4448 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4449 * acinclude.m4: Include acx_configure_dir.m4.
4450 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4451 calls. Call AC_PROG_RANLIB. Configure gnulib using
4452 ACX_CONFIGURE_DIR.
4453 (GNULIB): New.
4454 (GNULIB_STDINT_H): Adjust.
4455 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4456 * gdbreplay.c: Include build-gnulib/config.h.
4457 * server.h: Likewise.
4458 * aclocal.m4: Regenerate.
4459 * config.in: Regenerate.
4460 * configure: Regenerate.
c971b7fa 4461
809277f8
PA
44622012-04-19 Pedro Alves <palves@redhat.com>
4463
4464 * Makefile.in (LIBGNU, INCGNU): Adjust.
4465 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4466 (all, install-only, uninstall, clean-info, all-lib, clean)
4467 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4468 * configure.ac: Adjust AC_OUTPUT output.
4469 * aclocal.m4: Regenerate.
4470 * configure: Regenerate.
4471
fd9bb8b8
PA
44722012-04-19 Pedro Alves <palves@redhat.com>
4473
4474 * Makefile.in (generated_files): New.
4475 (server_h): Remove the explicit dependency on config.h, and depend
4476 on $generated_files.
4477
1c298c66
PA
44782012-04-19 Pedro Alves <palves@redhat.com>
4479
4480 * Makefile.in (INCGNU): Add -Ignulib.
4481
57c4b50b
PA
44822012-04-19 Pedro Alves <palves@redhat.com>
4483
4484 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4485 (INCGNU): ... this, and spell out -I here.
4486 (GNULIB_LIB): Rename to ...
4487 (LIBGNU): ... this.
4488 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4489
1030e047
PA
44902012-04-19 Pedro Alves <palves@redhat.com>
4491
4492 * config.in: Regenerate.
4493
447d4319
PA
44942012-04-19 Pedro Alves <palves@redhat.com>
4495
4496 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4497 * server.h (memmem): Remove declaration.
4498 * config.in: Regenerate.
4499 * configure: Regenerate.
4500
aad9eab9
YQ
45012012-04-19 Yao Qi <yao@codesourcery.com>
4502
4503 * Makefile.in (SFILES): Add common/vec.c.
4504 (OBS): Add vec.o.
4505 (vec.o): New rule.
4506
3e10640f
YQ
45072012-04-19 Yao Qi <yao@codesourcery.com>
4508
4509 * remote-utils.c (prepare_resume_reply): Replace with macro
4510 target_core_of_thread.
4511 * server.c (handle_qxfer_threads_proper): Likewise.
4512 * target.h (traget_core_of_thread): New macro.
4513
71622373
PA
45142012-04-18 Pedro Alves <palves@redhat.com>
4515
4516 * aclocal.m4: Regenerate.
4517 * configure: Regenerate.
4518
80d26939
YQ
45192012-04-16 Yao Qi <yao@codesourcery.com>
4520
4521 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4522 duplicated on address.
4523
42476b70
YQ
45242012-04-16 Yao Qi <yao@codesourcery.com>
4525
4526 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4527 (struct tracepoint_action_ops) <send>: New field.
4528 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4529 (agent_expr_send, x_tracepoint_action_send): New.
4530 (l_tracepoint_action_send): New.
4531 (cmd_qtdp): Download and install tracepoint
4532 according to `use_agent'.
4533 (run_inferior_command): Add one more parameter `len'.
4534 Update callers.
4535 (tracepoint_send_agent): New.
4536 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4537
7bc83639
YQ
45382012-04-16 Yao Qi <yao@codesourcery.com>
4539
4540 * tracepoint.c (download_tracepoints): Moved to ...
4541 (cmd_qtstart): ... here.
4542
5f18041e
YQ
45432012-04-14 Yao Qi <yao@codesourcery.com>
4544
4545 * tracepoint.c: Include inttypes.h.
4546 (struct collect_memory_action): Use sized types.
4547 (struct tracepoint): Likewise.
4548 (cmd_qtdp, stop_tracing): Update print specifiers.
4549 (cmd_qtp, response_tracepoint): Likewise.
4550 (collect_data_at_tracepoint): Likewise.
4551 (collect_data_at_step): Likewise.
4552
55a8c076
YQ
45532012-04-14 Yao Qi <yao@codesourcery.com>
4554
4555 Import gnulib module inttypes.
4556 * aclocal.m4, config.in, configure: Regenerated.
4557
dc750257
YQ
45582012-04-14 Yao Qi <yao@codesourcery.com>
4559
4560 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4561 Makefile and config.status at last.
4562
0ab5faf9
YQ
45632012-04-13 Yao Qi <yao@codesourcery.com>
4564
4565 * tracepoint.c: Include stdint.h unconditionally.
4566
18f5fd81
TJB
45672012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4568
4569 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4570 on BFD_HAVE_SYS_PROCFS_TYPE.
4571 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4572 * configure: Regenerate.
4573 * config.in: Likewise.
4574
4d47af5c
L
45752012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4576
4577 * Makefile.in (clean): Also remove x32.c x32-linux.c
4578 x32-avx.c x32-avx-linux.c.
4579 (x32.o): New target.
4580 (x32.c): Likewise.
4581 (x32-linux.o): Likewise.
4582 (x32-linux.c): Likewise.
4583 (x32-avx.o): Likewise.
4584 (x32-avx.c): Likewise.
4585 (x32-avx-linux.o): Likewise.
4586 (x32-avx-linux.c): Likewise.
4587
4588 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4589 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4590 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4591 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4592 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4593 i386/x32-avx-linux.xml.
4594
4595 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4596 (init_registers_x32_avx_linux): Likwise.
4597 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4598 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4599
ecedbe58
PA
46002012-04-13 Pedro Alves <palves@redhat.com>
4601
4602 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4603 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4604 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4605 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4606 the sub-make.
4607
c92b5177
L
46082012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4609
4610 * linux-x86-low.c (compat_x32_clock_t): New.
4611 (compat_x32_siginfo_t): Likewise.
4612 (compat_x32_siginfo_from_siginfo): Likewise.
4613 (siginfo_from_compat_x32_siginfo): Likewise.
4614 (linux_is_elf64): Likewise.
4615 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4616 and siginfo_from_compat_x32_siginfo for x32.
4617 (x86_arch_setup): Set linux_is_elf64.
4618
214d508e
L
46192012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4620
4621 PR gdb/13969
4622 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4623 e_machine field.
4624 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4625 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4626 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4627 compatible with process.
4628
c9a1864a
YQ
46292012-04-12 Yao Qi <yao@codesourcery.com>
4630
4631 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4632 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4633 (install-only, install-info, clean): Handle sub dir gnulib.
4634 (all-lib, am--refresh): New targets.
4635 (memmem.o): Remove target.
4636 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4637 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4638 (AC_REPLACE_FUNCS): Remove memmem.
4639 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4640 (AC_OUTPUT): Generate Makefile in gnulib/.
4641 * aclocal.m4, config.in, configure: Regenerated.
4642
367ba2c2
MR
46432012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4644
4645 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4646
9d236627
PA
46472012-04-05 Pedro Alves <palves@redhat.com>
4648
4649 -Werror=strict-aliasing
4650
4651 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4652 pointer.
4653
111217b3
PA
46542012-04-04 Pedro Alves <palves@redhat.com>
4655
4656 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4657 (sparc_store_gregset_from_stack, sparc_store_gregset)
4658 (sparc_breakpoint_at): Fix formatting.
4659
8365dcf5
TJB
46602012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4661
4662 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4663 are available.
4664 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4665 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4666 * config.in: Regenerate.
4667 * configure: Likewise.
4668
689cc2ae
PA
46692012-03-29 Pedro Alves <palves@redhat.com>
4670
4671 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4672 Correct ptrace arguments.
4673
c14dfd32
PA
46742012-03-28 Pedro Alves <palves@redhat.com>
4675
4676 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4677 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4678 (IA64_FR1_REGNUM): New defines.
4679 (ia64_fetch_register): New.
4680 (the_low_target): Install it.
4681 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4682 field.
4683 * linux-low.c (linux_fetch_registers): Try the
4684 the_low_target.fetch_register hook first.
4685
4686 * linux-arm-low.c (the_low_target): Adjust.
4687 * linux-bfin-low.c (the_low_target): Adjust.
4688 * linux-cris-low.c (the_low_target): Adjust.
4689 * linux-crisv32-low.c (the_low_target): Adjust.
4690 * linux-m32r-low.c (the_low_target): Adjust.
4691 * linux-m68k-low.c (the_low_target): Adjust.
4692 * linux-mips-low.c (the_low_target): Adjust.
4693 * linux-ppc-low.c (the_low_target): Adjust.
4694 * linux-s390-low.c (the_low_target): Adjust.
4695 * linux-sh-low.c (the_low_target): Adjust.
4696 * linux-sparc-low.c (the_low_target): Adjust.
4697 * linux-tic6x-low.c (the_low_target): Adjust.
4698 * linux-x86-low.c (the_low_target): Adjust.
4699 * linux-xtensa-low.c (the_low_target): Adjust.
4700
63c88e13
PA
47012012-03-26 Pedro Alves <palves@redhat.com>
4702
4703 * server.c (handle_qxfer_libraries): Don't bail early if
4704 the_target->qxfer_libraries_svr4 is not NULL.
4705
fb723180
PA
47062012-03-26 Pedro Alves <palves@redhat.com>
4707
4708 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4709
0afae3cf
PA
47102012-03-23 Pedro Alves <palves@redhat.com>
4711
4712 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4713 "library-list-svr4" element's start tag when the the DSO list is
4714 empty.
4715
485f1ee4
PA
47162012-03-23 Pedro Alves <palves@redhat.com>
4717
4718 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4719 a variable whose type size is the same as the inferior's pointer
4720 size.
4721
a5362b9a
TS
47222012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4723
4724 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4725 struct siginfo.
4726 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4727 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4728 * linux-low.h: Include <signal.h>.
4729 (struct siginfo): Remove forward declaration.
4730 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4731 struct siginfo.
4732
d226c142
MF
47332012-03-21 Mike Frysinger <vapier@gentoo.org>
4734
4735 * .gitignore: Ignore more files.
4736
122f36ef
PA
47372012-03-19 Pedro Alves <palves@redhat.com>
4738 Jan Kratochvil <jan.kratochvil@redhat.com>
4739
4740 * server.c (cont_thread, general_thread): Add describing comments.
4741 (start_inferior): Clear `cont_thread'.
4742 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4743 of a process.
4744
fc3e5175
YQ
47452012-03-15 Yao Qi <yao@codesourcery.com>
4746
4747 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4748 handling to ...
4749 (cmd_qtdp): ... here.
4750
8d0d92cd
YQ
47512012-03-15 Yao Qi <yao@codesourcery.com>
4752
4753 * tracepoint.c (struct tracepoint_action_ops): New.
4754 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4755 (m_tracepoint_action_download): New.
4756 (r_tracepoint_action_download): New.
4757 (x_tracepoint_action_download): New.
4758 (l_tracepoint_action_download): New.
4759 (add_tracepoint_action): Install `action->ops' according type.
4760 (download_tracepoint_1): Move code `download' function pointer
4761 of various tracepoint_action_ops.
4762
87b0bb13
JK
47632012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4764
4765 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4766 linux_ptrace_attach_warnings.
4767
5f572dec
JK
47682012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4769
4770 * Makefile.in (linux-ptrace.o): New.
4771 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4772 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4773 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4774 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4775 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4776 of these targets.
4777 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4778
f4647387
YQ
47792012-03-08 Yao Qi <yao@codesourcery.com>
4780 Pedro Alves <palves@redhat.com>
4781
4782 Fix PR server/13392.
4783 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4784 offset of JMP insn.
4785 * tracepoint.c (remove_tracepoint): New.
4786 (cmd_qtdp): Call remove_tracepoint when failed to install.
4787
9b224c5e
PA
47882012-03-07 Pedro Alves <palves@redhat.com>
4789
4790 * linux-low.c (get_detach_signal): New.
4791 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4792 Pass on pending signals to PTRACE_DETACH. Check the result of the
4793 ptrace call.
4794 * server.c (program_signals, program_signals_p): New.
4795 (handle_general_set): Handle QProgramSignals.
4796 * server.h (program_signals, program_signals_p): Declare.
4797
e237a7e2
JK
47982012-03-05 Pedro Alves <palves@redhat.com>
4799 Jan Kratochvil <jan.kratochvil@redhat.com>
4800
4801 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4802 New comment why.
4803
5808517f
YQ
48042012-03-03 Yao Qi <yao@codesourcery.com>
4805
4806 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4807 agent_look_up_symbols.
4808
58b4daa5
YQ
48092012-03-03 Yao Qi <yao@codesourcery.com>
4810
4811 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4812 (linux-x86-low.o): Likewise.
4813 * server.h: Remove in_process_agent_loaded.
4814 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4815 common/agent.c.
4816 Update callers.
4817
8ffcbaaf
YQ
48182012-03-03 Yao Qi <yao@codesourcery.com>
4819
4820 * tracepoint.c (gdb_agent_capability): New global.
4821 (in_process_agent_loaded_ust): Renamed to
4822 `in_process_agent_supports_ust'.
4823 Update callers.
4824 (in_process_agent_supports_ust): Call agent_capability_check.
4825 (clear_installed_tracepoints): Assert that agent supports
4826 agent.
4827
d1feda86
YQ
48282012-03-03 Yao Qi <yao@codesourcery.com>
4829
4830 * linux-low.c (linux_supports_agent): New.
4831 (linux_target_ops): Initialize field `supports_agent' with
4832 linux_supports_agent.
4833 * target.h (struct target_ops) <supports_agent>: New.
4834 (target_supports_agent): New macro.
4835 * server.c (handle_general_set): Handle packet 'QAgent'.
4836 (handle_query): Send `QAgent+'.
4837 * Makefile.in (server.o): Depends on agent.h.
4838
2fa291ac
YQ
48392012-03-03 Yao Qi <yao@codesourcery.com>
4840
4841 * Makefile.in (OBS): Add agent.o.
4842 Add new rule for agent.o.
4843 Track dependence of tracepoint.c on agent.h.
4844 * tracepoint.c (run_inferior_command_1):
4845 (run_inferior_command): Call agent_run_command.
4846 (gdb_ust_connect_sync_socket): Deleted. Move it to
4847 common/agent.c.
4848 (resume_thread, stop_thread): Likewise.
4849 (gdb_ust_socket_init): Renamed to ...
4850 (gdb_agent_socket_init): ... New.
4851 (gdb_ust_thread): Renamed to ...
4852 (gdb_agent_helper_thread): ... New.
4853 (gdb_ust_init): Move some code to ...
4854 (gdb_agent_init): ... here. New.
4855 [HAVE_UST]: Call gdb_ust_init.
4856 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4857 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4858 * config.in, configure: Regenerated.
4859
05044653
PA
48602012-03-02 Pedro Alves <palves@redhat.com>
4861
4862 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4863 * linux-low.c (struct simple_pid_list): New.
4864 (stopped_pids): New a struct simple_pid_list pointer.
4865 (add_to_pid_list, pull_pid_from_list): New.
4866 (handle_extended_wait): Don't assume the first signal new children
4867 report is SIGSTOP. Adjust call to pull_pid_from_list.
4868 (linux_wait_for_lwp): Adjust.
4869
8d00225b
YQ
48702012-03-02 Yao Qi <yao@codesourcery.com>
4871
4872 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4873 debug log.
4874
19560ba5
YQ
48752012-03-02 Yao Qi <yao@codesourcery.com>
4876
4877 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4878 `stop_pc' and `tpoint'. Update caller.
4879
1faeff08
MR
48802012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4881
4882 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4883 * linux-low.c (use_linux_regsets): New macro.
4884 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4885 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4886 (linux_register_in_regsets): New function.
4887 (usr_fetch_inferior_registers): Skip registers covered by
4888 regsets.
4889 (usr_store_inferior_registers): Likewise.
4890 (usr_fetch_inferior_registers): New macro.
4891 (usr_store_inferior_registers): Likewise.
4892 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4893 (linux_store_registers): Likewise.
4894 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4895 prototype.
4896 (init_registers_mips64_dsp_linux): Likewise.
4897 (init_registers_mips_linux): New macro.
4898 (init_registers_mips_dsp_linux): Likewise.
4899 (mips_dsp_num_regs): Likewise.
4900 (DSP_BASE, DSP_CONTROL): New fallback macros.
4901 (mips_base_regs): New macro.
4902 (mips_regmap): Use it. Fix the size.
4903 (mips_dsp_regmap): New variable.
4904 (mips_dsp_regset_bitmap): Likewise.
4905 (mips_arch_setup): New function.
4906 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4907 than mips_regmap.
4908 (mips_cannot_store_register): Likewise.
4909 (the_low_target): Update .arch_setup, .num_regs and .regmap
4910 initializers. Add .regset_bitmap initializer.
4911 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4912 initializer.
4913 * linux-bfin-low.c (the_low_target): Likewise.
4914 * linux-cris-low.c (the_low_target): Likewise.
4915 * linux-crisv32-low.c (the_low_target): Likewise.
4916 * linux-ia64-low.c (the_low_target): Likewise.
4917 * linux-m32r-low.c (the_low_target): Likewise.
4918 * linux-m68k-low.c (the_low_target): Likewise.
4919 * linux-ppc-low.c (the_low_target): Likewise.
4920 * linux-s390-low.c (the_low_target): Likewise.
4921 * linux-sh-low.c (the_low_target): Likewise.
4922 * linux-sparc-low.c (the_low_target): Likewise.
4923 * linux-tic6x-low.c (the_low_target): Likewise.
4924 * linux-x86-low.c (the_low_target): Likewise.
4925 * linux-xtensa-low.c (the_low_target): Likewise.
4926 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4927 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4928 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4929 srv_xmlfiles.
4930 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4931 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4932
c03e6ccc
YQ
49332012-02-29 Yao Qi <yao@codesourcery.com>
4934 Pedro Alves <palves@redhat.com>
4935
4936 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4937 `step_over_finished' is true.
4938
644cebc9
PA
49392012-02-27 Pedro Alves <palves@redhat.com>
4940
4941 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4942 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4943
c14d7ab2
PA
49442012-02-27 Pedro Alves <palves@redhat.com>
4945
4946 PR server/9684
4947 * linux-low.c (pid_is_stopped): New.
4948 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4949
412c89dd
LM
49502012-02-25 Luis Machado <lgustavo@codesourcery.com>
4951
4952 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4953 of conditions.
4954
b745defe
MR
49552012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4956
4957 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4958
9f3a5c85
LM
49592012-02-24 Luis Machado <lgustavo@codesourcery>
4960
4961 * server.c (handle_query): Advertise support for target-side
4962 breakpoint condition evaluation.
4963 (process_point_options): New function.
4964 (process_serial_event): When inserting a breakpoint, check for
4965 a target-side condition that should be evaluated.
4966
4967 * mem-break.c: Include regcache.h and ax.h.
4968 (point_cond_list_t): New data structure.
4969 (breakpoint) <cond_list>: New field.
4970 (find_gdb_breakpoint_at): Make non-static.
4971 (delete_gdb_breakpoint_at): Clear any target-side
4972 conditions.
4973 (clear_gdb_breakpoint_conditions): New function.
4974 (add_condition_to_breakpoint): Likewise.
4975 (add_breakpoint_condition): Likewise.
4976 (gdb_condition_true_at_breakpoint): Likewise.
4977 (gdb_breakpoint_here): Return result directly instead
4978 of going through a local variable.
4979
4980 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4981 (clear_gdb_breakpoint_conditions): Likewise.
4982 (add_breakpoint_condition): Likewise.
4983 (gdb_condition_true_at_breakpoint): Likewise.
4984
4985 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4986 (need_step_over_p): Take target-side breakpoint condition into
4987 consideration.
4988
5e1dc496
LM
49892012-02-24 Luis Machado <lgustavo@codesourcery>
4990
4991 * server.h: Include tracepoint.h.
4992 (agent_mem_read, agent_get_trace_state_variable_value,
4993 agent_set_trace_state_variable_value,
4994 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4995 get_set_tsv_func_addr): New prototypes.
4996
4997 * ax.h: New include file.
4998 * ax.c: New source file.
4999
5000 * tracepoint.c: Include ax.h.
5001 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5002 agent_expr, eval_result_type): Move to ax.h.
5003 (parse_agent_expr): Rename to ...
5004 (gdb_parse_agent_expr): ... this, make it non-static and move
5005 to ax.h.
5006 (unparse_agent_expr) Rename to ...
5007 (gdb_unparse_agent_expr): ... this, make it non-static and move
5008 to ax.h.
5009 (eval_agent_expr): Rename to ...
5010 (eval_tracepoint_agent_expr): ... this.
5011 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5012 forward declarations.
5013 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5014 (agent_get_trace_state_variable_value): New function.
5015 (agent_set_trace_state_variable_value): New function.
5016 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5017 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5018 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5019 (condition_true_at_tracepoint): Likewise.
5020 (parse_agent_expr): Rename to ...
5021 (gdb_parse_agent_expr): ... this and move to ax.c.
5022 (unparse_agent_expr): Rename to ...
5023 (gdb_unparse_agent_expr): ... this and move to ax.c.
5024 (gdb_agent_op_name): Move to ax.c.
5025 (eval_agent_expr): Rename to ...
5026 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5027 and move to ax.c.
5028 (eval_tracepoint_agent_expr): New function.
5029 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 5030 non-static.
5e1dc496
LM
5031 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5032 ax.c.
5033 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5034 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5035 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5036 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5037 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5038 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5039 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5040 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5041 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5042 (compile_bytecodes): Remove forward declaration.
5043 (is_goto_target): Move to ax.c.
5044 (compile_bytecodes): Move to ax.c and call
5045 agent_get_trace_state_variable_value (...) and
5046 agent_set_trace_state_variable_value (...).
5047
5048 * Makefile.in: Update ax.c and IPA dependencies.
5049
277e4e52
PA
50502012-02-24 Pedro Alves <palves@redhat.com>
5051
5052 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5053 (cmd_bigqtbuffer_circular): ... this. Only handle
5054 'QTBuffer:circular:'.
5055 (handle_tracepoint_general_set): Adjust.
5056
bf4c19f7
YQ
50572012-02-16 Yao Qi <yao@codesourcery.com>
5058
5059 * inferiors.c: Move code to ...
5060 * dll.c: .... here. New.
5061 * server.h: Declare clear_dlls.
5062 * Makefile.in (SFILES): Add dll.c.
5063 (OBS): Add dll.o
5064 (dll.o): New rule.
5065
d73f2619
YQ
50662012-02-11 Yao Qi <yao@codesourcery.com>
5067
5068 * server.c: (handle_monitor_command): Add a new parameter
5069 `own_buf'.
5070 (handle_query): Update caller.
5071
f8255c2a
JB
50722012-02-09 Joel Brobecker <brobecker@adacore.com>
5073
5074 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5075 * configure, config.in: Regenerate.
5076 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5077 is not defined.
5078
da84f473
PA
50792012-02-02 Pedro Alves <palves@redhat.com>
5080
5081 Try SIGKILL first, then PTRACE_KILL.
5082 * linux-low.c (linux_kill_one_lwp): New.
5083 (linux_kill_one_lwp): Rename to ...
5084 (kill_one_lwp_callback): ... this. Use the new
5085 linux_kill_one_lwp.
5086
e886a173
PA
50872012-02-02 Pedro Alves <palves@redhat.com>
5088
5089 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5090 inferior.
5091
be07f1a2
PA
50922012-01-27 Pedro Alves <palves@redhat.com>
5093
5094 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5095 (elf_64_file_p): Make static.
5096 (linux_pid_exe_is_elf_64_file): New.
5097 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5098 Delete declarations.
5099 (linux_pid_exe_is_elf_64_file): Declare.
5100 * linux-x86-low.c (x86_arch_setup): Use
5101 linux_pid_exe_is_elf_64_file.
5102
d8301ad1
JK
51032012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5104
5105 * linux-low.c (linux_wait_for_event_1): Rename to ...
5106 (linux_wait_for_event): ... here and merge it with former
5107 linux_wait_for_event - new variable wait_ptid, use it.
5108 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5109
01b17894
PA
51102012-01-23 Pedro Alves <palves@redhat.com>
5111
5112 * server.c (main): Avoid yet another case of infinite loop while
5113 detaching/killing after a longjmp.
5114
e825046f
JK
51152012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5116
5117 Code cleanup.
5118 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5119
b9e7b9c3
UW
51202012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5121
5122 * hostio.c (handle_readlink): New function.
5123 (handle_vFile): Call it to handle "vFile:readlink" packets.
5124
901f9912
UW
51252012-01-20 Pedro Alves <palves@redhat.com>
5126 Ulrich Weigand <ulrich.weigand@linaro.org>
5127
5128 * server.c (handle_v_requests): Only support vAttach and vRun to
5129 start multiple processes when in extended protocol mode.
5130
fc1ab1a0
PA
51312012-01-17 Pedro Alves <palves@redhat.com>
5132
5133 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5134 memalign plus mprotect to allocate the scratch buffer.
5135
7d5d4e98
PA
51362012-01-13 Pedro Alves <palves@redhat.com>
5137
5138 * server.c (attach_inferior): Clear `cont_thread'.
5139
f128d5e9
PA
51402012-01-13 Pedro Alves <palves@redhat.com>
5141
5142 * server.c (main): Avoid infinite loop while detaching/killing
5143 after a longjmp.
5144
06db92f0
DE
51452012-01-09 Doug Evans <dje@google.com>
5146
5147 * server.c (start_inferior): Set last_ptid in --wrapper case.
5148
32d92999
YQ
51492012-01-06 Yao Qi <yao@codesourcery.com>
5150
5151 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5152 defined.
5153 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5154
5e0a92a9
YQ
51552012-01-04 Yao Qi <yao@codesourcery.com>
5156
5157 * tracepoint.c (cmd_qtdp): Print debug message
5158 for static tracepoint.
5159
ae639e8c
YQ
51602012-01-04 Yao Qi <yao@codesourcery.com>
5161
5162 * tracepoint.c (trace_vdebug): Differentiate debug message
5163 between gdbserver and IPA.
5164
f72429c5
YQ
51652012-01-03 Yao Qi <yao@codesourcery.com>
5166
5167 * tracepoint.c (tracepoint_was_hit): Don't collect for
5168 static tracepoint.
5169
12c3e59c
JB
51702012-01-02 Joel Brobecker <brobecker@adacore.com>
5171
5172 * terminal.h: Reformat copyright header.
5173
67827812
JB
51742012-01-02 Joel Brobecker <brobecker@adacore.com>
5175
5176 * server.c (gdbserver_version): Update copyright year.
5177 * gdbreplay.c (gdbreplay_version): Likewise.
5178
3e52c33d
JK
51792011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5180
5181 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5182
5183 Revert:
5184 2011-12-18 Hui Zhu <teawater@gmail.com>
5185 * linux-low.c (linux_create_inferior): Save return value to ret.
5186
66f1260e
HZ
51872011-12-18 Hui Zhu <teawater@gmail.com>
5188
5189 * linux-low.c (linux_create_inferior): Save return value to ret.
5190
e77616d7
DE
51912011-12-16 Doug Evans <dje@google.com>
5192
e7b06c57
DE
5193 * linux-low.c (linux_create_inferior): If stdio connection,
5194 redirect stdin from /dev/null, stdout to stderr.
5195 * remote-utils.c (remote_is_stdio): New static global.
5196 (remote_connection_is_stdio): New function.
5197 (remote_prepare): Handle stdio connection.
5198 (remote_open): Ditto.
5199 (remote_close): Don't close stdin for stdio connections.
5200 (read_prim,write_prim): New functions. Replace all calls to
5201 read/write to these.
5202 * server.c (main): Watch for "-" argument. Move call to
5203 remote_prepare before start_inferior.
5204 * server.h (STDIO_CONNECTION_NAME): New macro.
5205 (remote_connection_is_stdio): Declare.
5206
e77616d7
DE
5207 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5208 in debugging output.
5209
82067193
YQ
52102011-12-15 Yao Qi <yao@codesourcery.com>
5211
5212 * tracepoint.c: Include sys/syscall.h.
5213 (gdb_ust_thread): Remove preprocessor conditional.
5214
82bfbe7e
PA
52152011-12-14 Pedro Alves <pedro@codesourcery.com>
5216
5217 * linux-low.c (linux_detach_one_lwp): Call
5218 the_low_target.prepare_to_resume before detaching.
5219
712c6575
YQ
52202011-12-14 Yao Qi <yao@codesourcery.com>
5221
5222 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5223 of write.
5224
d54d1edf
YQ
52252011-12-14 Yao Qi <yao@codesourcery.com>
5226
5227 * i386-low.c (i386_low_stopped_data_address): Initialize local
5228 variable `control'.
5229
6210a125
PA
52302011-12-13 Pedro Alves <pedro@codesourcery.com>
5231
5232 PR remote/13492
5233
5234 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5235 DR_CONTROL unless necessary. Extend comments.
5236 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5237 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5238
2ece8244
YQ
52392011-12-13 Yao Qi <yao@codesourcery.com>
5240
5241 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5242 macros.
5243 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5244
784867a5
JK
52452011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5246
5247 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5248 Print new debug message for such case.
5249
6bf36717
JK
52502011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5251
5252 Fix overlapping memcpy.
5253 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5254 the read_inferior_memory transfer.
5255 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5256 write_inferior_memory transfer.
5257 (set_fast_tracepoint_jump): New variable buf. Use it for the
5258 read_inferior_memory and write_inferior_memory transfers.
5259 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5260 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5261 Use it for the write_inferior_memory transfer.
5262 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5263 buffers.
5264
50275556
MR
52652011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5266
5267 * linux-low.c (fetch_register, store_register): Make code
5268 consistent, fix formatting.
5269
7325beb4
MR
52702011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5271
5272 * linux-low.c (usr_store_inferior_registers): Factor out code
5273 to handle individual registers into...
5274 (store_register): ... this new function.
5275
c642a434
UW
52762011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5277
5278 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5279 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5280 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5281 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5282 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5283 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5284 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5285 (srv_xmlfiles): Add new XML files.
5286
5287 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5288 and <sys/uio.h>.
5289 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5290 (init_registers_s390_linux32v1): Add prototype.
5291 (init_registers_s390_linux32v2): Likewise.
5292 (init_registers_s390_linux64v1): Likewise.
5293 (init_registers_s390_linux64v2): Likewise.
5294 (init_registers_s390x_linux64v1): Likewise.
5295 (init_registers_s390x_linux64v2): Likewise.
5296 (s390_num_regs): Increment to 52.
5297 (s390_regmap): Add orig_r2 register.
5298 (s390_num_regs_3264): Increment to 68.
5299 (s390_regmap_3264): Add orig_r2 register.
5300 (s390_collect_ptrace_register): Handle orig_r2 register.
5301 (s390_supply_ptrace_register): Likewise.
5302 (s390_fill_last_break): New function.
5303 (s390_store_last_break): Likewise.
5304 (s390_fill_system_call): New function.
5305 (s390_store_system_call): Likewise.
5306 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5307 register sets.
5308 (s390_check_regset): New function.
5309 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5310 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5311 Update target_regsets for available register sets.
5312
2268b414
JK
53132011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5314 Jan Kratochvil <jan.kratochvil@redhat.com>
5315
5316 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5317 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5318 New.
5319 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5320 * linux-low.h (struct process_info_private): New member r_debug.
5321 * server.c (handle_qxfer_libraries): Call
5322 the_target->qxfer_libraries_svr4.
5323 (handle_qxfer_libraries_svr4): New function.
5324 (qxfer_packets): New entry "libraries-svr4".
5325 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5326 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5327 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5328 PACKET_qXfer_libraries_svr4.
5329
d6db1fab
UW
53302011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5331
5332 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5333 PSW address/mask between 8-byte and 16-byte formats.
5334 (s390_supply_ptrace_register): Likewise.
5335 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5336 basic addressing mode bit.
5337
242f5f1c
SS
53382011-11-24 Stan Shebs <stan@codesourcery.com>
5339
5340 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5341
f196051f
SS
53422011-11-17 Stan Shebs <stan@codesourcery.com>
5343
5344 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5345 (tracing_start_time): New global.
5346 (tracing_stop_time): New global.
5347 (tracing_user_name): New global.
5348 (tracing_notes): New global.
5349 (tracing_stop_note): New global.
5350 (cmd_qtstart): Set traceframe_usage, start_time.
5351 (stop_tracing): Set stop_time.
5352 (cmd_qtstatus): Report additional status.
5353 (cmd_qtp): New function.
5354 (handle_tracepoint_query): Call it.
5355 (cmd_qtnotes): New function.
5356 (handle_tracepoint_general_set): Call it.
5357 (get_timestamp): Rename from tsv_get_timestamp.
5358
405f8e94
SS
53592011-11-14 Stan Shebs <stan@codesourcery.com>
5360 Kwok Cheung Yeung <kcy@codesourcery.com>
5361
5362 * linux-x86-low.c (small_jump_insn): New.
5363 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5364 trampoline and error message, build a trampoline and issue a small
5365 jump instruction to it.
5366 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5367 trampoline and error message.
5368 (x86_get_min_fast_tracepoint_insn_len): New.
5369 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5370 * linux-low.h (struct linux_target_ops): Add arguments to
5371 install_fast_tracepoint_jump_pad operation, add new operation.
5372 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5373 arguments.
5374 (linux_get_min_fast_tracepoint_insn_len): New function.
5375 (linux_target_op): Add new operation.
5376 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5377 (gdb_trampoline_buffer_end): Ditto.
5378 (gdb_trampoline_buffer_error): Ditto.
5379 (struct ipa_sym_addresses): Add fields for new IPA variables.
5380 (symbol_list): Add entries for new IPA variables.
5381 (struct tracepoint): Add fields to hold the address range of the
5382 trampoline used by the tracepoint.
5383 (trampoline_buffer_head): New static variable.
5384 (trampoline_buffer_tail): Ditto.
5385 (claim_trampoline_space): New function.
5386 (have_fast_tracepoint_trampoline_buffer): New function.
5387 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5388 structure.
5389 (install_fast_tracepoint): Ditto, also add error buffer argument.
5390 (cmd_qtminftpilen): New function.
5391 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5392 (fast_tracepoint_from_trampoline_address): New function.
5393 (fast_tracepoint_collecting): Handle trampoline as part of jump
5394 pad space.
5395 (set_trampoline_buffer_space): New function.
5396 (initialize_tracepoint): Initialize new IPA variables.
5397 * target.h (struct target_ops): Add arguments to
5398 install_fast_tracepoint_jump_pad operation, add new
5399 get_min_fast_tracepoint_insn_len operation.
5400 (target_get_min_fast_tracepoint_insn_len): New.
5401 (install_fast_tracepoint_jump_pad): Add arguments.
5402 * server.h (IPA_BUFSIZ): Define.
5403 * linux-i386-ipa.c: Include extra header files.
5404 (initialize_fast_tracepoint_trampoline_buffer): New function.
5405 (initialize_low_tracepoint): Call it.
5406 * server.h (set_trampoline_buffer_space): Declare.
5407 (claim_trampoline_space): Ditto.
5408 (have_fast_tracepoint_trampoline_buffer): Ditto.
5409
1e4d1764
YQ
54102011-11-14 Yao Qi <yao@codesourcery.com>
5411
5412 * server.c (handle_query): Handle InstallInTrace for qSupported.
5413 * tracepoint.c (add_tracepoint): Sort list.
5414 (install_tracepoint, download_tracepoint): New.
5415 (cmd_qtdp): Call them to install and download tracepoints.
5416 (sort_tracepoints): Removed.
5417 (cmd_qtstart): Update.
5418
5c73ff4e
YQ
54192011-11-14 Yao Qi <yao@codesourcery.com>
5420
5421 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5422 * mem-break.h: Declare.
5423 * tracepoint.c (cmd_qtstart): Move some code to ...
5424 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5425 New.
5426 (download_tracepoints): Move some code to ...
5427 (download_tracepoint_1): ... here. New.
5428
86a30030
YQ
54292011-11-08 Yao Qi <yao@codesourcery.com>
5430
5431 * remote-utils.c (relocate_instruction): A comment fix.
5432
8d26e50c
JB
54332011-11-07 Joel Brobecker <brobecker@adacore.com>
5434
5435 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5436 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5437 dr_status_mirror and dr_control_mirror from debug_reg_state.
5438 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5439 (i386_initial_stuff): Remove use of deleted globals.
5440 (i386_get_thread_context, i386_set_thread_context,
5441 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5442 from debug_reg_state.
5443
a59306a3
YQ
54442011-11-05 Yao Qi <yao@codesourcery.com>
5445
5446 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5447 address as TPOINT's.
5448
3065dfb6
SS
54492011-11-02 Stan Shebs <stan@codesourcery.com>
5450
5451 * tracepoint.c (agent_mem_read_string): New function.
5452 (eval_agent_expr): Call it for tracenz.
5453 * server.c (handle_query): Report support for tracenz.
5454
fd0d8c7c
YQ
54552011-11-02 Yao Qi <yao@codesourcery.com>
5456
5457 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5458
609086b1
YQ
54592011-11-02 Yao Qi <yao@codesourcery.com>
5460
5461 * target.h: Fix a typo in comment.
5462
b9fd1791
PA
54632011-10-31 Pedro Alves <pedro@codesourcery.com>
5464
5465 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5466 clobber the breakpoints' shadows with fast tracepoint jumps.
5467 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5468 * target.c (write_inferior_memory): Also pass MYADDR down to
5469 check_mem_write.
5470
03583c20
UW
54712011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5472
5473 * configure.ac: Check support for personality routine.
5474 * configure: Regenerate.
5475 * config.in: Likewise.
5476 * linux-low.c: Include <sys/personality.h>.
5477 Define ADDR_NO_RANDOMIZE if necessary.
5478 (linux_create_inferior): Disable address space randomization when
5479 forking inferior, if requested.
5480 (linux_supports_disable_randomization): New function.
5481 (linux_target_ops): Install it.
5482 * server.h (disable_randomization): Declare.
5483 * server.c (disable_randomization): New global variable.
5484 (handle_general_set): Handle QDisableRandomization.
5485 (handle_query): Likewise for qSupported.
5486 (main): Support --disable-randomization and --no-disable-randomization
5487 command line arguments.
5488 * target.h (struct target_ops): Add supports_disable_randomization.
5489 (target_supports_disable_randomization): New macro.
5490
723b724b
MF
54912011-09-29 Mike Frysinger <vapier@gentoo.org>
5492
5493 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5494 ifdef check.
5495 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5496 [!PT_GETDSBT] (target_loadmap): New definition.
5497 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5498 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5499 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5500 and PT_GETDSBT to LINUX_LOADMAP.
5501 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5502 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5503
55329a5c 55042011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5505
5506 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5507 (arm_linux_hwbp_cap): New static variable.
5508 (arm_linux_get_hwbp_cap): Replace by ...
5509 (arm_linux_init_hwbp_cap): ... this new function.
5510 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5511 (arm_linux_get_hw_watchpoint_count): Likewise.
5512 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5513 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5514 (arm_prepare_to_resume): Use perror_with_name instead of error.
5515
55329a5c 55162011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5517
5518 * linux-arm-low.c: Include <signal.h>.
5519 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5520 (struct arm_linux_hwbp_cap): New data type.
5521 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5522 (struct arm_linux_hw_breakpoint): New data type.
5523 (MAX_BPTS, MAX_WPTS): Define.
5524 (struct arch_process_info, struct arch_lwp_info): New data types.
5525 (arm_linux_get_hwbp_cap): New function.
5526 (arm_linux_get_hw_breakpoint_count): Likewise.
5527 (arm_linux_get_hw_watchpoint_count): Likewise.
5528 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5529 (arm_hwbp_control_initialize): Likewise.
5530 (arm_hwbp_control_is_enabled): Likewise.
5531 (arm_hwbp_control_is_initialized): Likewise.
5532 (arm_hwbp_control_disable): Likewise.
5533 (arm_linux_hw_breakpoint_equal): Likewise.
5534 (arm_linux_hw_point_initialize): Likewise.
5535 (struct update_registers_data): New data structure.
5536 (update_registers_callback: New function.
5537 (arm_insert_point): Likewise.
5538 (arm_remove_point): Likewise.
5539 (arm_stopped_by_watchpoint): Likewise.
5540 (arm_stopped_data_address): Likewise.
5541 (arm_new_process): Likewise.
5542 (arm_new_thread): Likewise.
5543 (arm_prepare_to_resume): Likewise.
5544 (the_low_target): Register arm_insert_point, arm_remove_point,
5545 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5546 arm_new_thread, and arm_prepare_to_resume.
5547
6b9801d4
SS
55482011-09-15 Stan Shebs <stan@codesourcery.com>
5549
5550 * server.h (struct emit_ops): Add compare-goto fields.
5551 * tracepoint.c (gdb_agent_op_sizes): New table.
5552 (emit_eq_goto): New function.
5553 (emit_ne_goto): New function.
5554 (emit_lt_goto): New function.
5555 (emit_le_goto): New function.
5556 (emit_gt_goto): New function.
5557 (emit_ge_goto): New function.
5558 (is_goto_target): New function.
5559 (compile_bytecodes): Recognize special cases of compare-goto
5560 combinations and call specialized emitters for them.
5561 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5562 (amd64_emit_ne_goto): New function.
5563 (amd64_emit_lt_goto): New function.
5564 (amd64_emit_le_goto): New function.
5565 (amd64_emit_gt_goto): New function.
5566 (amd64_emit_ge_goto): New function.
5567 (amd64_emit_ops): Add the new functions.
5568 (i386_emit_eq_goto): New function.
5569 (i386_emit_ne_goto): New function.
5570 (i386_emit_lt_goto): New function.
5571 (i386_emit_le_goto): New function.
5572 (i386_emit_gt_goto): New function.
5573 (i386_emit_ge_goto): New function.
5574 (i386_emit_ops): Add the new functions.
5575
bf15cbda
SS
55762011-09-08 Stan Shebs <stan@codesourcery.com>
5577
5578 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5579 (i386_emit_epilogue): Restore %ebx.
5580
943ca1dd
JZ
55812011-08-31 Jie Zhang <jzhang918@gmail.com>
5582
5583 * server.c (step_thread): Remove definition.
5584 (process_serial_event): Don't handle Hs.
5585 * server.h (step_thread): Remove declaration.
5586 * target.c (set_desired_inferior): Remove use of step_thread.
5587
e3deef73
LM
55882011-08-24 Luis Machado <lgustavo@codesourcery.com>
5589
5590 * linux-low.c: Include linux-procfs.h.
5591 (linux_attach_lwp_1): Update comments.
5592 (linux_attach): Scan for existing threads when attaching to a
5593 process that is the tgid.
5594 * Makefile.in: Update dependencies.
5595
13da1c97
LM
55962011-08-24 Luis Machado <lgustavo@codesourcery.com>
5597
5598 * configure.srv: Add linux-procfs.o dependencies.
5599
881127c9
YQ
56002011-08-14 Yao Qi <yao@codesourcery.com>
5601
5602 * target.h (struct target_ops): Fix indent.
5603 * win32-low.c (win32_target_ops): Fix comment.
5604
58dbd541
YQ
56052011-08-14 Andrew Jenner <andrew@codesourcery.com>
5606 Yao Qi <yao@codesourcery.com>
5607
5608 * Makefile.in (clean): Remove tic6x-*.c files.
5609 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5610 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5611 (tic6x-c64xp-linux.c): Likewise.
5612 * configure.srv: Add support for tic6x-*-uclinux.
5613 * linux-tic6x-low.c: New.
5614 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5615
78d85199
YQ
56162011-08-14 Andrew Stubbs <ams@codesourcery.com>
5617 Yao Qi <yao@codesourcery.com>
5618
5619 * target.h (struct target_ops): Add read_loadmap.
5620 * linux-low.c (struct target_loadseg): New type.
5621 (struct target_loadmap): New type.
5622 (linux_read_loadmap): New function.
5623 (linux_target_ops): Add linux_read_loadmap.
5624 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5625 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5626 to NULL.
78d85199 5627
a959a88d
EZ
56282011-08-05 Eli Zaretskii <eliz@gnu.org>
5629
5630 * win32-low.c: Include <stdint.h>.
5631
1ced966e
PA
56322011-07-22 Pedro Alves <pedro@codesourcery.com>
5633
5634 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5635 to the inferior here.
5636 (i386_remove_aligned_watchpoint): Ditto.
5637 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5638 fit part of the watchpoint in the debug registers.
5639 (i386_update_inferior_debug_regs): New.
5640 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5641 registers, and only update the inferior on success.
5642 (i386_low_remove_watchpoint): Ditto.
5643
d26e3629
KY
56442011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5645
5646 * linux-low.c (compare_ints, unique, list_threads, show_process,
5647 linux_core_of_thread): Delete.
5648 (linux_target_ops): Change linux_core_of_thread to
5649 linux_common_core_of_thread.
5650 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5651 * utils.c (malloc_failure): Change type of argument.
5652 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5653 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5654 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5655 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5656 (IPA_OBJS): Add common-utils-ipa.o.
5657 (ptid_h, linux_osdata_h): New macros.
5658 (server_h): Add common/common-utils.h, common/xml-utils.h,
5659 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5660 common/ptid.h.
5661 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5662 ptid.o, buffer.o): New rules.
5663 (linux-low.o): Add common/linux-osdata.h as a dependency.
5664 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5665 * configure.ac: Add AC_HEADER_DIRENT check.
5666 * config.in: Regenerate.
5667 * configure: Regenerate.
5668 * remote-utils.c (xml_escape_text): Delete.
5669 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5670 buffer_xml_printf): Move to common/buffer.c.
5671 * server.c (main): Remove call to initialize_inferiors.
5672 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5673 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5674 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5675 internal_error, gdb_assert, gdb_assert_fail): Delete.
5676 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5677 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5678 common/buffer.h.
5679 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5680 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5681 initialize_inferiors): Delete.
5682
2275a1a7
PA
56832011-07-20 Pedro Alves <pedro@codesourcery.com>
5684
5685 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5686 symbol error.
5687
0a5b1e09
PA
56882011-05-31 Pedro Alves <pedro@codesourcery.com>
5689
5690 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5691 assertion.
5692 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5693
6938fd34
YQ
56942011-05-26 Yao Qi <yao@codesourcery.com>
5695
5696 * Makefile.in (thread-db.o): Track dependence to
5697 common/gdb_thread_db.h.
5698 * thread-db.c: include gdb_thread_db.h from right place.
5699
b481f9e0
TT
57002011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5701
5702 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5703 __FILE__ and __LINE__ to internal_error.
5704
98a5dd13
DE
57052011-05-13 Doug Evans <dje@google.com>
5706
5707 * thread-db.c (try_thread_db_load_from_sdir): New function.
5708 (try_thread_db_load_from_dir): New function.
5709 (thread_db_load_search): Handle $sdir, ignore $pdir.
5710 Remove trying of system directories if search of
5711 libthread-db-search-path fails, that is now done via $sdir.
5712
d248b706
KY
57132011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5714
5715 * server.c (handle_query): Add EnableDisableTracepoints to the list
5716 of supported features.
43aaf8b6 5717 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5718 tracepoints.
43aaf8b6
PA
5719 (cmd_qtenable_disable): New.
5720 (cmd_qtstart): Install tracepoints even if disabled.
5721 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5722 receiving a QTEnable or QTDisable packet.
5723 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5724 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5725 tracepoints.
5726 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5727
84e578fb
DE
57282011-05-10 Doug Evans <dje@google.com>
5729
5730 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5731
71f55dd8
DE
57322011-05-04 Doug Evans <dje@google.com>
5733
5734 * linux-low.c (linux_join): Skip process lookup.
5735 * spu-low.c (spu_join): Ditto.
5736 * server.c (join_inferiors_callback): Delete.
5737 (process_serial_event): For 'D' packet (detach) call join_inferior
5738 directly.
5739
4d393d60
JM
57402011-05-04 Joseph Myers <joseph@codesourcery.com>
5741
5742 * README: Don't mention xscale*-*-linux*.
5743 * configure.srv (xscale*-*-linux*): Don't handle target.
5744
b00ad6ff
NF
57452011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5746
5747 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5748 casting pointers.
5749 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5750 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5751 (i386_emit_void_call_2): Likewise.
5752
af96c192
YQ
57532011-04-26 Yao Qi <yao@codesourcery.com>
5754
43aaf8b6
PA
5755 * linux-low.c: Move common macros to linux-ptrace.h.
5756 Include linux-ptrace.h.
af96c192
YQ
5757 * Makefile.in (linux_ptrace_h): New.
5758 (linux-low.o): Depends on linux-ptrace.h.
5759
03f2bd59
JK
57602011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5761
5762 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5763 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5764 (remote_prepare): New function with most of the TCP code from ...
5765 (remote_open): ... here. Detect PORT here unconditionally. Move also
5766 setting transport_is_reliable.
5767 * server.c (run_once): New variable.
5768 (gdbserver_usage): Document it.
5769 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5770 the first run if RUN_ONCE.
5771 * server.h (run_once, remote_prepare): New declarations.
5772
7a9dd1b2
TT
57732011-04-19 Tom Tromey <tromey@redhat.com>
5774
5775 * win32-low.c (handle_load_dll): Remove duplicate "the".
5776
81239425
PM
57772011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5778
5779 Remove support for old Cygwin 1.5 versions.
5780 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5781 function to avoid warning.
5782 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5783 warning.
5784
9e0627f1
PM
57852011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5786
5787 * gdbserver/server.h (Macro _): Define it if not available.
5788
588eebee
MS
57892011-03-14 Michael Snyder <msnyder@vmware.com>
5790
348af9f7 5791 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5792
43f70d4c
JB
57932011-03-10 Joel Brobecker <brobecker@adacore.com>
5794
5795 * Makefile.in (maintainer-clean realclean distclean): Remove
5796 "make ... subdir_do" command.
5797
348af9f7
MS
57982011-03-10 Michael Snyder <msnyder@vmware.com>
5799
5800 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5801
5802 * server.c (handle_v_run): Free alloced buffer on early return.
5803
e637a4f5
YQ
58042011-03-09 Yao Qi <yao@codesourcery.com>
5805
5806 Revert:
5807 2011-03-04 Yao Qi <yao@codesourcery.com>
5808
5809 * Makefile.in: Remove GNU make feature --directory.
5810
5811 2011-03-05 Yao Qi <yao@codesourcery.com>
5812
5813 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5814 (subdir_do): New make target. Copied from gdb/Makefile.
5815 (maintainer-clean, realclean, distclean, clean): Call corresponding
5816 make targets in common/Makefile.
5817
5818 2011-02-11 Yao Qi <yao@codesourcery.com>
5819
5820 * configure.ac: Call AC_PROG_RANLIB.
5821 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5822 * configure: Regenerate.
5823
e6edda56
JK
58242011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5825
5826 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5827
e5141119
JB
58282011-03-06 Yao Qi <yao@codesourcery.com>
5829
5830 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5831
64794aa4
JB
58322011-03-05 Yao Qi <yao@codesourcery.com>
5833
5834 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5835 (subdir_do): New make target. Copied from gdb/Makefile.
5836 (maintainer-clean, realclean, distclean, clean): Call corresponding
5837 make targets in common/Makefile.
5838
7a762829
YQ
58392011-03-04 Yao Qi <yao@codesourcery.com>
5840
5841 * Makefile.in: Remove GNU make feature --directory.
5842
348af9f7
MS
58432011-03-04 Michael Snyder <msnyder@vmware.com>
5844
5845 * server.c (queue_stop_reply): Call xmalloc not malloc.
5846
58472011-03-02 Michael Snyder <msnyder@vmware.com>
5848
5849 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5850
9f72fee2
MS
58512011-02-28 Michael Snyder <msnyder@vmware.com>
5852
588eebee
MS
5853 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5854 (cmd_qtframe): Ditto.
5855 (cmd_qtbuffer): Ditto.
5856 (cmd_bigqtbuffer): Ditto.
5857
9f72fee2
MS
5858 * utils.c (decimal2str): Initialize 'width' to nine, then
5859 don't mess with it.
5860
8040bd49
UW
58612011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5862
5863 * hostio.c (require_data): Free *data, not data.
5864
7e52cbd0
JK
58652011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5866
5867 * hostio.c (require_data): Use free, not xfree.
5868
9130f83e
MS
58692011-02-27 Michael Snyder <msnyder@vmware.com>
5870
4b812f4e
MS
5871 * server.c (handle_query): Discard unused value.
5872
9130f83e
MS
5873 * hostio.c (require_data): Free malloc memory before returning
5874 error.
5875
69d37113
MS
58762011-02-26 Michael Snyder <msnyder@vmware.com>
5877
5878 * linux-low.c (list_threads): Call closedir for dirent.
5879
35f5825a
MS
58802011-02-27 Michael Snyder <msnyder@vmware.com>
5881
2a589cef
MS
5882 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5883 a case statement falls through.
5884
0adea5f7
MS
5885 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5886
35f5825a
MS
5887 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5888 in comparison.
5889
238f1c74
MS
58902011-02-26 Michael Snyder <msnyder@vmware.com>
5891
5892 * utils.c (decimal2str): Eliminate dead code and dead param.
5893 (pulongest): Drop dead param from call to decimal2str.
5894 (plongest): Ditto.
5895
633ff500
JB
58962011-02-24 Joel Brobecker <brobecker@adacore.com>
5897
5898 Revert the following patch (not approved yet):
5899 2011-02-21 Hui Zhu <teawater@gmail.com>
5900 * tracepoint.c (tp_printf): New function.
5901 (eval_agent_expr): Handle gdb_agent_op_printf.
5902
f9c6ff72
HZ
59032011-02-21 Hui Zhu <teawater@gmail.com>
5904
5905 * tracepoint.c (tp_printf): New function.
5906 (eval_agent_expr): Handle gdb_agent_op_printf.
5907
94d5e490
TT
59082011-02-18 Tom Tromey <tromey@redhat.com>
5909
5910 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5911 (tracepoint.o): Likewise.
5912 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5913 (gdb_agent_op_names): Likewise.
5914
c7f96d2b
TT
59152011-02-18 Tom Tromey <tromey@redhat.com>
5916
5917 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5918 gdb_agent_op_rot>: New constants.
5919 (gdb_agent_op_names): Add pick and roll.
5920 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5921 cases.
5922
0feedb2c
JK
59232011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5924
5925 * aclocal.m4: Regenerated with aclocal-1.11.1.
5926
b3b9301e
PA
59272011-02-14 Pedro Alves <pedro@codesourcery.com>
5928
5929 * server.c (handle_qxfer_traceframe_info): New.
5930 (qxfer_packets): Register "traceframe-info".
5931 (handle_query): Report support for qXfer:traceframe-info:read+.
5932 * tracepoint.c (match_blocktype): New.
5933 (traceframe_find_block_type): Rename to ...
5934 (traceframe_walk_blocks): ... this. Add callback filter argument,
5935 and use it.
5936 (traceframe_find_block_type): New, reimplemented on top of
5937 traceframe_walk_blocks.
5938 (build_traceframe_info_xml): New.
5939 (traceframe_read_info): New.
5940 * server.h (traceframe_read_info): Declare.
5941
4f3e6fb7
YQ
59422011-02-11 Yao Qi <yao@codesourcery.com>
5943
5944 * configure.ac: Call AC_PROG_RANLIB.
5945 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5946 * configure: Regenerate.
5947
764880b7
PA
59482011-02-07 Pedro Alves <pedro@codesourcery.com>
5949
5950 * server.c (gdb_read_memory): Change return semantics to allow
5951 partial transfers.
5952 (handle_search_memory_1): Adjust.
5953 (process_serial_event) <'m' packet>: Handle partial transfers.
5954 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5955
1c79eb8a
PA
59562011-01-28 Pedro Alves <pedro@codesourcery.com>
5957
5958 * regcache.c (init_register_cache): Initialize
5959 regcache->register_status.
5960 (free_register_cache): Release regcache->register_status.
5961 (regcache_cpy): Copy register_status.
5962 (registers_to_string): Print 'x's for unavailable registers.
5963 (supply_register): Mark the register's status valid or
5964 unavailable, depending on whether a buffer was passed in or not.
5965 (supply_register_zeroed): New.
5966 (supply_regblock): Mark the registers' status valid or
5967 unavailable, depending on whether a buffer was passed in or not.
5968 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5969 (struct regcache): New `register_status' field.
5970 (supply_register_zeroed): Declare.
5971 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5972 supply_register_zeroed, rather than passing a NULL buffer to
5973 supply_register.
5974 * tracepoint.c (fetch_traceframe_registers): Update comment.
5975
85724a0e
PA
59762011-01-28 Pedro Alves <pedro@codesourcery.com>
5977
5978 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5979 buffer explicit.
5980
d08aafef
PA
59812011-01-25 Pedro Alves <pedro@codesourcery.com>
5982
5983 * server.h (decode_xfer_write): Change prototype.
5984 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5985 and don't extract the annex here.
5986 * server.c (decode_xfer_read): Remove `annex' parameter,
5987 and don't extract the annex here.
5988 (decode_xfer): New.
5989 (struct qxfer): New.
5990 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5991 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5992 (handle_qxfer_statictrace): New functions, abstracted out from
5993 handle_query, and made to use the struct qxfer interface.
5994 (handle_threads_qxfer_proper): Rename to ...
5995 (handle_qxfer_threads_proper): ... this.
5996 (handle_threads_qxfer): Rename to ...
5997 (handle_qxfer_threads): ... this. Adjust.
5998 (qxfer_packets): New array.
5999 (handle_qxfer): New function.
6000 (handle_query): Use handle_qxfer.
6001
493e2a69
MS
60022011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6003
6004 * gdbreplay.c: Shorten lines of >= 80 columns.
6005 * linux-low.c: Ditto.
6006 * linux-ppc-low.c: Ditto.
6007 * linux-s390-low.c: Ditto.
6008 * linux-sparc-low.c: Ditto.
6009 * linux-x86-low.c: Ditto.
6010 * linux-xtensa-low.c: Ditto.
6011 * mem-break.c: Ditto.
6012 * nto-low.c: Ditto.
6013 * regcache.h: Ditto.
6014 * remote-utils.c: Ditto.
6015 * server.c: Ditto.
6016 * server.h: Ditto.
6017 * thread-db.c: Ditto.
6018 * tracepoint.c: Ditto.
6019 * utils.c: Ditto.
6020 * win32-low.h: Ditto.
6021
44944448
JB
60222011-01-05 Joel Brobecker <brobecker@adacore.com>
6023
6024 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6025 update.
6026
71ce852c
JB
60272011-01-01 Joel Brobecker <brobecker@adacore.com>
6028
6029 * server.c (gdbserver_version): Update copyright year in version
6030 output.
6031 * gdbreplay.c (gdbreplay_version): Ditto.
6032
eb826dc6
MF
60332010-12-29 Jie Zhang <jie.zhang@analog.com>
6034
6035 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6036 * linux-bfin-low.c: New file.
6037 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6038 PT_DATA_ADDR for BFIN targets.
6039 * Makefile.in (SFILES): Add linux-bfin-low.c.
6040 (clean): Remove reg-bfin.c.
6041 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6042 * README: Mention supported Blackfin targets.
6043
39ab222a
MF
60442010-12-23 Mike Frysinger <vapier@gentoo.org>
6045
6046 * .gitignore: New file.
6047
a1f2ce7d
MF
60482010-11-16 Mike Frysinger <vapier@gentoo.org>
6049
6050 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6051
f474844c
JZ
60522010-10-22 Jie Zhang <jie@codesourcery.com>
6053
6054 * Makefile.in: Add FLAGS_TO_PASS variable.
6055 (install): Remove dependency of install-only and recursively
6056 invoke make for install-only.
6057
f1048712
DE
60582010-10-04 Doug Evans <dje@google.com>
6059
6060 * Makefile.in (uninstall): Use $(DESTDIR).
6061
b53a1623
PA
60622010-09-24 Pedro Alves <pedro@codesourcery.com>
6063
e6ee044d
PA
6064 PR gdb/11842
6065
b53a1623
PA
6066 * linux-x86-low.c (compat_siginfo_from_siginfo)
6067 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6068 si_code is < 0. Check for si_code == SI_TIMER before checking for
6069 si_code < 0.
6070
fa1bd1e4
JB
60712010-09-13 Joel Brobecker <brobecker@adacore.com>
6072
6073 * lynx-i386-low.c: New file.
6074 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6075
47fac8f8
JB
60762010-09-13 Joel Brobecker <brobecker@adacore.com>
6077
6078 * lynx-low.c (ptrace_request_to_str): Remove handling for
6079 request values that have been removed in LynxOS 5.x.
6080
1adfc54d
JB
60812010-09-13 Joel Brobecker <brobecker@adacore.com>
6082
6083 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6084 <ptrace.h>
6085
c2a66c29
NS
60862010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6087
6088 * configure.ac: Add --enable-inprocess-agent option.
6089 * configure: Rebuilt.
6090
32fcada3
YQ
60912010-09-06 Yao Qi <yao@codesourcery.com>
6092
6093 * linux-low.c (linux_kill): Remove unused variable.
6094 (linux_stabilize_threads): Likewise.
6095 * server.c (start_inferior): Likewise.
6096 (queue_stop_reply_callback): Likewise.
6097 * tracepoint.c (do_action_at_tracepoint): Likewise.
6098
0cccb683
YQ
60992010-09-06 Yao Qi <yao@codesourcery.com>
6100
6101 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6102 on return.
6103
423ec54c
JK
61042010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6105
6106 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6107
12ac6819
PA
61082010-09-06 Pedro Alves <pedro@codesourcery.com>
6109
6110 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6111 "$(IPA_DEPFILES)".
6112
8ed54b31
JB
61132010-09-01 Joel Brobecker <brobecker@adacore.com>
6114
6115 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6116 gdbserver/lynx-ppc-low.c: New files.
6117 * Makefile.in (lynx_low_h): New variable.
6118 (lynx-low.o, lynx-ppc-low.o): New rules.
6119 * configure.ac: On LynxOS, link with -lnetinet.
6120 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6121 * configure: regenerate.
6122
bb0116a4
JB
61232010-09-01 Joel Brobecker <brobecker@adacore.com>
6124
6125 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6126 * configure.ac: Add check for vasprintf and vsnprintf.
6127 * configure, config.in: Regenerate.
6128 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6129
a778ab81 61302010-09-01 Joel Brobecker <brobecker@adacore.com>
6131
6132 * gdbreplay.c: Move include of alloca.h up, next to include of
6133 malloc.h.
6134 * server.h: Add include of malloc.h.
6135 * mem-break.c: Remove include of malloc.h.
6136 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6137
8b034a19 61382010-09-01 Joel Brobecker <brobecker@adacore.com>
6139
6140 * Makefile.in (memmem.o): Build with -Wno-error.
6141
61422010-09-01 Joel Brobecker <brobecker@adacore.com>
6143
6144 * utils.c (xsnprintf): Make non-static.
6145 * server.h: Add xsnprintf declaration.
6146 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6147 replace calls to snprintf by calls to xsnprintf throughout.
6148
61492010-09-01 Joel Brobecker <brobecker@adacore.com>
6150
6151 * configure.ac: Add configure check for alloca.
6152 * configure, config.in: Regenerate.
6153 * server.h: Include alloca.h if it exists.
6154 * gdbreplay.c: Include alloca.h if it exists.
6155
1a981360
PA
61562010-08-28 Pedro Alves <pedro@codesourcery.com>
6157
6158 * linux-low.c (__SIGRTMIN): Define if not already defined.
6159 (linux_create_inferior): Check for __ANDROID__ rather than
6160 __SIGRTMIN.
6161 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6162 are already deferred.
6163 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6164 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6165 stopped and already has a pending signal to report.
6166 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6167 a pending signal to report or is moving out of a jump pad.
6168 (linux_init_signals): Check for __ANDROID__ rather than
6169 __SIGRTMIN.
6170
b4d51a55
PA
61712010-08-28 Pedro Alves <pedro@codesourcery.com>
6172
6173 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6174 debug_threads check. Avoid a linear search when not doing debug
6175 output.
6176
ec48365d
PA
61772010-08-27 Pedro Alves <pedro@codesourcery.com>
6178
6179 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6180 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6181 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6182 (process_event): Change local fd's type to gdb_fildes_t.
6183 (create_file_handler): Adjust prototype.
6184 (delete_file_handler): Adjust prototype.
6185 (handle_file_event): Adjust prototype. Use pfildes.
6186 (create_file_event): Adjsut prototype.
6187 * remote-utils.c (remote_desc, listen_desc): Change type to
6188 gdb_fildes_t.
6189 * server.h: New gdb_fildes_t typedef.
6190 [USE_WIN32API]: Include winsock2.h.
6191 (delete_file_handler, add_file_handler): Adjust prototypes.
6192 (pfildes): Declare.
6193 * utils.c (pfildes): New.
6194
854d88f0
PA
61952010-08-27 Pedro Alves <pedro@codesourcery.com>
6196
6197 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6198 * configure: Regenerate.
6199
0146f85b
PA
62002010-08-27 Pedro Alves <pedro@codesourcery.com>
6201
6202 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6203 (linux_done_accessing_memory): ... this.
6204 (linux_target_ops): Adjust.
6205 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6206 * nto-low.c (nto_target_ops): Adjust comment.
6207 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6208 * spu-low.c (spu_target_ops): Adjust comment.
6209 * target.h (target_ops): Rename unprepare_to_access_memory field
6210 to done_accessing_memory.
6211 (unprepare_to_access_memory): Rename to ...
6212 (done_accessing_memory): ... this.
6213
90d74c30
PA
62142010-08-26 Pedro Alves <pedro@codesourcery.com>
6215
6216 * linux-low.c (linux_prepare_to_access_memory): New.
6217 (linux_unprepare_to_access_memory): New.
6218 (linux_target_ops): Install them.
6219 * server.c (read_memory): Rename to ...
6220 (gdb_read_memory): ... this. Use
6221 prepare_to_access_memory/prepare_to_access_memory.
6222 (write_memory): Rename to ...
6223 (gdb_write_memory): ... this. Use
6224 prepare_to_access_memory/prepare_to_access_memory.
6225 (handle_search_memory_1): Adjust.
6226 (process_serial_event): Adjust.
6227 * target.h (struct target_ops): New fields
6228 prepare_to_access_memory and unprepare_to_access_memory.
6229 (prepare_to_access_memory, unprepare_to_access_memory): New.
6230 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6231 prepare_to_access_memory/prepare_to_access_memory.
6232 * nto-low.c (nto_target_ops): Adjust.
6233 * spu-low.c (spu_target_ops): Adjust.
6234 * win32-low.c (win32_target_ops): Adjust.
6235
fd467969
PA
62362010-08-26 Pedro Alves <pedro@codesourcery.com>
6237
6238 * Makefile.in (WARN_CFLAGS): Get it from configure.
6239 (WERROR_CFLAGS): New.
6240 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6241 * configure.ac: Introduce --enable-werror, which adds -Werror to
6242 the compiler command line. Enabled by default. Disable with
6243 --disable-werror. Add -Wdeclaration-after-statement
6244 Wpointer-arith and -Wformat-nonliteral to warning flags.
6245 * configure: Regenerate.
6246
331e2f5f
PA
62472010-08-26 Pedro Alves <pedro@codesourcery.com>
6248
6249 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6250
e581f2b4
PA
62512010-08-26 Pedro Alves <pedro@codesourcery.com>
6252
6253 * gdbreplay.c (remote_error): New.
6254 (gdbchar): New.
6255 (expect): Use gdbchar. Check for error reading from GDB.
6256 Clarify sync error output.
6257 (play): Check for errors writing to GDB.
6258 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6259 * remote-utils.c (getpkt): Check for errors writing to the remote
6260 descriptor.
6261
3c11dd79
PA
62622010-08-25 Pedro Alves <pedro@codesourcery.com>
6263
6264 * linux-low.c (linux_wait_1): Move non-debugging code out of
6265 `debug_threads' control.
6266
d20a8ad9
PA
62672010-08-25 Pedro Alves <pedro@codesourcery.com>
6268
6269 * linux-low.c (linux_wait_1): Don't set last_status here.
6270 * server.c (push_event, queue_stop_reply_callback): Assert we're
6271 not pushing a TARGET_WAITKIND_IGNORE event.
6272 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6273 (myresume, handle_target_event): Set the thread's last_resume_kind
6274 and last_status from the target returned status.
6275
964e4306
PA
62762010-08-25 Pedro Alves <pedro@codesourcery.com>
6277
6278 PR threads/10729
6279
6280 * linux-x86-low.c (update_debug_registers_callback): New.
6281 (i386_dr_low_set_addr): Use it.
6282 (i386_dr_low_get_addr): New.
6283 (i386_dr_low_set_control): Use update_debug_registers_callback.
6284 (i386_dr_low_get_control): New.
6285 (i386_dr_low_get_status): Adjust.
6286 * linux-low.c (linux_stop_lwp): New.
6287 * linux-low.h (linux_stop_lwp): Declare.
6288
6289 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6290 argument instead of a i386_debug_reg_state.
6291 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6292 a i386_debug_reg_state.
6293 (i386_insert_aligned_watchpoint): Adjust.
6294 (i386_remove_aligned_watchpoint): Adjust.
6295 (i386_low_stopped_data_address): Read the debug registers from the
6296 inferior instead of from the mirrors.
6297 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6298 (i386_dr_low_get_addr): Declare.
6299 (i386_dr_low_get_control): Declare.
6300 (i386_dr_low_get_status): Change prototype.
6301
6302 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6303 (i386_dr_low_get_addr): New.
6304 (i386_dr_low_get_control): New.
6305 (i386_dr_low_get_status): Adjust prototype. Return
6306 dr_status_mirror.
6307 (i386_initial_stuff): Clear dr_status_mirror and
6308 dr_control_mirror.
6309 (i386_get_thread_context): Adjust.
6310 (i386_set_thread_context): Adjust.
6311 (i386_thread_added): Adjust.
6312
5f21a75b
PA
63132010-08-24 Pedro Alves <pedro@codesourcery.com>
6314
6315 * linux-low.h (linux_thread_area): Delete declaration.
6316
3e4c1235
TS
63172010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6318
6319 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6320 after its termination.
6321
1971b033
PA
63222010-08-09 Pedro Alves <pedro@codesourcery.com>
6323
6324 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6325 (gdb_wants_all_stopped): Delete.
6326 (linux_wait_1): Don't call them.
6327 * server.c (handle_v_cont): Tag all threads as want-stopped.
6328 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6329 stopped as "client-wants-stopped".
6330
310444ac
PA
63312010-07-31 Pedro Alves <pedro@codesourcery.com>
6332
6333 * Makefile.in (signals_h): New.
6334 (server_h): Depend on it.
6335 (server.o): Don't depend on $(signals_def).
6336 (signals.o): Depend on $(signals_def).
6337
a19cae16
JK
63382010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6339
6340 * Makefile.in (signals_def): New.
6341 (server_h): Append include/gdb/signals.h and signals_def.
6342 (server.o): Append signals_def.
6343
30d50328
JK
63442010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6345
6346 * server.c (handle_target_event): Use target_signal_to_host for
6347 resume_info.sig initialization.
6348 * target.h (struct thread_resume) <sig>: New comment.
6349
5c3216e2
OS
63502010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6351
c6f46ca0
OS
6352 * server.c (handle_query): strcpy() the returned string from paddress()
6353 instead of sprintf().
5c3216e2
OS
6354 * utils.c (paddress): Return phex_nz().
6355
6bd31874
JB
63562010-07-07 Joel Brobecker <brobecker@adacore.com>
6357
6358 * server.c (handle_v_cont): Call mourn_inferior if process
6359 just exited.
6360 (myresume): Likewise.
6361
0fb4aa4b
PA
63622010-07-01 Pedro Alves <pedro@codesourcery.com>
6363
6364 Static tracepoints, and integration with UST.
6365
6366 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6367 * mem-break.c (uninsert_all_breakpoints)
6368 (reinsert_all_breakpoints): New.
6369 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6370 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6371 (gdb_agent_ust_loaded, helper_thread_id)
6372 (gdb_agent_helper_thread_id): New macros.
6373 (struct ipa_sym_addresses): Add addr_ust_loaded,
6374 addr_helper_thread_id, addr_cmd_buf.
6375 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6376 (in_process_agent_loaded_ust): New.
6377 (write_e_ust_not_loaded): New.
6378 (maybe_write_ipa_ust_not_loaded): New.
6379 (struct collect_static_trace_data_action): New.
6380 (enum tracepoint_type) <static_tracepoint>: New.
6381 (struct tracepoint) <handle>: Mention static tracepoints.
6382 (struct static_tracepoint_ctx): New.
6383 (CMD_BUF_SIZE): New.
6384 (add_tracepoint_action): Handle static tracepoint actions.
6385 (unprobe_marker_at): New.
6386 (clear_installed_tracepoints): Handle static tracepoints.
6387 (cmd_qtdp): Handle static tracepoints.
6388 (probe_marker_at): New.
6389 (cmd_qtstart): Handle static tracepoints.
6390 (response_tracepoint): Handle static tracepoints.
6391 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6392 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6393 (get_context_regcache): Handle static tracepoints.
6394 (do_action_at_tracepoint): Handle static tracepoint actions.
6395 (traceframe_find_block_type): Handle static trace data blocks.
6396 (traceframe_read_sdata): New.
6397 (download_tracepoints): Download static tracepoint actions.
6398 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6399 (GDB_PROBE_NAME): New.
6400 (ust_ops): New.
6401 (GET_UST_SYM): New.
6402 (USTF): New.
6403 (dlsym_ust): New.
6404 (ust_marker_to_static_tracepoint): New.
6405 (gdb_probe): New.
6406 (collect_ust_data_at_tracepoint): New.
6407 (gdb_ust_probe): New.
6408 (UNIX_PATH_MAX, SOCK_DIR): New.
6409 (gdb_ust_connect_sync_socket): New.
6410 (resume_thread, stop_thread): New.
6411 (run_inferior_command): New.
6412 (init_named_socket): New.
6413 (gdb_ust_socket_init): New.
6414 (cstr_to_hexstr): New.
6415 (next_st): New.
6416 (first_marker, next_marker): New.
6417 (response_ust_marker): New.
6418 (cmd_qtfstm, cmd_qtsstm): New.
6419 (unprobe_marker_at, probe_marker_at): New.
6420 (cmd_qtstmat, gdb_ust_thread): New.
6421 (gdb_ust_init): New.
6422 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6423 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6424 (ST_REGENTRY): New.
6425 (x86_64_st_collect_regmap): New.
6426 (X86_64_NUM_ST_COLLECT_GREGS): New.
6427 (AMD64_RIP_REGNUM): New.
6428 (supply_static_tracepoint_registers): New.
6429 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6430 (ST_REGENTRY): New.
6431 (i386_st_collect_regmap): New.
6432 (i386_NUM_ST_COLLECT_GREGS): New.
6433 (supply_static_tracepoint_registers): New.
6434 * server.c (handle_query): Handle qXfer:statictrace:read.
6435 <qSupported>: Report support for StaticTracepoints, and
6436 qXfer:statictrace:read features.
6437 * server.h (traceframe_read_sdata)
6438 (supply_static_tracepoint_registers): Declare.
6439 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6440 (unpack_varlen_hex): Include in IPA build.
6441 * Makefile.in (ustlibs, ustinc): New.
6442 (IPA_OBJS): Add remote-utils-ipa.o.
6443 ($(IPA_LIB)): Link -ldl and -lpthread.
6444 (UST_CFLAGS): New.
6445 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6446 * config.in, configure: Regenerate.
6447
9e4344e5
PA
64482010-06-20 Ian Lance Taylor <iant@google.com>
6449 Pedro Alves <pedro@codesourcery.com>
6450
6451 * linux-x86-low.c (always_true): Delete.
6452 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6453 trying to fool the compiler with always_true.
6454
c6beb2cb
PA
64552010-06-20 Pedro Alves <pedro@codesourcery.com>
6456
6457 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6458 conditions in gdbserver.
6459
d2ed6730
UW
64602010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6461
6462 * spu-low.c (spu_read_memory): Wrap around local store limit.
6463 (spu_write_memory): Likewise.
6464
4e29fb54
PA
64652010-06-15 Pedro Alves <pedro@codesourcery.com>
6466
6467 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6468 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6469 LONGEST uses.
6470 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6471 uses.
6472 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6473 uses with LONGEST uses.
6474
6a271cae
PA
64752010-06-14 Stan Shebs <stan@codesourcery.com>
6476 Pedro Alves <pedro@codesourcery.com>
6477
6478 Bytecode compiler.
6479
6480 * linux-x86-low.c: Include limits.h.
6481 (add_insns): New.
6482 (always_true): New.
6483 (EMIT_ASM): New.
6484 (EMIT_ASM32): New.
6485 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6486 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6487 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6488 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6489 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6490 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6491 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6492 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6493 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6494 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6495 (amd64_emit_void_call_2): New.
6496 (amd64_emit_ops): New.
6497 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6498 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6499 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6500 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6501 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6502 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6503 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6504 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6505 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6506 (i386_emit_stack_adjust, i386_emit_int_call_1)
6507 (i386_emit_void_call_2): New.
6508 (i386_emit_ops): New.
6509 (x86_emit_ops): New.
6510 (the_low_target): Install x86_emit_ops.
6511 * server.h (struct emit_ops): New.
6512 (get_raw_reg_func_addr): Declare.
6513 (current_insn_ptr, emit_error): Declare.
6514 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6515 (set_trace_state_variable_value): New defines.
6516 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6517 addr_get_trace_state_variable_value and
6518 addr_set_trace_state_variable_value.
6519 (symbol_list): New fields for get_raw_reg,
6520 get_trace_state_variable_value and set_trace_state_variable_value.
6521 (condfn): New typedef.
6522 (struct tracepoint): New field `compiled_cond'.
6523 (do_action_at_tracepoint): Clear compiled_cond.
6524 (get_trace_state_variable_value, set_trace_state_variable_value):
6525 Export in the IPA.
6526 (condition_true_at_tracepoint): If there's a compiled condition,
6527 run that.
6528 (current_insn_ptr, emit_error): New globals.
6529 (struct bytecode_address): New.
6530 (get_raw_reg_func_addr): New.
6531 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6532 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6533 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6534 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6535 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6536 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6537 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6538 (compile_tracepoint_condition, compile_bytecodes): New.
6539 * target.h (emit_ops): Forward declare.
6540 (struct target_ops): New field emit_ops.
6541 (target_emit_ops): New.
6542 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6543 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6544 * linux-low.c (linux_emit_ops): New.
6545 (linux_target_ops): Install it.
6546 * linux-low.h (struct linux_target_ops): New field emit_ops.
6547
92b72907
UW
65482010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6549
6550 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6551 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6552
fa593d66
PA
65532010-06-01 Pedro Alves <pedro@codesourcery.com>
6554 Stan Shebs <stan@codesourcery.com>
6555
6556 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6557 (all): Depend on $(extra_libraries).
6558 (install-only): Install the IPA.
6559 (IPA_OBJS, IPA_LIB): New.
6560 (clean): Remove the IPA lib.
6561 (IPAGENT_CFLAGS): New.
6562 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6563 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6564 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6565 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6566 * configure.ac: Check for atomic builtins support in the compiler.
6567 (IPA_DEPFILES, extra_libraries): Define.
6568 * configure.srv (ipa_obj): Add description.
6569 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6570 (i[34567]86-*-linux*): Set ipa_obj.
6571 (x86_64-*-linux*): Set ipa_obj.
6572 * linux-low.c (stabilizing_threads): New.
6573 (supports_fast_tracepoints): New.
6574 (linux_detach): Stabilize threads before detaching.
6575 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6576 the lwp is either not stabilizing, or is moving out of a jump pad.
6577 (linux_fast_tracepoint_collecting): New.
6578 (maybe_move_out_of_jump_pad): New.
6579 (enqueue_one_deferred_signal): New.
6580 (dequeue_one_deferred_signal): New.
6581 (linux_wait_for_event_1): If moving out of a jump pad, defer
6582 pending signals to later.
6583 (linux_stabilize_threads): New.
6584 (linux_wait_1): Check if threads need moving out of jump pads, and
6585 do it if so.
6586 (stuck_in_jump_pad_callback): New.
6587 (move_out_of_jump_pad_callback): New.
6588 (lwp_running): New.
6589 (linux_resume_one_lwp): Handle moving out of jump pads.
6590 (linux_set_resume_request): Dequeue deferred signals.
6591 (need_step_over_p): Also step over fast tracepoint jumps.
6592 (start_step_over): Also uninsert fast tracepoint jumps.
6593 (finish_step_over): Also reinsert fast tracepoint jumps.
6594 (linux_install_fast_tracepoint_jump): New.
6595 (linux_target_ops): Install linux_stabilize_threads and
6596 linux_install_fast_tracepoint_jump_pad.
6597 * linux-low.h (linux_target_ops) <get_thread_area,
6598 install_fast_tracepoint_jump_pad>: New fields.
6599 (struct lwp_info) <collecting_fast_tracepoint,
6600 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6601 (linux_get_thread_area): Declare.
6602 * linux-x86-low.c (jump_insn): New.
6603 (x86_get_thread_area): New.
6604 (append_insns): New.
6605 (push_opcode): New.
6606 (amd64_install_fast_tracepoint_jump_pad): New.
6607 (i386_install_fast_tracepoint_jump_pad): New.
6608 (x86_install_fast_tracepoint_jump_pad): New.
6609 (the_low_target): Install x86_get_thread_area and
6610 x86_install_fast_tracepoint_jump_pad.
6611 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6612 (struct fast_tracepoint_jump): New.
6613 (fast_tracepoint_jump_insn): New.
6614 (fast_tracepoint_jump_shadow): New.
6615 (find_fast_tracepoint_jump_at): New.
6616 (fast_tracepoint_jump_here): New.
6617 (delete_fast_tracepoint_jump): New.
6618 (set_fast_tracepoint_jump): New.
6619 (uninsert_fast_tracepoint_jumps_at): New.
6620 (reinsert_fast_tracepoint_jumps_at): New.
6621 (set_breakpoint_at): Use write_inferior_memory.
6622 (uninsert_raw_breakpoint): Use write_inferior_memory.
6623 (check_mem_read): Mask out fast tracepoint jumps.
6624 (check_mem_write): Mask out fast tracepoint jumps.
6625 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6626 (set_fast_tracepoint_jump): Declare.
6627 (delete_fast_tracepoint_jump)
6628 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6629 (reinsert_fast_tracepoint_jumps_at): Declare.
6630 * regcache.c: Don't compile many functions when building the
6631 in-process agent library.
6632 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6633 the register buffer in the heap.
6634 (free_register_cache): If the register buffer isn't owned by the
6635 regcache, don't free it.
6636 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6637 pre-existing register caches.
6638 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6639 type.
6640 (convert_ascii_to_int): : Constify `from' parameter type.
6641 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6642 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6643 the needed buffer in-place.
6644 (relocate_instruction): New.
6645 * server.c (handle_query) <qSymbols>: If the target supports
6646 tracepoints, give it a chance of looking up symbols. Report
6647 support for fast tracepoints.
6648 (handle_status): Stabilize threads.
6649 (process_serial_event): Adjust.
6650 * server.h (struct fast_tracepoint_jump): Forward declare.
6651 (struct process_info) <fast_tracepoint_jumps>: New field.
6652 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6653 (decode_X_packet, decode_M_packet): Adjust.
6654 (relocate_instruction): Declare.
6655 (in_process_agent_loaded): Declare.
6656 (tracepoint_look_up_symbols): Declare.
6657 (struct fast_tpoint_collect_status): Declare.
6658 (fast_tracepoint_collecting): Declare.
6659 (force_unlock_trace_buffer): Declare.
6660 (handle_tracepoint_bkpts): Declare.
6661 (initialize_low_tracepoint)
6662 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6663 * target.h (struct target_ops) <stabilize_threads,
6664 install_fast_tracepoint_jump_pad>: New fields.
6665 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6666 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6667 [HAVE_STDINT_H]: Include stdint.h.
6668 (trace_debug_1): Rename to ...
6669 (trace_vdebug): ... this.
6670 (trace_debug): Rename to ...
6671 (trace_debug_1): ... this. Add `level' parameter.
6672 (trace_debug): New.
6673 (ATTR_USED, ATTR_NOINLINE): New.
6674 (IP_AGENT_EXPORT): New.
6675 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6676 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6677 (about_to_request_buffer_space, trace_buffer_is_full)
6678 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6679 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6680 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6681 (traceframe_write_count, traceframes_created)
6682 (trace_state_variables)
6683 New renaming defines.
6684 (struct ipa_sym_addresses): New.
6685 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6686 (symbol_list): New.
6687 (ipa_sym_addrs): New.
6688 (all_tracepoint_symbols_looked_up): New.
6689 (in_process_agent_loaded): New.
6690 (write_e_ipa_not_loaded): New.
6691 (maybe_write_ipa_not_loaded): New.
6692 (tracepoint_look_up_symbols): New.
6693 (debug_threads) [IN_PROCESS_AGENT]: New.
6694 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6695 (UNKNOWN_SIDE_EFFECTS): New.
6696 (stop_tracing): New.
6697 (flush_trace_buffer): New.
6698 (stop_tracing_bkpt): New.
6699 (flush_trace_buffer_bkpt): New.
6700 (read_inferior_integer): New.
6701 (read_inferior_uinteger): New.
6702 (read_inferior_data_pointer): New.
6703 (write_inferior_data_pointer): New.
6704 (write_inferior_integer): New.
6705 (write_inferior_uinteger): New.
6706 (struct collect_static_trace_data_action): Delete.
6707 (enum tracepoint_type): New.
6708 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6709 <actions_str, step_actions, step_actions_str>: Only include in
6710 GDBserver.
fa593d66
PA
6711 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6712 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6713 (tracepoints): Use IP_AGENT_EXPORT.
6714 (last_tracepoint): Don't include in the IPA.
6715 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6716 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6717 (alloced_trace_state_variables): New.
6718 (trace_state_variables): Use IP_AGENT_EXPORT.
6719 (traceframe_t): Delete unused variable.
6720 (circular_trace_buffer): Don't include in the IPA.
6721 (trace_buffer_start): Delete.
6722 (struct trace_buffer_control): New.
6723 (trace_buffer_free): Delete.
6724 (struct ipa_trace_buffer_control): New.
6725 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6726 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6727 New.
6728 (trace_buffer_ctrl): New.
6729 (TRACE_BUFFER_CTRL_CURR): New.
6730 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6731 Reimplement as macros.
6732 (trace_buffer_wrap): Delete.
6733 (traceframe_write_count, traceframe_read_count)
6734 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6735 (struct tracepoint_hit_ctx) <type>: New field.
6736 (struct fast_tracepoint_ctx): New.
6737 (memory_barrier): New.
6738 (cmpxchg): New.
6739 (record_tracepoint_error): Update atomically in the IPA.
6740 (clear_inferior_trace_buffer): New.
6741 (about_to_request_buffer_space): New.
6742 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6743 updating the same buffer.
6744 (add_tracepoint): Default the tracepoint's type to trap
6745 tracepoint, and orig_size to -1.
6746 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6747 internal variables.
6748 (create_trace_state_variable): New parameter `gdb'. Handle it.
6749 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6750 (cmd_qtdp): Handle fast tracepoints.
6751 (cmd_qtdv): Adjust.
6752 (max_jump_pad_size): New.
6753 (gdb_jump_pad_head): New.
6754 (get_jump_space_head): New.
6755 (claim_jump_space): New.
6756 (sort_tracepoints): New.
6757 (MAX_JUMP_SIZE): New.
6758 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6759 IPA.
6760 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6761 support. Upload fast traceframes, and delete internal IPA
6762 breakpoints.
6763 (stop_tracing_handler): New.
6764 (flush_trace_buffer_handler): New.
6765 (cmd_qtstop): Upload fast tracepoints.
6766 (response_tracepoint): Handle fast tracepoints.
6767 (tracepoint_finished_step): Upload fast traceframes. Set the
6768 tracepoint hit context's tracepoint type.
6769 (handle_tracepoint_bkpts): New.
6770 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6771 type. Add comment about fast tracepoints.
6772 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6773 non-existing action_str field.
6774 (get_context_regcache): Handle fast tracepoints.
6775 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6776 to the regcache.
6777 (fast_tracepoint_from_jump_pad_address): New.
6778 (fast_tracepoint_from_ipa_tpoint_address): New.
6779 (collecting_t): New.
6780 (force_unlock_trace_buffer): New.
6781 (fast_tracepoint_collecting): New.
6782 (collecting): New.
6783 (gdb_collect): New.
6784 (write_inferior_data_ptr): New.
6785 (target_tp_heap): New.
6786 (target_malloc): New.
6787 (download_agent_expr): New.
6788 (UALIGN): New.
6789 (download_tracepoints): New.
6790 (download_trace_state_variables): New.
6791 (upload_fast_traceframes): New.
6792 (IPA_FIRST_TRACEFRAME): New.
6793 (IPA_NEXT_TRACEFRAME_1): New.
6794 (IPA_NEXT_TRACEFRAME): New.
6795 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6796 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6797 (gdb_jump_pad_buffer_end): New.
6798 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6799 (initialize_tracepoint): Adjust.
6800 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6801 buffer. Initialize the low module.
6802 * utils.c (PREFIX, TOOLNAME): New.
6803 (malloc_failure): Use PREFIX.
6804 (error): In the IPA, an error causes an exit.
6805 (fatal, warning): Use PREFIX.
6806 (internal_error): Use TOOLNAME.
6807 (NUMCELLS): Increase to 10.
6808 * configure, config.in: Regenerate.
6809
d149dd1d
PA
68102010-06-01 Pedro Alves <pedro@codesourcery.com>
6811
6812 * server.c (handle_query) <qSupported>: Do two passes over the
6813 qSupported string to avoid nesting strtok.
6814
f6528abd
JK
68152010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6816
6817 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6818 (CDEPS): New.
6819 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6820 -Wl,--dynamic-list.
6821 * configure: Regenerate.
6822 * proc-service.list: New.
6823
ca2a87a0
JK
68242010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6825
6826 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6827 New comment.
6828
363a6e9f
OS
68292010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6830
6831 * gdbreplay.c (remote_open): Check error return from socket() call by
6832 its equality to -1 not by it being negative.
6833 * remote-utils.c (remote_open): Likewise.
6834
d23b6cb1
PA
68352010-05-23 Pedro Alves <pedro@codesourcery.com>
6836
6837 * config.h: Regenerate.
6838
28d3cf85
MK
68392010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6840
6841 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6842 doesn't provide PTRACE_GET_THREAD_AREA.
6843
fea36a59
MK
68442010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6845
6846 * linux-m68k-low.c: Include <asm/ptrace.h>
6847 (ps_get_thread_area): Implement.
6848
24b066ba
DE
68492010-05-03 Doug Evans <dje@google.com>
6850
6851 * event-loop.c (struct callback_event): New struct.
6852 (callback_list): New global.
6853 (append_callback_event, delete_callback_event): New functions.
6854 (process_callback): New function.
6855 (start_event_loop): Call it.
6856 * remote-utils.c (NOT_SCHEDULED): Define.
6857 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6858 moved out of readchar.
6859 (readchar): Rewrite. Call reschedule before returning.
6860 (reset_readchar): New function.
6861 (remote_close): Call it.
6862 (process_remaining, reschedule): New functions.
6863 * server.h (callback_handler_func): New typedef.
6864 (append_callback_event, delete_callback_event): Declare.
6865
9836d6ea
PA
68662010-05-03 Pedro Alves <pedro@codesourcery.com>
6867
6868 * proc-service.c (ps_pglobal_lookup): Use
6869 thread_db_look_up_one_symbol.
6870 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6871 parameter. Use it instead of all_symbols_looked_up.
6872 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6873 field.
6874 (all_symbols_looked_up): Don't declare.
6875 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6876 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6877 field.
6878 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6879 Set all_symbols_looked_up here.
6880 (thread_db_look_up_one_symbol): New.
6881 (thread_db_get_tls_address): Adjust.
6882 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6883 thread_db object on the heap, and tentatively set it in the
6884 process structure.
6885 (thread_db_init): Don't set all_symbols_looked_up here.
6886 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6887
7984d532
PA
68882010-05-03 Pedro Alves <pedro@codesourcery.com>
6889
6890 * linux-low.c (linux_kill, linux_detach): Adjust.
6891 (status_pending_p_callback): Remove redundant statement. Check
6892 for !TARGET_WAITIKIND_IGNORE, instead of
6893 TARGET_WAITKIND_STOPPED.
6894 (handle_tracepoints): Make sure LWP is locked. Adjust.
6895 (linux_wait_for_event_1): Adjust.
6896 (linux_cancel_breakpoints): New.
6897 (unsuspend_one_lwp): New.
6898 (unsuspend_all_lwps): New.
6899 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6900 (send_sigstop_callback): Change return type to int, add new
6901 `except' parameter and handle it.
6902 (suspend_and_send_sigstop_callback): New.
6903 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6904 pass them down. If SUSPEND, also increment the lwp's suspend
6905 count.
6906 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6907 (need_step_over_p): Don't consider suspended LWPs.
6908 (start_step_over): Adjust.
6909 (proceed_one_lwp): Change return type to int, add new `except'
6910 parameter and handle it.
6911 (unsuspend_and_proceed_one_lwp): New.
6912 (proceed_all_lwps): Use find_inferior instead of
6913 for_each_inferior.
6914 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6915 also decrement the suspend count of LWPs. Pass `except' down,
6916 instead of hacking its suspend count.
6917 (linux_pause_all): Add `freeze' parameter. Adjust.
6918 (linux_unpause_all): New.
6919 (linux_target_ops): Install linux_unpause_all.
6920 * server.c (handle_status): Adjust.
6921 * target.h (struct target_ops): New fields `unpause_all' and
6922 `cancel_breakpoints'. Add new parameter to `pause_all'.
6923 (pause_all): Add new `freeze' parameter.
6924 (unpause_all): New.
6925 (cancel_breakpoints): New.
6926 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6927 cancel breakpoints.
6928 (cmd_qtstart): Pause threads.
6929 (stop_tracing): Pause threads, and cancel breakpoints.
6930 * win32-low.c (win32_target_ops): Adjust.
6931
e471f25b
PA
69322010-05-03 Pedro Alves <pedro@codesourcery.com>
6933
6934 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6935 the inferior right away from here...
6936 (linux_wait_1): ... to here, and adjust to check the thread's
6937 last_resume_kind instead of the lwp's step or stop_expected flags.
6938
1915ef4f
PA
69392010-05-02 Pedro Alves <pedro@codesourcery.com>
6940
6941 * README: Use consistent `GDB' and `GDBserver' spellings.
6942
f9e39928
PA
69432010-05-02 Pedro Alves <pedro@codesourcery.com>
6944
6945 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6946 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6947 (linux_detach_one_lwp): Assume the lwp is stopped.
6948 (any_thread_of): Delete.
6949 (linux_detach): Stop all lwps here. Don't blindly delete all
6950 breakpoints.
6951 (delete_lwp_callback): New.
6952 (linux_mourn): Delete all lwps of the process that is gone.
6953 (linux_wait_1): Don't delete the last lwp of the process here.
6954 * mem-break.h (mark_breakpoints_out): Declare.
6955 * mem-break.c (mark_breakpoints_out): New.
6956 (free_all_breakpoints): Use it.
6957 * server.c (handle_target_event): If the process is gone, mark
6958 breakpoints out.
6959 * thread-db.c (struct thread_db) <create_bp>: New field.
6960 (thread_db_enable_reporting): Fix prototype. Store a thread event
6961 breakpoint reference in the thread_db struct.
6962 (thread_db_load_search): Clear the thread_db object.
6963 (try_thread_db_load_1): Ditto.
6964 (switch_to_process): New.
6965 (disable_thread_event_reporting): Use it.
6966 (remove_thread_event_breakpoints): New.
6967 (thread_db_detach, thread_db_mourn): Use it.
6968
1e7fc18c
PA
69692010-05-01 Pedro Alves <pedro@codesourcery.com>
6970
6971 * linux-low.c (linux_enable_event_reporting): New.
6972 (linux_wait_for_event_1, handle_extended_wait): Use it.
6973
02fc4de7
PA
69742010-04-30 Pedro Alves <pedro@codesourcery.com>
6975
6976 * linux-low.c (linux_kill_one_lwp, linux_kill)
6977 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6978 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6979 SIGSTOP even if the LWP is stopped.
6980 (send_sigstop_callback): New.
6981 (stop_all_lwps): Use send_sigstop_callback instead.
6982 (linux_resume_one_thread): Adjust.
6983 (proceed_one_lwp): Still proceed an LWP that the client has
6984 requested to stop, if we haven't reported it as stopped yet. Make
6985 sure that LWPs the client want stopped, have a pending SIGSTOP.
6986
bc3b5632
DE
69872010-04-26 Doug Evans <dje@google.com>
6988
ae1ada35
DE
6989 * server.c (handle_general_set): Make static.
6990
bc3b5632
DE
6991 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6992 Print received char after testing for error/eof instead of before.
6993 (input_interrupt): Tweak comment.
6994
65730243
DE
69952010-04-23 Doug Evans <dje@google.com>
6996
6997 * server.c (start_inferior): Print inferior argv if --debug.
6998
a8ae7dc0
AR
69992010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7000
7001 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7002 * nto-x86-low.c: Include server.h
7003
1c07cc19
PM
70042010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7005
7006 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7007 be consistent with other sources of this directory.
7008 (init_registers_amd64): Correct name of source file of this function
7009 in the comment.
7010
e0a61e09
PM
70112010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7012
7013 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7014 64-bit executables.
7015
54709339
PM
70162010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7017
7018 * win32-i386-low.c: Add 64-bit support.
7019 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7020 (init_registers_amd64): Declare.
7021 (mappings): Add 64-bit version of array.
7022 (init_windows_x86): New function.
7023 (the_low_target): Change init_arch field to init_windows_x86.
7024
e8f0053d
PM
70252010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7026
7027 * win32-low.c: Adapt to support also 64-bit architecture.
7028 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7029 (get_image_name): Use SIZE_T type for local variable `done'.
7030 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7031 (toolhelp_get_dll_name): Idem.
7032 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7033 Use uintptr_t typecast to avoid warning.
7034 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7035 (handle_exception): Use phex_nz to avoid warning.
7036 (win32_wait): Remove unused local variable `process'.
7037
c481e77e
PM
70382010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7039
7040 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7041 `amd64-avx.o'.
7042
12ea4b69
PM
70432010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7044
7045 * configure.ac: Use `ws2_32' library for srv_mingw.
7046 * configure: Regenerate.
7047 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7048 * remote-utils.c: Likewise.
7049
f6d1620c
L
70502010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7051
7052 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7053 if __x86_64__ is defined.
7054
8e642873
PM
70552010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7056
7057 * configure: Regenerate.
7058
711e434b
PM
70592010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7060
7061 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7062 * target.h (target_ops): New get_tib_address field.
7063 * win32-low.h (win32_thread_info): Add thread_local_base field.
7064 * win32-low.c (child_add_thread): Add tlb argument.
7065 Set thread_local_base field to TLB.
7066 (get_child_debug_event): Adapt to child_add_thread change.
7067 (win32_get_tib_address): New function.
7068 (win32_target_ops): Set get_tib_address field to
7069 win32_get_tib_address.
7070 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7071
505106cd
PA
70722010-04-12 Pedro Alves <pedro@codesourcery.com>
7073
505106cd
PA
7074 * linux-low.c (linux_mourn): Also remove the process.
7075 * server.c (handle_target_event): Don't remove the process here.
7076 * nto-low.c (nto_mourn): New.
7077 (nto_target_ops): Install it.
7078 * spu-low.c (spu_mourn): New.
7079 (spu_target_ops): Install it.
7080 * win32-low.c (win32_mourn): New.
7081 (win32_target_ops): Install it.
7082
e8470a06
PA
70832010-04-12 Pedro Alves <pedro@codesourcery.com>
7084
7085 * server.h (buffer_xml_printf): Remove redundant `;'.
7086
45ba0d02
PA
70872010-04-12 Pedro Alves <pedro@codesourcery.com>
7088
7089 * regcache.c (set_register_cache): Invalidate regcaches before
7090 changing the register cache layout.
7091 (regcache_invalidate_one): Allow a NULL regcache.
7092 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7093 regcaches before changing the register cache layout or the target
7094 regsets.
7095
59e04013
L
70962010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7097
7098 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7099 variable warning on Linux/x86-64.
7100
8336d594
PA
71012010-04-11 Pedro Alves <pedro@codesourcery.com>
7102
7103 GDBserver disconnected tracing support.
7104
7105 * linux-low.c (linux_remove_process): Delete.
7106 (add_lwp): Don't set last_resume_kind here.
7107 (linux_kill): Use `mourn'.
7108 (linux_detach): Use `thread_db_detach', and `mourn'.
7109 (linux_mourn): New.
7110 (linux_attach_lwp_1): Adjust comment.
7111 (linux_attach): last_resume_kind moved the thread_info; adjust.
7112 (status_pending_p_callback): Adjust.
7113 (linux_wait_for_event_1): Adjust.
7114 (count_events_callback, select_singlestep_lwp_callback)
7115 (select_event_lwp_callback, cancel_breakpoints_callback)
7116 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7117 (proceed_one_lwp): Adjust.
7118 (linux_async): Add debug output.
7119 (linux_thread_stopped): New.
7120 (linux_pause_all): New.
7121 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7122 linux_pause_all.
7123 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7124 (thread_db_free): Delete declaration.
7125 (thread_db_detach, thread_db_mourn): Declare.
7126 * thread-db.c (thread_db_init): Use thread_db_mourn.
7127 (thread_db_free): Delete, split in two.
7128 (disable_thread_event_reporting): New.
7129 (thread_db_detach): New.
7130 (thread_db_mourn): New.
7131
7132 * server.h (struct thread_info) <last_resume_kind>: New field.
7133 <attached>: Add comment.
7134 <gdb_detached>: New field.
7135 (handler_func): Change return type to int.
7136 (handle_serial_event, handle_target_event): Ditto.
7137 (gdb_connected): Declare.
7138 (tracing): Delete.
7139 (disconnected_tracing): Declare.
7140 (stop_tracing): Declare.
7141
7142 * server.c (handle_query) <qSupported>: Report support for
7143 disconnected tracing.
7144 (queue_stop_reply_callback): Account for running threads.
7145 (gdb_wants_thread_stopped): New.
7146 (gdb_wants_all_threads_stopped): New.
7147 (gdb_reattached_process): New.
7148 (handle_status): Clear the `gdb_detached' flag of all processes.
7149 In all-stop, stop all threads.
7150 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7151 (process_serial_event): If the remote connection breaks, or if an
7152 exit was forced with "monitor exit", force an event loop exit.
7153 Handle disconnected tracing on detach.
7154 (handle_serial_event): Adjust.
7155 (handle_target_event): If GDB isn't connected, forward events back
7156 to the inferior, unless the last process exited, in which case,
7157 exit gdbserver. Adjust interface.
7158
7159 * remote-utils.c (remote_open): Don't block in accept. Instead
7160 register an event loop source on the listen socket file
7161 descriptor. Refactor bits into ...
7162 (listen_desc): ... this new global.
7163 (gdb_connected): ... this new function.
7164 (enable_async_notification): ... this new function.
7165 (handle_accept_event): ... this new function.
7166 (remote_close): Clear remote_desc.
7167
7168 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7169
7170 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7171 New fields.
7172 (mourn_inferior): Define.
7173 (target_process_qsupported): Avoid the dangling else problem.
7174 (thread_stopped): Define.
7175 (pause_all): Define.
7176 (target_waitstatus_to_string): Declare.
7177 * target.c (target_waitstatus_to_string): New.
7178
7179 * tracepoint.c (tracing): Make extern.
7180 (disconnected_tracing): New.
7181 (stop_tracing): Make extern. Handle tracing stops due to GDB
7182 disconnecting.
7183 (cmd_qtdisconnected): New.
7184 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7185 (handle_tracepoint_general_set): Handle QTDisconnected.
7186
7187 * event-loop.c (event_handler_func): Change return type to int.
7188 (process_event): Bail out if the event handler wants the event
7189 loop to stop.
7190 (handle_file_event): Ditto.
7191 (start_event_loop): Bail out if the event handler wants the event
7192 loop to stop.
7193
7194 * nto-low.c (nto_target_ops): Adjust.
7195 * spu-low.c (spu_wait): Don't remove the process here.
7196 (spu_target_ops): Adjust.
7197 * win32-low.c (win32_wait): Don't remove the process here.
7198 (win32_target_ops): Adjust.
7199
5d267c4c
PA
72002010-04-11 Pedro Alves <pedro@codesourcery.com>
7201
7202 * regcache.c (realloc_register_cache): Invalidate inferior's
7203 regcache before recreating it.
7204
623ccd72
PA
72052010-04-09 Pedro Alves <pedro@codesourcery.com>
7206
7207 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7208
219f2f23
PA
72092010-04-09 Stan Shebs <stan@codesourcery.com>
7210 Pedro Alves <pedro@codesourcery.com>
7211
7212 * server.h (LONGEST): New.
7213 (struct thread_info) <while_stepping>: New field.
7214 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7215 Declare.
7216 (initialize_tracepoint, handle_tracepoint_general_set)
7217 (handle_tracepoint_query, tracepoint_finished_step)
7218 (tracepoint_was_hit, release_while_stepping_state_list):
7219 (current_traceframe): Declare.
7220 * server.c (handle_general_set): Handle tracepoint packets.
7221 (read_memory): New.
7222 (write_memory): New.
7223 (handle_search_memory_1): Use read_memory.
7224 (handle_query): Report support for conditional tracepoints, trace
7225 state variables, and tracepoint sources. Handle tracepoint
7226 queries.
7227 (main): Initialize the tracepoints module.
7228 (process_serial_event): Handle traceframe reads/writes.
7229
7230 * linux-low.c (handle_tracepoints): New.
7231 (linux_wait_1): Call it.
7232 (linux_resume_one_lwp): Handle while-stepping.
7233 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7234 (linux_target_ops): Install them.
7235 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7236 New field.
7237 * linux-x86-low.c (x86_supports_tracepoints): New.
7238 (the_low_target). Install it.
7239
7240 * mem-break.h (delete_breakpoint): Declare.
7241 * mem-break.c (delete_breakpoint): Make external.
7242
7243 * target.h (struct target_ops): Add `supports_tracepoints',
7244 `read_pc', and `write_pc' fields.
7245 (target_supports_tracepoints): Define.
7246 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7247 (phex_nz): New.
7248
7249 * regcache.h (struct regcache) <registers_owned>: New field.
7250 (init_register_cache, regcache_cpy): Declare.
7251 (regcache_read_pc, regcache_write_pc): Declare.
7252 (register_cache_size): Declare.
7253 (supply_regblock): Declare.
7254 * regcache.c (init_register_cache): New.
7255 (new_register_cache): Use it.
7256 (regcache_cpy): New.
7257 (register_cache_size): New.
7258 (supply_regblock): New.
7259 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 7260
219f2f23
PA
7261 * tracepoint.c: New.
7262
7263 * Makefile.in (OBS): Add tracepoint.o.
7264 (tracepoint.o): New rule.
7265
3a13a53b
L
72662010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7267
7268 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7269 (i386-mmx.o): New.
7270 (i386-mmx.c): Likewise.
7271 (i386-mmx-linux.o): Likewise.
7272 (i386-mmx-linux.c): Likewise.
7273
7274 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7275 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7276 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7277 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7278
7279 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7280 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7281 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7282
1570b33e
L
72832010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7284
7285 * Makefile.in (clean): Updated.
7286 (i386-avx.o): New.
7287 (i386-avx.c): Likewise.
7288 (i386-avx-linux.o): Likewise.
7289 (i386-avx-linux.c): Likewise.
7290 (amd64-avx.o): Likewise.
7291 (amd64-avx.c): Likewise.
7292 (amd64-avx-linux.o): Likewise.
7293 (amd64-avx-linux.c): Likewise.
7294
7295 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7296 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7297 (srv_amd64_regobj): Add amd64-avx.o.
7298 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7299 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7300 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7301 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7302 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7303 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7304 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7305
7306 * i387-fp.c: Include "i386-xstate.h".
7307 (i387_xsave): New.
7308 (i387_cache_to_xsave): Likewise.
7309 (i387_xsave_to_cache): Likewise.
7310 (x86_xcr0): Likewise.
7311
7312 * i387-fp.h (i387_cache_to_xsave): Likewise.
7313 (i387_xsave_to_cache): Likewise.
7314 (x86_xcr0): Likewise.
7315
7316 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7317 * linux-crisv32-low.c (target_regsets): Likewise.
7318 * linux-m68k-low.c (target_regsets): Likewise.
7319 * linux-mips-low.c (target_regsets): Likewise.
7320 * linux-ppc-low.c (target_regsets): Likewise.
7321 * linux-s390-low.c (target_regsets): Likewise.
7322 * linux-sh-low.c (target_regsets): Likewise.
7323 * linux-sparc-low.c (target_regsets): Likewise.
7324 * linux-xtensa-low.c (target_regsets): Likewise.
7325
7326 * linux-low.c: Include <sys/uio.h>.
7327 (regsets_fetch_inferior_registers): Support nt_type.
7328 (regsets_store_inferior_registers): Likewise.
7329 (linux_process_qsupported): New.
7330 (linux_target_ops): Add linux_process_qsupported.
7331
7332 * linux-low.h (regset_info): Add nt_type.
7333 (linux_target_ops): Add process_qsupported.
7334
7335 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7336 and <sys/uio.h>.
7337 (init_registers_i386_avx_linux): New.
7338 (init_registers_amd64_avx_linux): Likewise.
7339 (xmltarget_i386_linux_no_xml): Likewise.
7340 (xmltarget_amd64_linux_no_xml): Likewise.
7341 (PTRACE_GETREGSET): Likewise.
7342 (PTRACE_SETREGSET): Likewise.
7343 (x86_fill_xstateregset): Likewise.
7344 (x86_store_xstateregset): Likewise.
7345 (use_xml): Likewise.
7346 (x86_linux_update_xmltarget): Likewise.
7347 (x86_linux_process_qsupported): Likewise.
7348 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7349 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7350 init_registers_i386_linux here. Call
7351 x86_linux_update_xmltarget.
7352 (the_low_target): Add x86_linux_process_qsupported.
7353
7354 * server.c (handle_query): Call target_process_qsupported.
7355
7356 * target.h (target_ops): Add process_qsupported.
7357 (target_process_qsupported): New.
7358
fc7238bb
PA
73592010-04-03 Pedro Alves <pedro@codesourcery.com>
7360
7361 * inferiors.c (add_thread): Set last_status kind to
7362 TARGET_WAITKIND_IGNORE.
7363 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7364 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7365 (linux_wait_1): Move `thread' local definition to block that uses
7366 it. Don't NULL initialize `event_child'.
7367 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7368 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7369 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7370
bdabb078
PA
73712010-04-01 Pedro Alves <pedro@codesourcery.com>
7372
7373 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7374 an extended waitstatus, or by a watchpoint.
7375 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7376 thread was stepping or has been stopped by a watchpoint.
7377
d3bbe7a0
PA
73782010-04-01 Pedro Alves <pedro@codesourcery.com>
7379
7380 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7381 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7382 of another, then delete the previous, and validate all
7383 breakpoints.
7384 (validate_inserted_breakpoint): New.
7385 (delete_disabled_breakpoints): New.
7386 (validate_breakpoints): New.
7387 (check_mem_read): Validate breakpoints before trusting their
7388 shadow. Delete disabled breakpoints.
7389 (check_mem_write): Validate breakpoints before trusting they
7390 should be inserted. Delete disabled breakpoints.
7391 * mem-break.h (validate_breakpoints):
7392 * server.c (handle_query): Validate breakpoints when we see a
7393 qSymbol query.
7394
8b07ae33
PA
73952010-04-01 Pedro Alves <pedro@codesourcery.com>
7396
7397 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7398 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7399 if we could tell there's a GDB breakpoint at stop_pc.
7400 (need_step_over_p): Don't do a step over if we find a GDB
7401 breakpoint at the resume PC.
7402
7403 * mem-break.c (struct raw_breakpoint): New.
7404 (enum bkpt_type): New type `gdb_breakpoint'.
7405 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7406 fields. New field `raw'.
7407 (find_raw_breakpoint_at): New.
7408 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7409 breakpoint instead.
7410 (set_breakpoint_at): Adjust.
7411 (delete_raw_breakpoint): New.
7412 (release_breakpoint): New.
7413 (delete_breakpoint): Rename to...
7414 (delete_breakpoint_1): ... this. Add proc parameter. Use
7415 release_breakpoint. Return ENOENT.
7416 (delete_breakpoint): Reimplement.
7417 (find_breakpoint_at): Delete.
7418 (find_gdb_breakpoint_at): New.
7419 (delete_breakpoint_at): Delete.
7420 (set_gdb_breakpoint_at): New.
7421 (delete_gdb_breakpoint_at): New.
7422 (gdb_breakpoint_here): New.
7423 (set_reinsert_breakpoint): Use release_breakpoint.
7424 (uninsert_breakpoint): Rename to ...
7425 (uninsert_raw_breakpoint): ... this.
7426 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7427 (reinsert_raw_breakpoint): Change parameter type to
7428 raw_breakpoint.
7429 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7430 instead.
7431 (check_breakpoints): Adjust. Use release_breakpoint.
7432 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7433 (breakpoint_inserted_here): Ditto.
7434 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7435 Don't trust the breakpoint's shadow if it is not inserted.
7436 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7437 (delete_all_breakpoints): Adjust.
7438 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7439 use delete_breakpoint_1.
7440
7441 * mem-break.h (breakpoints_supported): Delete declaration.
7442 (set_gdb_breakpoint_at): Declare.
7443 (gdb_breakpoint_here): Declare.
7444 (delete_breakpoint_at): Delete.
7445 (delete_gdb_breakpoint_at): Declare.
7446
7447 * server.h (struct raw_breakpoint): Forward declare.
7448 (struct process_info): New field `raw_breakpoints'.
7449
7450 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7451 breakpoints.
7452
6bf5e0ba
PA
74532010-03-24 Pedro Alves <pedro@codesourcery.com>
7454
7455 * linux-low.c (status_pending_p_callback): Fix comment.
7456 (linux_wait_for_event_1): Move most of the internal breakpoint
7457 handling from here...
7458 (linux_wait_1): ... to here.
7459 (count_events_callback): New.
7460 (select_singlestep_lwp_callback): New.
7461 (select_event_lwp_callback): New.
7462 (cancel_breakpoints_callback): New.
7463 (select_event_lwp): New.
7464 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7465 priority to all LWPs that have had events that should be reported
7466 to the client. Cancel breakpoints when about to reporting the
7467 event to the client, not while stopping lwps. No longer cancel
7468 finished single-steps here.
7469 (cancel_finished_single_step): Delete.
7470 (cancel_finished_single_steps): Delete.
7471
414a389f
PA
74722010-03-24 Pedro Alves <pedro@codesourcery.com>
7473
7474 * mem-break.c (enum bkpt_type): New.
7475 (struct breakpoint): New field `type'.
7476 (set_breakpoint_at): Change return type to struct breakpoint
7477 pointer. Set type to `other_breakpoint' by default.
7478 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7479 in the breakpoint list.
7480 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7481 (reinsert_breakpoint): Rename to ...
7482 (reinsert_raw_breakpoint): ... this.
7483 (reinsert_breakpoints_at): Adjust.
7484 * mem-break.h (struct breakpoint): Declare.
7485 (set_breakpoint_at): Change return type to struct breakpoint
7486 pointer.
7487
2280c721
PA
74882010-03-24 Pedro Alves <pedro@codesourcery.com>
7489
7490 * server.c (handle_query): Assign, not compare.
7491
d50171e4
PA
74922010-03-24 Pedro Alves <pedro@codesourcery.com>
7493
7494 Teach linux gdbserver to step-over-breakpoints.
7495
7496 * linux-low.c (can_hardware_single_step): New.
7497 (supports_breakpoints): New.
7498 (handle_extended_wait): If stopping threads, read the stop pc of
7499 the new cloned LWP.
7500 (get_pc): New.
7501 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7502 low target doesn't support retrieving the PC.
7503 (add_lwp): Set last_resume_kind to resume_continue.
7504 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7505 (linux_attach): Don't clear stop_expected. Set the lwp's
7506 last_resume_kind to resume_stop.
7507 (linux_detach_one_lwp): Don't check for removed breakpoints.
7508 (check_removed_breakpoint): Delete.
7509 (status_pending_p): Rename to ...
7510 (status_pending_p_callback): ... this. Don't check for removed
7511 breakpoints. Don't consider threads that are stopped from GDB's
7512 perspective.
7513 (linux_wait_for_lwp): Always read the stop_pc here.
7514 (cancel_breakpoint): New.
7515 (step_over_bkpt): New global.
7516 (linux_wait_for_event_1): Implement stepping over breakpoints.
7517 (gdb_wants_lwp_stopped): New.
7518 (gdb_wants_all_stopped): New.
7519 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7520 single-step traps here. Store the thread's last reported target
7521 wait status.
7522 (send_sigstop): Don't clear stop_expected. Always set it,
7523 instead.
7524 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7525 (cancel_finished_single_step): New.
7526 (cancel_finished_single_steps): New.
7527 (wait_for_sigstop): Don't cancel finished single-step traps here.
7528 (linux_resume_one_lwp): Don't check for removed breakpoints.
7529 Don't set `step' on non-hardware step archs.
7530 (linux_set_resume_request): Ignore resume_stop requests if already
7531 stopping or stopped. Set the lwp's last_resume_kind.
7532 (resume_status_pending_p): Don't check for removed breakpoints.
7533 (need_step_over_p): New.
7534 (start_step_over): New.
7535 (finish_step_over): New.
7536 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7537 requests. Clear the thread's last reported target waitstatus.
7538 Don't use the `suspended' flag. Don't consider pending breakpoints.
7539 (linux_resume): Start a step-over if necessary.
7540 (proceed_one_lwp): New.
7541 (proceed_all_lwps): New.
7542 (unstop_all_lwps): New.
7543 * linux-low.h (struct lwp_info): Rewrite comment for the
7544 `suspended' flag. Add the `stop_pc' field. Delete the
7545 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7546 Add `'last_resume_kind' and `need_step_over' fields.
7547 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7548 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7549 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7550 (set_raw_breakpoint_at): New.
7551 (set_breakpoint_at): Rewrite to use it.
7552 (reinsert_breakpoint_handler): Delete.
7553 (set_reinsert_breakpoint): New.
7554 (reinsert_breakpoint_by_bp): Delete.
7555 (delete_reinsert_breakpoints): New.
7556 (uninsert_breakpoint): Rewrite.
7557 (uninsert_breakpoints_at): New.
7558 (reinsert_breakpoint): Rewrite.
7559 (reinsert_breakpoints_at): New.
7560 (check_breakpoints): Rewrite.
7561 (breakpoint_here): New.
7562 (breakpoint_inserted_here): New.
7563 (check_mem_read): Adjust.
7564 * mem-break.h (breakpoints_supported, breakpoint_here)
7565 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7566 (reinsert_breakpoint_by_bp): Delete declaration.
7567 (delete_reinsert_breakpoints): Declare.
7568 (reinsert_breakpoint): Delete declaration.
7569 (reinsert_breakpoints_at): Declare.
7570 (uninsert_breakpoint): Delete declaration.
7571 (uninsert_breakpoints_at): Declare.
7572 (check_breakpoints): Adjust prototype.
7573 * server.h: Adjust include order.
7574 (struct thread_info): Declare here. Add a `last_status' field.
7575
30ba68cb
MS
75762010-03-23 Michael Snyder <msnyder@vmware.com>
7577
7578 * server.c (crc32): New function.
7579 (handle_query): Add handling for 'qCRC:' request.
7580
b9a881c2
PA
75812010-03-23 Pedro Alves <pedro@codesourcery.com>
7582
7583 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7584 lwp had been stopped by a watchpoint.
7585
e92d13d5
PA
75862010-03-16 Pedro Alves <pedro@codesourcery.com>
7587
7588 * server.h (internal_error): Declare.
7589 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7590 * utils.c (internal_error): New function.
7591
64daa791
AS
75922010-03-15 Andreas Schwab <schwab@redhat.com>
7593
7594 * configure.srv: Fix typo setting srv_regobj.
7595
f52cd8cd
PA
75962010-03-15 Pedro Alves <pedro@codesourcery.com>
7597
7598 * linux-low.c (fetch_register): Avoid passing a non string literal
7599 format to `error'.
7600 (usr_store_inferior_registers): Ditto.
7601
93ae6fdc
PA
76022010-03-14 Pedro Alves <pedro@codesourcery.com>
7603
7604 * linux-low.c (linux_write_memory): Bail out early if peeking
7605 memory failed.
7606
c3adc08c
PA
76072010-03-14 Pedro Alves <pedro@codesourcery.com>
7608
7609 * linux-low.h (struct lwp_info): New fields
7610 `stopped_by_watchpoint' and `stopped_data_address'.
7611 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7612 here, and cache them in the lwp object.
7613 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7614 directly.
7615 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7616 field.
7617 (linux_stopped_by_watchpoint): Rewrite.
7618 (linux_stopped_data_address): Rewrite.
7619
bce522a2
PA
76202010-03-06 Simo Melenius <simo.melenius@iki.fi>
7621
7622 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7623 switching the current inferior, not before.
7624
90884b2b
L
76252010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7626
7627 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7628 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7629 i386-linux.c and amd64-linux.c.
7630 (reg-i386.o): Removed.
7631 (reg-i386.c): Likewise.
7632 (reg-i386-linux.o): Likewise.
7633 (reg-i386-linux.c): Likewise.
7634 (reg-x86-64.o): Likewise.
7635 (reg-x86-64.c): Likewise.
7636 (reg-x86-64-linux.o): Likewise.
7637 (reg-x86-64-linux.c): Likewise.
7638 (i386.o): New.
7639 (i386.c): Likewise.
7640 (i386-linux.o): Likewise.
7641 (i386-linux.c): Likewise.
7642 (amd64.o): Likewise.
7643 (amd64.c): Likewise.
7644 (amd64-linux.o): Likewise.
7645 (amd64-linux.c): Likewise.
7646
7647 * configure.srv (srv_i386_regobj): New.
7648 (srv_i386_linux_regobj): Likewise.
7649 (srv_amd64_regobj): Likewise.
7650 (srv_amd64_linux_regobj): Likewise.
7651 (srv_i386_32bit_xmlfiles): Likewise.
7652 (srv_i386_64bit_xmlfiles): Likewise.
7653 (srv_i386_xmlfiles): Likewise.
7654 (srv_amd64_xmlfiles): Likewise.
7655 (srv_i386_linux_xmlfiles): Likewise.
7656 (srv_amd64_linux_xmlfiles): Likewise.
7657 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7658 srv_xmlfiles to $srv_i386_xmlfiles.
7659 (i[34567]86-*-mingw32ce*): Likewise.
7660 (i[34567]86-*-mingw*): Likewise.
7661 (i[34567]86-*-nto*): Likewise.
7662 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7663 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7664 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7665 (x86_64-*-linux*): Likewise.
7666
7667 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7668 (init_registers_amd64_linux): New.
7669 (x86_arch_setup): Replace init_registers_x86_64_linux with
7670 init_registers_amd64_linux.
7671
193f13e6
MK
76722010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7673
7674 * configure.ac: Check for libdl. If it is not available link against
7675 static libthread_db.
7676 * configure: Regenerate.
7677
85d721b8
PA
76782010-02-22 Pedro Alves <pedro@codesourcery.com>
7679
7680 PR9605
7681
7682 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7683 handing a read watchpoint.
7684 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7685
6076632b
DE
76862010-02-12 Doug Evans <dje@google.com>
7687
7688 * linux-low.c (linux_supports_tracefork_flag): Document.
7689 (linux_look_up_symbols): Add comment.
7690
3327ccf7
L
76912010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7692
7693 * regcache.c (supply_register): Clear regcache if buf is NULL.
7694
0718675c 76952010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7696 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7697
7698 * inferiors.c (find_inferior): Add function documentation.
7699 (unloaded_dll): Handle the case where the unloaded dll has not
7700 been previously registered in the dll list.
7701
177321bd
DJ
77022010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7703
7704 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7705 (thumb2_breakpoint): New.
7706 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7707
2b009048
DJ
77082010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7709
7710 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7711 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7712 breakpoints.
7713
3be029c7
PA
77142010-01-21 Pedro Alves <pedro@codesourcery.com>
7715
7716 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7717
18f5de3b
JK
77182010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7719
7720 * linux-s390-low.c (s390_collect_ptrace_register)
7721 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7722
3743bb4f
DE
77232010-01-21 Doug Evans <dje@google.com>
7724
14ce3065
DE
7725 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7726 (PTRACE_ARG4_TYPE): New macro.
7727 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7728 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7729 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7730 (usr_store_inferior_registers): Ditto.
7731 (linux_read_memory, linux_write_memory): Ditto.
7732 (linux_test_for_tracefork): Ditto.
7733
3743bb4f
DE
7734 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7735 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7736
8b315be5
PA
77372010-01-21 Pedro Alves <pedro@codesourcery.com>
7738
7739 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7740 target.
7741
85492558
PA
77422010-01-21 Pedro Alves <pedro@codesourcery.com>
7743
7744 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7745 prototype to take a regcache. Adjust.
7746
442ea881
PA
77472010-01-20 Pedro Alves <pedro@codesourcery.com>
7748
7749 * regcache.h (struct thread_info): Forward declare.
7750 (struct regcache): New.
7751 (new_register_cache): Adjust prototype.
7752 (get_thread_regcache): Declare.
7753 (free_register_cache): Adjust prototype.
7754 (registers_to_string, registers_from_string): Ditto.
7755 (supply_register, supply_register_by_name, collect_register)
7756 (collect_register_as_string, collect_register_by_name): Ditto.
7757 * regcache.c (struct inferior_regcache_data): Delete.
7758 (get_regcache): Rename to ...
7759 (get_thread_regcache): ... this. Adjust. Switch inferior before
7760 fetching registers.
7761 (regcache_invalidate_one): Adjust.
7762 (regcache_invalidate): Fix prototype.
7763 (new_register_cache): Return the new register cache.
7764 (free_register_cache): Change prototype.
7765 (realloc_register_cache): Adjust.
7766 (registers_to_string): Change prototype to take a regcache. Adjust.
7767 (registers_from_string): Ditto.
7768 (register_data): Ditto.
7769 (supply_register): Ditto.
7770 (supply_register_by_name): Ditto.
7771 (collect_register): Ditto.
7772 (collect_register_as_string): Ditto.
7773 (collect_register_by_name): Ditto.
7774 * server.c (process_serial_event): Adjust.
7775 * linux-low.h (regset_fill_func, regset_store_func): Change
7776 prototype.
7777 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7778 Change prototype.
7779 * linux-low.c (get_stop_pc): Adjust.
7780 (check_removed_breakpoint): Adjust.
7781 (linux_wait_for_event): Adjust.
7782 (linux_resume_one_lwp): Adjust.
7783 (fetch_register): Add regcache parameter. Adjust.
7784 (usr_store_inferior_registers): Ditto.
7785 (regsets_fetch_inferior_registers): Ditto.
7786 (regsets_store_inferior_registers): Ditto.
7787 (linux_fetch_registers, linux_store_registers): Ditto.
7788 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7789 regcache. Adjust.
43aaf8b6
PA
7790 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7791 Ditto.
442ea881
PA
7792 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7793 prototype to take a regcache.
7794 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7795 * remote-utils.c (convert_ascii_to_int, outreg)
7796 (prepare_resume_reply): Change prototype to take a regcache.
7797 Adjust.
7798 * target.h (struct target_ops) <fetch_registers, store_registers>:
7799 Change prototype to take a regcache.
7800 (fetch_inferior_registers, store_inferior_registers): Change
7801 prototype to take a regcache. Adjust.
7802 * proc-service.c (ps_lgetregs): Adjust.
7803 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7804 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7805 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7806 take a regcache. Adjust.
7807 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7808 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7809 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7810 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7811 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7812 (cris_cannot_fetch_register):
7813 (cris_breakpoint_at): Change prototype to take a regcache.
7814 Adjust.
7815 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7816 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7817 to take a regcache. Adjust.
7818 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7819 Adjust.
7820 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7821 take a regcache. Adjust.
7822 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7823 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7824 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7825 * linux-mips-low.c (mips_get_pc):
7826 (mips_set_pc): Change prototype to take a regcache. Adjust.
7827 (mips_reinsert_addr): Adjust.
7828 (mips_collect_register): Change prototype to take a regcache.
7829 Adjust.
7830 (mips_supply_register):
7831 (mips_collect_register_32bit, mips_supply_register_32bit)
7832 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7833 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7834 * linux-ppc-low.c (ppc_supply_ptrace_register)
7835 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7836 (parse_spufs_run): Adjust.
7837 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7838 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7839 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7840 take a regcache. Adjust.
7841 * linux-s390-low.c (s390_collect_ptrace_register)
7842 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7843 (s390_set_pc): Change prototype to take a regcache. Adjust.
7844 (s390_arch_setup): Adjust.
7845 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7846 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7847 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7848 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7849 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7850 regcache. Adjust.
7851 (sparc_breakpoint_at): Adjust.
7852 * linux-xtensa-low.c (xtensa_fill_gregset):
7853 (xtensa_store_gregset):
7854 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7855 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7856 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7857 prototype to take a regcache. Adjust.
7858 * win32-arm-low.c (arm_fetch_inferior_register)
7859 (arm_store_inferior_register): Change prototype to take a
7860 regcache. Adjust.
7861 * win32-i386-low.c (i386_fetch_inferior_register)
7862 (i386_store_inferior_register): Change prototype to take a
7863 regcache. Adjust.
7864 * win32-low.c (child_fetch_inferior_registers)
7865 (child_store_inferior_registers): Change prototype to take a
7866 regcache. Adjust.
7867 (win32_wait): Adjust.
7868 (win32_fetch_inferior_registers): Change prototype to take a
7869 regcache. Adjust.
7870 (win32_store_inferior_registers): Adjust.
7871 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7872 store_inferior_register>: Change prototype to take a regcache.
7873
60c3d7b0
DE
78742010-01-20 Doug Evans <dje@google.com>
7875
7876 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7877 #ifdef.
7878 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7879 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7880
dc146f7c
VP
78812010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7882
7883 * linux-low.c (linux_core_of_thread): New.
7884 (compare_ints, show_process, list_threads): New.
7885 (linux_qxfer_osdata): Report threads and cores.
7886 (linux_target_op): Register linux_core_of_thread.
7887 * remote-utils.c (prepare_resume_reply): Report the core.
7888 (buffer_xml_printf): Support %d specifier.
7889 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7890 New.
7891 (handle_query): Handle qXfer:threads. Announce availability
7892 thereof.
7893 * target.h (struct target_ops): New field core_of_thread.
7894
7803799a
UW
78952010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7896
7897 * Makefile.in (clean): Remove new generated files.
7898 (reg-s390.o, reg-s390.c): Remove rules.
7899 (reg-s390x.o, reg-s390x.c): Likewise.
7900 (s390-linux32.o, s390-linux32.c): Add rules.
7901 (s390-linux64.o, s390-linux64.c): Likewise.
7902 (s390x-linux64.o, s390x-linux64.c): Likewise.
7903 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7904 * linux-s390-low.c: Include <elf.h>.
7905 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7906 (init_registers_s390): Remove prototype.
7907 (init_registers_s390x): Likewise.
7908 (init_registers_s390_linux32): Add prototype.
7909 (init_registers_s390_linux64): Likewise.
7910 (init_registers_s390x_linux64): Likewise.
7911 (s390_num_regs_3264): New define.
7912 (s390_regmap_3264): New global variable.
7913 (s390_cannot_fetch_register): Remove obsolete check.
7914 (s390_cannot_store_register): Likewise.
7915 (s390_collect_ptrace_register): Handle upper/lower register halves.
7916 (s390_supply_ptrace_register): Likewise.
7917 (s390_fill_gregset): Update to register number changes.
7918 (s390_get_hwcap): New routine.
7919 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7920 Install appropriate regmap and register set.
7921
6e7ffa39
JB
79222010-01-01 Joel Brobecker <brobecker@adacore.com>
7923
7924 * server.c (gdbserver_version): Update copyright year to 2010.
7925 * gdbreplay.c (gdbreplay_version): Likewise.
7926
957f3f49
DE
79272009-12-28 Doug Evans <dje@google.com>
7928
7929 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7930 elf/external.h. Include <elf.h> instead but only if necessary.
7931
ca5c370d
PA
79322009-12-28 Pedro Alves <pedro@codesourcery.com>
7933
7934 * linux-low.c (linux_remove_process): Remove `detaching'
7935 parameter. Don't release/detach from thread_db here.
7936 (linux_kill): Release/detach from thread_db here, ...
7937 (linux_detach): ... and here, before actually detaching.
7938 (linux_wait_1): ... and here, when a process exits.
7939 * thread-db.c (any_thread_of): New.
7940 (thread_db_free): Switch the current inferior to a thread of the
7941 passed in process.
7942
4ee62156
DE
79432009-12-21 Doug Evans <dje@google.com>
7944
d90e6a88
DE
7945 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7946
c5f62d5f
DE
7947 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7948 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7949 warning ifndef __NR_tkill. Move setting of errno there too.
7950 Delete unnecessary resetting of errno after syscall.
7951 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7952
10e86dd7
DE
7953 * configure.ac: Check for dladdr.
7954 * config.in: Regenerate.
7955 * configure: Regenerate.
7956 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7957 (try_thread_db_load): Update.
7958
4ee62156
DE
7959 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7960
00f515da
DE
79612009-12-18 Doug Evans <dje@google.com>
7962
e9464885
DE
7963 * event-loop.c: Include unistd.h if it exists.
7964
07d4f67e
DE
7965 * linux-low.c (my_waitpid): Move definition away from being in
7966 between linux_tracefork_child/linux_test_for_tracefork.
7967
00f515da
DE
7968 * gdb_proc_service.h (psaddr_t): Fix type.
7969 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7970 signature to match glibc.
7971
1de1badb
DE
79722009-12-16 Doug Evans <dje@google.com>
7973
7974 * linux-low.c (linux_read_memory): Fix argument to read.
7975
aeeb81d1
PA
79762009-11-26 Pedro Alves <pedro@codesourcery.com>
7977
7978 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7979 events, don't leave current_inferior pointing at null.
7980
10357975
PA
79812009-11-26 Pedro Alves <pedro@codesourcery.com>
7982
7983 * win32-low.c (LOG): Delete.
7984 (OUTMSG): Output to stderr.
7985 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7986 on compile time LOG macro.
7987 (win32_wait): Fix debug output.
7988
cf6e3471
PA
79892009-11-26 Pedro Alves <pedro@codesourcery.com>
7990
7991 * win32-low.c (win32_add_one_solib): If the dll name is
7992 "ntdll.dll", prepend the system directory to the dll path.
7993
0c85e18e
MK
79942009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7995
7996 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7997
9ac544ce 79982009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7999 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
8000
8001 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8002 * configure.ac: Check for __mcoldfire__ and set
8003 gdb_cv_m68k_is_coldfire.
8004 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8005 reg-cf.o and reg-m68k.o.
8006 * configure: Regenerated.
8007
fd7dd3e6
PA
80082009-11-16 Pedro Alves <pedro@codesourcery.com>
8009
8010 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8011 Pass it to thread_db_free.
8012 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8013 proper `detaching' argument to linux_remove_process.
8014 * linux-low.h (thread_db_free): Add `detaching' parameter.
8015 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8016 to thread_db_free.
8017 (thread_db_free): Add `detaching' parameter. Only
8018 call td_ta_clear_event if detaching from process.
8019
75aa492e
MK
80202009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8021
8022 * thread-db.c (thread_db_free): Fix typo.
8023
21e1bee4
PP
80242009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8025
8026 PR gdb/10838
8027 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8028
8838b45e
NS
80292009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8030
8031 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8032 with an i686 compiler.
8033 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8034 needed.
8035 * configure: Rebuilt.
8036
8a35fb51
SL
80372009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8038
8039 PR gdb/10783
8040
8041 * server.c (handle_search_memory_1): Correct read_addr initialization
8042 in loop for searching subsequent chunks.
8043
96f15937
PP
80442009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8045
8046 * configure.ac: New --with-libthread-db option.
8047 * thread-db.c: Allow direct dependence on libthread_db.
8048 (thread_db_free): Adjust.
8049 * config.in: Regenerate.
8050 * configure: Likewise.
889bf7c5 8051
5f7d1694
PP
80522009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8053
8054 PR gdb/10757
8055 * thread-db.c (attach_thread): New function.
8056 (maybe_attach_thread): Return success/failure.
8057 (find_new_threads_callback): Adjust.
889bf7c5
PA
8058 (thread_db_find_new_threads): Loop until no new threads.
8059
88e3b899
PA
80602009-10-13 Pedro Alves <pedro@codesourcery.com>
8061
8062 * proc-service.c (ps_lgetregs): Formatting.
8063
cdbfd419
PP
80642009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8065
8066 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8067 * configure.ac: Adjust.
8068 * linux-low.h (struct process_info_private): Move members to struct
8069 thread_db.
8070 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8071 * linux-low.c (linux_remove_process): Adjust.
8072 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8073 * server.c (handle_query): Move code ...
8074 (handle_monitor_command): ... here. New function.
8075 * target.h (struct target_ops): New member.
8076 * thread-db.c (struct thread_db): New.
8077 (libthread_db_search_path): New variable.
8078 (thread_db_create_event, thread_db_enable_reporting)
8079 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8080 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8081 (try_thread_db_load_1, dladdr_to_soname): New functions.
8082 (try_thread_db_load, thread_db_load_search): New functions.
8083 (thread_db_init): Search for libthread_db.
8084 (thread_db_free): New function.
8085 (thread_db_handle_monitor_command): Likewise.
8086 * config.in: Regenerate.
8087 * configure: Regenerate.
889bf7c5 8088
4168d2d6
UW
80892009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8090
8091 * spu-low.c (spu_kill): Wait for inferior to terminate.
8092 Call clear_inferiors.
8093 (spu_detach): Call clear_inferiors.
8094
81ecdfbb
RW
80952009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8096
8097 * aclocal.m4: Regenerate.
8098 * config.in: Likewise.
8099 * configure: Likewise.
8100
0b9ff2c0
UW
81012009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8102
8103 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8104 (parse_spufs_run): New function.
8105 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8106 (ppc_breakpoint_at): Handle SPU breakpoints.
8107
efcbbd14
UW
81082009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8109
8110 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8111 (SPUFS_MAGIC): Define.
8112 (spu_enumerate_spu_ids): New function.
8113 (linux_qxfer_spu): New function.
8114 (linux_target_ops): Install linux_qxfer_spu.
8115
f4d9bade
UW
81162009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8117
8118 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8119 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8120 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8121 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8122 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8123 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8124 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8125 (init_registers_powerpc_cell32l): Add prototype.
8126 (init_registers_powerpc_cell64l): Likewise.
8127 (ppc_arch_setup): Detect Cell/B.E. architecture.
8128
96e946ca
RW
81292009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8130
8131 * Makefile.in (datarootdir): New variable.
8132
58d6951d
DJ
81332009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8134
8135 * linux-low.c (linux_write_memory): Update debugging output.
8136 * Makefile.in (clean): Add new descriptions.
8137 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8138 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8139 * configure.srv: Add new files for arm*-*-linux*.
8140 * linux-arm-low.c: Add new declarations.
8141 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8142 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8143 (HWCAP_VFPv3D16): New.
8144 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8145 instead of __IWMMXT__.
8146 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8147 (arm_arch_setup): New.
8148 (target_regsets): Remove #ifdef. Add VFP regset.
8149 (the_low_target): Use arm_arch_setup.
8150
12b42a12
DJ
81512009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8152
8153 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8154 the main thread again.
8155
ac8c974e
AR
81562009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8157
8158 Adding Neutrino gdbserver.
8159 * configure: Regenerated.
8160 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8161 * configure.srv (i[34567]86-*-nto*): New target.
8162 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8163 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8164 (nto_comctrl) [__QNX__]: New function.
8165 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8166
4424e0c3 81672009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
8168
8169 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8170 srv_tgtobj.
8171
912cf4ba
PA
81722009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8173 Pedro Alves <pedro@codesourcery.com>
8174
8175 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8176 don't support CONTEXT_EXTENDED_REGISTERS.
8177 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8178 (the_low_target): Install them.
8179 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8180 failing with ERROR_PIPE_NOT_CONNECTED.
8181
aa5ca48f
DE
81822009-06-30 Doug Evans <dje@google.com>
8183 Pierre Muller <muller@ics.u-strasbg.fr>
8184
8185 Add h/w watchpoint support to x86-linux, win32-i386.
8186 * Makefile.in (SFILES): Add i386-low.c
8187 (i386_low_h): Define.
8188 (i386-low.o): Add dependencies.
8189 (linux-x86-low.o): Add i386-low.h dependency.
8190 (win32-i386-low.o): Ditto.
8191 * i386-low.c: New file.
8192 * i386-low.h: New file.
8193 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8194 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8195 * linux-low.c (linux_add_process): Initialize arch_private.
8196 (linux_remove_process): Free arch_private.
8197 (add_lwp): Initialize arch_private.
8198 (delete_lwp): Free arch_private.
8199 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8200 provided.
8201 * linux-low.h (process_info_private): New member arch_private.
8202 (lwp_info): New member arch_private.
8203 (linux_target_ops): New members new_process, new_thread,
8204 prepare_to_resume.
8205 (ptid_of): New macro.
8206 * linux-x86-low.c: Include stddef.h, i386-low.h.
8207 (arch_process_info): New struct.
8208 (arch_lwp_info): New struct.
8209 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8210 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8211 (i386_dr_low_get_status): New function.
8212 (x86_insert_point, x86_remove_point): New functions.
8213 (x86_stopped_by_watchpoint): New function.
8214 (x86_stopped_data_address): New function.
8215 (x86_linux_new_process, x86_linux_new_thread): New functions.
8216 (x86_linux_prepare_to_resume): New function.
8217 (the_low_target): Add entries for insert_point, remove_point,
8218 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8219 prepare_to_resume.
8220 * server.c (debug_hw_points): New global.
8221 (monitor_show_help): Document set debug-hw-points.
8222 (handle_query): Process "set debug-hw-points".
8223 * server.h (debug_hw_points): Declare.
8224 (paddress): Declare.
8225 * utils.c (NUMCELLS, CELLSIZE): New macros.
8226 (get_sell, xsnprintf, paddress): New functions.
8227 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8228 remove_point, stopped_by_watchpoint, stopped_data_address.
8229 * win32-i386-low.c: Include i386-low.h.
8230 (debug_reg_state): Replaces dr.
8231 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8232 (i386_dr_low_get_status): New function.
8233 (i386_insert_point, i386_remove_point): New functions.
8234 (i386_stopped_by_watchpoint): New function.
8235 (i386_stopped_data_address): New function.
8236 (i386_initial_stuff): Update.
8237 (get_thread_context,set_thread_context,i386_thread_added): Update.
8238 (the_low_target): Add entries for insert_point,
8239 remove_point, stopped_by_watchpoint, stopped_data_address.
8240 * win32-low.c (win32_insert_watchpoint): New function.
8241 (win32_remove_watchpoint): New function.
8242 (win32_stopped_by_watchpoint): New function.
8243 (win32_stopped_data_address): New function.
8244 (win32_target_ops): Add entries for insert_watchpoint,
8245 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8246 * win32-low.h (win32_target_ops): New members insert_point,
8247 remove_point, stopped_by_watchpoint, stopped_data_address.
8248
d993e290
PA
82492009-06-25 Pedro Alves <pedro@codesourcery.com>
8250
8251 * server.c (process_serial_event): Re-return unsupported, not
8252 error, if the type isn't recognized. Re-allow supporting only
8253 insert or remove packets. Also call require_running for
8254 breakpoints. Add missing break statement to default case. Tidy.
8255 * target.h (struct target_ops): Rename insert_watchpoint to
8256 insert_point, and remove_watchpoint to remove_point.
8257
8258 * linux-low.h (struct linux_target_ops): Likewise.
8259 * linux-low.c (linux_insert_watchpoint): Rename to ...
8260 (linux_insert_point): ... this. Adjust.
8261 (linux_remove_watchpoint): Rename to ...
8262 (linux_remove_point): ... this. Adjust.
8263 (linux_target_ops): Adjust.
8264 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8265 (cris_insert_point): ... this.
8266 (cris_remove_watchpoint): Rename to ...
8267 (cris_remove_point): ... this.
8268 (the_low_target): Adjust.
8269
0f54c268
PM
82702009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8271
8272 * server.c (handle_v_kill): Pass signal_pid to
8273 kill_inferior if multi_process is zero.
8274
c6314022
AR
82752009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8276
8277 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8278 * target.h (target_ops): Comment for *_watchpoint to make it clear
8279 the functions can get types '0' and '1'.
8280
4463ce24
AR
82812009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8282
8283 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8284 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8285 * regcache.c (get_regcache): Likewise.
8286 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8287 * win32-low.c (child_fetch_inferior_registers): Remove check for
8288 regno 0.
8289
cf8fd78b
PA
82902009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8291 Pedro Alves <pedro@codesourcery.com>
8292
8293 * target.h (struct target_ops) <supports_multi_process>: New
8294 callback.
8295 (target_supports_multi_process): New.
8296 * server.c (handle_query): Even if GDB reports support, only
8297 enable multi-process if the target also supports it. Report
8298 multi-process support only if the target backend supports it.
8299 * linux-low.c (linux_supports_multi_process): New function.
8300 (linux_target_ops): Install it as target_supports_multi_process
8301 callback.
8302
47c0c975
DE
83032009-05-24 Doug Evans <dje@google.com>
8304
e09875d4
DE
8305 Global renaming of find_thread_pid to find_thread_ptid.
8306 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8307 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8308 All callers updated.
8309
e27d73f6
DE
8310 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8311 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8312 directly.
8313
47c0c975
DE
8314 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8315 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8316 (linux_resume_one_lwp): Ditto.
8317
2acc282a
DE
83182009-05-23 Doug Evans <dje@google.com>
8319
8320 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8321 from struct inferior_list_entry * to struct lwp_info *.
8322 All callers updated.
8323
9f1036c1
DE
83242009-05-13 Doug Evans <dje@google.com>
8325
8326 * linux-x86-low.c: Don't include assert.h.
8327 (x86_siginfo_fixup): Use fatal, not assert.
8328 (x86_arch_setup): Fix comment.
8329
d0722149
DE
83302009-05-12 Doug Evans <dje@google.com>
8331
8332 Biarch support for i386/amd64 gdbserver.
8333 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8334 Add linux-x86-low.c.
8335 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8336 (linux-x86-low.o): Add.
8337 * linux-x86-64-low.c: Delete.
8338 * linux-i386-low.c: Delete.
8339 * linux-x86-low.c: New file.
8340 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8341 linux-x86-low.o.
8342 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8343 linux-x86-low.o.
8344 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8345 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8346 (linux_child_pid_to_exec_file): New function.
8347 (elf_64_header_p, elf_64_file_p): New functions.
8348 (siginfo_fixup): New function.
8349 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8350 give target a chance to convert layout.
8351 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8352 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8353
fdeb2a12
DE
83542009-05-07 Doug Evans <dje@google.com>
8355
8356 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8357 (regsets_store_inferior_registers): Ditto.
8358
a6dbe5df
PA
83592009-05-06 Pedro Alves <pedro@codesourcery.com>
8360
8361 PR server/10048
8362
8363 * linux-low.c (must_set_ptrace_flags): Delete.
8364 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8365 of the global.
8366 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8367 `lwp->must_set_ptrace_flags' instead.
ba42693b 8368 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8369 (linux_wait_1): ... not here.
8370
5091eb23
DE
83712009-04-30 Doug Evans <dje@google.com>
8372
9f767825
DE
8373 * inferiors.c (started_inferior_callback): New function.
8374 (attached_inferior_callback): New function.
8375 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8376 * server.c (print_started_pid, print_attached_pid): New functions.
8377 (detach_or_kill_for_exit): New function.
8378 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8379 * server.h (have_started_inferiors_p): Declare.
8380 (have_attached_inferiors_p): Declare.
8381
5091eb23
DE
8382 * inferiors.c (remove_process): Fix memory leak, free process.
8383 * linux-low.c (linux_remove_process): New function.
8384 (linux_kill): Call it instead of remove_process.
8385 (linux_detach, linux_wait_1): Ditto.
8386
155c8968
PA
83872009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8388
8389 * configure.srv: Add x86 Windows CE target.
8390
7fe519cb
UW
83912009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8392
8393 * inferiors.c (get_thread_process): Make global.
8394 * server.h (get_thread_process): Add prototype.
8395 * thread-db.c (find_one_thread): Use get_thread_process
8396 instead of current_process.
8397 (thread_db_get_tls_address): Do not crash if called when
8398 thread layer is not yet initialized.
8399
5472f405
UW
84002009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8401
8402 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8403 * spu-low.c (current_tid): Rename to ...
8404 (current_ptid): ... this.
8405 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8406 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8407 ptid_get_lwp (current_ptid) instead of current_tid.
8408 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8409 instead of current_tid. Use find_process_pid to verify pid
8410 argument is valid. Pass proper argument to remove_process.
8411 (spu_thread_alive): Compare current_ptid instead of current_tid.
8412 (spu_resume): Likewise.
8413
55ac2b99
PA
84142009-04-02 Pedro Alves <pedro@codesourcery.com>
8415
8416 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8417 variable.
8418
95954743
PA
84192009-04-01 Pedro Alves <pedro@codesourcery.com>
8420
8421 Implement the multiprocess extensions, and add linux multiprocess
8422 support.
8423
8424 * server.h (ULONGEST): Declare.
8425 (struct ptid, ptid_t): New.
8426 (minus_one_ptid, null_ptid): Declare.
8427 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8428 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8429 (struct inferior_list_entry): Change `id' type from unsigned from
8430 to ptid_t.
8431 (struct sym_cache, struct breakpoint, struct
8432 process_info_private): Forward declare.
8433 (struct process_info): Declare.
8434 (current_process): Declare.
8435 (all_processes): Declare.
8436 (initialize_inferiors): Declare.
8437 (add_thread): Adjust to use ptid_t.
8438 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8439 (add_process, remove_process, find_thread_pid): Declare.
8440 (find_inferior_id): Adjust to use ptid_t.
8441 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8442 (multi_process): Declare.
8443 (push_event): Adjust to use ptid_t.
8444 (read_ptid, write_ptid): Declare.
8445 (prepare_resume_reply): Adjust to use ptid_t.
8446 (clear_symbol_cache): Declare.
8447 * inferiors.c (all_processes): New.
8448 (null_ptid, minus_one_ptid): New.
8449 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8450 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8451 (add_thread): Change unsigned long to ptid. Remove gdb_id
8452 parameter. Adjust.
8453 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8454 (gdb_id_to_thread): Rename to ...
8455 (find_thread_pid): ... this. Change unsigned long to ptid.
8456 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8457 (loaded_dll, pull_pid_from_list): Adjust.
8458 (add_process, remove_process, find_process_pid)
8459 (get_thread_process, current_process, initialize_inferiors): New.
8460 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8461 (struct target_waitstatus) <related_pid>: Ditto.
8462 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8463 return type to int.
8464 (struct target_ops) <join>: Add `pid' argument.
8465 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8466 (struct target_ops) <wait>: Add `ptid' field. Change return type
8467 to ptid.
8468 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8469 (mywait): Add `ptid' argument. Change return type to ptid_t.
8470 (target_pid_to_str): Declare.
8471 * target.c (set_desired_inferior): Adjust to use ptids.
8472 (mywait): Add new `ptid' argument. Adjust.
8473 (target_pid_to_str): New.
8474 * mem-break.h (free_all_breakpoints): Declare.
8475 * mem-break.c (breakpoints): Delelete.
8476 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8477 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8478 to use per-process breakpoint list.
8479 (free_all_breakpoints): New.
8480 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8481 (symbol_cache, all_symbols_looked_up): Delete.
8482 (hexchars): New.
8483 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8484 read_ptid): New.
8485 (prepare_resume_reply): Change ptid argument's type from unsigned
8486 long to ptid_t. Adjust. Implement W;process and X;process.
8487 (free_sym_cache, clear_symbol_cache): New.
8488 (look_up_one_symbol): Adjust to per-process symbol cache. *
8489 * server.c (cont_thread, general_thread, step_thread): Change type
8490 to ptid_t.
8491 (attached): Delete.
8492 (multi_process): New.
8493 (last_ptid): Change type to ptid_t.
8494 (struct vstop_notif) <ptid>: Change type to ptid_t.
8495 (queue_stop_reply, push_event): Change `ptid' argument's type to
8496 ptid_t.
8497 (discard_queued_stop_replies): Add `pid' argument.
8498 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8499 changes. Don't reference the `attached' global.
8500 (attach_inferior): Adjust to mywait interface changes.
8501 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8502 features. Handle and report "multiprocess+". Handle
8503 "qAttached:PID".
8504 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8505 changes.
8506 (handle_v_kill): New.
8507 (handle_v_stopped): Adjust to use target_pid_to_str.
8508 (handle_v_requests): Allow multiple attaches and runs when
8509 multiprocess extensions are in effect. Handle "vKill".
8510 (myresume): Adjust to use ptids.
8511 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8512 (handle_status): Adjust to discard_queued_stop_replies interface
8513 change.
8514 (first_thread_of, kill_inferior_callback)
8515 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8516 (main): Call initialize_inferiors. Adjust to use ptids, killing
8517 and detaching from all inferiors. Handle multiprocess packet
8518 variants.
8519 * linux-low.h: Include gdb_proc_service.h.
8520 (struct process_info_private): New.
8521 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8522 <lwpid_of>: Use ptid_get_lwp.
8523 (get_lwp_thread): Adjust.
8524 (struct lwp_info): Add `dead' member.
8525 (find_lwp_pid): Declare.
8526 * linux-low.c (thread_db_active): Delete.
8527 (new_inferior): Adjust comment.
8528 (inferior_pid): Delete.
8529 (linux_add_process): New.
8530 (handle_extended_wait): Adjust.
8531 (add_lwp): Change unsigned long to ptid.
8532 (linux_create_inferior): Add process to processes table. Adjust
8533 to use ptids. Don't set new_inferior here.
8534 (linux_attach_lwp): Rename to ...
8535 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8536 it. Adjust to use ptids.
8537 (linux_attach_lwp): New.
8538 (linux_attach): Add process to processes table. Don't set
8539 new_inferior here.
8540 (struct counter): New.
8541 (second_thread_of_pid_p, last_thread_of_process_p): New.
8542 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8543 multiple processes.
8544 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8545 processes. Remove process from process table.
8546 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8547 to multiple processes.
8548 (any_thread_of): New.
8549 (linux_detach): Add `pid' argument, and handle it. Remove process
8550 from processes table.
8551 (linux_join): Add `pid' argument. Handle it.
8552 (linux_thread_alive): Change unsighed long argument to ptid_t.
8553 Consider dead lwps as not being alive.
8554 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8555 threads we're not interested in.
8556 (same_lwp, find_lwp_pid): New.
8557 (linux_wait_for_lwp): Change `pid' argument's type from int to
8558 ptid_t. Adjust.
8559 (linux_wait_for_event): Rename to ...
8560 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8561 from int to ptid_t. Adjust.
8562 (linux_wait_for_event): New.
8563 (linux_wait_1): Add `ptid' argument. Change return type to
8564 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8565 that exit from the process table.
8566 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8567 Adjust.
8568 (mark_lwp_dead): New.
8569 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8570 stopping all threads, mark its main lwp as dead.
8571 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8572 ptids.
8573 (fetch_register, usr_store_inferior_registers)
8574 (regsets_fetch_inferior_registers)
8575 (regsets_store_inferior_registers, linux_read_memory)
8576 (linux_write_memory): Inline `inferior_pid'.
8577 (linux_look_up_symbols): Adjust to use per-process
8578 `thread_db_active'.
8579 (linux_request_interrupt): Adjust to use ptids.
8580 (linux_read_auxv): Inline `inferior_pid'.
8581 (initialize_low): Don't reference thread_db_active.
8582 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8583 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8584 (ps_getpid): Return the pid of the current inferior.
8585 * thread-db.c (proc_handle, thread_agent): Delete.
8586 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8587 per-process data.
8588 (find_one_thread): Change argument type to ptid_t. Adjust to
8589 per-process data.
8590 (maybe_attach_thread): Adjust to per-process data and ptids.
8591 (thread_db_find_new_threads): Ditto.
8592 (thread_db_init): Ditto.
8593 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8594 processes table. Adjust to use ptids.
8595 (spu_kill, spu_detach): Adjust interface. Remove process from
8596 processes table.
8597 (spu_join, spu_thread_alive): Adjust interface.
8598 (spu_wait): Adjust interface. Remove process from processes
8599 table. Adjust to use ptids.
8600 * win32-low.c (current_inferior_tid): Delete.
8601 (current_inferior_ptid): New.
8602 (debug_event_ptid): New.
8603 (thread_rec): Take a ptid. Adjust.
8604 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8605 (child_delete_thread): Ditto.
8606 (do_initial_child_stuff): Add `attached' argument. Add process to
8607 processes table.
8608 (child_fetch_inferior_registers, child_store_inferior_registers):
8609 Adjust.
8610 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8611 (win32_attach): Pass 1 to do_initial_child_stuff.
8612 (win32_kill): Adjust interface. Remove process from processes
8613 table.
8614 (win32_detach): Ditto.
8615 (win32_join): Adjust interface.
8616 (win32_thread_alive): Take a ptid.
8617 (win32_resume): Adjust to use ptids.
8618 (get_child_debug_event): Ditto.
8619 (win32_wait): Adjust interface. Remove exiting process from
8620 processes table.
8621
bd99dc85
PA
86222009-04-01 Pedro Alves <pedro@codesourcery.com>
8623
8624 Non-stop mode support.
8625
8626 * server.h (non_stop): Declare.
8627 (gdb_client_data, handler_func): Declare.
8628 (delete_file_handler, add_file_handler, start_event_loop):
8629 Declare.
8630 (handle_serial_event, handle_target_event, push_event)
8631 (putpkt_notif): Declare.
8632 * target.h (enum resume_kind): New.
8633 (struct thread_resume): Replace `step' field by `kind' field.
8634 (TARGET_WNOHANG): Define.
8635 (struct target_ops) <wait>: Add `options' argument.
8636 <supports_non_stop, async, start_non_stop>: New fields.
8637 (target_supports_non_stop, target_async): New.
8638 (start_non_stop): Declare.
8639 (mywait): Add `options' argument.
8640 * target.c (mywait): Add `options' argument. Print child exit
8641 notifications here.
8642 (start_non_stop): New.
8643 * server.c (non_stop, own_buf, mem_buf): New globals.
8644 (struct vstop_notif): New.
8645 (notif_queue): New global.
8646 (queue_stop_reply, push_event, discard_queued_stop_replies)
8647 (send_next_stop_reply): New.
8648 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8649 interface changes.
8650 (attach_inferior): In non-stop mode, don't wait for the target
8651 here.
8652 (handle_general_set): Handle QNonStop.
8653 (handle_query): When handling qC, return the current general
8654 thread, instead of the first thread of the list.
8655 (handle_query): If the backend supports non-stop mode, include
8656 QNonStop+ in the qSupported query response.
8657 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8658 and non-stop mode.
8659 (handle_v_attach, handle_v_run): Handle non-stop mode.
8660 (handle_v_stopped): New.
8661 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8662 (myresume): Adjust to use resume_kind. Handle non-stop.
8663 (queue_stop_reply_callback): New.
8664 (handle_status): Handle non-stop mode.
8665 (main): Clear non_stop flag on reconnection. Use the event-loop.
8666 Refactor serial protocol handling from here ...
8667 (process_serial_event): ... to this new function. When GDB
8668 selects any thread, select one here. In non-stop mode, wait until
8669 GDB acks all pending events before exiting.
8670 (handle_serial_event, handle_target_event): New.
8671 * remote-utils.c (remote_open): Install remote_desc in the event
8672 loop.
8673 (remote_close): Remove remote_desc from the event loop.
8674 (putpkt_binary): Rename to...
8675 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8676 (putpkt_binary): New as wrapper around putpkt_binary_1.
8677 (putpkt_notif): New.
8678 (prepare_resume_reply): In non-stop mode, don't change the
8679 general_thread.
8680 * event-loop.c: New.
8681 * Makefile.in (OBJ): Add event-loop.o.
8682 (event-loop.o): New rule.
8683
8684 * linux-low.h (pid_of): Moved here.
8685 (lwpid_of): New.
8686 (get_lwp_thread): Use lwpid_of.
8687 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8688 * linux-low.c (pid_of): Delete.
8689 (inferior_pid): Use lwpid_of.
8690 (linux_event_pipe): New.
8691 (target_is_async_p): New.
8692 (delete_lwp): New.
8693 (handle_extended_wait): Use lwpid_of.
8694 (add_lwp): Don't set lwpid field.
8695 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8696 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8697 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8698 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8699 first. Adjust to linux_wait_for_event interface changes. Use
8700 lwpid_of.
8701 (linux_detach): Don't delete the main lwp here.
8702 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8703 (status_pending_p): Don't consider explicitly suspended lwps.
8704 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8705 pointer. Add OPTIONS argument. Change return type to int. Use
8706 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8707 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8708 pointer. Add status pointer argument. Return a pid instead of a
8709 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8710 changes. In non-stop mode, don't switch to a random thread.
8711 (linux_wait): Rename to...
8712 (linux_wait_1): ... this. Add target_options argument, and handle
8713 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8714 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8715 clean exit and signal exit code. Don't stop all threads in
8716 non-stop mode. In all-stop mode, only stop all threads when
8717 reporting a stop to GDB. Handle explicit thread stop requests.
8718 (async_file_flush, async_file_mark): New.
8719 (linux_wait): New.
8720 (send_sigstop): Use lwpid_of.
8721 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8722 interface changes. In non-stop mode, don't switch to a random
8723 thread.
8724 (linux_resume_one_lwp): Use lwpid_of.
8725 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8726 (linux_resume_one_thread): ... this. Handle resume_stop. In
8727 non-stop mode, don't look for pending flag in all threads.
8728 (resume_status_pending_p): Don't consider explicitly suspended
8729 threads.
8730 (my_waitpid): Reimplement. Emulate __WALL.
8731 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8732 Use lwpid_of.
8733 (sigchld_handler, linux_supports_non_stop, linux_async)
8734 (linux_start_non_stop): New.
8735 (linux_target_ops): Register linux_supports_non_stop, linux_async
8736 and linux_start_non_stop.
8737 (initialize_low): Install SIGCHLD handler.
8738 * thread-db.c (thread_db_create_event, find_one_thread)
8739 (thread_db_get_tls_address): Use lwpid_of.
8740 * win32-low.c (win32_detach): Adjust to use resume_kind.
8741 (win32_wait): Add `options' argument.
8742 * spu-low.c (spu_resume): Adjust to use resume_kind.
8743 (spu_wait): Add `options' argument.
8744
5b1c542e
PA
87452009-04-01 Pedro Alves <pedro@codesourcery.com>
8746
8747 Decouple target code from remote protocol.
8748
8749 * target.h (enum target_waitkind): New.
8750 (struct target_waitstatus): New.
8751 (struct target_ops) <wait>: Return an unsigned long. Take a
8752 target_waitstatus pointer instead of a char pointer.
8753 (mywait): Likewise.
8754 * target.c (mywait): Change prototype to return an unsigned long.
8755 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8756 * server.h (thread_from_wait, old_thread_from_wait): Delete
8757 declarations.
8758 (prepare_resume_reply): Change prototype to take a
8759 target_waitstatus.
8760 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8761 (last_status, last_ptid): New.
8762 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8763 pid instead of a signal.
8764 (attach_inferior): Remove "status" and "signal" parameters.
8765 Adjust.
8766 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8767 not as an address.
8768 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8769 (handle_v_requests, myresume): Remove "status" and "signal"
8770 parameters. Adjust.
8771 (handle_status): New.
8772 (main): Delete local `status'. Adjust.
8773 * remote-utils.c: Include target.h.
8774 (prepare_resume_reply): Change prototype to take a
8775 target_waitstatus. Adjust.
8776
8777 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8778 interface.
8779 * spu-low.c (spu_wait): Adjust.
8780 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8781 Delete.
8782 (win32_wait): Adjust.
8783
2bd7c093
PA
87842009-04-01 Pedro Alves <pedro@codesourcery.com>
8785
8786 * target.h (struct thread_resume): Delete leave_stopped member.
8787 (struct target_ops): Add a `n' argument to the `resume' callback.
8788 * server.c (start_inferior): Adjust.
8789 (handle_v_cont, myresume): Adjust.
8790 * linux-low.c (check_removed_breakpoint): Adjust to resume
8791 interface change, and to removed leave_stopped field.
8792 (resume_ptr): Delete.
8793 (struct thread_resume_array): New.
8794 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8795 resume interface change.
8796 (linux_continue_one_thread, linux_queue_one_thread)
8797 (resume_status_pending_p): Check if the resume field is NULL
8798 instead of checking the leave_stopped member.
8799 (linux_resume): Adjust to the target resume interface change.
8800 * spu-low.c (spu_resume): Adjust to the target resume interface
8801 change.
8802 * win32-low.c (win32_detach, win32_resume): Ditto.
8803
c35fafde
PA
88042009-04-01 Pedro Alves <pedro@codesourcery.com>
8805
8806 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8807 flag.
8808 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8809 pending.
8810 (linux_continue_one_thread): Only preserve the stepping flag if
8811 there's a pending breakpoint.
8812
0a59d50b
PA
88132009-03-31 Pedro Alves <pedro@codesourcery.com>
8814
8815 * server.c (main): After the inferior having exited, call
8816 remote_close before exiting gdbserver.
8817
f04c6d38
TJB
88182009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8819
8820 Fix size of FPSCR in Power 7 processors.
8821 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8822 (PPC_FEATURE_HAS_DFP): New #define.
8823 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8824 size of the FPSCR.
8825
78e5cee6
PA
88262009-03-23 Pedro Alves <pedro@codesourcery.com>
8827
8828 * server.c (handle_query) Whitespace and formatting.
8829
1b3f6016
PA
88302009-03-22 Pedro Alves <pedro@codesourcery.com>
8831
8832 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8833 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8834 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8835 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8836 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8837 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8838 Makefile.in, configure.ac: Fix whitespace throughout.
8839 * configure: Regenerate.
8840
a07b2135
PA
88412009-03-22 Pedro Alves <pedro@codesourcery.com>
8842
8843 * inferiors.c (find_inferior): Make it safe for the callback
8844 function to delete the currently iterated inferior.
8845
67cc2626
PA
88462009-03-22 Pedro Alves <pedro@codesourcery.com>
8847
8848 * Makefile.in (linuw_low_h): Move higher.
8849 (thread-db.o): Depend on $(linux_low_h).
8850
54a0b537
PA
88512009-03-17 Pedro Alves <pedro@codesourcery.com>
8852
8853 Rename "process" to "lwp" throughout.
8854
8855 * linux-low.c (all_processes): Rename to...
8856 (all_lwps): ... this.
8857 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8858 (add_process): Rename to ...
8859 (add_lwp): ... this. Adjust.
8860 (linux_create_inferior): Adjust.
8861 (linux_attach_lwp): Adjust.
8862 (linux_attach): Adjust.
8863 (linux_kill_one_process): Rename to ...
8864 (linux_kill_one_lwp): ... this. Adjust.
8865 (linux_kill): Adjust.
8866 (linux_detach_one_process): Rename to ...
8867 (linux_detach_one_lwp): ... this. Adjust.
8868 (linux_detach): Adjust.
8869 (check_removed_breakpoint): Adjust.
8870 (status_pending_p): Adjust.
8871 (linux_wait_for_process): Rename to ...
8872 (linux_wait_for_lwp): ... this. Adjust.
8873 (linux_wait_for_event): Adjust.
8874 (send_sigstop): Adjust.
8875 (wait_for_sigstop): Adjust.
8876 (stop_all_processes): Rename to ...
8877 (stop_all_lwps): ... this.
8878 (linux_resume_one_process): Rename to ...
8879 (linux_resume_one_lwp): ... this. Adjust.
8880 (linux_set_resume_request, linux_continue_one_thread)
8881 (linux_queue_one_thread, resume_status_pending_p)
8882 (usr_store_inferior_registers, regsets_store_inferior_registers)
8883 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8884 Adjust.
8885 * linux-low.h (get_process): Rename to ...
8886 (get_lwp): ... this. Adjust.
8887 (get_thread_process): Rename to ...
8888 (get_thread_lwp): ... this. Adjust.
8889 (get_process_thread): Rename to ...
8890 (get_lwp_thread): ... this. Adjust.
8891 (struct process_info): Rename to ...
8892 (struct lwp_info): ... this.
8893 (all_processes): Rename to ...
8894 (all_lwps): ... this.
8895 * proc-service.c (ps_lgetregs): Adjust.
8896 * thread-db.c (thread_db_create_event, find_one_thread)
8897 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8898
0b16c5cf
PA
88992009-03-14 Pedro Alves <pedro@codesourcery.com>
8900
8901 * server.c (handle_query): Handle "qAttached".
8902
32de4b9d
NS
89032009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8904
8905 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8906 GPLv3, update license URL.
8907
2aecd87f
DE
89082009-03-01 Doug Evans <dje@google.com>
8909
93efd302 8910 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8911 (server_h): Add gdb_signals.h.
8912 (signals.o): Update.
8913 * server.h (target_signal_from_host,target_signal_to_host_p)
8914 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8915
86b1f9c5
PM
89162009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8917
8918 * remote-utils.c (getpkt): Also generate remote-debug
8919 information if noack_mode is set.
8920
4aa995e1
PA
89212009-02-06 Pedro Alves <pedro@codesourcery.com>
8922
8923 * server.c (handle_query): Report qXfer:siginfo:read and
8924 qXfer:siginfo:write as supported and handle them.
8925 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8926 * linux-low.c (linux_xfer_siginfo): New.
8927 (linux_target_ops): Set it.
8928
62709adf
PA
89292009-01-26 Pedro Alves <pedro@codesourcery.com>
8930
8931 * server.c (gdbserver_usage): Mention --remote-debug.
8932 (main): Accept '--remote-debug' switch.
8933
aef93bd7
DE
89342009-01-18 Doug Evans <dje@google.com>
8935
8936 * regcache.c (new_register_cache): No need to check result of xcalloc.
8937 * server.c (handle_search_memory): Back out calls to xmalloc,
8938 result is checked and error is returned to user upon failure.
8939 (handle_query): Ditto. Add more checks for result of malloc.
8940 (handle_v_cont): Check result of malloc, report error back to
8941 user upon failure.
8942 (handle_v_run): Ditto. Call freeargv.
8943 * server.h (freeargv): Declare.
8944 * utils.c (freeargv): New fn.
8945
54363045
DE
89462009-01-15 Doug Evans <dje@google.com>
8947
f626972c
DE
8948 * gdbreplay.c (perror_with_name): Make arg const char *.
8949 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8950 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8951 * utils.c (perror_with_name): Make arg const char *.
54363045 8952
18aae699
PA
89532009-01-14 Pedro Alves <pedro@codesourcery.com>
8954
8955 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8956 when handling a EXIT_PROCESS_DEBUG_EVENT.
8957
ff703abe
JB
89582009-01-06 Joel Brobecker <brobecker@adacore.com>
8959
8960 * gdbreplay.c (gdbreplay_version): Update copyright year.
8961 * server.c (gdbserver_version): Likewise.
8962
f21cc1a2 89632009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8964
8965 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8966 (handle_extended_wait): Improve comment.
0e21c1ec 8967
bca929d3
DE
89682008-12-13 Doug Evans <dje@google.com>
8969
8970 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8971 * server.h (ATTR_MALLOC): New macro.
8972 (xmalloc,xcalloc,xstrdup): Declare.
8973 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8974 * inferiors.c: Ditto.
8975 * linux-low.c: Ditto.
8976 * mem-break.c: Ditto.
8977 * regcache.c: Ditto.
8978 * remote-utils.c: Ditto.
8979 * server.c: Ditto.
8980 * target.c: Ditto.
8981 * win32-low.c: Ditto.
8982
97438e3f
DE
89832008-12-12 Doug Evans <dje@google.com>
8984
896c7fbb
DE
8985 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8986 in debugging printf.
8987
97438e3f
DE
8988 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8989
e3b886f8
DE
89902008-12-09 Doug Evans <dje@google.com>
8991
8992 * linux-low.h (struct process_info): Delete member tid, unused.
8993 * thread-db.c (find_one_thread): Update.
8994 (maybe_attach_thread): Update.
8995
07e059b5
VP
89962008-12-02 Pedro Alves <pedro@codesourcery.com>
8997
889bf7c5
PA
8998 * target.h (struct target_ops): Add qxfer_osdata member.
8999 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9000 and dirent.h.
9001 (linux_qxfer_osdata): New functions.
9002 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9003 callback.
9004 * server.c (handle_query): Handle "qXfer:osdata:read:".
9005 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9006 (buffer_xml_printf): New functions.
9007 * server.h (struct buffer): New.
9008 (buffer_grow_str, buffer_grow_str0): New macros.
9009 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9010 (buffer_xml_printf): Declare.
07e059b5 9011
4cab47ab
DE
90122008-11-24 Doug Evans <dje@google.com>
9013
9014 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9015
f142445f
DJ
90162008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9017
9018 * server.c (handle_v_run): Always use the supplied argument list.
9019
d0107bb6 90202008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 9021
d0107bb6
BW
9022 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9023 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 9024
2c4ad781
TJB
90252008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9026
9027 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9028 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9029 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9030 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9031 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9032 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9033 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9034 XML target descriptions.
9035 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9036 when inferior is running on an ISA 2.05 or later processor. Add
9037 special case to return offset for full 64-bit slot of FPSCR when
9038 in 32-bits.
9039
dfb64f85
DJ
90402008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9041
9042 * Makefile.in (SFILES, clean): Added sparc64 files.
9043 (reg-sparc64.o, reg-sparc64.c): New.
9044 * configure.srv (sparc*-*-linux*): New configuration.
9045 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9046 syscall arguments for SPARC.
9047 (regsets_store_inferior_registers): Likewise.
9048 * linux-sparc-low.c: New file.
9049
66b6e1dd
DE
90502008-10-21 Doug Evans <dje@google.com>
9051
9052 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9053 (READLINE_DIR,READLINE_DEP): Delete.
9054 (INTERNAL_CFLAGS): Update.
9055 (LINTFLAGS): Update.
9056
9b710a42
PA
90572008-10-10 Pedro Alves <pedro@codesourcery.com>
9058
9059 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9060 whole argv from the last run, not just argv[0].
9061
5822d809
PA
90622008-09-08 Pedro Alves <pedro@codesourcery.com>
9063
9064 * regcache.c (new_register_cache): Return NULL if the register
9065 cache size isn't known yet.
9066 (free_register_cache): Avoid dereferencing a NULL regcache.
9067
74aac56f
DJ
90682008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9069
9070 * configure.srv: Merge MIPS and MIPS64.
9071
400b20f5
MR
90722008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9073
9074 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9075
677c5bb1
LM
90762008-08-18 Luis Machado <luisgpm@br.ibm.com>
9077
9078 * Makefile.in: Add required vsx dependencies.
9079
9080 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9081 Declare init_registers_powerpc_vsx32l.
9082 Declare init_registers_powerpc_vsx64l.
9083 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9084 (ppc_arch_setup): Check for VSX in hwcap.
9085 (ppc_fill_vsxregset): New function.
9086 (ppc_store_vsxregset): New function.
9087 Add new VSX entry in regset_info target_regsets.
9088
9089 * configure.srv: Add new VSX dependencies.
9090
a6f3e723
SL
90912008-08-12 Pedro Alves <pedro@codesourcery.com>
9092
9093 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9094 (remote_open): Set or clear transport_is_reliable.
9095 (putpkt_binary): Don't expect acks in noack mode.
9096 (getpkt): Don't send ack/nac in noack mode.
9097 * server.c (handle_general_set): Handle QStartNoAckMode.
9098 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9099 qSupported.
9100 (main): Reset noack_mode on every connection.
9101 * server.h (noack_mode): Declare.
9102
a417dc56
RW
91032008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9104
9105 * Makefile.in (GDBREPLAY_OBS): New variable.
9106 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9107
3221518c
UW
91082008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9109 Daniel Jacobowitz <dan@codesourcery.com>
9110
9111 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9112 (usr_store_inferior_registers): Likewise.
9113 (regsets_store_inferior_registers): Likewise.
9114
ec56be1b
PA
91152008-07-31 Rolf Jansen <rj@surtec.com>
9116 Pedro Alves <pedro@codesourcery.com>
9117
9118 * configure.ac: Check for memmem declaration.
9119 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9120 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9121 (disable_packet_qfThreadInfo): Unconditionally compile.
9122 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9123 * configure, config.in: Regenerate.
9124
2fe5e3ff
DE
91252008-07-28 Doug Kwan <dougkwan@google.com>
9126
9127 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9128 (linux_write_memory): Remove declaration of errno.
9129
836acd6d
UW
91302008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9131
9132 * linux-low.c (handle_extended_wait): Do not use "status"
9133 variable uninitialized.
9134
aeba519e
PA
91352008-07-07 Pedro Alves <pedro@codesourcery.com>
9136
9137 * server.c (handle_v_attach): Inhibit reporting dll changes.
9138
db42f210
PA
91392008-06-27 Pedro Alves <pedro@codesourcery.com>
9140
9141 * remote-utils.c (prepare_resume_reply): If requested, don't
9142 output "thread:TID" in the T stop reply.
9143
9144 * server.c (disable_packet_vCont, disable_packet_Tthread)
9145 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9146 (handle_query): If requested, disable support for qC, qfThreadInfo
9147 and qsThreadInfo.
9148 (handle_v_requests): If requested, disable support for vCont.
9149 (gdbserver_show_disableable): New.
9150 (main): Handle --disable-packet and --disable-packet=LIST.
9151
9152 * server.h (disable_packet_vCont, disable_packet_Tthread)
9153 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9154
8e4c5421
CD
91552008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9156
9157 * server.c (gdbserver_usage): Mention --version.
9158
6e23a804
DJ
91592008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9160
9161 * Makefile.in (gdbreplay.o): New rule.
9162
90aa6a40
JM
91632008-06-06 Joseph Myers <joseph@codesourcery.com>
9164
9165 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9166 message, not gdbserver.
9167
c16158bc 91682008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
9169 Nathan Sidwell <nathan@codesourcery.com>
9170 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
9171
9172 * acinclude.m4: Include ../../config/acx.m4.
9173 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9174 * configure, config.in: Regenerate.
9175 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9176 * server.c (gdbserver_version): Print PKGVERSION.
9177 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9178 (main): Adjust gdbserver_usage calls.
9179 * gdbreplay.c (version, host_name): Add declarations.
9180 (gdbreplay_version, gdbreplay_usage): New.
9181 (main): Accept --version and --help options.
9182
aeb75bf5
DJ
91832008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9184
9185 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9186 (arm_breakpoint_at): Handle Thumb.
9187 (the_low_target): Add comment.
9188
76b233dd
UW
91892008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9190
9191 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9192
08388c79
DE
91932008-05-09 Doug Evans <dje@google.com>
9194
a3c83fae
DE
9195 * server.h (decode_search_memory_packet): Declare.
9196 * remote-utils.c (decode_search_memory_packet): New fn.
9197 * server.c (handle_search_memory_1): New fn.
08388c79
DE
9198 (handle_search_memory): New fn.
9199 (handle_query): Process qSearch:memory packets.
9200
bb9c3d36
UW
92012008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9202
9203 * regcache.c (registers_length): Remove.
9204 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9205 full register packet.
9206 * regcache.h (registers_length): Remove prototype.
9207 * server.h (PBUFSIZ): Define to 16384.
9208
7284e1be
UW
92092008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9210
9211 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9212 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9213 powerpc-64l.o, and powerpc-altivec64l.o.
9214 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9215 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9216 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9217 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9218 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9219 to srv_xmlfiles.
9220
9221 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9222 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9223 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9224 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9225 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9226 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9227 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9228 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9229 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9230 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9231 (clean): Update.
9232
9233 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9234 (init_registers_powerpc_32l): ... this new prototype.
9235 (init_registers_powerpc_32): Remove, replace by ...
9236 (init_registers_powerpc_altivec32l): ... this new prototype.
9237 (init_registers_powerpc_e500): Remove, replace by ...
9238 (init_registers_powerpc_e500l): ... this new prototype.
9239 (init_registers_ppc64): Remove, replace by ...
9240 (init_registers_powerpc_64l): ... this new prototype.
9241 (init_registers_powerpc_64): Remove, replace by ...
9242 (init_registers_powerpc_altivec64l): ... this new prototype.
9243 (ppc_num_regs): Set to 73.
9244 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9245 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9246 (ppc_cannot_store_register): Handle orig_r3 and trap.
9247 (ppc_arch_setup): Update init_registers_... calls.
9248 (ppc_fill_gregset): Handle orig_r3 and trap.
9249
9250 * inferiors.c (clear_inferiors): Reset current_inferior.
9251
fdc59709
PB
92522008-04-23 Paolo Bonzini <bonzini@gnu.org>
9253
889bf7c5
PA
9254 * acinclude.m4: Add override.m4.
9255 * configure: Regenerate.
fdc59709 9256
c9b2f845
UW
92572008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9258
9259 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9260 initial call to init_register_ppc64.
9261
550512b8
UW
92622008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9263
43aaf8b6
PA
9264 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9265 single powerpc*-*-linux* case.
550512b8
UW
9266 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9267
b6430ec3
UW
92682008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9269
9270 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 9271 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
9272 from reg_xmlfiles.
9273 * linux-ppc-low.c: Include <elf.h>.
9274 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9275 (ppc_hwcap): New global variable.
9276 (ppc_regmap): Remove __SPE__ #ifdef sections.
9277 (ppc_regmap_e500): New global variable.
9278 (ppc_cannot_store_register): Update __SPE__ special case.
9279 (ppc_get_hwcap): New function.
9280 (ppc_arch_setup): Use it to determine whether inferior supports
9281 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9282 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9283 Do not access registers if target does not support AltiVec.
9284 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9285 Do not access registers if target does not support SPE.
9286 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9287
52fa2412
UW
92882008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9289
9290 * linux-low.c (disabled_regsets, num_regsets): New.
9291 (use_regsets_p): Delete.
9292 (linux_wait_for_process): Clear disabled_regsets.
9293 (regsets_fetch_inferior_registers): Check and set it.
9294 (regsets_store_inferior_registers): Likewise.
9295 (linux_fetch_registers, linux_store_registers): Do not use
9296 use_regsets_p.
9297 (initialize_low): Allocate disabled_regsets.
9298
e28b3332
DJ
92992008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9300
9301 * Makefile.in (LIBOBJS): New.
9302 (OBS): Use LIBOBJS.
9303 (memmem.o): New rule.
9304 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9305 * configure: Regenerated.
9306
4536995d
UW
93072008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9308
9309 * server.c (handle_query): Never return "unsupported" for
9310 qXfer:features:read queries.
9311
221c031f
UW
93122008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9313
9314 * server.c (get_features_xml): Fix inverted condition.
9315 (handle_query): Always support qXfer:feature:read.
9316
ccd213ac
DJ
93172008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9318
9319 * server.c (wrapper_argv): New.
9320 (start_inferior): Handle wrapper_argv. If set, expect an extra
9321 trap.
9322 (gdbserver_usage): Document --wrapper.
9323 (main): Parse --wrapper.
9324
6fe305f7
UW
93252008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9326
9327 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9328 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9329 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9330 (ppc_set_pc): Likewise.
9331 (ppc_arch_setup): New function.
9332 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9333 of collect_register.
889bf7c5 9334 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9335
5b0a002e
UW
93362008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9337
9338 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9339 instead of linux-ppc64-low.o.
9340 * linux-ppc64-low.c: Remove file.
9341 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9342 (linux-ppc64-low.o): Remove rule.
9343
9344 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9345 (init_registers_powerpc_64): Likewise.
9346 (ppc_regmap): Conditionally define depending on __powerpc64__.
9347 (ppc_cannot_store_register): Do not special-case "fpscr" when
9348 compiled on __powerpc64__.
9349 (ppc_collect_ptrace_register): New function.
9350 (ppc_supply_ptrace_register): New function.
9351 (ppc_breakpoint): Change type to "unsigned int".
9352 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9353 (the_low_target): Conditionally provide initializers for the
889bf7c5 9354 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9355 collect_ptrace_register and supply_ptrace_register members.
9356
9b4b61c8
UW
93572008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9358
9359 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9360 * server.c (gdbserver_xmltarget): Define.
9361 (get_features_xml): Use it to replace "target.xml" and arch_string.
9362
9363 * configure.srv: Remove srv_xmltarget. Add XML files that were
9364 mentioned there to srv_xmlfiles instead. Remove conditional tests
9365 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9366 srv_xmlfiles and srv_regobj to include all possible choices.
9367 * configure.ac (srv_xmltarget): Remove.
9368 (srv_xmlfiles): Do not add "target.xml".
9369 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9370 checks for supplementary target information.
9371 * configure: Regenerate.
9372 * Makefile.in (XML_TARGET): Remove.
9373 (target.xml): Remove rule.
9374 (clean): Do not clean up target.xml.
9375 (.PRECIOUS): Do not mention target.xml.
9376
9377 * target.h (struct target_ops): Remove arch_string member.
9378 * linux-low.c (linux_arch_string): Remove.
9379 (linux_target_ops): Remove arch_string initializer.
9380 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9381 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9382 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9383 * spu-low.c (spu_arch_string): Remove.
9384 (spu_target_ops): Remove arch_string initializer.
9385 * win32-low.c (win32_arch_string): Remove.
9386 (win32_target_ops): Remove arch_string initializer.
9387 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9388 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9389 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9390
ee1a7ae4
UW
93912008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9392
9393 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9394 by collect_ptrace_register and supply_ptrace_register hooks.
9395 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9396 instead of checking for the_low_target.left_pad_xfer.
9397 (usr_store_inferior_registers): Use collect_ptrace_register callback
9398 instead of checking for the_low_target.left_pad_xfer.
9399
9400 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9401 (s390_supply_ptrace_register): Likewise.
9402 (s390_fill_gregset): Call s390_collect_ptrace_register.
9403 (the_low_target): Update.
9404
9405 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9406 (ppc_supply_ptrace_register): Likewise.
9407 (the_low_target): Update.
9408
9409 * linux-i386-low.c (the_low_target): Update.
9410 * linux-x86-64-low.c (the_low_target): Update.
9411
d61ddec4
UW
94122008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9413
9414 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9415 reg-s390.o and reg-s390x.o.
9416
9417 * linux-low.c (new_inferior): New global variable.
9418 (linux_create_inferior, linux_attach): Set it.
9419 (linux_wait_for_process): Call the_low_target.arch_setup after the
9420 target has stopped for the first time.
9421 (initialize_low): Do not call the_low_target.arch_setup.
9422
9423 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9424 (s390_set_pc): Likewise.
9425 (s390_arch_setup): New function.
9426 (the_low_target): Use s390_arch_setup as arch_setup routine.
9427
9428 * regcache.c (realloc_register_cache): New function.
9429 (set_register_cache): Call it for each existing regcache.
9430
d05b4ac3
UW
94312008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9432
9433 * server.h (init_registers): Remove prototype.
9434
9435 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9436 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9437 instead of init_registers ().
9438 * linux-arm-low.c (init_registers_arm): Add prototype.
9439 (init_registers_arm_with_iwmmxt): Likewise.
9440 (the_low_target): Add initializer for arch_setup field.
9441 * linux-cris-low.c (init_registers_cris): Add prototype.
9442 (the_low_target): Add initializer for arch_setup field.
9443 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9444 (the_low_target): Add initializer for arch_setup field.
9445 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9446 (the_low_target): Add initializer for arch_setup field.
9447 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9448 (the_low_target): Add initializer for arch_setup field.
9449 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9450 (the_low_target): Add initializer for arch_setup field.
9451 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9452 (the_low_target): Add initializer for arch_setup field.
9453 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9454 (init_registers_mips64_linux): Likewise.
9455 (the_low_target): Add initializer for arch_setup field.
9456 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9457 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9458 (the_low_target): Add initializer for arch_setup field.
9459 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9460 (init_registers_powerpc_64): Likewise.
9461 (the_low_target): Add initializer for arch_setup field.
9462 * linux-s390-low.c (init_registers_s390): Add prototype.
9463 (init_registers_s390x): Likewise.
9464 (the_low_target): Add initializer for arch_setup field.
9465 * linux-sh-low.c (init_registers_sh): Add prototype.
9466 (the_low_target): Add initializer for arch_setup field.
9467 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9468 (the_low_target): Add initializer for arch_setup field.
9469 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9470 (the_low_target): Add initializer for arch_setup field.
9471
9472 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9473 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9474 instead of init_registers ().
9475 * win32-arm-low.c (init_registers_arm): Add prototype.
9476 (the_low_target): Add initializer for arch_setup field.
9477 * win32-i386-low.c (init_registers_i386): Add prototype.
9478 (the_low_target): Add initializer for arch_setup field.
9479
9480 * spu-low.c (init_registers_spu): Add prototype.
9481 (initialize_low): Call initialie_registers_spu () instead of
9482 initialize_registers ().
9483
fd96d250
PA
94842008-02-19 Pedro Alves <pedro@codesourcery.com>
9485
9486 * server.c (handle_v_requests): When handling the vRun and vAttach
9487 packets, if already debugging a process, don't kill it. Return an
9488 error instead.
9489
d41b6bb4
DJ
94902008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9491
9492 * server.c (handle_query): Correct length check.
9493
5ac588cf
PA
94942008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9495
9496 * win32-low.c (do_initial_child_stuff): Add process handle
9497 parameter. Set current_process_handle and current_process_id from the
9498 parameters. Clear globals.
9499 (win32_create_inferior): Don't set current_process_handle and
9500 current_process_id here. Instead pass them on the call to
9501 do_initial_child_stuff.
9502 (win32_attach): Likewise.
9503 (win32_clear_inferiors): New.
9504 (win32_kill): Don't close the current process handle or the
9505 current thread handle here. Instead call win32_clear_inferiors.
9506 (win32_detach): Don't open a new handle to the process. Call
9507 win32_clear_inferiors.
9508 (win32_join): Don't rely on current_process_handle; open a new
9509 handle using the process id.
9510 (win32_wait): Call win32_clear_inferiors when the inferior process
9511 has exited.
9512
ecd7ecbc
DJ
95132008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9514
9515 * server.c (monitor_show_help): Add "exit".
9516
1525d545
MG
95172008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9518
ecd7ecbc 9519 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9520 (clean): Add reg-xtensa.c.
9521 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9522 * configure.srv (xtensa*-*-linux*) New target.
9523 * linux-xtensa-low.c: New.
9524 * xtensa-xtregs.c: New.
1525d545 9525
59a016f0
PA
95262008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9527
9528 * hostio.c: Don't include errno.h.
9529 (errno_to_fileio_errno): Move to hostio-errno.
9530 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9531 error number outputting to the target->hostio_last_error callback.
9532 (hostio_packet_error): Use FILEIO_EINVAL directly.
9533 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9534 calls to hostio_error.
9535 * hostio-errno.c: New.
9536 * server.h (hostio_last_error_from_errno): Declare.
9537 * target.h (target_ops): Add hostio_last_error member.
9538 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9539 as hostio_last_error handler.
889bf7c5 9540 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9541 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9542 (wince_hostio_last_error): New functions.
9543 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9544 as hostio_last_error handler.
9545 (win32_target_ops) [!_WIN32_WCE]: Register
9546 hostio_last_error_from_errno as hostio_last_error handler.
9547 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9548 (hostio-errno.o): New rule.
9549 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9550 * configure.srv (srv_hostio_err_objs): New variable. Default to
9551 hostio-errno.o.
9552 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9553 * configure: Regenerate.
9554
2d717e4f
DJ
95552008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9556
9557 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9558 (linux_kill, linux_detach): Clean up the process list.
9559 * remote-utils.c (remote_open): Improve port number parsing.
9560 (putpkt_binary, input_interrupt): Only send interrupts if the target
9561 is running.
9562 * server.c (extended_protocol): Make static.
9563 (attached): Define earlier.
9564 (exit_requested, response_needed, program_argv): New variables.
9565 (target_running): New.
9566 (start_inferior): Clear attached here.
9567 (attach_inferior): Set attached here.
9568 (require_running): Define.
9569 (handle_query): Use require_running and target_running. Implement
9570 "monitor exit".
9571 (handle_v_attach, handle_v_run): New.
9572 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9573 (gdbserver_usage): Update.
9574 (main): Redo argument parsing. Handle --debug and --multi. Handle
9575 --attach along with other options or after the port. Save
9576 program_argv. Support no initial program. Resynchronize
9577 communication with GDB after an error. Handle "monitor exit".
9578 Use require_running and target_running. Always allow the extended
9579 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9580 restart in extended mode.
9581 * README: Refer to the GDB manual. Update --attach usage.
9582
7407e2de
AS
95832007-12-20 Andreas Schwab <schwab@suse.de>
9584
9585 * linux-low.c (STACK_SIZE): Define.
9586 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9587 (linux_test_for_tracefork): Likewise.
9588
b65d95c5
DJ
95892007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9590
9591 * linux-low.c (linux_wait_for_event): Update messages. Do not
9592 reinsert auto-delete breakpoints.
9593 * mem-break.c (struct breakpoint): Change return type of handler to
9594 int.
9595 (set_breakpoint_at): Update handler type.
9596 (reinsert_breakpoint_handler): Return 1 instead of calling
9597 delete_breakpoint.
9598 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9599 setting a new one.
9600 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9601 * mem-break.h (set_breakpoint_at): Update handler type.
9602 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9603 * win32-low.c (auto_delete_breakpoint): New.
9604 (get_child_debug_event): Use it.
9605
4e799345
DJ
96062007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9607
9608 * configure.ac: Check for pread and pwrite.
9609 * hostio.c (handle_pread): Fall back to lseek and read.
9610 (handle_pwrite): Fall back to lseek and write.
9611 * config.in, configure: Regenerated.
9612
27524b67
DJ
96132007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9614
9615 * server.c (myresume): Add own_buf argument.
9616 (main): Update calls.
9617
a20d5e98
DJ
96182007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9619
9620 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9621 * remote-utils.c (remote_open): Do not call disable_async_io.
9622 (block_async_io): Delete.
9623 (unblock_async_io): Make static.
9624 (initialize_async_io): New.
9625 * server.c (handle_v_cont): Handle async I/O here.
9626 (myresume): Likewise. Move other common resume tasks here...
9627 (main): ... from here. Call initialize_async_io. Disable async
9628 I/O before the main loop.
9629 * server.h (initialize_async_io): Declare.
9630 (block_async_io, unblock_async_io): Delete prototypes.
9631 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9632
b79d787e
DJ
96332007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9634
9635 * remote-utils.c (readchar): Allow binary data in received messages.
9636
d97903b2
PA
96372007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9638
9639 * win32-low.c (attaching): New global.
9640 (win32_create_inferior): Clear the `attaching' global.
9641 (win32_attach): Set the `attaching' global.
9642 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9643 attaching. Only set a breakpoint at the entry point if not
9644 attaching.
9645
311de423
PA
96462007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9647
9648 * server.c (main): Don't report dll events on the initial
9649 connection on attaches.
9650
6c2d16d2
PA
96512007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9652
9653 * server.c (main): Relax numerical bases supported for the pid of
9654 the --attach command line argument.
9655
5ca906e6
PA
96562007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9657
9658 * win32-low.c (win32_attach): Call OpenProcess before
9659 DebugActiveProcess, not after. Add last error output to error
9660 call.
9661
9c6c8194
PA
96622007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9663
9664 * win32-low.c (win32_get_thread_context)
9665 (win32_set_thread_context): New functions.
9666 (thread_rec): Use win32_get_thread_context.
9667 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9668 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9669 field.
9670
4d5d1aaa
PA
96712007-12-03 Leo Zayas
9672 Pedro Alves <pedro_alves@portugalmail.pt>
9673
9674 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9675 global variables.
9676 (child_add_thread): Minor cleanup.
9677 (child_continue): Resume artificially suspended threads before
9678 calling ContinueDebugEvent.
9679 (suspend_one_thread): New.
9680 (fake_breakpoint_event): New.
9681 (get_child_debug_event): Change return type to int. Check here if
9682 gdb sent an interrupt request. If a soft interrupt was requested,
9683 fake a breakpoint event. Return 0 if there is no event to handle,
9684 and 1 otherwise.
9685 (win32_wait): Don't check here if gdb sent an interrupt request.
9686 Ensure there is a valid event to handle.
9687 (win32_request_interrupt): Add soft interruption method as last
9688 resort.
9689
c436e841
PA
96902007-12-03 Leo Zayas
9691 Pedro Alves <pedro_alves@portugalmail.pt>
9692
9693 * win32-low.h (win32_thread_info): Add descriptions to the
9694 structure members. Replace `suspend_count' counter by a
9695 `suspended' flag.
9696 * win32-low.c (thread_rec): Update condition of when to get the
9697 context from the inferior. Rely on ContextFlags being set if it
9698 has already been retrieved. Only suspend the inferior thread if
9699 we haven't already. Warn if that fails.
9700 (continue_one_thread): s/suspend_count/suspended/. Only call
9701 ResumeThread once. Warn if that fails.
9702
e7b5fa67
PA
97032007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9704
9705 * win32-low.c (win32_wait): Don't read from the inferior when it
9706 has already exited.
9707
a385171d
PA
97082007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9709
9710 * Makefile.in (win32_low_h): New variable.
9711 (win32-low.o): Add dependency on $(win32_low_h).
9712 (win32-arm-low.o, win32-i386-low.o): New rules.
9713
f80c84b3
DJ
97142007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9715
9716 * hostio.c: Correct copyright year.
9717
a6b151f1
DJ
97182007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9719
9720 * Makefile.in (OBS): Add hostio.o.
9721 (hostio.o): New rule.
9722 * server.h (handle_vFile): Declare.
9723 * hostio.c: New file.
9724 * server.c (handle_v_requests): Take packet_len and new_packet_len
9725 for binary packets. Call handle_vFile.
9726 (main): Update call to handle_v_requests.
9727
f9387fc3
DJ
97282007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9729
9730 * linux-low.c: Include <sched.h>.
9731
51c2684e
DJ
97322007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9733
9734 * linux-low.c (linux_tracefork_grandchild): New.
9735 (linux_tracefork_child): Use clone.
9736 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9737
75f83163
JB
97382007-10-31 Joel Brobecker <brobecker@adacore.com>
9739
9740 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9741
da5898ce
DJ
97422007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9743
9744 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9745
24a09b5f
DJ
97462007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9747
9748 * inferiors.c (change_inferior_id): Delete.
9749 (add_pid_to_list, pull_pid_from_list): New.
9750 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9751 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9752 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9753 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9754 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9755 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9756 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9757 (using_threads): Always set to 1.
9758 (handle_extended_wait): New.
9759 (add_process): Do not set TID.
9760 (linux_create_inferior): Set must_set_ptrace_flags.
9761 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9762 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9763 (linux_thread_alive): Rename TID argument to LWPID.
9764 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9765 (linux_wait_for_event): Do not use TID or check using_threads. Update
9766 call to dead_thread_notify. Call handle_extended_wait.
9767 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9768 (send_sigstop): Delete sigstop_sent.
9769 (wait_for_sigstop): Avoid TID.
9770 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9771 (linux_test_for_tracefork): New.
9772 (linux_lookup_signals): Use thread_db_active and
9773 linux_supports_tracefork_flag.
9774 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9775 * linux-low.h (get_process_thread): Avoid TID.
9776 (struct process_ifo): Move thread_known and tid to the end. Remove
9777 sigstop_sent.
9778 (linux_attach_lwp, thread_db_init): Update prototypes.
9779 * server.h (change_inferior_id): Delete prototype.
9780 (add_pid_to_list, pull_pid_from_list): New prototypes.
9781 * thread-db.c (thread_db_use_events): New.
9782 (find_first_thread): Rename to...
9783 (find_one_thread): ...this. Update callers and messages. Do not
9784 call fatal. Check thread_db_use_events. Do not call
9785 change_inferior_id or new_thread_notify.
9786 (maybe_attach_thread): Update. Do not call new_thread_notify.
9787 (thread_db_init): Set thread_db_use_events. Check use_events.
9788 * utils.c (fatal, warning): Correct message prefix.
9789
30ed0a8f
DJ
97902007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9791
9792 * Makefile.in (clean): Remove new files.
9793 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9794 (powerpc-64.o, powerpc-64.c): New rules.
9795 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9796 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9797 with SPE.
9798 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9799 SPE targets.
9800 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9801 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9802 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9803 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9804 (target_regsets): Add AltiVec and SPE register sets.
9805 * configure.ac: Check for AltiVec and SPE.
9806 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9807 (ppc_fill_vrregset, ppc_store_vrregset): New.
9808 (target_regsets): Add AltiVec register set.
9809 * configure: Regenerated.
9810
fd462a61
DJ
98112007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9812
9813 * linux-low.c (O_LARGEFILE): Define.
9814 (linux_read_memory): Use /proc/PID/mem.
9815 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9816 * configure, config.in: Regenerated.
9817
69f223ed
DJ
98182007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9819
9820 * linux-low.c (linux_wait_for_event): Do not pass signals while
9821 single-stepping.
9822
aec18585
PA
98232007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9824
9825 * win32-low.c (create_process): New.
9826 (win32_create_inferior): Use create_process instead of
9827 CreateProcess. If create_process failed retry appending an ".exe"
9828 suffix. Store the GetLastError result immediatelly after
9829 create_process calls and use it on the call to error.
9830
34d86ddd
PA
98312007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9832
9833 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9834
5a0e3bd0
JB
98352007-08-23 Joel Brobecker <brobecker@adacore.com>
9836
9837 * configure.ac: Switch license to GPLv3.
9838
f88c79e6
MS
98392007-08-01 Michael Snyder <msnyder@access-company.com>
9840
9841 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9842
6b3d9b83
PA
98432007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9844
9845 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9846 typedef.
9847 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9848 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9849 CloseToolhelp32Snapshot.
9850 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9851 CloseToolhelp32Snapshot.
9852
c588c53c
MS
98532007-07-27 Michael Snyder <michael.snyder@access-company.com>
9854
9855 * server.c (main): Check for inferior exit before main loop.
9856
aa0403d9
PA
98572007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9858
9859 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9860 instead of on tmp_desc.
9861
255e7678
DJ
98622007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9863 Daniel Jacobowitz <dan@codesourcery.com>
9864
9865 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9866 (add_thread): Minor cleanups.
9867 (clear_inferiors): Move lower in the file. Clear the DLL
9868 list.
9869 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9870 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9871 (xml_escape_text): New.
9872 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9873 for qSupported.
9874 (handle_v_cont): Report errors.
9875 (gdbserver_version): Update.
9876 (main): Correct size of own_buf. Do not report initial DLL events.
9877 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9878 (unloaded_dll, xml_escape_text): New.
9879 * win32-low.c (enum target_waitkind): Update comments.
9880 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9881 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9882 (win32_EnumProcessModules, win32_GetModuleInformation)
9883 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9884 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9885 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9886 (win32_Module32First, win32_Module32Next, load_toolhelp)
9887 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9888 (get_child_debug_event): Handle DLL events.
9889 (win32_wait): Likewise.
9890
0d37add9
DJ
98912007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9892
9893 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9894 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9895
45e2715e
PA
98962007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9897
9898 * win32-low.c (handle_output_debug_string): Ignore event if not
9899 waiting.
9900
c5674cf1
PA
99012007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9902
9903 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9904
2bbe3cc1
DJ
99052007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9906
9907 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9908
ae13219e
DJ
99092007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9910
9911 * inferiors.c (change_inferior_id): Add comment.
9912 * linux-low.c (check_removed_breakpoint): Add an early
9913 prototype. Improve debug output.
9914 (linux_attach): Doc update.
9915 (linux_detach_one_process, linux_detach): Clean up before releasing
9916 each process.
9917 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9918 * linux-low.h (struct process_info): Doc improvement.
9919 * mem-break.c (delete_all_breakpoints): New.
9920 * mem-break.h (delete_all_breakpoints): New prototype.
9921 * thread-db.c (find_first_thread): New.
9922 (thread_db_create_event): Call it instead of
9923 thread_db_find_new_threads. Clean up unused variables.
9924 (maybe_attach_thread): Remove first thread handling.
9925 (thread_db_find_new_threads): Use find_first_thread.
9926 (thread_db_get_tls_address): Likewise.
9927
4105de34
DJ
99282007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9929
9930 * thread-db.c (thread_db_find_new_threads): Add prototype.
9931 (thread_db_create_event): Check for the main thread before adding
9932 a new thread.
9933 (maybe_attach_thread): Only enable event reporting if TID == 0.
9934 (thread_db_get_tls_address): Check for new threads.
9935
2b876972
DJ
99362007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9937
9938 * linux-low.c (linux_create_inferior): Try execv before execvp.
9939 * spu-low.c (spu_create_inferior): Likewise.
9940
7a245884
DJ
99412007-06-13 Mike Frysinger <vapier@gentoo.org>
9942
9943 * linux-low.c (linux_create_inferior): Change execv to execvp.
9944 * spu-low.c (spu_create_inferior): Likewies.
9945
117ce543
DJ
99462007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9947
9948 * Makefile.in (clean): Clean new files instead of deleted ones.
9949 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9950 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9951 rules.
9952 * configure.srv: Specify XML files and new regformats for MIPS and
9953 MIPS64 GNU/Linux.
9954 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9955 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9956 an entry for the restart register.
9957 (mips_cannot_fetch_register, mips_cannot_store_register)
9958 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9959 register names to match the XML descriptions.
9960 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9961 restart register instead of $0.
9962
0e7f50da
UW
99632007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9964 Markus Deuling <deuling@de.ibm.com>
9965
9966 * remote-utils.c (decode_xfer_write): New function.
9967 * server.h (decode_xfer_write): Add prototype.
9968 * server.c (handle_query): Add PACKET_LEN argument. Support
9969 qXfer:spu:read and qXfer:spu:write packets.
9970 (main): Pass packet_len to handle_query.
9971 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9972 * target.h (target_ops): Add qxfer_spu.
9973
374c1d38
UW
99742007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9975
9976 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9977 accessing non-seekable spufs files.
9978
bb63802a
UW
99792007-05-16 Markus Deuling <deuling@de.ibm.com>
9980
889bf7c5 9981 * server.c (handle_query): Add reply for qC packet.
bb63802a 9982
7390519e
PA
99832007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9984 Leo Zayas <lerele@champenstudios@com>
9985
9986 * server.h (check_remote_input_interrupt_request): New function.
9987 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9988 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9989 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9990 (check_remote_input_interrupt_request): New function.
9991 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9992 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9993 winapi_GenerateConsoleCtrlEvent): New typedefs.
9994 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9995 to 250 ms.
9996 (win32_wait): Check for remote interrupt request
9997 with check_remote_input_interrupt_request.
9998 (win32_request_interrupt): New function.
9999 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10000
34b34921
PA
100012007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10002
10003 * win32-low.c (debug_registers_changed,
10004 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10005 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10006 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10007 (thread_rec): Get context using the low target.
10008 (child_add_thread): Call thread_added on the low target,
10009 which does the same thing.
10010 (regptr): Delete.
10011 (do_initial_child_stuff): Remove debug registers references.
10012 Set context using the low target. Resume threads after
10013 setting the contexts.
10014 (child_continue): Remove dead variable. Remove debug
10015 registers references.
10016 (child_fetch_inferior_registers): Go through the low target.
10017 (do_child_store_inferior_registers): Remove.
10018 (child_store_inferior_registers): Go through the low target.
10019 (win32_resume): Remove debug registers references.
10020 Set context using the low target.
10021 (handle_exception): Change return type to void. Don't record
10022 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10023 first chance exception.
889bf7c5 10024 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
10025 goto loop. Always return after waiting for debug event.
10026 (win32_wait): Convert to switch statement. Handle spurious
10027 events.
10028
10029 * win32-i386-low.c (debug_registers_changed,
10030 debug_registers_used): New.
10031 (initial_stuff): Rename to ...
10032 (i386_initial_stuff): ... this. Clear debug registers
10033 state variables.
10034 (store_debug_registers): Delete.
10035 (i386_get_thread_context): New.
10036 (load_debug_registers): Delete.
10037 (i386_set_thread_context): New.
10038 (i386_thread_added): New.
10039 (single_step): Rename to ...
10040 (i386_single_step): ... this.
10041 (do_fetch_inferior_registers): Rename to ...
10042 (i386_fetch_inferior_register): ... this.
10043 (i386_store_inferior_register): New.
10044 (the_low_target): Adapt to new interface.
10045
10046 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10047 (arm_get_thread_context): New.
10048 (arm_set_thread_context): New.
10049 (regptr): New.
10050 (do_fetch_inferior_registers): Rename to ...
10051 (arm_fetch_inferior_register): ... this.
10052 (arm_store_inferior_register): New.
10053 (arm_wince_breakpoint): Reimplement as unsigned long.
10054 (arm_wince_breakpoint_len): Define.
10055 (the_low_target): Adapt to new interface.
10056
10057 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10058 load_debug_registers. Add get_thread_context, set_thread_context,
10059 thread_added and store_inferior_register. Rename
10060 fetch_inferior_registers to fetch_inferior_register.
10061 (regptr): Remove declaration.
10062
dd6953e1
PA
100632007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10064
10065 * linux-low.c (linux_detach): Change return type to int. Return 0.
10066 * spu-low.c (spu_detach): Likewise.
10067
444d6139
PA
100682007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10069
10070 * target.h (target_ops): Change return type of detach to int.
10071 Add join.
10072 (join_inferior): New.
10073 * server.c (main): Don't skip detach support on mingw32.
10074 If the inferior doesn't support detaching return error.
10075 Call join_inferior instead of using waitpid.
10076 * linux-low.c (linux_join): New.
10077 (linux_target_op): Add linux_join.
10078 * spu-low.c (spu_join): New.
10079 (spu_target_ops): Add spu_join.
10080 * win32-low.c (win32_detach): Adapt to new interface.
10081 Reopen current_process_handle before detaching. Issue a child
10082 resume before detaching.
10083 (win32_join): New.
10084 (win32_target_op): Add win32_join.
10085
1d5315fe
PA
100862007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10087
10088 * win32-low.c (win32-attach): Fix return value.
10089 * target.h (target_ops): Describe ATTACH return values.
10090
bf914831
PA
100912007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10092
10093 * win32-low.c (GETPROCADDRESS): Define.
10094 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10095 (winapi_DebugSetProcessKillOnExit): Likewise.
10096 (win32_create_inferior): Force usage of ansi CreateProcessA.
10097 (win32_attach): Use GETPROCADDRESS.
10098 (win32_detach): Likewise.
10099
f72f3e60
PA
101002007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10101
10102 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10103
ed50f18f
PA
101042007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10105
10106 * win32-low.c: Commit leftover changes from 2007-03-29.
10107
0c2ead7e
DJ
101082007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10109
10110 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10111 fields short instead of int. Add explicit padding.
10112 (i387_cache_to_fsave): Remove unnecessary casts.
10113 (i387_fsave_to_cache): Doc fix.
10114 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10115
73725ff3
DJ
101162007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10117
10118 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10119 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10120
d99f33d8
PA
101212007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10122
10123 * configure.srv (arm*-*-mingw32ce*): Move near the other
10124 arm targets.
10125
68070c10
PA
101262007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10127
2482afc6 10128 * configure.ac: Add errno checking.
68070c10
PA
10129 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10130 sys/file.h and malloc.h.
10131 (AC_CHECK_DECLS): Add perror.
10132 (srv_mingwce): Handle.
2482afc6 10133 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
10134 win32-i386-low.o to srv_tgtobj.
10135 (i[34567]86-*-mingw*): Likewise.
10136 (arm*-*-mingw32ce*): Add case.
10137 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10138 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10139 [__MINGW32CE__] (strerror): New function.
10140 [__MINGW32CE__] (errno): Define to GetLastError.
10141 [__MINGW32CE__] (COUNTOF): New macro.
10142 (remote_open): Remove extra close call.
10143 * mem-break.c (delete_breakpoint_at): New function.
10144 * mem-break.h (delete_breakpoint_at): Declare.
10145 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10146 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10147 [USE_WIN32API] (read, write): Add char* casts.
10148 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10149 * server.h: Include wincecompat.h on Windows CE.
10150 [HAVE_ERRNO_H]: Check.
10151 (perror): Declare if not declared.
10152 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10153 (perror_with_name): Remove errno declaration.
10154 * wincecompat.h: New.
10155 * wincecompat.c: New.
10156 * win32-low.h: New.
10157 * win32-arm-low.c: New.
10158 * win32-i386-low.c: New.
10159 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10160 (OUTMSG2): Make it safe.
10161 (_T): New macro.
10162 (COUNTOF): New macro.
10163 (NUM_REGS): Get it from the low target.
10164 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10165 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10166 (thread_rec): Let low target handle debug registers.
10167 (child_add_thread): Likewise.
10168 (child_init_thread_list): Likewise.
10169 (continue_one_thread): Likewise.
10170 (regptr): New.
10171 (do_child_fetch_inferior_registers): Move to ...
10172 * win32-i386-low.c: ... here, and rename to ...
10173 (do_fetch_inferior_registers): ... this.
889bf7c5 10174 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
10175 Go through the low target.
10176 (do_child_store_inferior_registers): Use regptr.
10177 (strwinerror): New function.
10178 (win32_create_inferior): Handle Windows CE.
10179 Use strwinerror instead of strerror on Windows error
10180 codes. Add program to the error output.
10181 Don't close the main thread handle on Windows CE.
10182 (win32_attach): Use coredll.dll on Windows CE.
10183 (win32_kill): Close current process and current
10184 thread handles.
10185 (win32_detach): Use coredll.dll on Windows CE.
10186 (win32_resume): Let low target handle debug registers, and
10187 step request.
10188 (handle_exception): Add/Remove initial breakpoint. Avoid
10189 non-existant WSTOPSIG on Windows CE.
10190 (win32_read_inferior_memory): Cast to remove warning.
10191 (win32_arch_string): Go through the low target.
10192 (initialize_low): Call set_breakpoint_data with the low
10193 target's breakpoint.
10194 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10195 FOP_REGNUM, mappings): Move to ...
10196 * win32-i386-low.c: ... here.
10197 * win32-low.c (win32_thread_info): Move to ...
10198 * win32-low.h: ... here.
10199 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10200 win32-arm-low.c and wincecompat.c.
10201 (all:): Add $EXEEXT.
10202 (install-only:): Likewise.
10203 (gdbserver:): Likewise.
10204 (gdbreplay:): Likewise.
10205 * config.in: Regenerate.
10206 * configure: Regenerate.
10207
41093d81
PA
102082007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10209
10210 * win32-low.c: Rename typedef thread_info to
10211 win32_thread_info throughout.
10212
544afa54
PA
102132007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10214
10215 * win32-i386-low.c: Rename to ...
10216 * win32-low.c: ... this.
10217 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10218 * Makefile.in: Likewise.
10219
bce7165d
PA
102202007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10221
10222 * remote-utils.c (monitor_output): Constify msg parameter.
10223 * server.h (monitor_output): Likewise.
10224 * win32-i386-low.c (handle_output_debug_string): New.
10225 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10226 handle_output_debug_string.
10227 (get_child_debug_event): Likewise.
10228
506c7aa0
DJ
102292007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10230
10231 * server.c (main): Correct strtoul check.
10232
42c81e2a
DJ
102332007-03-27 Jon Ringle <jon@ringle.org>
10234
10235 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10236
9453113a
DJ
102372007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10238
10239 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10240
64a69107
DJ
102412007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10242
10243 * terminal.h: Check HAVE_SGTTY_H.
10244
102452007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
10246
10247 * remote-utils.c (remote_open): Print out the assigned port number.
10248
c74d0ad8
DJ
102492007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10250
10251 * remote-utils.c (monitor_output): New function.
10252 * server.c (debug_threads): Define here.
10253 (monitor_show_help): New function.
10254 (handle_query): Handle qRcmd.
10255 (main): Do not handle 'd' packet.
10256 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10257 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10258 of debug_threads.
10259
de7c3b4a
PA
102602007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10261
10262 * Makefile.in (EXEEXT): New.
10263 (clean): Use $(EXEEXT).
10264
ef57601b
PA
102652007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10266
10267 * target.h (target_ops): Rename send_signal to request_interrupt,
10268 and remove enum target_signal parameter.
10269 * linux-low.c (linux_request_interrupt): Rename from
10270 linux_send_signal, and always send SIGINT.
10271 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10272 and always send SIGINT.
10273 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10274 of send_signal.
10275 (input_interrupt): Likewise.
10276
820f2bda
PA
102772007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10278
10279 * server.c (get_features_xml): Check if target implemented
10280 arch_string.
10281 * win32-i386-low.c (win32_arch_string): New.
10282 (win32_target_ops): Add win32_arch_string as arch_string member.
10283
ab39bf24
UW
102842007-02-22 Markus Deuling <deuling@de.ibm.com>
10285
10286 * spu-low.c (spu_arch_string): New.
10287 (spu_target_ops): Add spu_arch_string.
10288
61ff6e04
DJ
102892007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10290
10291 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10292 * configure.ac: Do not check for terminal.h.
10293 * configure, config.in: Regenerated.
10294
fb1e4ffc
DJ
102952007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10296
10297 * Makefile.in (OBS): Add $(XML_BUILTIN).
10298 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10299 (clean): Update.
10300 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10301 (arm-with-iwmmxt.c): New.
10302 * config.in, configure: Regenerate.
10303 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10304 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10305 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10306 (arm*-*-linux*): Add iWMMXt and regset support.
10307 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10308 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10309 (arm_store_wmmxregset, target_regsets): New.
10310 * server.c (get_features_xml): Take annex argument. Check builtin
10311 XML documents.
10312 (handle_query): Handle multiple annexes.
10313
0f48aa01
DJ
103142007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10315
10316 * remote-utils.c [USE_WIN32API] (read, write): Define.
10317 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10318 write.
10319
23181151
DJ
103202007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10321
10322 * linux-i386-low.c (the_low_target): Set arch_string.
10323 * linux-x86-64-low.c (the_low_target): Likewise.
10324 * linux-low.c (linux_arch_string): New.
10325 (linux_target_ops): Add it.
10326 * linux-low.h (struct linux_target_ops): Add arch_string.
10327 * server.c (write_qxfer_response): Use const void * for DATA.
10328 (get_features_xml): New.
10329 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10330 * target.h (struct target_ops): Add arch_string method.
10331
9d606399
DJ
103322007-01-03 Denis Pilat <denis.pilat@st.com>
10333 Daniel Jacobowitz <dan@codesourcery.com>
10334
10335 * linux-low.c (linux_kill): Handle being called with no threads.
10336 * win32-i386-low.c (win32_kill): Likewise.
10337 (get_child_debug_event): Clear current_process_handle.
10338
103392006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10340 Daniel Jacobowitz <dan@codesourcery.com>
10341
10342 * remote-utils.c (remote_open): Check the type of specified
10343 serial port devices before opening them.
10344 * server.c (main): Kill the inferior if an error occurs during
10345 the first remote_open.
10346
a5e13d24
DJ
103472006-12-05 Markus Deuling <deuling@de.ibm.com>
10348
10349 * README: Update supported targets.
10350
186947f7
DJ
103512006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10352
10353 * Makefile.in (clean): Remove reg-mips64.c.
10354 (reg-mips64.c, reg-mips64.o): New rules.
10355 * configure.srv: Handle mips64. Include regset support for mips.
10356 * linux-mips-low.c (union mips_register): New.
10357 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10358 (mips_breakpoint, mips_breakpoint_at): Use int.
10359 (mips_collect_register, mips_supply_register)
10360 (mips_collect_register_32bit, mips_supply_register_32bit)
10361 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10362 (mips_store_fpregset, target_regsets): New.
10363 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10364
a13e2c95
UW
103652006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10366
10367 * configure.srv: Add target "spu*-*-*".
10368 * Makefile.in (clean): Remove reg-spu.c.
10369 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10370 * spu-low.c: New file.
10371
cb7283db
DJ
103722006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10373
10374 * configure.ac: Correct td_thr_tls_get_addr test.
10375 * configure: Regenerated.
10376
89be2091
DJ
103772006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10378
10379 * linux-low.c (linux_wait_for_event): Reformat. Use the
10380 pass_signals array.
10381 * remote-utils.c (decode_address_to_semicolon): New.
10382 * server.c (pass_signals, handle_general_set): New.
10383 (handle_query): Mention QPassSignals for qSupported.
10384 (main): Call handle_general_set.
10385 * server.h (pass_signals, decode_address_to_semicolon): New.
10386
000ef4f0
DJ
103872006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10388
10389 * server.c (handle_query): Correct error handling for read_auxv.
10390
b7149293
UW
103912005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10392
10393 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10394 and srv_linux_thread_db to yes.
10395 * linux-s390-low.c (s390_fill_gregset): New function.
10396 (target_regsets): Define data structure.
10397
dae5f5cf
DJ
103982006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10399
10400 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10401 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10402 * config.in, configure: Regenerated.
10403 * inferiors.c (gdb_id_to_thread): New function.
10404 (gdb_id_to_thread_id): Use it.
10405 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10406 * linux-low.h (struct process_info): Add th member.
10407 (thread_db_get_tls_address): New prototype.
10408 * remote-utils.c (decode_address): Make non-static.
10409 * server.c (handle_query): Handle qGetTLSAddr.
10410 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10411 * target.h (struct target_ops): Add get_tls_address.
10412 * thread-db.c (maybe_attach_thread): Save the thread handle.
10413 (thread_db_get_tls_address): New.
10414
32ca6d61
DJ
104152006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10416
10417 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10418 (linux_resume_one_process): Take a siginfo_t *. Update all
10419 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10420 (struct pending_signals): Add a siginfo_t.
10421 (linux_wait_for_process): Always set last_status.
10422 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10423 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10424 * linux-low.h (struct process_info): Add last_status.
10425
5ffff7c1
DJ
104262006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10427
10428 * remote-utils.c (try_rle): New function.
10429 (putpkt_binary): Use it.
10430
8695c747
DJ
104312006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10432
10433 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10434 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10435 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10436 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10437 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10438 point registers.
10439
290fadea
RS
104402006-08-08 Richard Sandiford <richard@codesourcery.com>
10441
10442 * server.c (terminal_fd): New variable.
10443 (old_foreground_pgrp): Likewise.
10444 (restore_old_foreground_pgrp): New function.
10445 (start_inferior): Record the terminal file descriptor in terminal_fd
10446 and its original foreground group in old_foreground_pgrp. Register
10447 restore_old_foreground_pgrp with atexit().
10448
9f2e1e63
DJ
104492006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10450
10451 * server.c (handle_query): Correct qPart to qXfer.
10452
b80864fb
DJ
104532006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10454
10455 * configure.ac: Check for more headers which are missing on
10456 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10457 * configure.srv: Add Cygwin and mingw32.
10458 * remote-utils.c: Don't include headers unconditionally which
10459 are missing on mingw32. Include <winsock.h> for mingw32.
10460 (remote_open): Adjust for mingw32 support. Flush
10461 standard error after writing to it.
10462 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10463 (unblock_async_io, enable_async_io, disable_async_io)
10464 (readchar, getpkt): Update for Winsock support.
10465 (prepare_resume_reply): Expect a protocol signal number.
10466 * server.c: Disable <sys/wait.h> on mingw32.
10467 (start_inferior): Adjust for mingw32 support. Flush
10468 standard error after writing to it.
10469 (attach_inferior): Likewise. Use protocol signal
10470 numbers.
10471 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10472 and names.
10473 * win32-i386-low.c: New file.
10474 * Makefile.in (XM_CLIBS): Set.
10475 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10476 (win32-i386-low.o): New dependency rule.
10477 * linux-low.c (linux_wait): Use target signal numbers.
10478 * target.h (struct target_ops): Doc fix.
10479 * server.h (target_signal_to_name): New prototype.
10480 * gdbreplay.c: Don't include headers unconditionally which
10481 are missing on mingw32. Include <winsock.h> for mingw32.
10482 (remote_close, remote_open): Adjust for Winsock support.
10483 * configure, config.in: Regenerated.
10484
0876f84a
DJ
104852006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10486
10487 * server.c (decode_xfer_read, write_qxfer_response): New.
10488 (handle_query): Take a packet length argument. Handle
10489 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10490 the qSupported response.
10491 (main): Update call to handle_query.
10492
01f9e8fa
DJ
104932006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10494
10495 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10496 (putpkt_binary): Renamed from putpkt and adjusted for binary
10497 data.
10498 (putpkt): New wrapper for putpkt_binary.
10499 (readchar): Don't mask off the high bit.
10500 (decode_X_packet): New function.
10501 * server.c (main): Call putpkt_binary if a handler sets the packet
10502 length. Save the length of the incoming packet. Handle 'X'.
10503 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10504
be2a5f71
DJ
105052006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10506
10507 * server.c (handle_query): Handle qSupported.
10508
ea025f5f
DJ
105092006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10510
10511 * remote-utils.c (all_symbols_looked_up): New variable.
10512 (look_up_one_symbol): Check it.
10513 * server.h (look_up_one_symbol): New declaration.
10514 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10515
9308fc88
DJ
105162006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10517
10518 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10519 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10520 (PTRACE_GET_THREAD_AREA): Define.
10521 (ps_get_thread_area): New function.
10522
52fb6437
NS
105232006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10524
10525 * configure.srv (m68k*-*-uclinux*): New target.
10526 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10527 (linux_resume_one_process): Remove extraneous cast.
10528 (linux_read_offsets): New.
10529 (linux_target_op): Add linux_read_offsets on mmuless systems.
10530 * server.c (handle_query): Add qOffsets logic.
10531 * target.h (struct target_ops): Add read_offsets.
10532
21b0f40c
DJ
105332006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10534
10535 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10536 (PTRACE_GET_THREAD_AREA): Define.
10537 (ps_get_thread_area): New function.
10538 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10539 (linux-x86-64-low.o): Update.
10540
0050a760
DJ
105412006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10542
10543 * configure.ac: Remove checks for prfpregset_t.
10544 * gdb_proc_service.h: New file.
10545 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10546 new "gdb_proc_service.h".
10547 * proc-service.c: Likewise.
10548 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10549 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10550 * Makefile.in (gdb_proc_service_h): Updated.
10551 * configure, config.in: Regenerated.
10552
b92a518e
DJ
105532006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10554
10555 * remote-utils.c (prepare_resume_reply): Move declaration
10556 of gdb_id_from_wait to the top of the block.
10557
545587ee
DJ
105582006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10559
10560 * linux-low.c (regsets_store_inferior_registers): Read the regset
10561 from the target before filling it.
10562
9db87ebd
DJ
105632006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10564
10565 * server.c (attach_inferior): Return SIGTRAP for a successful
10566 attach.
10567
dd24457d
DJ
105682006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10569
10570 * Makefile.in (OBS): Add version.o.
10571 (STAGESTUFF): Delete.
10572 (version.o): Add dependencies.
10573 (version.c): Replace rule.
10574 (clean): Remove version.c.
10575 * server.c (gdbserver_version): New.
10576 (gdbserver_usage): Use printf.
10577 (main): Handle --version and --help.
10578 * server.h (version, host_name): Add declarations.
10579
6f0f660e
EZ
105802005-12-23 Eli Zaretskii <eliz@gnu.org>
10581
889bf7c5
PA
10582 * linux-arm-low.c:
10583 * linux-arm-low.c:
10584 * inferiors.c:
10585 * i387-fp.h:
10586 * i387-fp.c:
10587 * gdbreplay.c:
10588 * regcache.c:
10589 * proc-service.c:
10590 * mem-break.h:
10591 * mem-break.c:
10592 * linux-x86-64-low.c:
10593 * linux-sh-low.c:
10594 * linux-s390-low.c:
10595 * linux-ppc64-low.c:
10596 * linux-ppc-low.c:
10597 * linux-mips-low.c:
10598 * linux-m68k-low.c:
10599 * linux-m32r-low.c:
10600 * linux-low.h:
10601 * linux-low.c:
10602 * linux-ia64-low.c:
10603 * linux-i386-low.c:
10604 * linux-crisv32-low.c:
10605 * thread-db.c:
10606 * terminal.h:
10607 * target.h:
10608 * target.c:
10609 * server.h:
10610 * server.c:
10611 * remote-utils.c:
10612 * regcache.h:
10613 * utils.c:
10614 * Makefile.in:
10615 * configure.ac:
6f0f660e
EZ
10616 * gdbserver.1: Add (C) after Copyright. Update the FSF
10617 address.
10618
9d1fb177
DJ
106192005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10620
10621 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10622 (arm_breakpoint_at): Recognize both breakpoints.
10623 (the_low_target): Use the correct breakpoint instruction.
10624
011a70c2
DJ
106252005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10626
10627 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10628 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10629 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10630 (the_low_target): Update.
10631
7fb85e41
AS
106322005-10-25 Andreas Schwab <schwab@suse.de>
10633
10634 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10635
10636 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10637 (ia64_num_regs): Reduce to 462.
10638
3db0444b
DJ
106392005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10640
10641 * acinclude.m4: Correct quoting.
10642 * aclocal.m4: Regenerated.
10643
10644 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10645 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10646 (thread_db_init): Call thread_db_err_str.
10647 * configure.ac: Check for TD_VERSION.
10648 * config.in, configure: Regenerated.
10649
bee0189a
DJ
106502005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10651
10652 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10653
e9d25b98
DJ
106542005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10655
10656 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10657 is not available. Define HAVE_PTRACE_GETREGS if it is.
10658 * config.in, configure: Regenerated.
10659 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10660 * linux-i386-low.c, linux-m68k-low.c: Update to use
10661 HAVE_PTRACE_GETREGS.
10662 * linux-low.c (regsets_fetch_inferior_registers)
10663 (regsets_store_inferior_registers): Only return 0 if we processed
10664 GENERAL_REGS.
10665 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10666 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10667
a06660f7
DJ
106682005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10669
10670 * inferiors.c (struct thread_info): Add gdb_id.
10671 (add_thread): Add gdb_id argument.
10672 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10673 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10674 calls to add_thread.
10675 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10676 * server.c (handle_query): Use thread_to_gdb_id.
10677 (handle_v_cont, main): Use gdb_id_to_thread_id.
10678 * server.h (add_thread): Update prototype.
10679 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10680 prototypes.
10681
5a1f5858
DJ
106822005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10683
10684 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10685 left-padded registers.
10686 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10687 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10688
e122f1f5
SE
106892005-07-01 Steve Ellcey <sje@cup.hp.com>
10690
10691 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10692 * configure: Regenerate.
10693 * config.in: Regenerate.
10694 * server.h (NEED_DECLARATION_STRERROR):
10695 Replace with !HAVE_DECL_STRERROR.
10696
d592fa2f
DJ
106972005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10698
10699 * linux-low.c (linux_wait, linux_send_signal): Don't test
10700 an unsigned long variable for > 0 if it could be MAX_ULONG.
10701 * server.c (myresume): Likewise.
10702 * target.c (set_desired_inferior): Likewise.
10703
ccbd4912
MK
107042005-06-13 Mark Kettenis <kettenis@gnu.org>
10705
10706 * configure.ac: Simplify and improve check for socklen_t.
10707 * configure, config.in: Regenerate.
10708
f450004a
DJ
107092005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10710
10711 * acconfig.h: Remove.
10712 * configure.ac: Add a test for socklen_t. Use three-argument
10713 AC_DEFINE throughout.
10714 * config.in: Regenerated using autoheader 2.59.
10715 * configure: Regenerated.
10716
10717 * gdbreplay.c (socklen_t): Provide a default.
10718 (remote_open): Use socklen_t.
10719 * remote-utils.c (socklen_t): Provide a default.
10720 (remote_open): Use socklen_t.
10721 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10722 unsigned char.
10723
10724 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10725 char for buffers.
10726 * linux-low.c (linux_read_memory, linux_write_memory)
10727 (linux_read_auxv): Likewise.
10728 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10729 (check_mem_write): Likewise.
10730 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10731 Likewise.
10732 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10733 (registers_from_string, register_data): Likewise.
10734 * server.c (handle_query, main): Likewise.
10735 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10736 (decode_M_packet): Likewise.
10737 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10738 * target.h (struct target_ops): Update read_memory, write_memory,
10739 and read_auxv.
10740 (read_inferior_memory, write_inferior_memory): Update.
10741 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10742 to unsigned char *.
10743 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10744 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10745 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10746 linux-s390-low.c, linux-sh-low.c: Update for changes in
10747 read_inferior_memory and the_low_target->breakpoint.
10748
eee84df1
DJ
107492005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10750
10751 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10752 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10753 * configure.srv: Add powerpc64-*-linux*.
10754 * linux-ppc64-low.c: New file.
10755
45b134e5
OF
107562005-05-23 Orjan Friberg <orjanf@axis.com>
10757
10758 * linux-cris-low.c: New file with support for CRIS.
10759 * linux-crisv32-low.c: Ditto for CRISv32.
10760 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10761 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10762 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10763 reg-crisv32.o, and reg-crisv32.c to make rules.
10764 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10765 recognized targets.
10766
48d93c75
UW
107672005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10768
10769 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10770 of sizeof (PTRACE_XFER_TYPE).
10771 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10772
e013ee27
OF
107732005-05-12 Orjan Friberg <orjanf@axis.com>
10774
889bf7c5 10775 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10776 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10777 pointers for hardware watchpoint support.
10778 * linux-low.h (struct linux_target_ops): Ditto.
10779 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10780 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10781 to linux_target_ops.
10782 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10783 reply packet.
10784 * server.c (main): Recognize 'Z' and 'z' packets.
10785
b0ded00b
UW
107862005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10787
10788 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10789 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10790 (the_low_target): Add new members.
10791
8643e2ad
DJ
107922005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10793
10794 * proc-service.c (ps_lgetregs): Search all_processes instead of
10795 all_threads.
10796
fc620387
DJ
107972005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10798
10799 * server.c (start_inferior): Change return type to int.
10800 (attach_inferior): Change sigptr to int *.
10801 (handle_v_cont, handle_v_requests): Change signal to int *.
10802 (main): Change signal to int.
10803
108042005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10805
10806 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10807 * configure.srv: Add m32r*-*-linux*.
10808 * linux-m32r-low.c: New file.
10809
e0e76420
DJ
108102005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10811
10812 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10813
a1928bad
DJ
108142005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10815
10816 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10817 Take unsigned long arguments for PIDs.
10818 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10819 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10820 (wait_for_sigstop, linux_resume_one_process)
10821 (regsets_fetch_inferior_registers, linux_send_signal)
10822 (linux_read_auxv): Likewise. Update the types of variables holding
10823 PIDs. Update format string specifiers.
10824 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10825 * remote-utils.c (prepare_resume_reply): Likewise.
10826 * server.c (cont_thread, general_thread, step_thread)
10827 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10828 unsigned long.
10829 (handle_query): Update format specifiers.
10830 (handle_v_cont, main): Use strtoul for thread IDs.
10831 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10832 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10833 (general_thread, step_thread, thread_from_wait)
10834 (old_thread_from_wait): Update.
10835 * target.h (struct thread_resume): Use unsigned long for THREAD.
10836 (struct target_ops): Use unsigned long for arguments to attach and
10837 thread_alive.
10838
dcdb98d2
DJ
108392005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10840
10841 * acinclude.m4: Include bfd/bfd.m4 directly.
10842 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10843 <agriffis@toolchain.org>.
10844 * aclocal.m4, configure: Regenerated.
10845
bec39cab
AC
108462005-01-07 Andrew Cagney <cagney@gnu.org>
10847
10848 * configure.ac: Rename configure.in, require autoconf 2.59.
10849 * configure: Re-generate.
10850
434c4c77
DJ
108512004-12-08 Daniel Jacobowitz <dan@debian.org>
10852
10853 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10854 LIBS when finished.
10855 * aclocal.m4: Regenerated.
10856 * configure: Regenerated.
10857
db1d3e1b
AS
108582004-11-21 Andreas Schwab <schwab@suse.de>
10859
10860 * linux-m68k-low.c (m68k_num_gregs): Define.
10861 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10862 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10863 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10864 (m68k_breakpoint_at): New. Add to the_low_target.
10865
10866 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10867 srv_linux_thread_db to yes.
10868
43360365
JB
108692004-10-20 Joel Brobecker <brobecker@gnat.com>
10870
10871 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10872 (ARCH_SET_FS): Likewise.
10873 (ARCH_GET_FS): Likewise.
10874 (ARCH_GET_GS): Likewise.
10875
fd500816
DJ
108762004-10-16 Daniel Jacobowitz <dan@debian.org>
10877
10878 * linux-i386-low.c (ps_get_thread_area): New.
10879 * linux-x86-64-low.c (ps_get_thread_area): New.
10880 * linux-low.c: Include <sys/syscall.h>.
10881 (linux_kill_one_process): Don't kill the first thread here.
10882 (linux_kill): Kill the first thread here.
10883 (kill_lwp): New function.
10884 (send_sigstop, linux_send_signal): Use it.
10885 * proc-service.c: Clean up #ifdefs.
10886 (fpregset_info): Delete.
10887 (ps_lgetregs): Update and enable implementation.
10888 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10889 implementations.
10890 * remote-utils.c (struct sym_cache, symbol_cache): New.
10891 (input_interrupt): Print a clearer message.
10892 (async_io_enabled): New variable.
10893 (enable_async_io, disable_async_io): Use it. Update comments.
10894 (look_up_one_symbol): Use the symbol cache.
10895 * thread-db.c (thread_db_look_up_symbols): New function.
10896 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10897
f6de3c42
DJ
108982004-10-16 Daniel Jacobowitz <dan@debian.org>
10899
10900 * configure.in: Test for -rdynamic.
10901 * configure: Regenerated.
10902 * Makefile (INTERNAL_LDFLAGS): New.
10903 (gdbserver, gdbreplay): Use it.
10904
2c0fc042
AC
109052004-09-02 Andrew Cagney <cagney@gnu.org>
10906
10907 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10908
075b3282
DJ
109092004-03-23 Daniel Jacobowitz <drow@mvista.com>
10910
10911 * linux-low.c (linux_wait): Clear all_processes list also.
10912
fa6a77dc
DJ
109132004-03-12 Daniel Jacobowitz <drow@mvista.com>
10914
10915 * linux-low.c: Include <errno.h>. Remove extern declaration of
10916 errno.
10917
6d782a97
DJ
109182004-03-12 Daniel Jacobowitz <drow@mvista.com>
10919
10920 * gdbreplay.c, server.h, utils.c: Update copyright years.
10921
3a7fb99b
DJ
109222004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10923
10924 * server.c (main): Print child status or termination signal from
10925 variable 'signal', not 'sig'.
10926
c3e735a6
DJ
109272004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10928
10929 * linux-low.c (linux_read_memory): Change return type to
10930 int. Check for and return error from ptrace().
10931 * target.c (read_inferior_memory): Change return type to int. Pass
10932 back return status from the_target->read_memory().
10933 * target.h (struct target_ops): Adapt *read_memory() prototype.
10934 Update comment.
10935 (read_inferior_memory): Adapt prototype.
10936 * server.c (main): Return an error packet if
10937 read_inferior_memory() returns an error.
10938
a59d1c82
DJ
109392004-03-04 Daniel Jacobowitz <drow@mvista.com>
10940
10941 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10942 Unify with other clean targets.
10943
dc3f8883
DJ
109442004-02-29 Daniel Jacobowitz <drow@mvista.com>
10945
10946 * server.c (handle_v_cont): Call set_desired_inferior.
10947
89a208da
DJ
109482004-02-29 Daniel Jacobowitz <drow@mvista.com>
10949
10950 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10951
62ea82f5
DJ
109522004-02-29 Daniel Jacobowitz <drow@mvista.com>
10953
10954 * linux-low.c (linux_wait): Unblock async I/O.
10955 (linux_resume): Block and enable async I/O.
10956 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10957 * server.h (block_async_io, unblock_async_io): Add prototypes.
10958
6910d122
DJ
109592004-02-29 Daniel Jacobowitz <drow@mvista.com>
10960
10961 * remote-utils.c (remote_open): Print a status notice after
10962 opening a TCP port.
10963 * server.c (attach_inferior): Print a status notice after
10964 attaching.
10965
109662004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10967
10968 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10969
c89dc5d4
DJ
109702004-02-26 Daniel Jacobowitz <drow@mvista.com>
10971
10972 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10973 error packet.
10974 * server.c, target.h: Update copyright years.
10975
4b8dad4a
RM
109762004-02-25 Roland McGrath <roland@redhat.com>
10977
10978 * target.h (struct target_ops): New member `read_auxv'.
10979 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10980 * linux-low.c (linux_read_auxv): New function.
10981 (linux_target_ops): Initialize `read_auxv' member to that.
10982
d7446758
JB
109832004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10984
10985 Committed by Jim Blandy <jimb@redhat.com>.
10986
10987 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10988 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10989 instead of GPR_SIZE to distiguish s390 and s390x targets.
10990
5544ad89
DJ
109912004-01-31 Daniel Jacobowitz <drow@mvista.com>
10992
10993 * linux-low.c: Update copyright year.
10994 (check_removed_breakpoint): Clear pending_is_breakpoint.
10995 (linux_set_resume_request, linux_queue_one_thread)
10996 (resume_status_pending_p): New functions.
10997 (linux_continue_one_thread): Use process->resume.
10998 (linux_resume): Only resume threads if there are no pending events.
10999 * linux-low.h (struct process_info): Add resume request
11000 pointer.
11001
2a68b70e
DJ
110022004-01-30 Daniel Jacobowitz <drow@mvista.com>
11003
11004 * regcache.c (new_register_cache): Clear the allocated register
11005 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11006
64386c31
DJ
110072003-10-13 Daniel Jacobowitz <drow@mvista.com>
11008
11009 * linux-low.c (linux_resume): Take a struct thread_resume *
11010 argument.
11011 (linux_wait): Update call.
11012 (resume_ptr): New static variable.
11013 (linux_continue_one_thread): Renamed from
11014 linux_continue_one_process. Use resume_ptr.
11015 (linux_resume): Use linux_continue_one_thread.
11016 * server.c (handle_v_cont, handle_v_requests): New functions.
11017 (myresume): New function.
11018 (main): Handle 'v' case.
11019 * target.h (struct thread_resume): New type.
11020 (struct target_ops): Change argument of "resume" to struct
11021 thread_resume *.
11022 (myresume): Delete macro.
11023
c938e9b0
L
110242003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11025
11026 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11027 (uninstall): Support DESTDIR.
11028
7f313d07
BC
11029Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11030
11031 * configure.srv: Add xscale*linux copy of arm*linux entry.
11032
3b2fc2ea
DJ
110332003-07-24 Daniel Jacobowitz <drow@mvista.com>
11034
11035 * linux-arm-low.c (arm_reinsert_addr): New function.
11036 (the_low_target): Add arm_reinsert_addr.
11037
1c0a559e
MK
110382003-07-08 Mark Kettenis <kettenis@gnu.org>
11039
11040 * mem-break.c: Remove whitespace at end of file.
11041
43d5792c
DJ
110422003-06-28 Daniel Jacobowitz <drow@mvista.com>
11043
11044 * configure.in: Check whether we need to prototype strerror.
11045 * server.h: Optionally prototype strerror.
11046 * gdbreplay.c (perror_with_name): Use strerror.
11047 * linux-low.c (linux_attach_lwp): Use strerror.
11048 * utils.c (perror_with_name): Use strerror.
11049 * config.in, configure: Regenerated.
11050
c8a86edf
DJ
110512003-06-28 Daniel Jacobowitz <drow@mvista.com>
11052
11053 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11054 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11055
73d37363
DJ
110562003-06-20 Daniel Jacobowitz <drow@mvista.com>
11057
11058 * Makefile.in (SFILES): Update.
11059 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11060 low-sun3.c: Remove files.
11061
6ad8ae5c
DJ
110622003-06-17 Daniel Jacobowitz <drow@mvista.com>
11063
11064 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11065 (linux_detach_one_process, linux_detach): New functions.
11066 (linux_target_ops): Add linux_detach.
11067 * server.c (main): Handle 'D' packet.
11068 * target.h (struct target_ops): Add "detach" member.
11069 (detach_inferior): Define.
11070
1581182a
MK
110712003-06-13 Mark Kettenis <kettenis@gnu.org>
11072
11073 From Kelley Cook <kelleycook@wideopenwest.com>:
11074 * configure.srv: Accept i[34567]86 variants.
11075
e5379b03
DJ
110762003-06-05 Daniel Jacobowitz <drow@mvista.com>
11077
11078 * linux-low.c (linux_wait_for_event): Correct comment typos.
11079 (linux_resume_one_process): Call check_removed_breakpoint.
11080 (linux_send_signal): New function.
11081 (linux_target_ops): Add linux_send_signal.
11082 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11083 of kill.
11084 * target.h (struct target_ops): Add send_signal.
11085
2ff29de4
JB
110862003-05-29 Jim Blandy <jimb@redhat.com>
11087
11088 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11089 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11090 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11091 away part of the register's value.
11092
254787d4
DJ
110932003-03-26 Daniel Jacobowitz <drow@mvista.com>
11094
11095 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11096 (linux_wait_for_event, linux_init_signals): Likewise.
11097
94e10508
DJ
110982003-03-17 Daniel Jacobowitz <drow@mvista.com>
11099
11100 * configure.in: Check for stdlib.h.
11101 * configure: Regenerated.
11102 * config.in: Regenerated.
11103
4c0711e0
DJ
111042003-01-04 Andreas Schwab <schwab@suse.de>
11105
11106 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11107
ef66e766
AC
111082003-01-02 Andrew Cagney <ac131313@redhat.com>
11109
11110 * Makefile.in: Remove obsolete code.
11111
a1358604
DJ
111122002-11-20 Daniel Jacobowitz <drow@mvista.com>
11113
11114 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11115 defined(PT_FPR0_HI).
11116
23ce3b1c
DJ
111172002-11-17 Stuart Hughes <seh@zee2.com>
11118
11119 * linux-arm-low.c (arm_num_regs): Increase.
11120 (arm_regmap): Include status register.
11121
111222002-11-17 Daniel Jacobowitz <drow@mvista.com>
11123
11124 * linux-low.c (register_addr): Remove incorrect -1 check.
11125
a9fa9f7d
DJ
111262002-08-29 Daniel Jacobowitz <drow@mvista.com>
11127
11128 * linux-low.c (linux_create_inferior): Call setpgid. Return
11129 the new PID.
11130 (unstopped_p, linux_signal_pid): Remove.
11131 (linux_target_ops): Remove linux_signal_pid.
11132 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11133 global instead of target method.
11134 * target.h (struct target_ops): Remove signal_pid. Update comment
11135 for create_inferior.
11136 * server.c (signal_pid): New variable.
11137 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 11138 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
11139 (attach_inferior): Set signal_pid.
11140
17574093
DJ
111412002-08-23 Daniel Jacobowitz <drow@mvista.com>
11142
11143 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11144
111452002-08-20 Jim Blandy <jimb@redhat.com>
11146
11147 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11148 default for this.
11149
111502002-08-01 Andrew Cagney <cagney@redhat.com>
11151
11152 * Makefile.in: Make chill references obsolete.
11153
111542002-07-24 Kevin Buettner <kevinb@redhat.com>
11155
11156 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11157 * configure: Regenerate.
11158 * config.in: Regenerate.
11159
111602002-07-09 David O'Brien <obrien@FreeBSD.org>
11161
11162 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11163 (perror_with_name, remote_close, remote_open, expect, play): Static.
11164
111652002-07-04 Michal Ludvig <mludvig@suse.cz>
11166
4b8dad4a 11167 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
11168 byte offsets instead of an array of indexes.
11169 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11170
111712002-06-13 Daniel Jacobowitz <drow@mvista.com>
11172
11173 * regcache.c: Add comment.
11174
111752002-06-11 Daniel Jacobowitz <drow@mvista.com>
11176
11177 * thread-db.c: New file.
11178 * proc-service.c: New file.
11179 * acinclude.m4: New file.
11180 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11181 proc-service.o, and thread-db.o.
11182 (linux-low.o): Add USE_THREAD_DB.
11183 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11184 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11185 * aclocal.m4: Regenerated.
11186 * config.in: Regenerated.
11187 * configure: Regenerated.
11188 * configure.in: Check for proc_service.h, sys/procfs.h,
11189 thread_db.h, and linux/elf.h headrs.
11190 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11191 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11192 Check for -lthread_db and thread support.
11193 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11194 PowerPC, and SuperH.
11195 * i387-fp.c: Constify arguments.
11196 * i387-fp.h: Likewise.
11197 * inferiors.c: (struct thread_info): Renamed from
11198 `struct inferior_info'. Remove PID member. Use generic inferior
11199 list header. All uses updated.
11200 (inferiors, signal_pid): Removed.
11201 (all_threads): New variable.
11202 (get_thread): Define.
11203 (add_inferior_to_list): New function.
11204 (for_each_inferior): New function.
11205 (change_inferior_id): New function.
11206 (add_inferior): Removed.
11207 (remove_inferior): New function.
11208 (add_thread): New function.
11209 (free_one_thread): New function.
11210 (remove_thread): New function.
11211 (clear_inferiors): Use for_each_inferior and free_one_thread.
11212 (find_inferior): New function.
11213 (find_inferior_id): New function.
11214 (inferior_target_data): Update argument type.
11215 (set_inferior_target_data): Likewise.
11216 (inferior_regcache_data): Likewise.
11217 (set_inferior_regcache_data): Likewise.
11218 * linux-low.c (linux_bp_reinsert): Remove.
11219 (all_processes, stopping_threads, using_thrads)
11220 (struct pending_signals, debug_threads, pid_of): New.
11221 (inferior_pid): Replace with macro.
11222 (struct inferior_linux_data): Remove.
11223 (get_stop_pc, add_process): New functions.
11224 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11225 Use add_process and add_thread.
11226 (linux_attach_lwp): New function, based on old linux_attach. Use
11227 add_process and add_thread. Set stop_expected for new threads.
11228 (linux_attach): New function.
11229 (linux_kill_one_process): New function.
11230 (linux_kill): Kill all LWPs.
11231 (linux_thread_alive): Use find_inferior_id.
11232 (check_removed_breakpoints, status_pending_p): New functions.
11233 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11234 Update. Use WNOHANG. Wait for cloned processes also. Update process
11235 struct for the found process.
11236 (linux_wait_for_event): New function.
11237 (linux_wait): Use it. Support LWPs.
11238 (send_sigstop, wait_for_sigstop, stop_all_processes)
11239 (linux_resume_one_process, linux_continue_one_process): New functions.
11240 (linux_resume): Support LWPs.
11241 (REGISTER_RAW_SIZE): Remove.
11242 (fetch_register): Use register_size instead. Call supply_register.
11243 (usr_store_inferior_registers): Likewise. Call collect_register.
11244 Fix recursive case.
11245 (regsets_fetch_inferior_registers): Improve error message.
11246 (regsets_store_inferior_registers): Add debugging.
11247 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11248 (unstopped_p, linux_signal_pid): New functions.
11249 (linux_target_ops): Add linux_signal_pid.
11250 (linux_init_signals): New function.
11251 (initialize_low): Call it. Initialize using_threads.
11252 * regcache.c (inferior_regcache_data): Add valid
11253 flag.
11254 (get_regcache): Fetch registers lazily. Add fetch argument
11255 and update all callers.
11256 (regcache_invalidate_one, regcache_invalidate): New
11257 functions.
11258 (new_register_cache): Renamed from create_register_cache.
11259 Return the new regcache.
11260 (free_register_cache): Change argument to a void *.
11261 (registers_to_string, registers_from_string): Call get_regcache
11262 with fetch flag set.
11263 (register_data): Make static. Pass fetch flag to get_regcache.
11264 (supply_register): Call get_regcache with fetch flag clear.
11265 (collect_register): Call get_regcache with fetch flag set.
11266 (collect_register_as_string): New function.
11267 * regcache.h: Update.
11268 * remote-utils.c (putpkt): Flush after debug output and use
11269 stderr.
11270 Handle input interrupts while waiting for an ACK.
11271 (input_interrupt): Use signal_pid method.
11272 (getpkt): Flush after debug output and use stderr.
11273 (outreg): Use collect_register_as_string.
11274 (new_thread_notify, dead_thread_notify): New functions.
11275 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11276 and general_thread.
11277 (look_up_one_symbol): Flush after debug output.
11278 * server.c (step_thread, server_waiting): New variables.
11279 (start_inferior): Don't use signal_pid. Update call to mywait.
11280 (attach_inferior): Update call to mywait.
11281 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11282 (main): Don't fetch/store registers explicitly. Use
11283 set_desired_inferior. Support proposed ``Hs'' packet. Update
11284 calls to mywait.
11285 * server.h: Update.
11286 (struct inferior_list, struct_inferior_list_entry): New.
11287 * target.c (set_desired_inferior): New.
11288 (write_inferior_memory): Constify.
11289 (mywait): New function.
11290 * target.h: Update.
11291 (struct target_ops): New signal_pid method.
11292 (mywait): Removed macro, added prototype.
11293
11294 * linux-low.h (regset_func): Removed.
11295 (regset_fill_func, regset_store_func): New.
11296 (enum regset_type): New.
11297 (struct regset_info): Add type field. Use new operation types.
11298 (struct linux_target_ops): stop_pc renamed to get_pc.
11299 Add decr_pc_after_break and breakpoint_at.
11300 (get_process, get_thread_proess, get_process_thread)
11301 (strut process_info, all_processes, linux_attach_lwp)
11302 (thread_db_init): New.
11303
11304 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11305 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11306 (the_low_target): Add new members.
11307 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11308 (i386_store_fpxregset): Constify.
11309 (target_regsets): Add new kind identifier.
11310 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11311 (i386_set_pc): Add debugging.
11312 (i386_breakpoint_at): New function.
11313 (the_low_target): Add new members.
11314 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11315 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11316 (mips_breakpoint_at): New.
11317 (the_low_target): Add new members.
11318 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11319 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11320 (the_low_target): Add new members.
11321 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11322 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11323 (the_low_target): Add new members.
11324 * linux-x86-64-low.c (target_regsets): Add new kind
11325 identifier.
11326
113272002-05-15 Daniel Jacobowitz <drow@mvista.com>
11328
11329 From Martin Pool <mbp@samba.org>:
11330 * server.c (gdbserver_usage): New function.
11331 (main): Call it.
11332
113332002-05-14 Daniel Jacobowitz <drow@mvista.com>
11334
11335 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11336 stop_at -> stop_pc.
11337
113382002-05-04 Andrew Cagney <ac131313@redhat.com>
11339
11340 * Makefile.in: Remove obsolete code.
11341
113422002-04-24 Michal Ludvig <mludvig@suse.cz>
11343
11344 * linux-low.c (regsets_fetch_inferior_registers),
11345 (regsets_store_inferior_registers): Removed cast to int from
11346 ptrace() calls.
11347 * regcache.h: Added declaration of struct inferior_info.
11348
113492002-04-20 Daniel Jacobowitz <drow@mvista.com>
11350
11351 * inferiors.c (struct inferior_info): Add regcache_data.
11352 (add_inferior): Call create_register_cache.
11353 (clear_inferiors): Call free_register_cache.
11354 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11355 * regcache.c (struct inferior_regcache_data): New.
11356 (registers): Remove.
11357 (get_regcache): New function.
11358 (create_register_cache, free_register_cache): New functions.
11359 (set_register_cache): Don't initialize the register cache here.
11360 (registers_to_string, registers_from_string, register_data): Call
11361 get_regcache.
11362 * regcache.h: Add prototypes.
11363 * server.h: Likewise.
11364
113652002-04-20 Daniel Jacobowitz <drow@mvista.com>
11366
11367 * mem-break.c: New file.
11368 * mem-break.h: New file.
11369 * Makefile.in: Add mem-break.o rule; update server.h
11370 dependencies.
11371 * inferiors.c (struct inferior_info): Add target_data
11372 member.
11373 (clear_inferiors): Free target_data member if set.
11374 (inferior_target_data, set_inferior_target_data): New functions.
11375 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11376 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11377 * linux-low.c (linux_bp_reinsert): New variable.
11378 (struct inferior_linux_data): New.
11379 (linux_create_inferior): Use set_inferior_target_data.
11380 (linux_attach): Likewise. Call add_inferior.
11381 (linux_wait_for_one_inferior): New function.
11382 (linux_wait): Call it.
11383 (linux_write_memory): Add const.
11384 (initialize_low): Call set_breakpoint_data.
11385 * linux-low.h (struct linux_target_ops): Add breakpoint
11386 handling members.
11387 * server.c (attach_inferior): Remove extra add_inferior
11388 call.
11389 * server.h: Include mem-break.h. Update inferior.c
11390 prototypes.
11391 * target.c (read_inferior_memory)
11392 (write_inferior_memory): New functions.
11393 * target.h (read_inferior_memory)
11394 (write_inferior_memory): Change macros to prototypes.
11395 (struct target_ops): Update comments. Add const to write_memory
11396 definition.
11397
113982002-04-11 Daniel Jacobowitz <drow@mvista.com>
11399
11400 * linux-low.c (usr_store_inferior_registers): Support
11401 registers which are allowed to fail to store.
11402 * linux-low.h (linux_target_ops): Likewise.
11403 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11404 (ppc_cannot_store_register): FPSCR may not be storable.
11405
114062002-04-09 Daniel Jacobowitz <drow@mvista.com>
11407
11408 * server.h: Include <string.h> if HAVE_STRING_H.
11409 * ChangeLog: Correct paths in last ChangeLog entry.
11410
114112002-04-09 Daniel Jacobowitz <drow@mvista.com>
11412
11413 * linux-low.h: Remove obsolete prototypes.
11414 (struct linux_target_ops): New.
11415 (extern the_low_target): New.
11416 * linux-low.c (num_regs, regmap): Remove declarations.
11417 (register_addr): Use the_low_target explicitly.
11418 (fetch_register): Likewise.
11419 (usr_fetch_inferior_registers): Likewise.
11420 (usr_store_inferior_registers): Likewise.
11421 * linux-arm-low.c (num_regs): Remove.
11422 (arm_num_regs): Define.
11423 (arm_regmap): Renamed from regmap, made static.
11424 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11425 made static.
11426 (arm_cannot_store_register): Renamed from cannot_store_register,
11427 made static.
11428 (the_low_target): New.
11429 * linux-i386-low.c (num_regs): Remove.
11430 (i386_num_regs): Define.
11431 (i386_regmap): Renamed from regmap, made static.
11432 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11433 made static.
11434 (i386_cannot_store_register): Renamed from cannot_store_register,
11435 made static.
11436 (the_low_target): New.
11437 * linux-ia64-low.c (num_regs): Remove.
11438 (ia64_num_regs): Define.
11439 (ia64_regmap): Renamed from regmap, made static.
11440 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11441 made static.
11442 (ia64_cannot_store_register): Renamed from cannot_store_register,
11443 made static.
11444 (the_low_target): New.
11445 * linux-m68k-low.c (num_regs): Remove.
11446 (m68k_num_regs): Define.
11447 (m68k_regmap): Renamed from regmap, made static.
11448 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11449 made static.
11450 (m68k_cannot_store_register): Renamed from cannot_store_register,
11451 made static.
11452 (the_low_target): New.
11453 * linux-mips-low.c (num_regs): Remove.
11454 (mips_num_regs): Define.
11455 (mips_regmap): Renamed from regmap, made static.
11456 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11457 made static.
11458 (mips_cannot_store_register): Renamed from cannot_store_register,
11459 made static.
11460 (the_low_target): New.
11461 * linux-ppc-low.c (num_regs): Remove.
11462 (ppc_num_regs): Define.
11463 (ppc_regmap): Renamed from regmap, made static.
11464 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11465 made static.
11466 (ppc_cannot_store_register): Renamed from cannot_store_register,
11467 made static.
11468 (the_low_target): New.
11469 * linux-s390-low.c (num_regs): Remove.
11470 (s390_num_regs): Define.
11471 (s390_regmap): Renamed from regmap, made static.
11472 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11473 made static.
11474 (s390_cannot_store_register): Renamed from cannot_store_register,
11475 made static.
11476 (the_low_target): New.
11477 * linux-sh-low.c (num_regs): Remove.
11478 (sh_num_regs): Define.
11479 (sh_regmap): Renamed from regmap, made static.
11480 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11481 made static.
11482 (sh_cannot_store_register): Renamed from cannot_store_register,
11483 made static.
11484 (the_low_target): New.
11485 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11486 (the_low_target): New.
11487
114882002-04-09 Daniel Jacobowitz <drow@mvista.com>
11489
11490 * Makefile.in: Add stamp-h target.
11491 * configure.in: Create stamp-h.
11492 * configure: Regenerated.
11493
114942002-04-09 Daniel Jacobowitz <drow@mvista.com>
11495
11496 * inferiors.c: New file.
11497 * target.c: New file.
11498 * target.h: New file.
11499 * Makefile.in: Add target.o and inferiors.o. Update
11500 dependencies.
11501 * linux-low.c (inferior_pid): New static variable,
11502 moved from server.c.
11503 (linux_create_inferior): Renamed from create_inferior.
11504 Call add_inferior. Return 0 on success instead of a PID.
11505 (linux_attach): Renamed from myattach.
11506 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11507 (linux_thread_alive): Renamed from mythread_alive.
11508 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11509 child dies.
11510 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11511 (regsets_store_inferior_registers): Correct error message.
11512 Add missing ``return 0''.
11513 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11514 (linux_store_registers): Renamed from store_inferior_registers.
11515 (linux_read_memory): Renamed from read_inferior_memory.
11516 (linux_write_memory): Renamed from write_inferior_memory.
11517 (linux_target_ops): New structure.
11518 (initialize_low): Call set_target_ops ().
11519 * remote-utils.c (unhexify): New function.
11520 (hexify): New function.
11521 (input_interrupt): Send signals to ``signal_pid''.
11522 * server.c (inferior_pid): Remove.
11523 (start_inferior): Update create_inferior call.
11524 (attach_inferior): Call add_inferior.
11525 (handle_query): New function.
11526 (main): Call handle_query for `q' packets.
11527 * server.h: Include "target.h". Remove obsolete prototypes.
11528 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11529
115302002-04-09 Daniel Jacobowitz <drow@mvista.com>
11531
11532 * Makefile.in: Add WARN_CFLAGS. Update configury
11533 dependencies.
11534 * configure.in: Check for <string.h>
11535 * configure: Regenerate.
11536 * config.in: Regenerate.
11537 * gdbreplay.c: Include needed system headers.
11538 (remote_open): Remove strchr prototype.
11539 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11540 * regcache.c (supply_register): Change buf argument to const void *.
11541 (supply_register_by_name): Likewise.
11542 (collect_register): Change buf argument to void *.
11543 (collect_register_by_name): Likewise.
11544 * regcache.h: Add missing prototypes.
11545 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11546 * server.c (handle_query): New function.
11547 (attached): New static variable, moved out of main.
11548 (main): Quiet longjmp clobber warnings.
11549 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11550 * utils.c (error): Remove NORETURN.
11551 (fatal): Likewise.