MIPS ptrace build fixes
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
aa58a496
SM
12015-07-29 Simon Marchi <simon.marchi@ericsson.com>
2
3 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4 ptrace's 4th parameter.
5
50904b25
YQ
62015-07-27 Yao Qi <yao.qi@linaro.org>
7
8 * configure.srv (case aarch64*-*-linux*): Don't set
9 srv_linux_usrregs.
10
5826e159
PA
112015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
12
13 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
14 sys/ptrace.h.
15 * linux-arm-low.c: Likewise.
16 * linux-cris-low.c: Likewise.
17 * linux-crisv32-low.c: Likewise.
18 * linux-low.c: Likewise.
19 * linux-m68k-low.c: Likewise.
20 * linux-mips-low.c: Likewise.
21 * linux-nios2-low.c: Likewise.
22 * linux-s390-low.c: Likewise.
23 * linux-sparc-low.c: Likewise.
24 * linux-tic6x-low.c: Likewise.
25 * linux-tile-low.c: Likewise.
26 * linux-x86-low.c: Likewise.
27
54019719
PA
282015-07-24 Pedro Alves <palves@redhat.com>
29
30 * config.in: Regenerate.
31 * configure: Regenerate.
32
eb7aa561
PA
332015-07-24 Pedro Alves <palves@redhat.com>
34
35 * acinclude.m4: Include ../ptrace.m4.
36 * configure.ac: Call GDB_AC_PTRACE.
37 * config.in, configure: Regenerate.
38
55d7b841
YQ
392015-07-24 Yao Qi <yao.qi@linaro.org>
40
41 * linux-low.c (linux_create_inferior): Remove setting to
42 proc->priv->new_inferior.
43 (linux_attach): Likewise.
44 (linux_low_filter_event): Likewise.
45 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
46
c06cbd92
YQ
472015-07-24 Yao Qi <yao.qi@linaro.org>
48
49 * linux-low.c (linux_arch_setup): New function.
50 (linux_low_filter_event): If proc->tdesc is NULL and
51 proc->attached is true, call the_low_target.arch_setup.
52 Otherwise, keep status pending, and return.
53 (linux_resume_one_lwp_throw): Don't call get_pc if
54 thread->while_stepping isn't NULL. Don't call
55 get_thread_regcache if proc->tdesc is NULL.
56 (need_step_over_p): Return 0 if proc->tdesc is NULL.
57 (linux_target_ops): Install arch_setup.
58 * server.c (start_inferior): Call the_target->arch_setup.
59 * target.h (struct target_ops) <arch_setup>: New field.
60 (target_arch_setup): New marco.
61 * lynx-low.c (lynx_target_ops): Update.
62 * nto-low.c (nto_target_ops): Update.
63 * spu-low.c (spu_target_ops): Update.
64 * win32-low.c (win32_target_ops): Update.
65
5ae3ebba
YQ
662015-07-24 Yao Qi <yao.qi@linaro.org>
67
68 * linux-low.c (linux_add_process): Don't set
69 proc->priv->new_inferior.
70 (linux_create_inferior): Set proc->priv->new_inferior to 1.
71 (linux_attach): Likewise.
72
eb97750b
YQ
732015-07-24 Yao Qi <yao.qi@linaro.org>
74
75 * server.c (start_inferior): Code refactor.
76
51aee833
YQ
772015-07-24 Yao Qi <yao.qi@linaro.org>
78
79 * server.c (process_serial_event): Set general_thread.
80
af1b22f3
YQ
812015-07-21 Yao Qi <yao.qi@linaro.org>
82
83 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
84 aarch64_linux_get_debug_reg_capacity.
85
554717a3
YQ
862015-07-17 Yao Qi <yao.qi@linaro.org>
87
88 * Makefile.in (aarch64-linux-hw-point.o): New rule.
89 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
90 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
91 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
92 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
93 (AARCH64_HWP_ALIGNMENT): Likewise.
94 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
95 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
96 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
97 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
98 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
99 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
100 (struct aarch64_debug_reg_state): Likewise.
101 (struct arch_lwp_info): Likewise.
102 (aarch64_align_watchpoint): Likewise.
103 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
104 (aarch64_watchpoint_length): Likewise.
105 (aarch64_point_encode_ctrl_reg): Likewise
106 (aarch64_point_is_aligned): Likewise.
107 (aarch64_align_watchpoint): Likewise.
108 (aarch64_linux_set_debug_regs):
109 (aarch64_dr_state_insert_one_point): Likewise.
110 (aarch64_dr_state_remove_one_point): Likewise.
111 (aarch64_handle_breakpoint): Likewise.
112 (aarch64_handle_aligned_watchpoint): Likewise.
113 (aarch64_handle_unaligned_watchpoint): Likewise.
114 (aarch64_handle_watchpoint): Likewise.
115
c67ca4de
YQ
1162015-07-17 Yao Qi <yao.qi@linaro.org>
117
118 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
119 and don't aarch64_get_debug_reg_state. All callers update.
120 (aarch64_handle_aligned_watchpoint): Likewise.
121 (aarch64_handle_unaligned_watchpoint): Likewise.
122 (aarch64_handle_watchpoint): Likewise.
123 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
124 (aarch64_remove_point): Likewise.
125
25abf979
YQ
1262015-07-17 Yao Qi <yao.qi@linaro.org>
127
128 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
129 debug_printf.
130 (aarch64_handle_unaligned_watchpoint): Likewise.
131
db1ff28b
JK
1322015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
133
134 Revert the previous 3 commits:
135 Move gdb_regex* to common/
136 Move linux_find_memory_regions_full & co.
137 gdbserver build-id attribute generator
138
700ca40f
JK
1392015-07-15 Aleksandar Ristovski <aristovski@qnx.com
140 Jan Kratochvil <jan.kratochvil@redhat.com>
141
142 gdbserver build-id attribute generator.
143 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
144 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
145 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
146 (find_phdr): New.
147 (get_dynamic): Use find_pdhr to traverse program headers.
148 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
149 (compare_mapping_entry_range, struct find_memory_region_callback_data)
150 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
151 (get_hex_build_id): New.
152 (linux_qxfer_libraries_svr4): Add optional build-id attribute
153 to reply XML document.
154
9904185c
JK
1552015-07-15 Aleksandar Ristovski <aristovski@qnx.com
156 Jan Kratochvil <jan.kratochvil@redhat.com>
157
158 * target.c: Include target/target-utils.h and fcntl.h.
159 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
160 (target_fileio_read_stralloc): New functions.
161
6e5b4429
JK
1622015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
163
164 * Makefile.in (OBS): Add gdb_regex.o.
165 (gdb_regex.o): New.
166 * config.in: Rebuilt.
167 * configure: Rebuilt.
168
ddc98fbf
JK
1692015-07-15 Aleksandar Ristovski <aristovski@qnx.com
170 Jan Kratochvil <jan.kratochvil@redhat.com>
171
172 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
173 * Makefile.in (OBS): Add target-utils.o.
174 (linux-maps.o, target-utils.o): New.
175 * configure.srv (srv_linux_obj): Add linux-maps.o.
176
e57bb7a0
PL
1772015-07-15 Pierre Langlois <pierre.langlois@arm.com>
178
179 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
180 function, return 1.
181 (the_low_target): Install it.
182
586b02a9
PA
1832015-07-14 Pedro Alves <palves@redhat.com>
184
185 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
186 Instead, ignore ECHILD, and throw an error for other errnos.
187
58c1b36c
PA
1882015-07-10 Pedro Alves <palves@redhat.com>
189
190 * event-loop.c (struct callback_event) <data>: Change type to
191 gdb_client_data instance instead of gdb_client_data pointer.
192 (append_callback_event): Adjust.
193
421530db
PL
1942015-07-10 Pierre Langlois <pierre.langlois@arm.com>
195
196 * linux-aarch64-low.c: Add comments for each linux_target_ops
197 method. Remove comments already covered in target_ops and
198 linux_target_ops definitions.
199 (the_low_target): Add comments for each unimplemented method.
200
c2d65f38
YQ
2012015-07-09 Yao Qi <yao.qi@linaro.org>
202
203 * linux-aarch64-low.c (aarch64_regmap): Remove.
204 (aarch64_usrregs_info): Remove.
205 (regs_info): Set field usrregs to NULL.
206
b20a6524
MM
2072015-07-02 Markus Metzger <markus.t.metzger@intel.com>
208
209 * linux-low.c: Include "rsp-low.h"
210 (linux_low_encode_pt_config, linux_low_encode_raw): New.
211 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
212 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
213 (handle_btrace_enable_pt): New.
214 (handle_btrace_general_set): Support "pt".
215 (handle_btrace_conf_general_set): Support "pt:size".
216
96c97461
PL
2172015-06-29 Pierre Langlois <pierre.langlois@arm.com>
218
219 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
220 Z_PACKET_SW_BP.
221
37d66942
PL
2222015-06-29 Pierre Langlois <pierre.langlois@arm.com>
223
224 * linux-aarch64-low.c: Remove comment about endianness.
225 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
226 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
227 memcmp.
228
dc06243f
GB
2292015-06-24 Gary Benson <gbenson@redhat.com>
230
231 * linux-i386-ipa.c (stdint.h): Do not include.
232 * lynx-i386-low.c (stdint.h): Likewise.
233 * lynx-ppc-low.c (stdint.h): Likewise.
234 * mem-break.c (stdint.h): Likewise.
235 * thread-db.c (stdint.h): Likewise.
236 * tracepoint.c (stdint.h): Likewise.
237 * win32-low.c (stdint.h): Likewise.
238
124e13d9
SM
2392015-06-18 Simon Marchi <simon.marchi@ericsson.com>
240
241 * server.c (write_qxfer_response): Update call to
242 remote_escape_output.
243
909c2cda
JK
2442015-06-15 Aleksandar Ristovski <aristovski@qnx.com
245 Jan Kratochvil <jan.kratochvil@redhat.com>
246
247 Merge multiple hex conversions.
248 * gdbreplay.c (tohex): Rename to 'fromhex'.
249 (logchar): Use fromhex.
250
24c05f46
JK
2512015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
252
253 * server.c (handle_qxfer_libraries): Set `version' attribute for
254 <library-list>.
255
14d2069a
GB
2562015-06-10 Gary Benson <gbenson@redhat.com>
257
258 * target.h (struct target_ops) <multifs_open>: New field.
259 <multifs_unlink>: Likewise.
260 <multifs_readlink>: Likewise.
261 * linux-low.c (nat/linux-namespaces.h): New include.
262 (linux_target_ops): Initialize the_target->multifs_open,
263 the_target->multifs_unlink and the_target->multifs_readlink.
264 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
265 * hostio.c (hostio_fs_pid): New static variable.
266 (hostio_handle_new_gdb_connection): New function.
267 (handle_setfs): Likewise.
268 (handle_open): Use the_target->multifs_open as appropriate.
269 (handle_unlink): Use the_target->multifs_unlink as appropriate.
270 (handle_readlink): Use the_target->multifs_readlink as
271 appropriate.
272 (handle_vFile): Handle vFile:setfs packets.
273 * server.c (handle_query): Call hostio_handle_new_gdb_connection
274 after target_handle_new_gdb_connection.
275
4b8b5e72
GB
2762015-06-10 Gary Benson <gbenson@redhat.com>
277
278 * configure.ac (AC_CHECK_FUNCS): Add setns.
279 * config.in: Regenerate.
280 * configure: Likewise.
281 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
282 (linux-namespaces.o): New rule.
283 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
284
3ac2e371
GB
2852015-06-09 Gary Benson <gbenson@redhat.com>
286
287 * hostio.c (handle_open): Process mode argument with
288 fileio_to_host_mode.
289
ca9b78ce
YQ
2902015-06-01 Yao Qi <yao.qi@linaro.org>
291
292 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
293 * linux-x86-low.c: Likewise.
294
bfacd19d
DB
2952015-05-28 Don Breazeal <donb@codesourcery.com>
296
297 * linux-low.c (handle_extended_wait): Initialize
298 thread_info.last_resume_kind for new fork children.
299
452003ef
PA
3002015-05-15 Pedro Alves <palves@redhat.com>
301
302 * target.h (target_handle_new_gdb_connection): Rewrite using if
303 wrapped in do/while.
304
1041a03c
JB
3052015-05-14 Joel Brobecker <brobecker@adacore.com>
306
307 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
308 * configure, config.in: Regenerate.
309 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
310 Declare typedef.
311
c269dbdb
DB
3122015-05-12 Don Breazeal <donb@codesourcery.com>
313
314 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
315 PTRACE_EVENT_VFORK_DONE.
316 (linux_low_ptrace_options, extended_event_reported): Add vfork
317 events.
318 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
319 and "vforkdone" for RSP 'T' Stop Reply Packet.
320 * server.h (report_vfork_events): Declare
321 global variable.
322
3a8a0396
DB
3232015-05-12 Don Breazeal <donb@codesourcery.com>
324
325 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
326 (the_low_target) <new_fork>: Initialize new member.
327 * linux-arm-low.c (arm_new_fork): New function.
328 (the_low_target) <new_fork>: Initialize new member.
329 * linux-low.c (handle_extended_wait): Call new target function
330 new_fork.
331 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
332 * linux-mips-low.c (mips_add_watchpoint): New function
333 extracted from mips_insert_point.
334 (the_low_target) <new_fork>: Initialize new member.
335 (mips_linux_new_fork): New function.
336 (mips_insert_point): Call mips_add_watchpoint.
337 * linux-x86-low.c (x86_linux_new_fork): New function.
338 (the_low_target) <new_fork>: Initialize new member.
339
de0d863e
DB
3402015-05-12 Don Breazeal <donb@codesourcery.com>
341
342 * linux-low.c (handle_extended_wait): Implement return value,
343 rename argument 'event_child' to 'event_lwp', handle
344 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
345 (linux_low_ptrace_options): New function.
346 (linux_low_filter_event): Call linux_low_ptrace_options,
347 use different argument fo linux_enable_event_reporting,
348 use return value from handle_extended_wait.
349 (extended_event_reported): New function.
350 (linux_wait_1): Call extended_event_reported and set
351 status to report fork events.
352 (linux_write_memory): Add pid to debug message.
353 (reset_lwp_ptrace_options_callback): New function.
354 (linux_handle_new_gdb_connection): New function.
355 (linux_target_ops): Initialize new structure member.
356 * linux-low.h (struct lwp_info) <waitstatus>: New member.
357 * lynx-low.c: Initialize new structure member.
358 * remote-utils.c (prepare_resume_reply): Implement stop reason
359 "fork" for "T" stop message.
360 * server.c (handle_query): Call handle_new_gdb_connection.
361 * server.h (report_fork_events): Declare global flag.
362 * target.h (struct target_ops) <handle_new_gdb_connection>:
363 New member.
364 (target_handle_new_gdb_connection): New macro.
365 * win32-low.c: Initialize new structure member.
366
ddcbc397
DB
3672015-05-12 Don Breazeal <donb@codesourcery.com>
368
369 * mem-break.c (APPEND_TO_LIST): Define macro.
370 (clone_agent_expr): New function.
371 (clone_one_breakpoint): New function.
372 (clone_all_breakpoints): New function.
373 * mem-break.h: Declare new functions.
374
89245bc0
DB
3752015-05-12 Don Breazeal <donb@codesourcery.com>
376
377 * linux-low.c (linux_supports_fork_events): New function.
378 (linux_supports_vfork_events): New function.
379 (linux_target_ops): Initialize new structure members.
380 (initialize_low): Call linux_check_ptrace_features.
381 * lynx-low.c (lynx_target_ops): Initialize new structure
382 members.
383 * server.c (report_fork_events, report_vfork_events):
384 New global flags.
385 (handle_query): Add new features to qSupported packet and
386 response.
387 (captured_main): Initialize new global variables.
388 * target.h (struct target_ops) <supports_fork_events>:
389 New member.
390 <supports_vfork_events>: New member.
391 (target_supports_fork_events): New macro.
392 (target_supports_vfork_events): New macro.
393 * win32-low.c (win32_target_ops): Initialize new structure
394 members.
395
835205d0
GB
3962015-05-12 Gary Benson <gbenson@redhat.com>
397
398 * server.c (handle_qxfer_exec_file): Use current process
399 if annex is empty.
400
21e94bd9
SL
4012015-05-08 Sandra Loosemore <sandra@codesourcery.com>
402
403 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
404 Remove HAVE_PTRACE_GETREGS conditionals.
405 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
406 instead of PTRACE_GETREGS and PTRACE_SETREGS.
407
45614f15
YQ
4082015-05-08 Yao Qi <yao.qi@linaro.org>
409
410 * linux-low.c (linux_supports_conditional_breakpoints): New
411 function.
412 (linux_target_ops): Install new target method.
413 * lynx-low.c (lynx_target_ops): Install NULL hook for
414 supports_conditional_breakpoints.
415 * nto-low.c (nto_target_ops): Likewise.
416 * spu-low.c (spu_target_ops): Likewise.
417 * win32-low.c (win32_target_ops): Likewise.
418 * server.c (handle_query): Check
419 target_supports_conditional_breakpoints.
420 * target.h (struct target_ops) <supports_conditional_breakpoints>:
421 New field.
422 (target_supports_conditional_breakpoints): New macro.
423
80ad801e
PA
4242015-05-06 Pedro Alves <palves@redhat.com>
425
426 PR server/18081
427 * server.c (start_inferior): If the process exits, mourn it.
428
819843c7
GB
4292015-04-21 Gary Benson <gbenson@redhat.com>
430
431 * hostio.c (fileio_open_flags_to_host): Factored out to
432 fileio_to_host_openflags in common/fileio.c. Single use
433 updated.
434
a2d5a9d7
MF
4352015-04-17 Max Filippov <jcmvbkbc@gmail.com>
436
437 * linux-xtensa-low.c (xtensa_fill_gregset)
438 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
439 XCHAL_HAVE_LOOP.
440
deb44829
MF
4412015-04-17 Max Filippov <jcmvbkbc@gmail.com>
442
443 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
444 (regs_info): Replace usrregs pointer with NULL.
445
e57f1de3
GB
4462015-04-17 Gary Benson <gbenson@redhat.com>
447
448 * target.h (struct target_ops) <pid_to_exec_file>: New field.
449 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
450 * server.c (handle_qxfer_exec_file): New function.
451 (qxfer_packets): Add exec-file entry.
452 (handle_query): Report qXfer:exec-file:read as supported packet.
453
62828379
RN
4542015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
455
456 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
457
b88bb450
GB
4582015-04-09 Gary Benson <gbenson@redhat.com>
459
460 * hostio-errno.c (errno_to_fileio_error): Remove function.
461 Update caller to use remote_fileio_to_fio_error.
462
c8f4bfdd
YQ
4632015-04-09 Yao Qi <yao.qi@linaro.org>
464
465 * linux-low.c (linux_insert_point): Call
466 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
467 (linux_remove_point): Call remove_memory_breakpoint if type is
468 raw_bkpt_type_sw.
469 * linux-x86-low.c (x86_insert_point): Don't call
470 insert_memory_breakpoint.
471 (x86_remove_point): Don't call remove_memory_breakpoint.
472
41f98f02
PA
4732015-04-01 Pedro Alves <palves@redhat.com>
474 Cleber Rosa <crosa@redhat.com>
475
476 * server.c (gdbserver_usage): Reorganize and extend the usage
477 message.
478
2bf6fb9d
PA
4792015-03-24 Pedro Alves <palves@redhat.com>
480
481 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
482 output. Also dump TRAP_TRACE.
483 (linux_low_filter_event): In debug output, distinguish a
484 resume_stop SIGSTOP from a delayed SIGSTOP.
485
369f6daa
GB
4862015-03-24 Gary Benson <gbenson@redhat.com>
487
488 * linux-x86-low.c (x86_linux_new_thread): Moved to
489 nat/x86-linux.c.
490 (x86_linux_prepare_to_resume): Likewise.
491
8e5d4070
GB
4922015-03-24 Gary Benson <gbenson@redhat.com>
493
494 * Makefile.in (x86-linux-dregs.o): New rule.
495 * configure.srv: Add x86-linux-dregs.o to relevant targets.
496 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
497 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
498 (x86_linux_dr_get): Likewise.
499 (x86_linux_dr_set): Likewise.
500 (update_debug_registers_callback): Likewise.
501 (x86_linux_dr_set_addr): Likewise.
502 (x86_linux_dr_get_addr): Likewise.
503 (x86_linux_dr_set_control): Likewise.
504 (x86_linux_dr_get_control): Likewise.
505 (x86_linux_dr_get_status): Likewise.
506 (x86_linux_update_debug_registers): Likewise.
507
2b95d440
GB
5082015-03-24 Gary Benson <gbenson@redhat.com>
509
510 * linux-x86-low.c (x86_linux_update_debug_registers):
511 New function, factored out from...
512 (x86_linux_prepare_to_resume): ...this.
513
14b0bc68
GB
5142015-03-24 Gary Benson <gbenson@redhat.com>
515
516 * linux-x86-low.c (x86_linux_dr_get): Update comments.
517 (x86_linux_dr_set): Likewise.
518 (update_debug_registers_callback): Likewise.
519 (x86_linux_dr_set_addr): Likewise.
520 (x86_linux_dr_get_addr): Likewise.
521 (x86_linux_dr_set_control): Likewise.
522 (x86_linux_dr_get_control): Likewise.
523 (x86_linux_dr_get_status): Likewise.
524 (x86_linux_prepare_to_resume): Likewise.
525
5dfe6ca8
GB
5262015-03-24 Gary Benson <gbenson@redhat.com>
527
528 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
529 Use perror_with_name. Pass string through gettext.
530 (x86_linux_dr_set): Likewise.
531
d33472ad
GB
5322015-03-24 Gary Benson <gbenson@redhat.com>
533
534 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
535 (x86_linux_dr_set_addr): ...this.
536 (x86_dr_low_get_addr): Rename to...
537 (x86_linux_dr_get_addr): ...this.
538 (x86_dr_low_set_control): Rename to...
539 (x86_linux_dr_set_control): ...this.
540 (x86_dr_low_get_control): Rename to...
541 (x86_linux_dr_get_control): ...this.
542 (x86_dr_low_get_status): Rename to...
543 (x86_linux_dr_get_status): ...this.
544 (x86_dr_low): Update with new function names.
545
4b134ca1
GB
5462015-03-24 Gary Benson <gbenson@redhat.com>
547
548 * Makefile.in (x86-linux.o): New rule.
549 * configure.srv: Add x86-linux.o to relevant targets.
550 * linux-low.c (lwp_set_arch_private_info): New function.
551 (lwp_arch_private_info): Likewise.
552 * linux-x86-low.c: Include nat/x86-linux.h.
553 (arch_lwp_info): Removed structure.
554 (update_debug_registers_callback):
555 Use lwp_set_debug_registers_changed.
556 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
557 and lwp_set_debug_registers_changed.
558 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
559
34c703da
GB
5602015-03-24 Gary Benson <gbenson@redhat.com>
561
562 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
563 * linux-arm-low.c (arm_new_thread): Likewise.
564 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
565 * linux-mips-low.c (mips_linux_new_thread): Likewise.
566 * linux-x86-low.c (x86_linux_new_thread): Likewise.
567 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
568
cff068da
GB
5692015-03-24 Gary Benson <gbenson@redhat.com>
570
571 * linux-low.c (ptid_of_lwp): New function.
572 (lwp_is_stopped): Likewise.
573 (lwp_stop_reason): Likewise.
574 * linux-x86-low.c (update_debug_registers_callback):
575 Use lwp_is_stopped.
576 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
577 lwp_stop_reason.
578
b2f7c7e8
GB
5792015-03-24 Gary Benson <gbenson@redhat.com>
580
581 * linux-low.h (linux_stop_lwp): Remove declaration.
582
6d4ee8c6
GB
5832015-03-24 Gary Benson <gbenson@redhat.com>
584
585 * linux-low.h: Include nat/linux-nat.h.
586 * linux-low.c (iterate_over_lwps_args): New structure.
587 (iterate_over_lwps_filter): New function.
588 (iterate_over_lwps): Likewise.
589 * linux-x86-low.c (update_debug_registers_callback):
590 Update signature to what iterate_over_lwps expects.
591 Remove PID check that iterate_over_lwps now performs.
592 (x86_dr_low_set_addr): Use iterate_over_lwps.
593 (x86_dr_low_set_control): Likewise.
594
70a0bb6b
GB
5952015-03-24 Gary Benson <gbenson@redhat.com>
596
597 * linux-x86-low.c (x86_debug_reg_state): New function.
598 (x86_linux_prepare_to_resume): Use the above.
599
7b669087
GB
6002015-03-24 Gary Benson <gbenson@redhat.com>
601
602 * linux-low.c (current_lwp_ptid): New function.
603 * linux-x86-low.c: Include nat/linux-nat.h.
604 (x86_dr_low_get_addr): Use current_lwp_ptid.
605 (x86_dr_low_get_control): Likewise.
606 (x86_dr_low_get_status): Likewise.
607
eef49a3d
PA
6082015-03-20 Pedro Alves <palves@redhat.com>
609
610 * tracepoint.c (cmd_qtstatus): Make "str" const.
611
b2333d22
PA
6122015-03-20 Pedro Alves <palves@redhat.com>
613
614 * server.c (handle_general_set): Make "req_str" const.
615
23f238d3
PA
6162015-03-19 Pedro Alves <palves@redhat.com>
617
618 * linux-low.c (linux_resume_one_lwp): Rename to ...
619 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
620 instead call perror_with_name.
621 (check_ptrace_stopped_lwp_gone): New function.
622 (linux_resume_one_lwp): Reimplement as wrapper around
623 linux_resume_one_lwp_throw that swallows errors if the LWP is
624 gone.
625
91baf43f
PA
6262015-03-19 Pedro Alves <palves@redhat.com>
627
628 * linux-low.c (count_events_callback, select_event_lwp_callback):
629 No longer check whether the thread has resume_stop as last resume
630 kind.
631
8bf3b159
PA
6322015-03-19 Pedro Alves <palves@redhat.com>
633
634 * linux-low.c (count_events_callback, select_event_lwp_callback):
635 Use the lwp's status_pending_p field, not the thread's.
636
b90fc188
PA
6372015-03-19 Pedro Alves <palves@redhat.com>
638
639 * linux-low.c (select_event_lwp_callback): Update comments to
640 no longer mention SIGTRAP.
641
464b0089
GB
6422015-03-18 Gary Benson <gbenson@redhat.com>
643
644 * server.c (handle_query): Do not report vFile:fstat as supported.
645
aa9e327f
GB
6462015-03-11 Gary Benson <gbenson@redhat.com>
647
648 * hostio.c (sys/types.h): New include.
649 (sys/stat.h): Likewise.
650 (common-remote-fileio.h): Likewise.
651 (handle_fstat): New function.
652 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 653
791c0056
GB
6542015-03-11 Gary Benson <gbenson@redhat.com>
655
656 * configure.ac (AC_CHECK_MEMBERS): Add checks for
657 struct stat.st_blocks and struct stat.st_blksize.
658 * configure: Regenerate.
659 * config.in: Likewise.
660 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
661 (OBS): Add common-remote-fileio.o.
662 (common-remote-fileio.o): New rule.
663
9a9df970
PA
6642015-03-09 Pedro Alves <palves@redhat.com>
665
666 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
667 'struct sockaddr' pointer in 'accept' call.
668
9eb1356e
PA
6692015-03-09 Pedro Alves <palves@redhat.com>
670
671 Revert:
672 2015-03-07 Pedro Alves <palves@redhat.com>
673 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
674 or <winsock2.h> here. Instead include "gdb_socket.h".
675 (remote_open): Use union gdb_sockaddr_u.
676 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
677 or <winsock2.h> here. Instead include "gdb_socket.h".
678 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
679 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
680 or <sys/un.h>.
681 (init_named_socket, gdb_agent_helper_thread): Use union
682 gdb_sockaddr_u.
683
aac331e4
PA
6842015-03-07 Pedro Alves <palves@redhat.com>
685
686 * configure.ac (build_warnings): Move
687 -Wdeclaration-after-statement to the C-specific set.
688 * configure: Regenerate.
689
366c75fc
PA
6902015-03-07 Pedro Alves <palves@redhat.com>
691
692 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
693 or <winsock2.h> here. Instead include "gdb_socket.h".
694 (remote_open): Use union gdb_sockaddr_u.
695 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
696 or <winsock2.h> here. Instead include "gdb_socket.h".
697 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
698 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
699 or <sys/un.h>.
700 (init_named_socket, gdb_agent_helper_thread): Use union
701 gdb_sockaddr_u.
702
492d29ea
PA
7032015-03-07 Pedro Alves <palves@redhat.com>
704
705 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
706 instead.
707
60a191ed
YQ
7082015-03-06 Yao Qi <yao.qi@linaro.org>
709
710 * linux-aarch64-low.c (aarch64_insert_point): Use
711 show_debug_regs as a boolean.
712 (aarch64_remove_point): Likewise.
713
f5771b1d
PA
7142015-03-05 Pedro Alves <palves@redhat.com>
715
716 * lynx-low.c (lynx_target_ops): Install NULL hooks for
717 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
718 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
719 * nto-low.c (nto_target_ops): Likewise.
720 * spu-low.c (spu_target_ops): Likewise.
721 * win32-low.c (win32_target_ops): Likewise.
722
3e572f71
PA
7232015-03-04 Pedro Alves <palves@redhat.com>
724
72f4393d 725 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
726 Decide whether a breakpoint triggered based on the SIGTRAP's
727 siginfo.si_code.
72f4393d
L
728 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
729 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
730 (linux_low_filter_event): Check for breakpoints before checking
731 watchpoints.
732 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
733 siginfo.si_code.
72f4393d
L
734 (linux_stopped_by_sw_breakpoint)
735 (linux_supports_stopped_by_sw_breakpoint)
736 (linux_stopped_by_hw_breakpoint)
737 (linux_supports_stopped_by_hw_breakpoint): New functions.
738 (linux_target_ops): Install new target methods.
3e572f71 739
1ec68e26
PA
7402015-03-04 Pedro Alves <palves@redhat.com>
741
742 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
743 * server.c (swbreak_feature, hwbreak_feature): New globals.
744 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
745 (captured_main): Clear swbreak_feature and hwbreak_feature.
746 * server.h (swbreak_feature, hwbreak_feature): Declare.
747 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
748 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
749 supports_stopped_by_hw_breakpoint>: New fields.
750 (target_supports_stopped_by_sw_breakpoint)
751 (target_stopped_by_sw_breakpoint)
752 (target_supports_stopped_by_hw_breakpoint)
753 (target_stopped_by_hw_breakpoint): Declare.
754
15c66dd6
PA
7552015-03-04 Pedro Alves <palves@redhat.com>
756
757 enum lwp_stop_reason -> enum target_stop_reason
758 * linux-low.c (check_stopped_by_breakpoint): Adjust.
759 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
760 (linux_wait_1, stuck_in_jump_pad_callback)
761 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
762 (linux_stopped_by_watchpoint):
763 * linux-low.h (enum lwp_stop_reason): Delete.
764 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
765 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
766
98fc70d6
YQ
7672015-03-04 Yao Qi <yao.qi@linaro.org>
768
769 * Makefile.in (SFILES): Add linux-aarch64-low.c.
770
dd2ac174
GB
7712015-03-03 Gary Benson <gbenson@redhat.com>
772
773 * hostio.c (handle_vFile): Fix prefix lengths.
774
d68e53f4
MM
7752015-03-03 Markus Metzger <markus.t.metzger@intel.com>
776
777 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
778 ptr_bits.
779
bf2d68ab
AA
7802015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
781
782 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
783 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
784 (clean): Add "rm -f" for above C files.
785 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
786 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
787 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
788 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
789 * linux-s390-low.c (HWCAP_S390_VX): New macro.
790 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
791 (init_registers_s390x_vx_linux64)
792 (init_registers_s390x_tevx_linux64)
793 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
794 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
795 declarations.
796 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
797 (s390_store_vxrs_high): New functions.
798 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
799 NT_S390_VXRS_HIGH.
800 (s390_arch_setup): Add logic for selecting one of the new target
801 descriptions. Activate the new vector regsets if applicable.
802 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
803 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
804 and init_registers_s390x_tevx_linux64.
805
c966a859
PA
8062015-03-01 Pedro Alves <palves@redhat.com>
807
808 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
809 parameter.
810
4180215b
PA
8112015-02-27 Pedro Alves <palves@redhat.com>
812
813 * linux-x86-low.c (u_debugreg_offset): New function.
814 (x86_linux_dr_get, x86_linux_dr_set): Use it.
815
749bab01
PA
8162015-02-27 Pedro Alves <palves@redhat.com>
817
818 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
819 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
820 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
821 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
822 (ps_lsetfpregs, ps_getpid)
823 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
824 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
825 (ps_lsetxregs, ps_plog): Declare.
826
3c14e5a3
PA
8272015-02-27 Pedro Alves <palves@redhat.com>
828
829 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
830 IP_AGENT_EXPORT_FUNC.
831 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
832 IP_AGENT_EXPORT_FUNC.
833 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
834 (IP_AGENT_EXPORT): Delete.
835 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
836 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
837 (gdb_trampoline_buffer_error, collecting, gdb_collect)
838 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
839 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
840 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
841 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
842 (traceframe_read_count, traceframe_write_count)
843 (traceframes_created, trace_state_variables, get_raw_reg)
844 (get_trace_state_variable_value, set_trace_state_variable_value)
845 (ust_loaded, helper_thread_id, cmd_buf): Use
846 IPA_SYM_EXPORTED_NAME.
847 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
848 (tracepoints) Use IP_AGENT_EXPORT_VAR.
849 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
850 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
851 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
852 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
853 EXTERN_C_PUSH/EXTERN_C_POP.
854 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
855 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
856 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
857 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
858 (traceframe_write_count, traceframe_read_count)
859 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
860 (about_to_request_buffer_space, get_trace_state_variable_value)
861 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
862 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
863 EXTERN_C_PUSH/EXTERN_C_POP.
864 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
865 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
866 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
867 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
868 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
869 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
870 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
871 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
872 Define.
873 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
874 (IP_AGENT_EXPORT_VAR_DECL): Define.
875 (tracing): Declare.
876 (gdb_agent_get_raw_reg): Declare.
877
fe978cb0
PA
8782015-02-27 Tom Tromey <tromey@redhat.com>
879 Pedro Alves <palves@redhat.com>
880
881 Rename symbols whose names are reserved C++ keywords throughout.
882
3bc3d82a
PA
8832015-02-27 Pedro Alves <palves@redhat.com>
884
885 * Makefile.in (COMPILER): New, get it from autoconf.
886 (CXX): Get from autoconf instead.
887 (COMPILE.pre): Use COMPILER.
888 (CC-LD): Rename to ...
889 (CC_LD): ... this. Use COMPILER.
890 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
891 (CXX_FOR_TARGET): Default to g++ instead of gcc.
892 * acinclude.m4: Include build-with-cxx.m4.
893 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
894 Disable -Werror by default if building in C++ mode.
895 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
896 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
897 the C++ compiler. Save/restore CXXFLAGS too.
898 * configure: Regenerate.
899
07697489
PA
9002015-02-27 Pedro Alves <palves@redhat.com>
901
902 * acinclude.m4: Include libiberty.m4.
903 * configure.ac: Call libiberty_INIT.
904 * config.in, configure: Regenerate.
905
9beb7c4e
PA
9062015-02-26 Pedro Alves <palves@redhat.com>
907
908 * linux-low.c (linux_wait_1): When incrementing the PC past a
909 program breakpoint always use the_low_target.breakpoint_len as
910 increment, rather than the maximum between that and
911 the_low_target.decr_pc_after_break.
912
8090aef2
PA
9132015-02-23 Pedro Alves <palves@redhat.com>
914
915 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
916 thread was doing a step-over; always adjust the PC if
917 we stepped over a permanent breakpoint.
918 (linux_wait_1): If we stepped over breakpoint that was on top of a
919 permanent breakpoint, manually advance the PC past it.
920
bc9540e8
PA
9212015-02-23 Pedro Alves <palves@redhat.com>
922
923 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
924 modes.
925 (x86_fill_gregset, x86_store_gregset): Use it when handling
926 $orig_eax.
927
2db9a427
PA
9282015-02-20 Pedro Alves <palves@redhat.com>
929
930 * thread-db.c: Include "nat/linux-procfs.h".
931 (thread_db_init): Skip listing new threads if the kernel supports
932 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
933
afa8d396
PA
9342015-02-20 Pedro Alves <palves@redhat.com>
935
936 * linux-low.c (status_pending_p_callback): Use ptid_match.
937
c9587f88
AT
9382015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
939
940 PR breakpoints/16812
941 * linux-low.c (wstatus_maybe_breakpoint): Remove.
942 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
943 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
944
b05ec7a5
AT
9452015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
946
947 PR breakpoints/15956
948 * tracepoint.c (cmd_qtinit): Add check for current_thread.
949
d33501a5
MM
9502015-02-09 Markus Metzger <markus.t.metzger@intel.com>
951
952 * linux-low.c (linux_low_btrace_conf): Print size.
953 * server.c (handle_btrace_conf_general_set): New.
954 (hanle_general_set): Call handle_btrace_conf_general_set.
955 (handle_query): Report Qbtrace-conf:bts:size as supported.
956
f4abbc16
MM
9572015-02-09 Markus Metzger <markus.t.metzger@intel.com>
958
959 * linux-low.c (linux_low_enable_btrace): Update parameters.
960 (linux_low_btrace_conf): New.
961 (linux_target_ops)<to_btrace_conf>: Initialize.
962 * server.c (current_btrace_conf): New.
963 (handle_btrace_enable): Rename to ...
964 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
965 to target_enable_btrace. Update comment. Update users.
966 (handle_qxfer_btrace_conf): New.
967 (qxfer_packets): Add btrace-conf entry.
968 (handle_query): Report qXfer:btrace-conf:read as supported packet.
969 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
970 (target_ops)<read_btrace_conf>: New.
971 (target_enable_btrace): Update parameters.
972 (target_read_btrace_conf): New.
973
043c3577
MM
9742015-02-09 Markus Metzger <markus.t.metzger@intel.com>
975
976 * server.c (handle_btrace_general_set): Remove call to
977 target_supports_btrace.
978 (supported_btrace_packets): New.
979 (handle_query): Call supported_btrace_packets.
980 * target.h: include btrace-common.h.
981 (btrace_target_info): Removed.
982 (supports_btrace, target_supports_btrace): Update parameters.
983
734b0e4b
MM
9842015-02-09 Markus Metzger <markus.t.metzger@intel.com>
985
986 * Makefile.in (SFILES): Add common/btrace-common.c.
987 (OBS): Add common/btrace-common.o.
988 (btrace-common.o): Add build rules.
989 * linux-low: Include btrace-common.h.
990 (linux_low_read_btrace): Use struct btrace_data. Call
991 btrace_data_init and btrace_data_fini.
992
d6c146e9
PA
9932015-02-06 Pedro Alves <palves@redhat.com>
994
995 * thread-db.c (find_new_threads_callback): Add debug output.
996
20ba1ce6
PA
9972015-02-04 Pedro Alves <palves@redhat.com>
998
999 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1000 (resume_stopped_resumed_lwps): New function.
1001 (linux_wait_for_event_filtered): Use it.
1002
8cc73a39
SDJ
10032015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1004
1005 * Makefile.in (SFILES): Add linux-personality.c.
1006 (linux-personality.o): New rule.
1007 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1008 list of objects to be built.
1009 * linux-low.c: Include nat/linux-personality.h.
1010 (linux_create_inferior): Remove code to disable address space
1011 randomization (moved to ../nat/linux-personality.c). Create
1012 cleanup to disable address space randomization.
1013
fb23d554
SDJ
10142015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1015
1016 * Makefile.in (posix-strerror.o): New rule.
1017 (mingw-strerror.o): Likewise.
1018 * configure: Regenerated.
1019 * configure.ac: Source file ../common/common.host. Initialize new
1020 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1021
cdf43629
YQ
10222015-01-14 Yao Qi <yao@codesourcery.com>
1023
1024 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1025 (ppc-linux.o): New rule.
1026 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1027 * configure.ac: AC_CHECK_FUNCS(getauxval).
1028 * config.in: Re-generated.
1029 * configure: Re-generated.
1030 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1031 ppc64_64bit_inferior_p
1032
514c5338
YQ
10332015-01-14 Yao Qi <yao@codesourcery.com>
1034
1035 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1036 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1037 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1038 (PT_ORIG_R3, PT_TRAP): Likewise.
1039 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1040 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1041 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1042
3368c1e5
JB
10432015-01-10 Joel Brobecker <brobecker@adacore.com>
1044
1045 * i387-fp.c (i387_cache_to_xsave): In look over
1046 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1047 zmmh_low_space field by use of zmmh_high_space.
1048
582511be
PA
10492015-01-09 Pedro Alves <palves@redhat.com>
1050
1051 * linux-low.c (step_over_bkpt): Move higher up in the file.
1052 (handle_extended_wait): Don't store the stop_pc here.
1053 (get_stop_pc): Adjust comments and rename to ...
1054 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1055 stopped for a software breakpoint or hardware breakpoint.
1056 (thread_still_has_status_pending_p): New function.
1057 (status_pending_p_callback): Use
1058 thread_still_has_status_pending_p. If the event is no longer
1059 interesting, resume the LWP.
1060 (handle_tracepoints): Add assert.
1061 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1062 (wstatus_maybe_breakpoint): New function.
1063 (cancel_breakpoint): Delete function.
1064 (check_stopped_by_watchpoint): New function, factored out from
1065 linux_low_filter_event.
1066 (lp_status_maybe_breakpoint): Delete function.
1067 (linux_low_filter_event): Remove filter_ptid argument.
1068 Leave thread group exits pending here. Store the LWP's stop PC.
1069 Always leave events pending.
1070 (linux_wait_for_event_filtered): Pull all events out of the
1071 kernel, and leave them all pending.
1072 (count_events_callback, select_event_lwp_callback): Consider all
1073 events.
1074 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1075 (select_event_lwp): Only give preference to the stepping LWP in
1076 all-stop mode. Adjust comments.
1077 (ignore_event): New function.
1078 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1079 references to cancel_breakpoints. Adjust to renames. Also give
1080 equal priority to all LWPs that have had events in non-stop mode.
1081 If reporting a software breakpoint event, unadjust the LWP's PC.
1082 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1083 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1084 Adjust.
1085 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1086 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1087 (linux_stopped_by_watchpoint): Adjust.
1088 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1089 * linux-low.h (enum lwp_stop_reason): New.
1090 (struct lwp_info) <stop_pc>: Adjust comment.
1091 <stopped_by_watchpoint>: Delete field.
1092 <stop_reason>: New field.
1093 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1094 * mem-break.c (software_breakpoint_inserted_here)
1095 (hardware_breakpoint_inserted_here): New function.
1096 * mem-break.h (software_breakpoint_inserted_here)
1097 (hardware_breakpoint_inserted_here): Declare.
1098 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1099 (cancel_breakpoints): Delete.
1100 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1101 (upload_fast_traceframes): Remove references to
1102 cancel_breakpoints.
1103
a33e3959
PA
11042015-01-09 Pedro Alves <palves@redhat.com>
1105
1106 * thread-db.c (find_new_threads_callback): Ignore thread if the
1107 kernel thread ID is -1.
1108
8784d563
PA
11092015-01-09 Pedro Alves <palves@redhat.com>
1110
1111 * linux-low.c (linux_attach_fail_reason_string): Move to
1112 nat/linux-ptrace.c, and rename.
1113 (linux_attach_lwp): Update comment.
1114 (attach_proc_task_lwp_callback): New function.
1115 (linux_attach): Adjust to rename and use
1116 linux_proc_attach_tgid_threads.
1117 (linux_attach_fail_reason_string): Delete declaration.
1118
76f2b779
JB
11192015-01-01 Joel Brobecker <brobecker@adacore.com>
1120
1121 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1122 * server.c (gdbserver_version): Likewise.
1123
fafcc06a
SDJ
11242014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1125
1126 * remote-utils.c: Include ctype.h.
1127 (input_interrupt): Explicitly handle the case when the char
1128 received is the NUL byte. Improve the printing of non-ASCII
1129 characters.
1130
beed38b8
JB
11312014-12-16 Joel Brobecker <brobecker@adacore.com>
1132
1133 * linux-low.c (linux_low_filter_event): Update call to
1134 linux_enable_event_reporting following the addition of
1135 a new parameter to that function.
1136
bf330350
CU
11372014-12-16 Catalin Udma <catalin.udma@freescale.com>
1138
1139 PR server/17457
1140 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1141 (AARCH64_FPCR_REGNO): Likewise.
1142 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1143 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1144 (aarch64_store_fpregset): Likewise.
1145
5227d625
JB
11462014-12-15 Joel Brobecker <brobecker@adacore.com>
1147
1148 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1149 Remove FIXME comment about assumption about N.
1150
f93b65a0
JB
11512014-12-13 Joel Brobecker <brobecker@adacore.com>
1152
1153 * configure.ac: If large-file support is disabled in GDBserver,
1154 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1155 * configure: Regenerate.
1156
e5a9158d
AA
11572014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1158
1159 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1160 warning upon ENODATA from ptrace.
1161 * linux-s390-low.c (s390_store_tdb): New.
1162 (s390_regsets): Add regset for NT_S390_TDB.
1163
feea5f36
AA
11642014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1165
1166 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1167 without a fill_function.
1168 * linux-s390-low.c (s390_fill_last_break): Remove.
1169 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1170 (s390_arch_setup): Use regset's size instead of fill_function for
1171 loop end condition.
1172
098dbe61
AA
11732014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1174
1175 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1176 the regset's store function when ptrace returned an error.
1177 * regcache.c (get_thread_regcache): Invalidate register cache
1178 before fetching inferior's registers.
1179
28eef672
AA
11802014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1181
1182 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1183 while-loop as for-loop.
1184 (regsets_store_inferior_registers): Likewise.
1185
bdca27a2
YQ
11862014-11-28 Yao Qi <yao@codesourcery.com>
1187
1188 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1189 * config.in, configure: Re-generate.
1190 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1191 is defined.
1192
9c232dda
YQ
11932014-11-21 Yao Qi <yao@codesourcery.com>
1194
1195 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1196 (AC_CHECK_HEADERS): Remove malloc.h.
1197 * configure: Re-generated.
1198 * config.in: Re-generated.
1199 * server.h: Don't include alloca.h and malloc.h.
1200 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1201 Don't include malloc.h.
1202
43968415
JB
12032014-11-17 Joel Brobecker <brobecker@adacore.com>
1204
1205 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1206 corresponding ERRNO check in same block.
1207
40e91bc7
PA
12082014-11-12 Pedro Alves <palves@redhat.com>
1209
1210 * server.c (cont_thread): Update comment.
1211 (start_inferior, attach_inferior): No longer clear cont_thread.
1212 (handle_v_cont): No longer set cont_thread.
1213 (captured_main): Clear cont_thread each time a GDB connects.
1214
c2c118cf
PA
12152014-11-12 Pedro Alves <palves@redhat.com>
1216
1217 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1218 thread, and don't resume all threads if the Hc thread has exited.
1219
78708b7c
PA
12202014-11-12 Pedro Alves <palves@redhat.com>
1221
1222 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1223 the process group instead of to a specific LWP.
1224
a2abc7de
PA
12252014-10-15 Pedro Alves <palves@redhat.com>
1226
1227 PR server/17487
1228 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1229 parameter.
1230 (arm_set_thread_context): Delete.
1231 (the_low_target): Adjust.
1232 * win32-i386-low.c (debug_registers_changed)
1233 (debug_registers_used): Delete.
1234 (update_debug_registers_callback): New function.
1235 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1236 needing to update their debug registers.
1237 (win32_get_current_dr): New function.
1238 (x86_dr_low_get_addr, x86_dr_low_get_control)
1239 (x86_dr_low_get_status): Fetch the debug register from the thread
1240 record's context.
1241 (i386_initial_stuff): Adjust.
1242 (i386_get_thread_context): Remove current_event parameter. Don't
1243 clear debug_registers_changed nor copy DR values to
1244 debug_reg_state.
1245 (i386_set_thread_context): Delete.
1246 (i386_prepare_to_resume): New function.
1247 (i386_thread_added): Mark the thread as needing to update irs
1248 debug registers.
1249 (the_low_target): Remove i386_set_thread_context and install
1250 i386_prepare_to_resume.
1251 * win32-low.c (win32_get_thread_context): Adjust.
1252 (win32_set_thread_context): Use SetThreadContext
1253 directly.
1254 (win32_prepare_to_resume): New function.
1255 (win32_require_context): New function, factored out from ...
1256 (thread_rec): ... this.
1257 (continue_one_thread): Call win32_prepare_to_resume on each thread
1258 we're about to continue.
1259 (win32_resume): Call win32_prepare_to_resume on the event thread.
1260 * win32-low.h (struct win32_thread_info)
1261 <debug_registers_changed>: New field.
1262 (struct win32_target_ops): Change prototype of set_thread_context,
1263 delete set_thread_context and add prepare_to_resume.
1264 (win32_require_context): New declaration.
1265
a442d071
GB
12662014-10-08 Gary Benson <gbenson@redhat.com>
1267
1268 * server.h: Do not include common-exceptions.h.
1269
6f1947e8
GB
12702014-10-08 Gary Benson <gbenson@redhat.com>
1271
1272 * server.h: Do not include cleanups.h.
1273
63b434a4
JH
12742014-09-30 James Hogan <james.hogan@imgtec.com>
1275
1276 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1277 mips64-dsp-linux.c.
1278
c4d9ceb6
YQ
12792014-09-23 Yao Qi <yao@codesourcery.com>
1280
1281 * linux-low.c (lp_status_maybe_breakpoint): New function.
1282 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1283 (count_events_callback): Likewise.
1284 (select_event_lwp_callback): Likewise.
1285 (cancel_breakpoints_callback): Likewise.
1286
89a5711c
DB
12872014-09-19 Don Breazeal <donb@codesourcery.com>
1288
1289 * linux-low.c (handle_extended_wait): Call
1290 linux_ptrace_get_extended_event.
1291 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1292 linux_is_extended_waitstatus.
1293
bffc0964
JB
12942014-09-16 Joel Brobecker <brobecker@adacore.com>
1295
1296 * Makefile.in (CPPFLAGS): Define.
1297 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1298 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1299
0bfdf32f
GB
13002014-09-16 Gary Benson <gbenson@redhat.com>
1301
1302 * inferiors.h (current_inferior): Renamed as...
1303 (current_thread): New variable. All uses updated.
1304 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1305 (maybe_move_out_of_jump_pad): Likewise.
1306 (cancel_breakpoint): Likewise.
1307 (linux_low_filter_event): Likewise.
1308 (wait_for_sigstop): Likewise.
1309 (linux_resume_one_lwp): Likewise.
1310 (need_step_over_p): Likewise.
1311 (start_step_over): Likewise.
1312 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1313 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1314 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1315 and save_inferior as saved_thread.
1316 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1317 saved_thread.
1318 (regcache_invalidate_thread): Likewise.
1319 * remote-utils.c (prepare_resume_reply): Likewise.
1320 * thread-db.c (thread_db_get_tls_address): Likewise.
1321 (disable_thread_event_reporting): Likewise.
1322 (remove_thread_event_breakpoints): Likewise.
1323 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1324 as saved_thread.
1325 * target.h (set_desired_inferior): Renamed as...
1326 (set_desired_thread): New declaration. All uses updated.
1327 * server.c (myresume): Updated comment to reference thread instead
1328 of inferior.
1329 (handle_serial_event): Likewise.
1330 (handle_target_event): Likewise.
1331
361c8ade
GB
13322014-09-12 Tom Tromey <tromey@redhat.com>
1333 Gary Benson <gbenson@redhat.com>
1334
1335 * regcache.h: Include common-regcache.h.
1336 (regcache_read_pc): Don't declare.
1337 * regcache.c (get_thread_regcache_for_ptid): New function.
1338
bd9269f7
GB
13392014-09-11 Tom Tromey <tromey@redhat.com>
1340 Gary Benson <gbenson@redhat.com>
1341
1342 * symbol.c: New file.
1343 * Makefile.in (SFILES): Add symbol.c.
1344 (OBS): Add symbol.o.
1345
f8c1d06b
GB
13462014-09-11 Gary Benson <gbenson@redhat.com>
1347
1348 * target.c (target_stop_ptid, target_continue_ptid): New
1349 functions.
1350
721ec300
GB
13512014-09-11 Tom Tromey <tromey@redhat.com>
1352 Gary Benson <gbenson@redhat.com>
1353
1354 * target.h: Include target/target.h.
1355 * target.c (target_read_memory, target_read_uint32)
1356 (target_write_memory): New functions.
1357
c5e92cca
GB
13582014-09-11 Gary Benson <gbenson@redhat.com>
1359
1360 * server.h (debug_hw_points): Don't declare.
1361 * server.c (debug_hw_points): Don't define. Replace all uses
1362 with show_debug_regs.
1363 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1364 all uses with show_debug_regs.
1365
2e4bb98a
EBM
13662014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1367
1368 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1369 endianness into account.
1370 (ppc_supply_ptrace_register): Likewise.
1371
ac740bc7
JH
13722014-09-03 James Hogan <james.hogan@imgtec.com>
1373
1374 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1375 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1376
97ea6506
GB
13772014-09-03 Gary Benson <gbenson@redhat.com>
1378
1379 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1380 ALL_DEBUG_ADDRESS_REGISTERS.
1381
df7e5265
GB
13822014-09-02 Gary Benson <gbenson@redhat.com>
1383
1384 * i386-low.h: Renamed as...
1385 * x86-low.h: New file. All type, function and variable name
1386 prefixes changed from "i386_" to "x86_". All references updated.
1387 * i386-low.c: Renamed as...
1388 * x86-low.c: New file. All type, function and variable name
1389 prefixes changed from "i386_" to "x86_". All references updated.
1390
ed859da7
GB
13912014-09-02 Gary Benson <gbenson@redhat.com>
1392
1393 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1394 (x86_linux_new_thread): Likewise.
1395
860789c7
GB
13962014-08-29 Gary Benson <gbenson@redhat.com>
1397
1398 * server.h (setjmp.h): Do not include.
1399 (toplevel): Do not declare.
1400 (common-exceptions.h): Include.
1401 (cleanups.h): Likewise.
1402 * server.c (toplevel): Do not define.
1403 (exit_code): New static global.
1404 (detach_or_kill_for_exit_cleanup): New function.
1405 (main): New function. Original main renamed to...
1406 (captured_main): New function.
1407 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1408
ff55e1b5
GB
14092014-08-29 Gary Benson <gbenson@redhat.com>
1410
1411 * Makefile.in (SFILES): Add common/common-exceptions.c.
1412 (OBS): Add common-exceptions.o.
1413 (common-exceptions.o): New rule.
1414 * utils.c (prepare_to_throw_exception): New function.
1415
e9bcb658
GB
14162014-08-29 Gary Benson <gbenson@redhat.com>
1417
1418 * config.in: Regenerate.
1419 * configure: Likewise.
1420
e3180625
GB
14212014-08-29 Gary Benson <gbenson@redhat.com>
1422
1423 * Makefile.in (SFILES): Add common/cleanups.c.
1424 (OBS): cleanups.o.
1425 (cleanups.o): New rule.
1426
e3d6ba5d
GB
14272014-08-29 Gary Benson <gbenson@redhat.com>
1428
1429 * utils.c (internal_vwarning): New function.
1430
7096e886
GB
14312014-08-28 Gary Benson <gbenson@redhat.com>
1432
1433 * utils.h (fatal): Remove declaration.
1434 * utils.c (fatal): Remove function.
1435
14ce3192
GB
14362014-08-28 Gary Benson <gbenson@redhat.com>
1437
1438 * tracepoint.c (gdb_agent_init): Replace fatal with
1439 perror_with_name.
1440 (initialize_tracepoint): Likewise.
1441
50278d59
GB
14422014-08-28 Gary Benson <gbenson@redhat.com>
1443
1444 * remote-utils.c (remote_prepare): Replace fatal with error.
1445
aa96c426
GB
14462014-08-28 Gary Benson <gbenson@redhat.com>
1447
1448 * linux-low.c (linux_async): Replace fatal with warning.
1449 Tidy up and return.
1450 (linux_start_non_stop): Return -1 if linux_async failed.
1451
f7160e97
GB
14522014-08-28 Gary Benson <gbenson@redhat.com>
1453
1454 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1455 gdb_assert.
1456 (i386_dr_low_get_addr): Remove vague comment.
1457 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1458 gdb_assert.
1459
38e08fca
GB
14602014-08-28 Gary Benson <gbenson@redhat.com>
1461
1462 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1463 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1464 internal_error.
1465 (linux_resume_one_lwp): Likewise.
1466 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1467 gdb_assert.
1468 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1469 with internal_error.
1470 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1471 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1472 (find_register_by_name): Replace fatal with internal_error.
1473 (find_regno): Likewise.
1474 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1475 * thread-db.c (thread_db_create_event): Likewise.
1476 (thread_db_load_search): Likewise.
1477 (try_thread_db_load_1): Likewise.
1478 * tracepoint.c (get_jump_space_head): Replace fatal with
1479 internal_error.
1480 (claim_trampoline_space): Likewise.
1481 (have_fast_tracepoint_trampoline_buffer): Likewise.
1482 (cmd_qtstart): Likewise.
1483 (stop_tracing): Likewise.
1484 (fast_tracepoint_collecting): Likewise.
1485 (target_malloc): Likewise.
1486 (download_tracepoint): Likewise.
1487 (download_trace_state_variables): Replace check with gdb_assert.
1488 (upload_fast_traceframes): Replace fatal with internal_error.
1489
34abf635
GB
14902014-08-19 Tom Tromey <tromey@redhat.com>
1491 Gary Benson <gbenson@redhat.com>
1492
1493 * Makefile.in (SFILES): Add common/common-debug.c.
1494 (OBS): Add common-debug.o.
1495 (common-debug.o): New rule.
1496 * debug.h (debug_printf): Don't declare.
1497 * debug.c (debug_printf): Renamed and rewritten as...
1498 (debug_vprintf): New function.
1499
f6e94d78
GB
15002014-08-19 Gary Benson <gbenson@redhat.com>
1501
1502 * utils.h: Do not include print-utils.h.
1503
9239eeab
GB
15042014-08-19 Tom Tromey <tromey@redhat.com>
1505 Gary Benson <gbenson@redhat.com>
1506
1507 * server.h: Add static assertion.
1508 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1509
ef87c8bb
GB
15102014-08-19 Tom Tromey <tromey@redhat.com>
1511 Gary Benson <gbenson@redhat.com>
1512
1513 * Makefile.in (SFILES): Add common/errors.c.
1514 (OBS): Add errors.o.
1515 (IPA_OBS): Add errors-ipa.o.
1516 (errors.o): New rule.
1517 (errors-ipa.o): Likewise.
1518 * utils.h (perror_with_name, error, warning): Don't declare.
1519 * utils.c (warning): Renamed and rewritten as...
1520 (vwarning): New function.
1521 (error): Renamed and rewritten as...
1522 (verror): New function.
1523 (internal_error): Renamed and rewritten as...
1524 (internal_verror): New function.
1525
bb974a24
GB
15262014-08-07 Gary Benson <gbenson@redhat.com>
1527
1528 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1529 * configure: Regenerate.
1530 * config.in: Likewise.
1531 * server.h: Do not include errno.h.
1532 * event-loop.c: Likewise.
1533 * hostio-errno.c: Likewise.
1534 * linux-low.c: Likewise.
1535 * remote-utils.c: Likewise.
1536 * spu-low.c: Likewise.
1537 * utils.c: Likewise.
1538 * gdbreplay.c: Unconditionally include errno.h.
1539
6d3d12eb
GB
15402014-08-07 Gary Benson <gbenson@redhat.com>
1541
1542 * server.h: Do not include string.h.
1543 * event-loop.c: Likewise.
1544 * linux-low.c: Likewise.
1545 * regcache.c: Likewise.
1546 * remote-utils.c: Likewise.
1547 * spu-low.c: Likewise.
1548 * utils.c: Likewise.
1549
dccbb609
GB
15502014-08-07 Gary Benson <gbenson@redhat.com>
1551
1552 * server.h: Do not include gdb_assert.h.
1553
e76df0d0
GB
15542014-08-07 Gary Benson <gbenson@redhat.com>
1555
1556 * server.h: Do not include common-utils.h.
1557
4cb9c816
GB
15582014-08-07 Gary Benson <gbenson@redhat.com>
1559
1560 * server.h: Do not include ptid.h.
1561 * notif.h: Likewise.
1562
3995eeee
GB
15632014-08-07 Gary Benson <gbenson@redhat.com>
1564
1565 * server.h: Do not include gdb_locale.h.
1566
cb9f1a9b
GB
15672014-08-07 Gary Benson <gbenson@redhat.com>
1568
1569 * server.h: Do not include gdb/signals.h.
1570 * win32-low.c: Likewise.
1571
a5fceff8
GB
15722014-08-07 Gary Benson <gbenson@redhat.com>
1573
1574 * server.h: Do not include pathmax.h.
1575
b9391142
GB
15762014-08-07 Gary Benson <gbenson@redhat.com>
1577
1578 * server.h: Do not include libiberty.h.
1579 * linux-bfin-low.c: Likewise.
1580
0e443c87
GB
15812014-08-07 Gary Benson <gbenson@redhat.com>
1582
1583 * server.h: Do not include ansidecl.h.
1584
8ebb3f56
GB
15852014-08-07 Gary Benson <gbenson@redhat.com>
1586
1587 * linux-x86-low.c: Do not include stddef.h.
1588 * lynx-ppc-low.c: Likewise.
1589 * tracepoint.c: Likewise.
1590
8980bdf6
GB
15912014-08-07 Gary Benson <gbenson@redhat.com>
1592
1593 * server.h: Do not include stdarg.h.
1594 * nto-low.c: Likewise.
1595
d7096f71
GB
15962014-08-07 Gary Benson <gbenson@redhat.com>
1597
1598 * server.h: Do not include stdlib.h.
1599 * inferiors.c: Likewise.
1600 * linux-low.c: Likewise.
1601 * regcache.c: Likewise.
1602 * spu-low.c: Likewise.
1603 * tracepoint.c: Likewise.
1604 * utils.c: Likewise.
1605
d02f550d
GB
16062014-08-07 Gary Benson <gbenson@redhat.com>
1607
1608 * server.h: Do not include stdio.h.
1609 * linux-low.c: Likewise.
1610 * remote-utils.c: Likewise.
1611 * spu-low.c: Likewise.
1612 * utils.c: Likewise.
1613 * wincecompat.c: Likewise.
1614
87f6c4e3
GB
16152014-08-06 Gary Benson <gbenson@redhat.com>
1616
1617 * regcache.c (init_register_cache): Move conditionals inside if.
1618
7089dca4
GB
16192014-08-06 Gary Benson <gbenson@redhat.com>
1620
1621 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1622
462f517e
GB
16232014-07-31 Gary Benson <gbenson@redhat.com>
1624
1625 * ax.h: Do not include server.h.
1626 * gdbthread.h: Likewise.
1627 * lynx-low.h: Likewise.
1628 * notif.h: Likewise.
1629
976411d6
GB
16302014-07-30 Gary Benson <gbenson@redhat.com>
1631
1632 * server.h: Include common-defs.h.
1633 Do not include config.h or build-gnulib-gdbserver/config.h.
1634
d41f6d8e
GB
16352014-07-30 Gary Benson <gbenson@redhat.com>
1636
1637 * hostio-errno.c: Move server.h to top of includes list.
1638 * inferiors.c: Likewise.
1639 * linux-x86-low.c: Likewise.
1640 * notif.c: Include server.h.
1641
314c6a35
TT
16422014-07-24 Tom Tromey <tromey@redhat.com>
1643 Gary Benson <gbenson@redhat.com>
1644
1645 * server.h (CORE_ADDR): Now unsigned.
1646
69ff6be5
PA
16472014-07-16 Pedro Alves <palves@redhat.com>
1648
1649 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1650
ce9e3fe7
PA
16512014-07-15 Pedro Alves <palves@redhat.com>
1652
1653 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1654 copy.
1655
e76126e8
PA
16562014-07-11 Pedro Alves <palves@redhat.com>
1657
1658 * linux-low.c (kill_wait_lwp): New function, based on
1659 kill_one_lwp_callback, but use my_waitpid directly.
1660 (kill_one_lwp_callback, linux_kill): Use it.
1661
8e9db26e
PA
16622014-06-23 Pedro Alves <palves@redhat.com>
1663
1664 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1665 before setting DR0..DR3.
1666
698b3e08
GB
16672014-06-20 Gary Benson <gbenson@redhat.com>
1668
1669 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1670 * configure: Regenerated.
1671 * config.in: Likewise.
1672
125f8a3d
GB
16732014-06-20 Gary Benson <gbenson@redhat.com>
1674
1675 * Makefile.in (SFILES): Update locations for files moved
1676 from common to nat.
1677 (object file files): Reordered.
1678
42995dbd
GB
16792014-06-20 Gary Benson <gbenson@redhat.com>
1680
1681 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1682 (i386_dr_low_set_addr): Likewise.
1683 (i386_dr_low_get_addr): Likewise.
1684 (i386_dr_low_can_set_control): Likewise.
1685 (i386_dr_low_set_control): Likewise.
1686 (i386_dr_low_get_control): Likewise.
1687 (i386_dr_low_get_status): Likewise.
1688 (i386_get_debug_register_length): Likewise.
1689 * linux-x86-low.c (i386_dr_low_set_addr):
1690 Changed signature. Made static.
1691 (i386_dr_low_get_addr): Likewise.
1692 (i386_dr_low_set_control): Likewise.
1693 (i386_dr_low_get_control): Likewise.
1694 (i386_dr_low_get_status): Likewise.
1695 (i386_dr_low): New global variable.
1696 * win32-i386-low.c (i386_dr_low_set_addr):
1697 Changed signature. Made static.
1698 (i386_dr_low_get_addr): Likewise.
1699 (i386_dr_low_set_control): Likewise.
1700 (i386_dr_low_get_control): Likewise.
1701 (i386_dr_low_get_status): Likewise.
1702 (i386_dr_low): New global variable.
1703
e1d2394b
MS
17042014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1705
1706 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1707 * Makefile.in (AR, AR_FLAGS): Define.
1708 * configure: Regenerate.
1709
3a8ee006
GB
17102014-06-19 Gary Benson <gbenson@redhat.com>
1711
1712 * Makefile.in (i386-dregs.o): New rule.
1713 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1714 * i386-low.c (target.h): Remove include.
1715 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1716 (DR_CONTROL_SHIFT): Likewise.
1717 (DR_CONTROL_SIZE): Likewise.
1718 (DR_RW_EXECUTE): Likewise.
1719 (DR_RW_WRITE): Likewise.
1720 (DR_RW_READ): Likewise.
1721 (DR_RW_IORW): Likewise.
1722 (DR_LEN_1): Likewise.
1723 (DR_LEN_2): Likewise.
1724 (DR_LEN_4): Likewise.
1725 (DR_LEN_8): Likewise.
1726 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1727 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1728 (DR_ENABLE_SIZE): Likewise.
1729 (DR_LOCAL_SLOWDOWN): Likewise.
1730 (DR_GLOBAL_SLOWDOWN): Likewise.
1731 (DR_CONTROL_RESERVED): Likewise.
1732 (I386_DR_CONTROL_MASK): Likewise.
1733 (I386_DR_VACANT): Likewise.
1734 (I386_DR_LOCAL_ENABLE): Likewise.
1735 (I386_DR_GLOBAL_ENABLE): Likewise.
1736 (I386_DR_DISABLE): Likewise.
1737 (I386_DR_SET_RW_LEN): Likewise.
1738 (I386_DR_GET_RW_LEN): Likewise.
1739 (I386_DR_WATCH_HIT): Likewise.
1740 (i386_wp_op_t): Likewise.
1741 (i386_show_dr): Likewise.
1742 (i386_length_and_rw_bits): Likewise.
1743 (i386_insert_aligned_watchpoint): Likewise.
1744 (i386_remove_aligned_watchpoint): Likewise.
1745 (i386_handle_nonaligned_watchpoint): Likewise.
1746 i386_update_inferior_debug_regs(): Likewise.
1747 (i386_dr_insert_watchpoint): Likewise.
1748 (i386_dr_remove_watchpoint): Likewise.
1749 (i386_dr_region_ok_for_watchpoint): Likewise.
1750 (i386_dr_stopped_data_address): Likewise.
1751 (i386_dr_stopped_by_watchpoint): Likewise.
1752
8f26655c
GB
17532014-06-19 Gary Benson <gbenson@redhat.com>
1754
1755 * i386-low.c (i386_dr_show): Renamed to
1756 i386_show_dr and made static. All uses updated.
1757 (i386_dr_length_and_rw_bits): Renamed to
1758 i386_length_and_rw_bits and made static.
1759 All uses updated.
1760 (i386_dr_insert_aligned_watchpoint): Renamed to
1761 i386_insert_aligned_watchpoint and made static.
1762 All uses updated.
1763 (i386_dr_remove_aligned_watchpoint): Renamed to
1764 i386_remove_aligned_watchpoint and made static.
1765 All uses updated.
1766 (i386_dr_update_inferior_debug_regs): Renamed to
1767 i386_update_inferior_debug_regs and made static.
1768 All uses updated.
1769
b9228891
GB
17702014-06-18 Gary Benson <gbenson@redhat.com>
1771
5171def3
GB
1772 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1773 (i386_dr_low_can_set_control): Likewise.
1774 (i386_get_debug_register_length): Likewise.
1775 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1776 (i386_dr_low_can_set_control): Likewise.
1777 (i386_get_debug_register_length): Likewise.
1778
17792014-06-17 Gary Benson <gbenson@redhat.com>
1780
b9228891
GB
1781 * i386-low.h (i386-dregs.h): New include.
1782 (DR_FIRSTADDR): Now in i386-dregs.h.
1783 (DR_LASTADDR): Likewise.
1784 (DR_NADDR): Likewise.
1785 (DR_STATUS): Likewise.
1786 (DR_CONTROL): Likewise.
1787 (i386_debug_reg_state): Likewise.
1788 (i386_dr_insert_watchpoint): Likewise.
1789 (i386_dr_remove_watchpoint): Likewise.
1790 (i386_dr_region_ok_for_watchpoint): Likewise.
1791 (i386_dr_stopped_data_address): Likewise.
1792 (i386_dr_stopped_by_watchpoint): Likewise.
1793 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1794
4be83cc2
GB
17952014-06-18 Gary Benson <gbenson@redhat.com>
1796
1797 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1798 i386_dr_insert_watchpoint.
1799 (i386_low_remove_watchpoint): Renamed to
1800 i386_dr_remove_watchpoint.
1801 (i386_low_region_ok_for_watchpoint): Renamed to
1802 i386_dr_region_ok_for_watchpoint.
1803 (i386_low_stopped_data_address): Renamed to
1804 i386_dr_stopped_data_address.
1805 (i386_low_stopped_by_watchpoint): Renamed to
1806 i386_dr_stopped_by_watchpoint.
1807 * i386-low.c (i386_show_dr): Renamed to
1808 i386_dr_show and made nonstatic. All uses updated.
1809 (i386_length_and_rw_bits): Renamed to
1810 i386_dr_length_and_rw_bits and made nonstatic.
1811 All uses updated.
1812 (i386_insert_aligned_watchpoint): Renamed to
1813 i386_dr_insert_aligned_watchpoint and made nonstatic.
1814 All uses updated.
1815 (i386_remove_aligned_watchpoint): Renamed to
1816 i386_dr_remove_aligned_watchpoint and made nonstatic.
1817 All uses updated.
1818 (i386_update_inferior_debug_regs): Renamed to
1819 i386_dr_update_inferior_debug_regs and made nonstatic.
1820 All uses updated.
1821 (i386_low_insert_watchpoint): Renamed to
1822 i386_dr_insert_watchpoint. All uses updated.
1823 (i386_low_remove_watchpoint): Renamed to
1824 i386_dr_remove_watchpoint. All uses updated.
1825 (i386_low_region_ok_for_watchpoint): Renamed to
1826 i386_dr_region_ok_for_watchpoint. All uses updated.
1827 (i386_low_stopped_data_address): Renamed to
1828 i386_dr_stopped_data_address. All uses updated.
1829 (i386_low_stopped_by_watchpoint): Renamed to
1830 i386_dr_stopped_by_watchpoint. All uses updated.
1831
131aa0d4
GB
18322014-06-18 Gary Benson <gbenson@redhat.com>
1833
1834 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1835 (i386_dr_low_can_set_control): Likewise.
1836 (i386_insert_aligned_watchpoint): New check.
1837
d9305f7f
GB
18382014-06-18 Gary Benson <gbenson@redhat.com>
1839
1840 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1841 Renamed to state.
1842
e927c9fc
GB
18432014-06-18 Gary Benson <gbenson@redhat.com>
1844
1845 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1846 instead of fatal and error.
1847 (i386_handle_nonaligned_watchpoint): Likewise.
1848
1b6d4134
GB
18492014-06-18 Gary Benson <gbenson@redhat.com>
1850
1851 * i386-low.c (i386_get_debug_register_length): New macro.
1852 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1853 (i386_show_dr): Use debug_printf instead of fprintf. Use
1854 phex to format values.
1855
6e62758f
GB
18562014-06-18 Gary Benson <gbenson@redhat.com>
1857
1858 * i386-low.h: Comment changes.
1859 * i386-low.c: Likewise.
1860
fc6e2f03
GB
18612014-06-18 Gary Benson <gbenson@redhat.com>
1862
1863 * i386-low.c: Whitespace changes.
1864
f9d1eeed
TT
18652014-06-12 Tom Tromey <tromey@redhat.com>
1866
1867 * utils.c (freeargv): Remove.
1868
0b04e523
TT
18692014-06-12 Tom Tromey <tromey@redhat.com>
1870
1871 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1872 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1873 (parse_debug_format_options): Likewise.
1874 (gdbserver_usage): Likewise.
1875 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1876 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1877 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1878 against libiberty.
1879 ($(LIBGNU)): Depend on libiberty.
1880 (all-lib): Recurse into all subdirs.
1881 (install-only): Invoke "install" target in subdirs.
1882 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1883 targets.
1884 * configure: Rebuild.
1885 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1886 for vasprintf, vsnprintf, or gettimeofday.
1887 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1888 srv_tgtobj.
1889
270c9937
JB
18902014-06-05 Joel Brobecker <brobecker@adacore.com>
1891
1892 * development.sh: Delete.
1893 * Makefile.in (config.status): Adjust dependency on development.sh.
1894 * configure.ac: Adjust development.sh source call.
1895 * configure: Regenerate.
1896
0a261ed8
PA
18972014-06-02 Pedro Alves <palves@redhat.com>
1898
1899 * ax.c (gdb_free_agent_expr): New function.
1900 * ax.h (gdb_free_agent_expr): New declaration.
1901 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1902 list.
1903 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1904 static.
1905 (clear_breakpoint_conditions_and_commands): New function.
1906 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1907 (clear_breakpoint_conditions_and_commands): New declaration.
1908
e9dae05e
RR
19092014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1910
1911 * linux-aarch64-low.c (asm/ptrace.h): Include.
1912
5876f503
JK
19132014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1914
1915 Fix TLS access for -static -pthread.
1916 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1917 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1918 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1919
802e8e6d
PA
19202014-05-20 Pedro Alves <palves@redhat.com>
1921
1922 * linux-aarch64-low.c (aarch64_insert_point)
1923 (aarch64_remove_point): No longer check whether the type is
1924 supported here. Adjust to new interface.
1925 (the_low_target): Install aarch64_supports_z_point_type as
1926 supports_z_point_type method.
1927 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1928 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1929 instead of a Z packet char. Adjust.
1930 (arm_supports_z_point_type): New function.
1931 (arm_insert_point, arm_remove_point): Adjust to new interface.
1932 (the_low_target): Install arm_supports_z_point_type.
1933 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1934 (cris_insert_point, cris_remove_point): Adjust to new interface.
1935 Don't check whether the type is supported here.
1936 (the_low_target): Install cris_supports_z_point_type.
1937 * linux-low.c (linux_supports_z_point_type): New function.
1938 (linux_insert_point, linux_remove_point): Adjust to new interface.
1939 * linux-low.h (struct linux_target_ops) <insert_point,
1940 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1941 raw_breakpoint pointer parameter.
1942 <supports_z_point_type>: New method.
1943 * linux-mips-low.c (mips_supports_z_point_type): New function.
1944 (mips_insert_point, mips_remove_point): Adjust to new interface.
1945 Use mips_supports_z_point_type.
1946 (the_low_target): Install mips_supports_z_point_type.
1947 * linux-ppc-low.c (the_low_target): Install NULL as
1948 supports_z_point_type method.
1949 * linux-s390-low.c (the_low_target): Install NULL as
1950 supports_z_point_type method.
1951 * linux-sparc-low.c (the_low_target): Install NULL as
1952 supports_z_point_type method.
1953 * linux-x86-low.c (x86_supports_z_point_type): New function.
1954 (x86_insert_point): Adjust to new insert_point interface. Use
1955 insert_memory_breakpoint. Adjust to new
1956 i386_low_insert_watchpoint interface.
1957 (x86_remove_point): Adjust to remove_point interface. Use
1958 remove_memory_breakpoint. Adjust to new
1959 i386_low_remove_watchpoint interface.
1960 (the_low_target): Install x86_supports_z_point_type.
1961 * lynx-low.c (lynx_target_ops): Install NULL as
1962 supports_z_point_type callback.
1963 * nto-low.c (nto_supports_z_point_type): New.
1964 (nto_insert_point, nto_remove_point): Adjust to new interface.
1965 (nto_target_ops): Install nto_supports_z_point_type.
1966 * mem-break.c: Adjust intro comment.
1967 (struct raw_breakpoint) <raw_type, size>: New fields.
1968 <inserted>: Update comment.
1969 <shlib_disabled>: Delete field.
1970 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1971 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1972 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1973 (raw_bkpt_type_to_target_hw_bp_type): New function.
1974 (find_enabled_raw_code_breakpoint_at): New function.
1975 (find_raw_breakpoint_at): New type and size parameters. Use them.
1976 (insert_memory_breakpoint): New function, based off
1977 set_raw_breakpoint_at.
1978 (remove_memory_breakpoint): New function.
1979 (set_raw_breakpoint_at): Reimplement.
1980 (set_breakpoint): New, based on set_breakpoint_at.
1981 (set_breakpoint_at): Reimplement.
1982 (delete_raw_breakpoint): Go through the_target->remove_point
1983 instead of assuming memory breakpoints.
1984 (find_gdb_breakpoint_at): Delete.
1985 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1986 (find_gdb_breakpoint): New function.
1987 (set_gdb_breakpoint_at): Delete.
1988 (z_type_supported): New function.
1989 (set_gdb_breakpoint_1): New function, loosely based off
1990 set_gdb_breakpoint_at.
1991 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1992 (delete_gdb_breakpoint_at): Delete.
1993 (delete_gdb_breakpoint_1): New function, loosely based off
1994 delete_gdb_breakpoint_at.
1995 (delete_gdb_breakpoint): New function.
1996 (clear_gdb_breakpoint_conditions): Rename to ...
1997 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1998 breakpoint.
1999 (add_condition_to_breakpoint): Make static.
2000 (add_breakpoint_condition): Take a struct breakpoint pointer
2001 instead of an address. Adjust.
2002 (gdb_condition_true_at_breakpoint): Rename to ...
2003 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2004 z_type parameter.
2005 (gdb_condition_true_at_breakpoint): Reimplement.
2006 (add_breakpoint_commands): Take a struct breakpoint pointer
2007 instead of an address. Adjust.
2008 (gdb_no_commands_at_breakpoint): Rename to ...
2009 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2010 parameter. Return true if no breakpoint was found. Change debug
2011 output.
2012 (gdb_no_commands_at_breakpoint): Reimplement.
2013 (run_breakpoint_commands): Rename to ...
2014 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2015 and change return type to boolean.
2016 (run_breakpoint_commands): New function.
2017 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2018 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2019 breakpoint. Go through the_target->remove_point instead of
2020 assuming memory breakpoint.
2021 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2022 software and hardware breakpoints.
2023 (reinsert_raw_breakpoint): Go through the_target->insert_point
2024 instead of assuming memory breakpoint.
2025 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2026 software and hardware breakpoints.
2027 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2028 Check both software and hardware breakpoints.
2029 (validate_inserted_breakpoint): Assert the breakpoint is a
2030 software breakpoint. Set the inserted flag to -1 instead of
2031 setting shlib_disabled.
2032 (delete_disabled_breakpoints): Adjust.
2033 (validate_breakpoints): Only validate software breakpoints.
2034 Adjust to inserted flag change.
2035 (check_mem_read, check_mem_write): Skip breakpoint types other
2036 than software breakpoints. Adjust to inserted flag change.
2037 * mem-break.h (enum raw_bkpt_type): New enum.
2038 (raw_breakpoint, struct process_info): Forward declare.
2039 (Z_packet_to_target_hw_bp_type): Delete declaration.
2040 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2041 (set_gdb_breakpoint, delete_gdb_breakpoint)
2042 (clear_breakpoint_conditions): New declarations.
2043 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2044 (breakpoint_inserted_here): Update comment.
2045 (add_breakpoint_condition, add_breakpoint_commands): Replace
2046 address parameter with a breakpoint pointer parameter.
2047 (gdb_breakpoint_here): Update comment.
2048 (delete_gdb_breakpoint_at): Delete.
2049 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2050 * server.c (process_point_options): Take a struct breakpoint
2051 pointer instead of an address. Adjust.
2052 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2053 delete_gdb_breakpoint.
2054 * spu-low.c (spu_target_ops): Install NULL as
2055 supports_z_point_type method.
2056 * target.h: Include mem-break.h.
2057 (struct target_ops) <prepare_to_access_memory>: Update comment.
2058 <supports_z_point_type>: New field.
2059 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2060 instead of a char. Also take a raw breakpoint pointer.
2061 * win32-arm-low.c (the_low_target): Install NULL as
2062 supports_z_point_type.
2063 * win32-i386-low.c (i386_supports_z_point_type): New function.
2064 (i386_insert_point, i386_remove_point): Adjust to new interface.
2065 (the_low_target): Install i386_supports_z_point_type.
2066 * win32-low.c (win32_supports_z_point_type): New function.
2067 (win32_insert_point, win32_remove_point): Adjust to new interface.
2068 (win32_target_ops): Install win32_supports_z_point_type.
2069 * win32-low.h (struct win32_target_ops):
2070 <supports_z_point_type>: New method.
2071 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2072 instead of a char. Also take a raw breakpoint pointer.
2073
932539e3
PA
20742014-05-20 Pedro Alves <palves@redhat.com>
2075
2076 * mem-break.h: Include break-common.h.
2077 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2078 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2079 (Z_packet_to_target_hw_bp_type): New declaration.
2080 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2081 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2082 (Z_PACKET_ACCESS_WP): Delete macros.
2083 (Z_packet_to_hw_type): Delete function.
2084 * i386-low.h: Don't include break-common.h here.
2085 (Z_packet_to_hw_type): Delete declaration.
2086 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2087 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2088 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2089 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2090 * linux-aarch64-low.c: Don't include break-common.h here.
2091 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2092 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2093 (Z_packet_to_target_hw_bp_type): Delete function.
2094 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2095 function.
2096 (mips_insert_point, mips_remove_point): Use
2097 Z_packet_to_target_hw_bp_type.
2098
4ff0d3d8
PA
20992014-05-20 Pedro Alves <palves@redhat.com>
2100
2101 * linux-aarch64-low.c: Include break-common.h.
2102 (enum target_point_type): Delete.
2103 (Z_packet_to_point_type): Rename to ...
2104 (Z_packet_to_target_hw_bp_type): ... this, and return a
2105 target_hw_bp_type instead.
2106 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2107 instead of an enum target_point_type.
2108 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2109 breakpoint type.
2110 (aarch64_dr_state_insert_one_point)
2111 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2112 (aarch64_handle_aligned_watchpoint)
2113 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2114 Take an enum target_hw_bp_type instead of an enum
2115 target_point_type.
2116 (aarch64_supports_z_point_type): New function.
2117 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2118 use Z_packet_to_target_hw_bp_type.
2119
786dc519
JB
21202014-05-20 Joel Brobecker <brobecker@adacore.com>
2121
2122 * configure.ac: Only use -Werror by default when DEVELOPMENT
2123 is true.
2124 * configure: Regenerate.
2125
9e0aa64f
JK
21262014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2127
2128 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2129 * linux-x86-low.c (X86_64_USER_REGS): New.
2130 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2131
2b577b92
YQ
21322014-04-28 Yao Qi <yao@codesourcery.com>
2133
2134 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2135 name.
2136
94611da2
PA
21372014-04-25 Pedro Alves <palves@redhat.com>
2138
2139 PR server/16255
2140 * linux-low.c (linux_attach_fail_reason_string): New function.
2141 (linux_attach_lwp): Delete.
2142 (linux_attach_lwp_1): Rename to ...
2143 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2144 argument. Remove "initial" parameter. Return int instead of
2145 void. Don't error or warn here.
2146 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2147 failure to attach to the tgid. Call warning when failing to
2148 attach to an lwp.
2149 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2150 argument. Remove "initial" parameter. Return int instead of
2151 void. Don't error or warn here.
2152 (linux_attach_fail_reason_string): New declaration.
2153 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2154 interface change. Use linux_attach_fail_reason_string.
2155
01f9f808
MS
21562014-04-24 Michael Sturm <michael.sturm@mintel.com>
2157 Walfred Tedeschi <walfred.tedeschi@intel.com>
2158
2159 * Makefile.in: Added rules to handle new files
2160 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2161 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2162 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2163 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2164 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2165 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2166 x32-avx512-linux.o.
2167 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2168 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2169 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2170 i386/x32-avx512.xml.
2171 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2172 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2173 i386/x32-avx512-linux.xml.
2174 * i387-fp.c (num_avx512_k_registers): New constant for number
2175 of K registers.
2176 (num_avx512_zmmh_low_registers): New constant for number of
2177 lower ZMM registers (0-15).
2178 (num_avx512_zmmh_high_registers): New constant for number of
2179 higher ZMM registers (16-31).
2180 (num_avx512_ymmh_registers): New contant for number of higher
2181 YMM registers (ymm16-31 added by avx521 on x86_64).
2182 (num_avx512_xmm_registers): New constant for number of higher
2183 XMM registers (xmm16-31 added by AVX512 on x86_64).
2184 (struct i387_xsave): Add space for AVX512 registers.
2185 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2186 Add code to handle AVX512 registers.
2187 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2188 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2189 prototypei from generated file.
2190 (tdesc_amd64_avx512_linux): Likewise.
2191 (init_registers_x32_avx512_linux): Likewise.
2192 (tdesc_x32_avx512_linux): Likewise.
2193 (init_registers_i386_avx512_linux): Likewise.
2194 (tdesc_i386_avx512_linux): Likewise.
2195 (x86_64_regmap): Add AVX512 registers.
2196 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2197 mask.
2198 (initialize_low_arch): Add code to initialize AVX512 registers.
2199
51aa91f9
PA
22002014-04-23 Pedro Alves <palves@redhat.com>
2201
2202 * mem-break.c (find_gdb_breakpoint_at): Make static.
2203 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2204
a4165e94
PA
22052014-04-23 Pedro Alves <palves@redhat.com>
2206
2207 * i386-low.c: Don't include break-common.h here.
2208 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2209 prototype to take target_hw_bp_type as argument instead of a Z
2210 packet char.
2211 * i386-low.h: Include break-common.h here.
2212 (Z_packet_to_hw_type): Declare.
2213 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2214 prototypes.
2215 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2216 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2217 (x86_remove_point): Convert the packet number to a
2218 target_hw_bp_type before calling i386_low_remove_watchpoint.
2219 * win32-i386-low.c (i386_insert_point): Convert the packet number
2220 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2221 (i386_remove_point): Convert the packet number to a
2222 target_hw_bp_type before calling i386_low_remove_watchpoint.
2223
b8acf843
PA
22242014-04-23 Pedro Alves <palves@redhat.com>
2225
2226 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2227
d708bcd1
PA
22282014-04-10 Pedro Alves <palves@redhat.com>
2229
2230 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2231 Check if the condition or command is NULL before checking if the
2232 breakpoint is known. On success, return true.
2233 * mem-break.h (add_breakpoint_condition): Document return.
2234 (add_breakpoint_commands): Add describing comment.
2235 * server.c (skip_to_semicolon): New function.
2236 (process_point_options): Use it.
2237
2eec7d5b
PA
22382014-04-09 Pedro Alves <palves@redhat.com>
2239
2240 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2241 to lwpid_of.
2242
fa96cb38
PA
22432014-02-27 Pedro Alves <palves@redhat.com>
2244
2245 PR 12702
2246 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2247 macros.
2248 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2249 output.
2250 (last_thread_of_process_p): Take a PID argument instead of a
2251 thread pointer.
2252 (linux_wait_for_lwp): Delete.
2253 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2254 functions.
2255 (linux_low_filter_event): New function, party factored out from
2256 linux_wait_for_event.
2257 (linux_wait_for_event): Rename to ...
2258 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2259 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2260 sigsuspend. Check for zombie leaders.
2261 (linux_wait_for_event): Reimplement as wrapper around
2262 linux_wait_for_event_filtered.
2263 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2264 a normal or signal exit is seen, it's the whole process exiting.
2265 (wait_for_sigstop): No longer a for_each_inferior callback.
2266 Rewrite on top of linux_wait_for_event_filtered.
2267 (stop_all_lwps): Call wait_for_sigstop directly.
2268 * server.c (resume, handle_target_event): Handle
2269 TARGET_WAITKIND_NO_RESUMED.
2270
d763de10
JB
22712014-02-26 Joel Brobecker <brobecker@adacore.com>
2272
2273 * win32-low.c (psapi_get_dll_name,
2274 * win32_CreateToolhelp32Snapshot): Delete.
2275 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2276 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2277 Delete.
2278 (handle_load_dll): Add function description.
2279 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2280
850a0f76
JB
22812014-02-26 Joel Brobecker <brobecker@adacore.com>
2282
2283 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2284 Add comment.
2285 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2286 base address when calling win32_add_one_solib.
2287 (handle_load_dll): Delete local variable load_addr.
2288 Remove 0x1000 offset applied to DLL base address when calling
2289 win32_add_one_solib.
2290 (handle_unload_dll): Add comment.
2291
f25b3fc3
JB
22922014-02-26 Joel Brobecker <brobecker@adacore.com>
2293
2294 * win32-low.c (win32_add_all_dlls): Renames
2295 win32_ensure_ntdll_loaded. Rewrite function documentation.
2296 Adjust implementation to always load all DLLs.
2297 Add 0x1000 offset to DLL base address when calling
2298 win32_add_one_solib.
2299 (child_initialization_done): New static global.
2300 (do_initial_child_stuff): Set child_initialization_done to
2301 zero during child initialization, and 1 after. Replace call
2302 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2303 Add comment.
2304 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2305 (handle_unload_dll): Add function documentation.
2306 (get_child_debug_event): Ignore load and unload DLL events
2307 during child initialization.
2308
d86d4aaf
DE
23092014-02-20 Doug Evans <dje@google.com>
2310
3bc32da3 2311 Remove global all_lwps.
d86d4aaf
DE
2312 * inferiors.h (ptid_of): Move here from linux-low.h.
2313 (pid_of, lwpid_of): Ditto.
2314 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2315 parameter is a struct thread_info * now.
2316 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2317 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2318 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2319 directly.
2320 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2321 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2322 * linux-arm-low.c (update_registers_callback): Update, "entry"
2323 parameter is a struct thread_info * now.
2324 Fetch lwpid from current_inferior directly.
2325 (arm_insert_point): Pass &all_threads to find_inferior instead of
2326 &all_lwps.
2327 (arm_remove_point): Ditto.
2328 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2329 (arm_prepare_to_resume): Fetch pid from thread.
2330 (arm_read_description): Fetch lwpid from current_inferior directly.
2331 * linux-low.c (all_lwps): Delete.
2332 (delete_lwp): Delete call to remove_inferior.
2333 (handle_extended_wait): Fetch lwpid from thread.
2334 (add_lwp): Don't set lwp->entry.id. Remove call to
2335 add_inferior_to_list.
2336 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2337 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2338 (kill_one_lwp_callback): Ditto.
2339 (linux_kill): Don't dereference NULL pointer.
2340 Fetch ptid,lwpid from thread.
2341 (get_detach_signal): Fetch ptid from thread.
2342 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2343 Simplify call to regcache_invalidate_thread.
2344 (delete_lwp_callback): Update, "entry" parameter is a
2345 struct thread_info * now. Fetch pid from thread.
2346 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2347 (status_pending_p_callback): Update, "entry" parameter is a
2348 struct thread_info * now. Fetch ptid from thread.
2349 (find_lwp_pid): Update, "entry" parameter is a
2350 struct thread_info * now.
2351 (linux_wait_for_lwp): Fetch pid from thread.
2352 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2353 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2354 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2355 (dequeue_one_deferred_signal): Ditto.
2356 (cancel_breakpoint): Fetch ptid from current_inferior.
2357 (linux_wait_for_event): Pass &all_threads to find_inferior,
2358 not &all_lwps. Fetch ptid, lwpid from thread.
2359 (count_events_callback): Update, "entry" parameter is a
2360 struct thread_info * now.
2361 (select_singlestep_lwp_callback): Ditto.
2362 (select_event_lwp_callback): Ditto.
2363 (cancel_breakpoints_callback): Ditto.
2364 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2365 not &all_lwps.
2366 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2367 (unsuspend_one_lwp): Update, "entry" parameter is a
2368 struct thread_info * now.
2369 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2370 not &all_lwps.
2371 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2372 Fetch lwpid from thread, not lwp.
2373 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2374 Pass &all_threads to find_inferior, not &all_lwps.
2375 (send_sigstop): Fetch lwpid from thread, not lwp.
2376 (send_sigstop_callback): Update, "entry" parameter is a
2377 struct thread_info * now.
2378 (suspend_and_send_sigstop_callback): Ditto.
2379 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2380 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2381 struct thread_info * now.
2382 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2383 from thread, lwp.
2384 (lwp_running): Update, "entry" parameter is a
2385 struct thread_info * now.
2386 (stop_all_lwps): Fetch ptid from thread.
2387 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2388 (linux_resume_one_lwp): Fetch lwpid from thread.
2389 (linux_set_resume_request): Update, "entry" parameter is a
2390 struct thread_info * now. Fetch pid, lwpid from thread.
2391 (resume_status_pending_p): Update, "entry" parameter is a
2392 struct thread_info * now.
2393 (need_step_over_p): Ditto. Fetch lwpid from thread.
2394 (start_step_over): Fetch lwpid from thread.
2395 (linux_resume_one_thread): Update, "entry" parameter is a
2396 struct thread_info * now. Fetch lwpid from thread.
2397 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2398 (proceed_one_lwp): Update, "entry" parameter is a
2399 struct thread_info * now. Fetch lwpid from thread.
2400 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2401 struct thread_info * now.
2402 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2403 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2404 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2405 directly.
2406 (regsets_store_inferior_registers): Ditto.
2407 (fetch_register, store_register): Ditto.
2408 (linux_read_memory, linux_write_memory): Ditto.
2409 (linux_request_interrupt): Ditto.
2410 (linux_read_auxv): Ditto.
2411 (linux_xfer_siginfo): Ditto.
2412 (linux_qxfer_spu): Ditto.
2413 (linux_qxfer_libraries_svr4): Ditto.
2414 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2415 moved to inferiors.h.
2416 (get_lwp): Delete.
2417 (get_thread_lwp): Update.
2418 (struct lwp_info): Delete member "entry". Simplify comment for
2419 member "thread".
2420 (all_lwps): Delete.
2421 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2422 current_inferior directly.
2423 (update_watch_registers_callback): Update, "entry" parameter is a
2424 struct thread_info * now. Fetch pid from thread.
2425 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2426 (mips_insert_point): Fetch lwpid from current_inferior.
2427 Pass &all_threads to find_inferior, not &all_lwps.
2428 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2429 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2430 directly.
2431 (mips_stopped_data_address): Ditto.
2432 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2433 directly.
2434 * linux-tile-low.c (tile_arch_setup): Ditto.
2435 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2436 (update_debug_registers_callback): Update, "entry" parameter is a
2437 struct thread_info * now. Fetch pid from thread.
2438 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2439 Pass &all_threads to find_inferior, not &all_lwps.
2440 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2441 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2442 Pass &all_threads to find_inferior, not &all_lwps.
2443 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2444 (i386_dr_low_get_status): Ditto.
2445 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2446 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2447 (x86_linux_read_description): Ditto.
2448 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2449
3b8361aa
DE
24502014-02-20 Doug Evans <dje@google.com>
2451
2452 * inferiors.c (get_first_inferior): Fix buglet.
2453
f7667f0d
DE
24542014-02-19 Doug Evans <dje@google.com>
2455
2456 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2457 * inferiors.c (add_thread): Change result type to struct thread_info *.
2458 All callers updated.
2459 (add_lwp): Call add_thread here instead of in callers.
2460 All callers updated.
2461 * linux-low.h (get_lwp_thread): Rewrite.
2462 (struct lwp_info): New member "thread".
2463
b3312d80
DE
24642014-02-19 Doug Evans <dje@google.com>
2465
2466 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2467 All callers updated.
2468
ecc6f45c
DE
24692014-02-19 Doug Evans <dje@google.com>
2470
2471 * inferiors.c (add_thread): Fix whitespace.
2472
649ebbca
DE
24732014-02-19 Doug Evans <dje@google.com>
2474
2475 * dll.c (clear_dlls): Replace accessing list implemention details
2476 with API function.
2477 * gdbthread.h (get_first_thread): Declare.
2478 * inferiors.c (for_each_inferior_with_data): New function.
2479 (get_first_thread): New function.
2480 (find_thread_ptid): Simplify.
2481 (get_first_inferior): New function.
2482 (clear_list): Delete.
2483 (one_inferior_p): New function.
2484 (clear_inferior_list): New function.
2485 (clear_inferiors): Update.
2486 * inferiors.h (for_each_inferior_with_data): Declare.
2487 (clear_inferior_list): Declare.
2488 (one_inferior_p): Declare.
2489 (get_first_inferior): Declare.
2490 * linux-low.c (linux_wait_for_event): Replace accessing list
2491 implemention details with API function.
2492 * server.c (target_running): Ditto.
2493 (accumulate_file_name_length): New function.
2494 (emit_dll_description): New function.
2495 (handle_qxfer_libraries): Replace accessing list implemention
2496 details with API function.
2497 (handle_qxfer_threads_worker): New function.
2498 (handle_qxfer_threads_proper): Replace accessing list implemention
2499 details with API function.
2500 (handle_query): Ditto.
2501 (visit_actioned_threads_callback_ftype): New typedef.
2502 (visit_actioned_threads_data): New struct.
2503 (visit_actioned_threads): Rewrite to be find_inferior callback.
2504 (resume): Call find_inferior.
2505 (handle_status): Replace accessing list implemention
2506 details with API function.
2507 (process_serial_event): Replace accessing list implemention details
2508 with API function.
2509 * target.c (set_desired_inferior): Replace accessing list implemention
2510 details with API function.
2511 * tracepoint.c (same_process_p): New function.
2512 (gdb_agent_about_to_close): Replace accessing list implemention
2513 details with API function.
2514 * win32-low.c (child_delete_thread): Replace accessing list
2515 implemention details with API function.
2516 (match_dll_by_basename): New function.
2517 (dll_is_loaded_by_basename): New function.
2518 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2519 details call to dll_is_loaded_by_basename.
2520
80894984
DE
25212014-02-19 Doug Evans <dje@google.com>
2522
2523 * dll.h (struct dll_info): Add comment.
2524 * gdbthread.h (struct thread_info): Add comment.
2525 (current_ptid): Simplify.
2526 * inferiors.c (add_process): Update.
2527 (remove_process): Update.
2528 * inferiors.h (struct process_info): Rename member "head" to "entry".
2529 * linux-low.c (delete_lwp): Update.
2530 (add_lwp): Update.
2531 (last_thread_of_process_p): Update.
2532 (kill_one_lwp_callback, linux_kill): Update.
2533 (status_pending_p_callback): Update.
2534 (wait_for_sigstop): Update. Simplify read of ptid.
2535 (start_step_over): Update.
2536 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2537 (get_lwp_thread): Update.
2538 (struct lwp_info): Rename member "head" to "entry".
2539 * regcache.h (inferior_list_entry): Delete.
2540 * server.c (kill_inferior_callback): Update.
2541 (detach_or_kill_inferior_callback): Update.
2542 (print_started_pid): Update.
2543 (print_attached_pid): Update.
2544 (process_serial_event): Simplify read of ptid.
2545 * thread-db.c (thread_db_create_event): Update.
2546 (thread_db_get_tls_address): Update.
2547 * win32-low.c (current_inferior_ptid): Simplify.
2548
46917d26
TT
25492014-02-19 Tom Tromey <tromey@redhat.com>
2550
2551 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2552 argument.
2553 (target_supports_btrace): Update.
2554
0759a81e
YQ
25552014-02-14 Yao Qi <yao@codesourcery.com>
2556
2557 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2558 (rsp-low-ipa.o): New target.
2559
a7191e8b
TT
25602014-02-12 Tom Tromey <tromey@redhat.com>
2561
2562 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2563 convert_ascii_to_int.
2564 * regcache.c (registers_to_string): Likewise.
2565 * remote-utils.c (decode_M_packet): Likewise.
2566 * server.c (process_serial_event): Likewise.
2567
ff0e980e
TT
25682014-02-12 Tom Tromey <tromey@redhat.com>
2569
2570 * server.c (handle_query, handle_v_run): Use hex2bin, not
2571 unhexify.
2572 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2573
e9371aff
TT
25742014-02-12 Tom Tromey <tromey@redhat.com>
2575
2576 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2577 convert_int_to_ascii.
2578 * regcache.c (registers_to_string, collect_register_as_string):
2579 Likewise.
2580 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2581 Likewise.
2582 * server.c (process_serial_event): Likewise.
2583 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2584 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2585
971dc0b8
TT
25862014-02-12 Tom Tromey <tromey@redhat.com>
2587
2588 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2589 bin2hex, not hexify.
2590 * tracepoint.c (cmd_qtstatus): Likewise.
2591
0a822afb
TT
25922014-02-12 Tom Tromey <tromey@redhat.com>
2593
2594 * remote-utils.c (monitor_output): Pass explicit length to
2595 hexify.
2596
9c3d6531
TT
25972014-02-12 Tom Tromey <tromey@redhat.com>
2598
2599 * tracepoint.c: Include rsp-low.h.
2600 * server.c: Include rsp-low.h.
2601 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2602 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2603 declare.
2604 * remote-utils.c: Include rsp-low.h.
2605 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2606 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2607 (convert_int_to_ascii, convert_ascii_to_int): Move to
2608 common/rsp-low.c.
2609 * regcache.c: Include rsp-low.h.
2610 * ax.c: Include rsp-low.h.
2611 * Makefile.in (SFILES): Add common/rsp-low.c.
2612 (OBS): Add rsp-low.o.
2613 (rsp-low.o): New target.
2614
01fd3ea5
TT
26152014-02-12 Tom Tromey <tromey@redhat.com>
2616
2617 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2618 Include print-utils.h.
2619 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2620 (plongest, thirty_two, phex_nz): Remove.
2621 * Makefile.in (SFILES): Add common/print-utils.c.
2622 (OBS): Add print-utils.o.
2623 (print-utils-ipa.o): New target.
2624 (print-utils.o): New target.
2625 (IPA_OBJS): Add print-utils-ipa.o.
2626
e99dc820
TT
26272014-02-06 Tom Tromey <tromey@redhat.com>
2628
2629 * Makefile.in (SFILES): Fix indentation.
2630
ee1e2d4f
DE
26312014-02-05 Doug Evans <dje@google.com>
2632
2633 * linux-low.c (linux_wait_for_event): Improve comment.
2634 (linux_wait_1): Keep current_inferior in sync with event_child.
2635
f5a02773
DE
26362014-01-22 Doug Evans <dje@google.com>
2637
2638 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2639
87ce2a04
DE
26402014-01-22 Doug Evans <dje@google.com>
2641
2642 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2643 * configure: Regenerate.
2644 * config.in: Regenerate.
2645 * Makefile.in (SFILES): Add debug.c.
2646 (OBS): Add debug.o.
2647 * debug.c: New file.
2648 * debug.h: New file.
2649 * linux-aarch64-low.c (*): Update all debugging printfs to use
2650 debug_printf instead of fprintf.
2651 * linux-arm-low.c (*): Ditto.
2652 * linux-cris-low.c (*): Ditto.
2653 * linux-crisv32-low.c (*): Ditto.
2654 * linux-m32r-low.c (*): Ditto.
2655 * linux-sparc-low.c (*): Ditto.
2656 * linux-x86.c (*): Ditto.
2657 * linux-low.c (*): Ditto.
2658 (linux_wait_1): Add calls to debug_enter, debug_exit.
2659 (linux_wait): Remove redundant debugging printf.
2660 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2661 (linux_resume, unstop_all_lwps): Ditto.
2662 * mem-break.c (*): Update all debugging printfs to use
2663 debug_printf instead of fprintf.
2664 * remote-utils.c (*): Ditto.
2665 * thread-db.c (*): Ditto.
2666 * server.c #include <ctype.h>, "gdb_vecs.h".
2667 (debug_threads): Moved to debug.c.
2668 (*): Update all debugging printfs to use debug_printf instead of
2669 fprintf.
2670 (start_inferior): Replace call to fflush with call to debug_flush.
2671 (monitor_show_help): Mention set debug-format.
2672 (parse_debug_format_options): New function.
2673 (handle_monitor_command): Handle "monitor set debug-format".
2674 (gdbserver_usage): Mention --debug-format.
2675 (main): Parse --debug-format.
2676 * server.h (debug_threads): Declaration moved to debug.h.
2677 #include "debug.h".
2678 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2679 trace_debug_1 that uses debug_printf.
2680 (tracepoint_look_up_symbols): Update all debugging printfs to use
2681 debug_printf instead of fprintf.
2682
e671835b
BS
26832014-01-20 Baruch Siach <baruch@tkos.co.il>
2684
2685 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2686 sys/ptrace.h.
2687
b5737fa9
PA
26882014-01-17 Pedro Alves <palves@redhat.com>
2689
ea38d2a9 2690 PR build/16445
c7faa97a
PA
2691 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2692 defined after including gdb_proc_service.h.
b5737fa9 2693
40ed484e
DE
26942014-01-16 Doug Evans <dje@google.com>
2695
2696 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2697 (match_dll): Use it.
2698
969c39fb
MM
26992014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2700
2701 * target.h (target_ops) <read_btrace>: Change parameters and
2702 return type to allow error reporting.
2703 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2704 trace reading errors on.
2705 * linux-low.c (linux_low_read_btrace): Pass trace reading
2706 errors on.
2707 (linux_low_disable_btrace): New.
2708
ab7f45ba
DE
27092014-01-15 Doug Evans <dje@google.com>
2710
2711 * inferiors.c (thread_id_to_gdb_id): Delete.
2712 * inferiors.h (thread_id_to_gdb_id): Delete.
2713
66af0f44
EZ
27142014-01-13 Eli Zaretskii <eliz@gnu.org>
2715
2716 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2717 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2718 versions.
2719
9939e131
PA
27202014-01-08 Pedro Alves <palves@redhat.com>
2721
2722 * server.c (handle_status): Don't discard previous queued stop
2723 replies or thread's pending status here.
2724 (main) <disconnection>: Do it here instead.
2725
b7ea362b
PA
27262014-01-08 Pedro Alves <palves@redhat.com>
2727
2728 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2729 * server.c (visit_actioned_threads, handle_pending_status): New
2730 function.
2731 (handle_v_cont): Factor out parts to ...
2732 (resume): ... this new function. If in all-stop, and a thread
2733 being resumed has a pending status, report it without actually
2734 resuming.
2735 (myresume): Adjust to use the new 'resume' function.
2736 (clear_pending_status_callback, set_pending_status_callback)
2737 (find_status_pending_thread_callback): New functions.
2738 (handle_status): Handle the case of multiple threads having
2739 interesting statuses to report. Report threads' real last signal
2740 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2741 with an interesting thread to report the status for, instead of
2742 always reporting the status of the first thread.
2743
28498c42
JB
27442014-01-01 Joel Brobecker <brobecker@adacore.com>
2745
2746 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2747 * gdbreplay.c (gdbreplay_version): Likewise.
2748
f45c82da
YZ
27492013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2750
2751 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2752 iov.iov_len with the real length in use.
2753
379a5e2d
JB
27542013-12-13 Joel Brobecker <brobecker@adacore.com>
2755
2756 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2757 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2758 for all targets that use win32-low.c.
2759 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2760 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2761
4210d83e
PA
27622013-12-13 Pedro Alves <palves@redhat.com>
2763
2764 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2765 if equal to TARGET_WAITKIND_LOADED.
2766 * win32-low.c (cached_status): New static global.
2767 (win32_wait): Add declaration.
2768 (do_initial_child_stuff): Flush all initial pending debug events
2769 up to the initial breakpoint.
2770 (win32_wait): If CACHED_STATUS was set, return that instead
2771 of doing a real wait. Remove the code resuming the execution
2772 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2773 during the initial phase. Also remove the code changing
2774 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2775 TARGET_WAITKIND_STOPPED.
2776
e7f0d979
YQ
27772013-12-11 Yao Qi <yao@codesourcery.com>
2778
2779 * notif.c (handle_notif_ack): Return 0 if no notification
2780 matches.
2781
ebcf782c
DE
27822013-11-20 Doug Evans <dje@google.com>
2783
2784 * linux-low.c (linux_set_resume_request): Fix comment.
2785
20ad9378
DE
27862013-11-20 Doug Evans <dje@google.com>
2787
2788 * linux-low.c (resume_status_pending_p): Tweak comment.
2789
a196ebeb
WT
27902013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2791
2792 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2793 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2794 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2795 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2796 (srv_amd64_regobj): Add amd64-mpx.o.
2797 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2798 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2799 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2800 * i387-fp.c (num_pl_bnd_register) Added constant.
2801 (num_pl_bnd_cfg_registers) Added constant.
2802 (struct i387_xsave) Added reserved area and MPX fields.
2803 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2804 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2805 function.
2806 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2807 (init_registers_amd64_mpx_linux): Declare new function.
2808 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2809 (x86_64_regmap): Add MPX registers.
2810 (x86_linux_read_description): Add MPX case.
2811 (initialize_low_arch): Initialize MPX targets.
2812
0080a2f6
TT
28132013-11-18 Tom Tromey <tromey@redhat.com>
2814
2815 * configure: Rebuild.
2816 * configure.ac: Don't check for stdlib.h.
2817 * gdbreplay.c: Unconditionally include stdlib.h.
2818
2978b111
TT
28192013-11-18 Tom Tromey <tromey@redhat.com>
2820
2821 * config.in: Rebuild.
2822 * configure: Rebuild.
2823 * configure.ac: Don't use AC_HEADER_DIRENT.
2824
a3d08894
TT
28252013-11-18 Tom Tromey <tromey@redhat.com>
2826
2827 * server.h: Don't check HAVE_STRING_H.
2828 * gdbreplay.c: Don't check HAVE_STRING_H.
2829 * configure: Rebuild.
2830
0a5dd17d
TT
28312013-11-18 Tom Tromey <tromey@redhat.com>
2832
2833 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2834 LIBGNU.
2835
1bd2f0ba
TT
28362013-11-08 Tom Tromey <tromey@redhat.com>
2837
2838 * configure, config.in: Rebuild.
2839 * configure.ac: Remove unused configury.
2840
3266f10b
TT
28412013-11-08 Tom Tromey <tromey@redhat.com>
2842
2843 * acinclude.m4: Include common.m4, codeset.m4.
2844 * configure, config.in: Rebuild.
2845 * configure.ac: Use GDB_AC_COMMON.
2846
6682d959
AA
28472013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2848
2849 * linux-s390-low.c (HWCAP_S390_TE): New define.
2850 (s390_arch_setup): Consider the TE field in the HWCAP for
2851 determining 'have_regset_tdb'.
2852
fd0a4d76
SDJ
28532013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2854
2855 PR gdb/16014
2856 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2857 call to sizeof.
2858
1a3d890b
PA
28592013-10-02 Pedro Alves <palves@redhat.com>
2860
2861 * server.c (process_serial_event): Don't output "GDBserver
2862 exiting" if GDB is connected through stdio.
2863 * target.c (mywait): Likewise, be silent if GDB is connected
2864 through stdio.
2865
97ad4581
JB
28662013-10-01 Joel Brobecker <brobecker@adacore.com>
2867
2868 * lynx-low.c (lynx_add_threads_after_attach): New function.
2869 (lynx_attach): Remove call to add_thread. Add call to
2870 lynx_add_threads_after_attach instead.
2871
5b4e221c
MF
28722013-09-28 Mike Frysinger <vapier@gentoo.org>
2873
2874 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2875 * config.in, configure: Regenerated.
2876
ee47b2f8
YQ
28772013-09-18 Yao Qi <yao@codesourcery.com>
2878
2879 PR server/15959
2880 * server.c (start_inferior): Clear 'resume_info'.
2881
d6707650 28822013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2883
d6707650
JW
2884 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2885 for each register.
2886
9243dd0e 28872013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2888
9243dd0e
JW
2889 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2890 linux-tile-low.o to srv_tgtobj.
2891
c623a6ef
WN
28922013-09-16 Will Newton <will.newton@linaro.org>
2893
2894 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2895 out regs.
2896
fb71d39e
PA
28972013-09-06 Pedro Alves <palves@redhat.com>
2898
2899 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2900 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2901 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2902 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2903 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2904 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2905
8e7e9910
PA
29062013-09-06 Pedro Alves <palves@redhat.com>
2907
2908 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2909 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2910
7c3a12ca
PA
29112013-09-06 Pedro Alves <palves@redhat.com>
2912
2913 * linux-amd64-ipa.c: Include tracepoint.h.
2914 * linux-i386-ipa.c: Include tracepoint.h.
2915
8eb3d7b6
RW
29162013-09-06 Ricard Wanderlof <ricardw@axis.com>
2917
2918 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2919 (ps_get_thread_area): New function.
2920
eddddb9d
RW
29212013-09-06 Ricard Wanderlof <ricardw@axis.com>
2922
2923 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2924 (initialize_low_arch): Call init_registers_crisv32 rather than
2925 init_register_crisv32.
2926
533b0600
PA
29272013-09-05 Pedro Alves <palves@redhat.com>
2928
2929 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2930 to ...
2931 * hostio.h: ... this new file.
2932 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2933 win32-low.c: Include hostio.h.
2934
0ce3d3b5
PA
29352013-09-05 Pedro Alves <palves@redhat.com>
2936
2937 * server.h (gdb_client_data, handler_func, callback_handler_func)
2938 (delete_file_handler, add_file_handler, append_callback_event)
2939 (delete_callback_event, start_event_loop, initialize_event_loop):
2940 Move to event-loop.h and include it.
2941 * event-loop.h: New file.
2942
799cdc37
PA
29432013-09-05 Pedro Alves <palves@redhat.com>
2944
2945 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2946 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2947 (loaded_dll, unloaded_dll): Move to ...
2948 * dll.h: ... this new file.
2949 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2950
6a6bbd9d
PA
29512013-09-05 Pedro Alves <palves@redhat.com>
2952
2953 * server.h (current_process, get_thread_process, all_processes)
2954 (add_inferior_to_list, for_each_inferior, current_inferior)
2955 (remove_inferior, add_process, remove_process, find_process_pid)
2956 (have_started_inferiors_p, have_attached_inferiors_p)
2957 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2958 (clear_inferiors, find_inferior, find_inferior_id)
2959 (inferior_target_data, set_inferior_target_data)
2960 (inferior_regcache_data, set_inferior_regcache_data): Move to
2961 inferiors.h, and include it.
2962 * inferiors.h: New file.
2963
f699aaba
PA
29642013-09-05 Pedro Alves <palves@redhat.com>
2965
2966 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2967 Move ...
72f4393d 2968 * ax.h: ... here.
f699aaba 2969
c144c7a0
PA
29702013-09-05 Pedro Alves <palves@redhat.com>
2971
2972 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2973 tracepoint.h.
2974 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2975 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2976 (handle_tracepoint_general_set, handle_tracepoint_query)
2977 (tracepoint_finished_step, tracepoint_was_hit)
2978 (release_while_stepping_state_list, current_traceframe)
2979 (in_readonly_region, traceframe_read_mem)
2980 (fetch_traceframe_registers, traceframe_read_sdata)
2981 (traceframe_read_info, struct fast_tpoint_collect_status)
2982 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2983 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2984 (supply_fast_tracepoint_registers)
2985 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2986 (ipa_tdesc, claim_trampoline_space)
2987 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2988 (agent_mem_read, agent_get_trace_state_variable_value)
2989 (agent_set_trace_state_variable_value, agent_tsv_read)
2990 (agent_mem_read_string, get_raw_reg_func_addr)
2991 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2992 * tracepoint.h: ... this new file.
2993
ff42e6ab
PA
29942013-09-05 Pedro Alves <palves@redhat.com>
2995
2996 * server.h (perror_with_name, error, fatal, warning, paddress)
2997 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2998 include it.
2999 * utils.h: New file.
3000
541af0f4
PA
30012013-09-05 Pedro Alves <palves@redhat.com>
3002
3003 * server.h (remote_debug, noack_mode, transport_is_reliable)
3004 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3005 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3006 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3007 (write_enn, initialize_async_io, enable_async_io)
3008 (disable_async_io, check_remote_input_interrupt_request)
3009 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3010 (dead_thread_notify, prepare_resume_reply)
3011 (decode_address_to_semicolon, decode_address, decode_m_packet)
3012 (decode_M_packet, decode_X_packet, decode_xfer_write)
3013 (decode_search_memory_packet, unhexify, hexify)
3014 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3015 (look_up_one_symbol, relocate_instruction)
3016 (monitor_output): Move to remote-utils.h, and include it.
3017 * remote-utils.h: New file.
3018
eebdf26b
PA
30192013-09-05 Pedro Alves <palves@redhat.com>
3020
3021 * server.h (_): Delete.
3022
3aafd2ff
PA
30232013-09-02 Pedro Alves <palves@redhat.com>
3024
3025 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3026 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3027 allocated.
3028 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3029
cee83bcb
PM
30302013-09-02 Pierre Muller <muller@sourceware.org>
3031
3032 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3033 or WriteProcessMemory complete successfully and handle
3034 ERROR_PARTIAL_COPY error.
3035
9a13b2fa
PA
30362013-09-02 Pedro Alves <palves@redhat.com>
3037
3038 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3039 error instead of EIO.
3040
602e3198
JK
30412013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3042
3043 PR server/15604
3044 * linux-low.c: Include filestuff.h.
3045 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3046 * lynx-low.c: Include filestuff.h.
3047 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3048 * server.c: Include filestuff.h.
3049 (main): Call notice_open_fds.
3050 * spu-low.c: Include filestuff.h.
3051 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3052
96d7229d
LM
30532013-08-22 Luis Machado <lgustavo@codesourcery.com>
3054
3055 * Makefile.in: Explain why ../target and ../nat are not
3056 listed as include file search paths.
3057 (linux-waitpid.o): New object file rule.
3058 * configure.srv (srv_native_linux_obj): New variable.
3059 Replace all occurrences of linux native object files with
3060 $srv_native_linux_obj.
3061 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3062 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3063 (linux_enable_event_reporting): Remove declaration.
3064 (my_waitpid): Moved to common/linux-waitpid.c.
3065 (linux_wait_for_event): Pass ptid when calling
3066 linux_enable_event_reporting.
3067 (linux_supports_tracefork_flag): Remove.
3068 (linux_enable_event_reporting): Likewise.
3069 (linux_tracefork_grandchild): Remove.
3070 (STACK_SIZE): Moved to common/linux-ptrace.c.
3071 (linux_tracefork_child): Remove.
3072 (linux_test_for_tracefork): Remove.
3073 (linux_look_up_symbols): Call linux_supports_traceclone.
3074 (initialize_low): Remove call to linux_test_for_tracefork.
3075 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3076 common/linux-ptrace.h.
3077 (PTRACE_TYPE_ARG4): Likewise.
3078 Include linux-ptrace.h.
3079
32940073
PA
30802013-08-21 Pedro Alves <palves@redhat.com>
3081
3082 * config.in: Renegerate.
3083
33b60d58 30842013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 3085
33b60d58
LM
3086 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3087 (SFILES): Remove $(srcdir)/common/target-common.c and
3088 add $(srcdir)/target/waitstatus.c.
3089 (OBS): Remove target-common.o and add waitstatus.o.
3090 (server_h): Remove $(srcdir)/../common/target-common.h and
3091 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3092 and $(srcdir)/../target/waitstatus.h.
3093 (target-common.o): Remove.
3094 (waitstatus.o): New target object file.
3095 * target.h: Do not include target-common.h and
3096 include target/resume.h, target/wait.h and
3097 target/waitstatus.h.
3098
b8e1b30e
LM
30992013-08-13 Luis Machado <lgustavo@codesourcery.com>
3100
3101 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3102 to PTRACE_TYPE_ARG3.
3103 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3104 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3105 PTRACE_TYPE_ARG4.
3106 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3107 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3108
7a60ad40
YQ
31092013-07-27 Jie Zhang <jie@codesourcery.com>
3110 Daniel Jacobowitz <dan@codesourcery.com>
3111 Yao Qi <yao@codesourcery.com>
3112
3113 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3114 (mips-linux-watch.o): New rule.
3115 (mips_linux_watch_h): New variable.
3116 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3117 srv_tgtobj.
3118 * linux-mips-low.c: Include mips-linux-watch.h.
3119 (struct arch_process_info, struct arch_lwp_info): New.
3120 (update_watch_registers_callback): New function.
3121 (mips_linux_new_process, mips_linux_new_thread) New functions.
3122 (mips_linux_prepare_to_resume, mips_insert_point): New
3123 functions.
3124 (mips_remove_point, mips_stopped_by_watchpoint): New
3125 functions.
3126 (rsp_bp_type_to_target_hw_bp_type): New function.
3127 (mips_stopped_data_address): New function.
3128 (the_low_target): Add watchpoint support functions.
3129
de6f69ad
YQ
31302013-07-27 Yao Qi <yao@codesourcery.com>
3131
3132 * i386-low.c: Include break-common.h.
3133 (enum target_hw_bp_type): Remove.
3134
3360c0bf
LM
31352013-07-24 Luis Machado <lgustavo@codesourcery.com>
3136
3137 * Makefile.in (SFILES): /common/target-common.c.
3138 (OBS): Add target-common.o.
3139 (server_h): Add $(srcdir)/../common/target-common.h.
3140 (target-common.o): New target.
3141 * server.c (queue_stop_reply_callback): Free
3142 status string after use.
3143 * target.c (target_waitstatus_to_string): Remove.
3144 * target.h: Include target-common.h.
3145 (resume_kind): Likewise.
3146 (target_waitkind): Likewise.
3147 (target_waitstatus): Likewise.
3148 (TARGET_WNOHANG): Likewise.
3149
bd885420
YQ
31502013-07-04 Yao Qi <yao@codesourcery.com>
3151
3152 * Makefile.in (host_alias): Use @host_noncanonical@.
3153 (target_alias): Use @target_noncanonical@.
3154 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3155 ACX_NONCANONICAL_HOST.
3156 * configure: Regenerated.
3157
3158 Revert:
3159 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3160
3161 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3162 * configure: Rebuild.
3163 * Makefile.in (version_host, version_target): Get from configure.
3164 (version.c): Use $(version_host) and $(version_target).
3165
17ef446e
PA
31662013-07-03 Pedro Alves <palves@redhat.com>
3167
3168 * Makefile.in (config.status): Depend on development.sh.
3169 * acinclude.m4: Include libmcheck.m4.
3170 * configure: Regenerate.
3171
7a9a7487
MG
31722013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3173
3174 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3175 attribute inside the parentheses.
3176 (winapi_DebugSetProcessKillOnExit): Ditto.
3177 (winapi_DebugBreakProcess): Ditto.
3178 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 3179
49b64de6
MG
31802013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3181
3182 * notif.h (notif_event): Add a dummy member to avoid compiler
3183 errors.
3184
d5749ee7
PA
31852013-07-01 Pedro Alves <palves@redhat.com>
3186
3187 * hostio.c (HOSTIO_PATH_MAX): Define.
3188 (require_filename, handle_open, handle_unlink, handle_readlink):
3189 Use it.
3190
d8d2a3ee
PA
31912013-07-01 Pedro Alves <palves@redhat.com>
3192
3193 * server.h: Include "pathmax.h".
3194 * linux-low.c: Don't include sys/param.h.
3195 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3196 MAXPATHLEN.
3197 * win32-low.c: Don't include sys/param.h.
3198 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3199
bc7dea8d
PA
32002013-07-01 Pedro Alves <palves@redhat.com>
3201
3202 * event-loop.c: Don't check HAVE_UNISTD_H before including
3203 <unistd.h>.
3204 * gdbreplay.c: Likewise.
3205 * remote-utils.c: Likewise.
3206 * server.c: Likewise.
3207 * configure.ac: Don't check for unistd.h.
3208 * configure: Regenerate.
3209
d6c2da54
TT
32102013-06-28 Tom Tromey <tromey@redhat.com>
3211
3212 * Makefile.in (version.c): Use version.in, not
3213 common/version.in.
3214
257b6bec
MG
32152013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3216
3217 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3218 * configure: Rebuild.
3219 * Makefile.in (version_host, version_target): Get from configure.
3220 (version.c): Use $(version_host) and $(version_target).
3221
86ebe149
DK
32222013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3223
3224 Fix trace-status to output user name without trailing colon.
3225 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3226
f30aa5af
DK
32272013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3228
3229 Fix trace-status to output proper start-time and stop-time.
3230 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3231 output start time and stop time in hex as gdb expects.
3232
28a93511
YQ
32332013-06-26 Pedro Alves <pedro@codesourcery.com>
3234
3235 * tracepoint.c (build_traceframe_info_xml): Output trace state
3236 variables present in the trace buffer.
3237
01208463
TT
32382013-06-24 Tom Tromey <tromey@redhat.com>
3239
3240 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3241 create-version.sh.
3242 (version.o): Remove.
3243 * gdbreplay.c: Include version.h.
3244 (version, host_name): Don't declare.
3245 * server.h: Include version.h.
3246 (version, host_name): Don't declare.
3247
760256f9
PA
32482013-06-12 Pedro Alves <palves@redhat.com>
3249
3250 * linux-x86-low.c (linux_is_elf64): Delete global.
3251 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3252 with local linux_pid_exe_is_elf_64_file use.
3253
030031ee
PA
32542013-06-11 Pedro Alves <palves@redhat.com>
3255
3256 * linux-low.c (regset_disabled, disable_regset): New functions.
3257 (regsets_fetch_inferior_registers)
3258 (regsets_store_inferior_registers): Use them.
3259 (initialize_regsets_info); Don't allocate the disabled_regsets
3260 array here.
3261 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3262 comment.
3263
5da6eb0a
PA
32642013-06-11 Pedro Alves <palves@redhat.com>
3265
3266 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3267 xmalloc.
3268
7e5aaa09
PA
32692013-06-11 Pedro Alves <palves@redhat.com>
3270
3271 * linux-x86-low.c (initialize_low_arch): Call
3272 init_registers_x32_avx_linux.
3273
d878444c
JK
32742013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3275
3276 Fix compatibility with Android Bionic.
3277 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3278 it is not empty.
3279
3aee8918
PA
32802013-06-07 Pedro Alves <palves@redhat.com>
3281
5f2b57b5 3282 PR server/14823
3aee8918
PA
3283 * Makefile.in (OBS): Add tdesc.o.
3284 (IPA_OBJS): Add tdesc-ipa.o.
3285 (tdesc-ipa.o): New rule.
3286 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3287 interface.
3288 * linux-low.c (new_inferior): Delete.
3289 (disabled_regsets, num_regsets): Delete.
3290 (linux_add_process): Adjust to set the new per-process
3291 new_inferior flag.
3292 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3293 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3294 was a stop. When calling arch_setup, switch the current inferior
3295 to the thread that got an event.
3296 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3297 (regsets_fetch_inferior_registers)
3298 (regsets_store_inferior_registers): New regsets_info parameter.
3299 Adjust to use it.
3300 (linux_register_in_regsets): New regs_info parameter. Adjust to
3301 use it.
3302 (register_addr, fetch_register, store_register): New usrregs_info
3303 parameter. Adjust to use it.
3304 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3305 parameter regs_info. Adjust to use it.
3306 (linux_fetch_registers): Get the current inferior's regs_info, and
3307 adjust to use it.
3308 (linux_store_registers): Ditto.
3309 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3310 (initialize_low): Don't initialize the target_regsets here. Call
3311 initialize_low_arch.
3312 * linux-low.h (target_regsets): Delete declaration.
3313 (struct regsets_info): New.
3314 (struct usrregs_info): New.
3315 (struct regs_info): New.
3316 (struct process_info_private) <new_inferior>: New field.
3317 (struct linux_target_ops): Delete the num_regs, regmap, and
3318 regset_bitmap fields. New field regs_info.
3319 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3320 * i387-fp.c (num_xmm_registers): Delete.
3321 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3322 calls to new interface.
3323 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3324 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3325 Infer the number of xmm registers from the regcache's target
3326 description.
3327 * i387-fp.h (num_xmm_registers): Delete.
3328 * inferiors.c (add_thread): Don't install the thread's regcache
3329 here.
3330 * proc-service.c (gregset_info): Fetch the current inferior's
3331 regs_info. Adjust to use it.
3332 * regcache.c: Include tdesc.h.
3333 (register_bytes, reg_defs, num_registers)
3334 (gdbserver_expedite_regs): Delete.
3335 (get_thread_regcache): If the thread doesn't have a regcache yet,
3336 create one, instead of aborting gdbserver.
3337 (regcache_invalidate_one): Rename to ...
3338 (regcache_invalidate_thread): ... this.
3339 (regcache_invalidate_one): New.
3340 (regcache_invalidate): Only invalidate registers of the current
3341 process.
3342 (init_register_cache): Add target_desc parameter, and use it.
3343 (new_register_cache): Ditto. Assert the target description has a
3344 non zero registers_size.
3345 (regcache_cpy): Add assertions. Adjust.
3346 (realloc_register_cache, set_register_cache): Delete.
3347 (registers_to_string, registers_from_string): Adjust.
3348 (find_register_by_name, find_regno, find_register_by_number)
3349 (register_cache_size): Add target_desc parameter, and use it.
3350 (free_register_cache_thread, free_register_cache_thread_one)
3351 (regcache_release, register_cache_size): New.
3352 (register_size): Add target_desc parameter, and use it.
3353 (register_data, supply_register, supply_register_zeroed)
3354 (supply_regblock, supply_register_by_name, collect_register)
3355 (collect_register_as_string, collect_register_by_name): Adjust.
3356 * regcache.h (struct target_desc): Forward declare.
3357 (struct regcache) <tdesc>: New field.
3358 (init_register_cache, new_register_cache): Add target_desc
3359 parameter.
3360 (regcache_invalidate_thread): Declare.
3361 (regcache_invalidate_one): Delete declaration.
3362 (regcache_release): Declare.
3363 (find_register_by_number, register_cache_size, register_size)
3364 (find_regno): Add target_desc parameter.
3365 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3366 declarations.
3367 * remote-utils.c: Include tdesc.h.
3368 (outreg, prepare_resume_reply): Adjust.
3369 * server.c: Include tdesc.h.
3370 (gdbserver_xmltarget): Delete declaration.
3371 (get_features_xml, process_serial_event): Adjust.
3372 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3373 declare.
3374 (struct process_info) <tdesc>: New field.
3375 (ipa_tdesc): Declare.
3376 * tdesc.c: New file.
3377 * tdesc.h: New file.
3378 * tracepoint.c: Include tdesc.h.
3379 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3380 (get_context_regcache): Adjust to pass ipa_tdesc down.
3381 (do_action_at_tracepoint): Adjust to get the register cache size
3382 from the context regcache's description.
3383 (traceframe_walk_blocks): Adjust to get the register cache size
3384 from the current trace frame's description.
3385 (traceframe_get_pc): Adjust to get current trace frame's
3386 description and pass it down.
3387 (gdb_collect): Adjust to get the register cache size from the
3388 IPA's description.
3389 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3390 (gdbserver_xmltarget): Delete.
3391 (initialize_low_tracepoint): Set the ipa's target description.
3392 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3393 (initialize_low_tracepoint): Set the ipa's target description.
3394 * linux-x86-low.c: Include tdesc.h.
3395 [__x86_64__] (is_64bit_tdesc): New.
3396 (ps_get_thread_area, x86_get_thread_area): Use it.
3397 (i386_cannot_store_register): Rename to ...
3398 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3399 (i386_cannot_fetch_register): Rename to ...
3400 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3401 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3402 to new interface.
3403 (target_regsets): Rename to ...
3404 (x86_regsets): ... this.
3405 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3406 interface.
3407 (x86_siginfo_fixup): Use is_64bit_tdesc.
3408 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3409 (tdesc_x32_avx_linux, tdesc_x32_linux)
3410 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3411 Declare.
3412 (x86_linux_update_xmltarget): Delete.
3413 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3414 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3415 (AMD64_LINUX_USER64_CS): New.
3416 (x86_linux_read_description): New, based on
3417 x86_linux_update_xmltarget.
3418 (same_process_callback): New.
3419 (x86_arch_setup_process_callback): New.
3420 (x86_linux_update_xmltarget): New.
3421 (x86_regsets_info): New.
3422 (amd64_linux_regs_info): New.
3423 (i386_linux_usrregs_info): New.
3424 (i386_linux_regs_info): New.
3425 (x86_linux_regs_info): New.
3426 (x86_arch_setup): Reimplement.
3427 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3428 (x86_emit_ops): Ditto.
3429 (the_low_target): Adjust. Install x86_linux_regs_info,
3430 x86_cannot_fetch_register, and x86_cannot_store_register.
3431 (initialize_low_arch): New.
3432 * linux-ia64-low.c (tdesc_ia64): Declare.
3433 (ia64_fetch_register): Adjust.
3434 (ia64_usrregs_info, regs_info): New globals.
3435 (ia64_regs_info): New function.
3436 (the_low_target): Adjust.
3437 (initialize_low_arch): New function.
3438 * linux-sparc-low.c (tdesc_sparc64): Declare.
3439 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3440 Adjust.
3441 (sparc_arch_setup): New function.
3442 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3443 (the_low_target): Adjust.
3444 (initialize_low_arch): New function.
3445 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3446 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3447 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3448 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3449 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3450 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3451 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3452 (tdesc_powerpc_isa205_vsx64l): Declare.
3453 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3454 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3455 (ppc_set_pc, ppc_get_hwcap): Adjust.
3456 (ppc_usrregs_info): Forward declare.
3457 (!__powerpc64__) ppc_regmap_adjusted: New global.
3458 (ppc_arch_setup): Adjust to the current process'es target
3459 description.
3460 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3461 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3462 (ppc_store_evrregset): Adjust.
3463 (target_regsets): Rename to ...
3464 (ppc_regsets): ... this, and make static.
3465 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3466 (ppc_regs_info): New function.
3467 (the_low_target): Adjust.
3468 (initialize_low_arch): New function.
3469 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3470 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3471 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3472 (tdesc_s390x_linux64v2): Declare.
3473 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3474 (s390_fill_gregset, s390_store_last_break): Adjust.
3475 (target_regsets): Rename to ...
3476 (s390_regsets): ... this, and make static.
3477 (s390_get_pc, s390_set_pc): Adjust.
3478 (s390_get_hwcap): New target_desc parameter, and use it.
3479 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3480 (s390_arch_setup): Adjust to set the current process'es target
3481 description. Don't adjust the regmap.
3482 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3483 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3484 (regs_info_3264): New globals.
3485 (s390_regs_info): New function.
3486 (the_low_target): Adjust.
3487 (initialize_low_arch): New function.
3488 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3489 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3490 [__mips64] (init_registers_mips_linux)
3491 (init_registers_mips_dsp_linux): Delete defines.
3492 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3493 (have_dsp): New global.
3494 (mips_read_description): New, based on mips_arch_setup.
3495 (mips_arch_setup): Reimplement.
3496 (get_usrregs_info): New function.
3497 (mips_cannot_fetch_register, mips_cannot_store_register)
3498 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3499 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3500 (target_regsets): Rename to ...
3501 (mips_regsets): ... this, and make static.
3502 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3503 (dsp_regs_info, regs_info): New globals.
3504 (mips_regs_info): New function.
3505 (the_low_target): Adjust.
3506 (initialize_low_arch): New function.
3507 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3508 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3509 Declare.
3510 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3511 (arm_read_description): New, with bits factored from
3512 arm_arch_setup.
3513 (arm_arch_setup): Reimplement.
3514 (target_regsets): Rename to ...
3515 (arm_regsets): ... this, and make static.
3516 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3517 (arm_regs_info): New function.
3518 (the_low_target): Adjust.
3519 (initialize_low_arch): New function.
3520 * linux-m68k-low.c (tdesc_m68k): Declare.
3521 (target_regsets): Rename to ...
3522 (m68k_regsets): ... this, and make static.
3523 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3524 (m68k_regs_info): New function.
3525 (m68k_arch_setup): New function.
3526 (the_low_target): Adjust.
3527 (initialize_low_arch): New function.
3528 * linux-sh-low.c (tdesc_sharch): Declare.
3529 (target_regsets): Rename to ...
3530 (sh_regsets): ... this, and make static.
3531 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3532 (sh_regs_info, sh_arch_setup): New functions.
3533 (the_low_target): Adjust.
3534 (initialize_low_arch): New function.
3535 * linux-bfin-low.c (tdesc_bfin): Declare.
3536 (bfin_arch_setup): New function.
3537 (bfin_usrregs_info, regs_info): New globals.
3538 (bfin_regs_info): New function.
3539 (the_low_target): Adjust.
3540 (initialize_low_arch): New function.
3541 * linux-cris-low.c (tdesc_cris): Declare.
3542 (cris_arch_setup): New function.
3543 (cris_usrregs_info, regs_info): New globals.
3544 (cris_regs_info): New function.
3545 (the_low_target): Adjust.
3546 (initialize_low_arch): New function.
3547 * linux-cris-low.c (tdesc_crisv32): Declare.
3548 (cris_arch_setup): New function.
3549 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3550 (cris_regs_info): New function.
3551 (the_low_target): Adjust.
3552 (initialize_low_arch): New function.
3553 * linux-m32r-low.c (tdesc_m32r): Declare.
3554 (m32r_arch_setup): New function.
3555 (m32r_usrregs_info, regs_info): New globals.
3556 (m32r_regs_info): Adjust.
3557 (initialize_low_arch): New function.
3558 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3559 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3560 (tic6x_usrregs_info): Forward declare.
3561 (tic6x_read_description): New function, based on ...
3562 (tic6x_arch_setup): ... this. Reimplement.
3563 (target_regsets): Rename to ...
3564 (tic6x_regsets): ... this, and make static.
3565 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3566 (tic6x_regs_info): New function.
3567 (the_low_target): Adjust.
3568 (initialize_low_arch): New function.
3569 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3570 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3571 (target_regsets): Rename to ...
3572 (xtensa_regsets): ... this, and make static.
3573 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3574 globals.
3575 (xtensa_arch_setup, xtensa_regs_info): New functions.
3576 (the_low_target): Adjust.
3577 (initialize_low_arch): New function.
3578 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3579 (nios2_arch_setup): Set the current process'es tdesc.
3580 (target_regsets): Rename to ...
3581 (nios2_regsets): ... this.
3582 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3583 (nios2_regs_info): New function.
3584 (the_low_target): Adjust.
3585 (initialize_low_arch): New function.
a261b8f5
PA
3586 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3587 (aarch64_arch_setup): Set the current process'es tdesc.
3588 (target_regsets): Rename to ...
3589 (aarch64_regsets): ... this.
3590 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3591 (aarch64_regs_info): New function.
3592 (the_low_target): Adjust.
3593 (initialize_low_arch): New function.
3aee8918
PA
3594 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3595 globals.
3596 (target_regsets): Rename to ...
3597 (tile_regsets): ... this.
3598 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3599 (tile_regs_info): New function.
3600 (tile_arch_setup): Set the current process'es tdesc.
3601 (the_low_target): Adjust.
3602 (initialize_low_arch): New function.
3603 * spu-low.c (tdesc_spu): Declare.
3604 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3605 * win32-arm-low.c (tdesc_arm): Declare.
3606 (arm_arch_setup): New function.
3607 (the_low_target): Install arm_arch_setup instead of
3608 init_registers_arm.
3609 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3610 (init_windows_x86): Rename to ...
3611 (i386_arch_setup): ... this. Set `win32_tdesc'.
3612 (the_low_target): Adjust.
3613 * win32-low.c (win32_tdesc): New global.
3614 (child_add_thread): Don't create the thread cache here.
3615 (do_initial_child_stuff): Set the new process'es tdesc.
3616 * win32-low.h (struct target_desc): Forward declare.
3617 (win32_tdesc): Declare.
3618 * lynx-i386-low.c (tdesc_i386): Declare global.
3619 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3620 * lynx-low.c (lynx_tdesc): New global.
3621 (lynx_add_process): Set the new process'es tdesc.
3622 * lynx-low.h (struct target_desc): Forward declare.
3623 (lynx_tdesc): Declare global.
3624 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3625 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3626 * nto-low.c (nto_tdesc): New global.
3627 (do_attach): Set the new process'es tdesc.
3628 * nto-low.h (struct target_desc): Forward declare.
3629 (nto_tdesc): Declare.
3630 * nto-x86-low.c (tdesc_i386): Declare.
3631 (nto_x86_arch_setup): Set `nto_tdesc'.
3632
b1fbec62
GB
36332013-06-04 Gary Benson <gbenson@redhat.com>
3634
3635 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3636 to qSupported response when appropriate.
3637 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3638 with nonzero-length annex.
3639 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3640 arguments supplied in annex.
3641
d1ec4ce7
DE
36422013-05-31 Doug Evans <dje@google.com>
3643
ac44adcb 3644 PR server/15594
d1ec4ce7
DE
3645 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3646 64 bits in 64-cross-32 environment.
3647
9b25f2d3
PA
36482013-05-28 Pedro Alves <palves@redhat.com>
3649
3650 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3651 (aarch64-without-fpu.c): Delete rule.
3652 * configure.srv (aarch64*-*-linux*): Remove references to
3653 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3654 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3655 declaration.
3656
6740dc9c
PA
36572013-05-24 Pedro Alves <palves@redhat.com>
3658
3659 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3660 instead of strchr/decode_address. Error if the range isn't split
3661 with a ','. Don't assume there's be a ':' in the action.
3662
c2d6af84
PA
36632013-05-23 Yao Qi <yao@codesourcery.com>
3664 Pedro Alves <palves@redhat.com>
3665
3666 * linux-low.c (lwp_in_step_range): New function.
3667 (linux_wait_1): If the thread was range stepping and stopped
3668 outside the stepping range, report the stop to GDB. Otherwise,
3669 continue stepping. Add range stepping debug output.
3670 (linux_set_resume_request): Copy the step range from the resume
3671 request to the lwp.
3672 (linux_supports_range_stepping): New.
3673 (linux_target_ops) <supports_range_stepping>: Set to
3674 linux_supports_range_stepping.
3675 * linux-low.h (struct linux_target_ops)
3676 <supports_range_stepping>: New field.
3677 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3678 * linux-x86-low.c (x86_supports_range_stepping): New.
3679 (the_low_target) <supports_range_stepping>: Set to
3680 x86_supports_range_stepping.
3681 * server.c (handle_v_cont): Handle 'r' action.
3682 (handle_v_requests): Append ";r" if the target supports range
3683 stepping.
3684 * target.h (struct thread_resume) <step_range_start,
3685 step_range_end>: New fields.
3686 (struct target_ops) <supports_range_stepping>:
3687 New field.
3688 (target_supports_range_stepping): New macro.
3689
58794e1a
JB
36902013-05-17 Joel Brobecker <brobecker@adacore.com>
3691
3692 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3693 confusion in comment.
3694
d631c5a7
JB
36952013-05-17 Joel Brobecker <brobecker@adacore.com>
3696
3697 * lynx-low.c (struct process_info_private): New type.
3698 (lynx_add_process): New function.
3699 (lynx_create_inferior, lynx_attach): Replace calls to
3700 add_process by calls to lynx_add_process.
3701 (lynx_resume): If PTID is null, then try using
3702 current_process()->private->last_wait_event_ptid.
3703 Add comments.
3704 (lynx_clear_inferiors): Delete. The contents of that function
3705 has been inlined in lynx_mourn;
3706 (lynx_wait_1): Save the ptid in the process's private data.
3707 (lynx_mourn): Free the process' private data. Replace call
3708 to lynx_clear_inferiors by call to clear_inferiors.
3709
96f7a20f
YQ
37102013-05-17 Yao Qi <yao@codesourcery.com>
3711
3712 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3713 the right place.
3714
db0dfaa0
LM
37152013-05-16 Luis Machado <lgustavo@codesourcery.com>
3716
3717 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3718 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3719 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3720 PT_TEXT_END_ADDR guards. Update comments.
3721 (linux_target_op) <read_offsets>: Conditionally define to
3722 linux_read_offsets if the target is UCLIBC and if it defines
3723 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3724
68f5f838
SL
37252013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3726 Andrew Jenner <andrew@codesourcery.com>
3727
3728 * Makefile.in (SFILES): Add linux-nios2-low.c.
3729 (clean): Add action to delete nios2-linux.c.
3730 (nios2-linux.c): New rule.
3731 * configure.srv: Add nios2*-*-linux*.
3732 * linux-nios2-low.c: New.
3733
1ebff1fd
HAQ
37342013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3735
3736 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3737
f6150862
HZ
37382013-04-25 Hui Zhu <hui@codesourcery.com>
3739
3740 PR gdb/15186
f6150862
HZ
3741 * ax.c (ax_printf): Add fflush.
3742
614c279d
TT
37432013-04-22 Tom Tromey <tromey@redhat.com>
3744
3745 * Makefile.in (SFILES): Add filestuff.c.
3746 (OBS): Add filestuff.o.
3747 (filestuff.o): New target.
3748 * config.in, configure: Rebuild.
3749 * configure.ac: Check for fdwalk, pipe2.
3750
7d4e5717
PA
37512013-04-17 Pedro Alves <palves@redhat.com>
3752
3753 * configure.ac (USE_THREAD_DB): Delete variable.
3754 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3755 Don't AC_SUBST USE_THREAD_DB.
3756 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3757 * config.in, configure: Regenerate.
3758
d5c93e41
PA
37592013-04-16 Pedro Alves <palves@redhat.com>
3760
3761 * linux-low.h (struct lwp_info) <thread_known>: Move under
3762 the USE_THREAD_DB #ifdef.
3763
04f5fe89
PA
37642013-04-16 Pedro Alves <palves@redhat.com>
3765
3766 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3767 (linux-low.o): Delete rule.
3768 * linux-low.h: Always include "gdb_thread_db.h" instead of
3769 conditionally including thread_db.h.
3770 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3771 HAVE_THREAD_DB_H.
3772
480b27bf
JK
37732013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3774
3775 * Makefile.in (install-only): Fix make install regression.
3776
43662968
JK
37772013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3778
3779 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3780 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3781 installation.
3782 * gdbserver.1: Remove.
3783
3e74e146
PA
37842013-03-22 Pedro Alves <palves@redhat.com>
3785
3786 * linux-low.c (handle_extended_wait): Don't call
3787 linux_enable_event_reporting.
3788
a8347a2a
TT
37892013-03-15 Tony Theodore <tonyt@logyst.com>
3790
3791 PR build/9098:
3792 * Makefile.in (SHELL): Use @SHELL@.
3793
eeb56fa7
SDJ
37942013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3795
3796 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3797 compiler warning.
3798
4fa7e2ff
JB
37992013-03-13 Joel Brobecker <brobecker@adacore.com>
3800
3801 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3802 Remove extraneous NULL element.
3803
8ddb1965
YQ
38042013-03-13 Yao Qi <yao@codesourcery.com>
3805
3806 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3807 'V' block in trace frame.
3808
9accd112
MM
38092013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3810
3811 * target.h (struct target_ops): Add btrace ops.
3812 (target_supports_btrace): New macro.
3813 (target_enable_btrace): New macro.
3814 (target_disable_btrace): New macro.
3815 (target_read_btrace): New macro.
3816 * gdbthread.h (struct thread_info): Add btrace field.
3817 * server.c: Include btrace-common.h.
3818 (handle_btrace_general_set): New function.
3819 (handle_btrace_enable): New function.
3820 (handle_btrace_disable): New function.
3821 (handle_general_set): Call handle_btrace_general_set.
3822 (handle_qxfer_btrace): New function.
3823 (struct qxfer qxfer_packets[]): Add btrace entry.
3824 * inferiors.c (remove_thread): Disable btrace.
3825 * linux-low: Include linux-btrace.h.
3826 (linux_low_enable_btrace): New function.
3827 (linux_low_read_btrace): New function.
3828 (linux_target_ops): Add btrace ops.
3829 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3830 Add srv_linux_btrace=yes.
3831 (x86_64-*-linux*): Add linux-btrace.o.
3832 Add srv_linux_btrace=yes.
3833 * configure.ac: Define HAVE_LINUX_BTRACE.
3834 * config.in: Regenerated.
3835 * configure: Regenerated.
3836
5cc22e4c
MM
38372013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3838
3839 * server.c (handle_qxfer): Preserve error message if -3 is
3840 returned.
3841 (qxfer): Document the -3 return value.
3842
7c97f91e
MM
38432013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3844
3845 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3846 (linux_btrace_h): New variable.
3847 (linux-btrace.o): New rule.
3848
be9a119c 38492013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3850 Hafiz Abid Qadeer <abidh@codesourcery.com>
3851
3852 * tracepoint.c (trace_buffer_size): New global.
3853 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3854 (init_trace_buffer): Change to one-argument function. Allocate
3855 trace buffer memory.
3856 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3857 handle QTBuffer:size packet.
3858 (cmd_bigqtbuffer_size): New function.
3859 (initialize_tracepoint): Call init_trace_buffer with
3860 DEFAULT_TRACE_BUFFER_SIZE.
3861 * server.c (handle_query): Add QTBuffer:size in the
3862 supported packets.
3863
e64f7499
YQ
38642013-03-07 Yao Qi <yao@codesourcery.com>
3865
3866 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3867 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3868 of -1.
3869 (cmd_qtsp): Adjust condition. Do post increment.
3870 Set cur_action and cur_step_action back to 0.
3871
f0ae6fc3
PA
38722013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3873
3874 PR server/15236
3875 * linux-low.c (linux_write_memory): Return early success if LEN is
3876 zero.
3877
b5b0b0af
CV
38782013-03-05 Corinna Vinschen <vinschen@redhat.de>
3879
334ad4a8 3880 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3881
589bc927
TT
38822013-02-28 Tom Tromey <tromey@redhat.com>
3883
3884 * configure.ac: Invoke AC_SYS_LARGEFILE.
3885 * configure, config.in: Rebuild.
3886
dfe07582
CV
38872013-02-28 Corinna Vinschen <vinschen@redhat.com>
3888
3889 * win32-low.c: Throughout, fix format strings and casts of
3890 printf-like functions to avoid type related warnings on all
3891 platforms.
3892 (get_child_debug_event): Print dwDebugEventCode as hex since
3893 that's how it's usually documented.
3894
736cd585
YQ
38952013-02-28 Yao Qi <yao@codesourcery.com>
3896
3897 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3898 pulongest.
3899
e1f58301
JW
39002013-02-27 Jiong Wang <jiwang@tilera.com>
3901
3902 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3903 (reg-tilegx32.c): New rule.
3904 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3905 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3906 different register info initializer according to elf class.
3907 (init_registers_tilgx32): New function. The tilegx32 register info
3908 initializer.
3909 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3910 (tile_store_gregset): Likewise.
3911
d171ca78
YQ
39122013-02-27 Yao Qi <yao@codesourcery.com>
3913
3914 * server.c (process_point_options): Print debug message when
3915 debug_threads is true.
3916
282bbdf3
YQ
39172013-02-26 Yao Qi <yao@codesourcery.com>
3918
3919 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3920
aca22551
PA
39212013-02-19 Pedro Alves <palves@redhat.com>
3922 Kai Tietz <ktietz@redhat.com>
3923
3924 PR gdb/15161
3925
3926 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3927 instead of strtoul to extract address from packet.
3928 (process_serial_event) <'z'>: Likewise.
3929
4f3cee1c
YQ
39302013-02-18 Yao Qi <yao@codesourcery.com>
3931
3932 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3933
8e1d55a3
PA
39342013-02-14 Pedro Alves <palves@redhat.com>
3935
3936 Plug memory leak.
3937
3938 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3939 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3940
458820da
PA
39412013-02-14 Pedro Alves <palves@redhat.com>
3942
3943 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3944
baea0dae
PA
39452013-02-14 Pedro Alves <palves@redhat.com>
3946
3947 * tracepoint.c (save_string): Delete.
3948 (add_tracepoint_action): Use savestring instead of save_string.
3949
0b1afbb3
PA
39502013-02-12 Pedro Alves <palves@redhat.com>
3951
3952 * linux-xtensa-low.c: Ditto.
3953 * xtensa-xtregs.c: Ditto.
3954
8a4ac37e
PA
39552013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3956
3957 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3958 thread_db.
3959
148de6bb
MS
39602013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3961
3962 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3963 aarch64_num_wp_regs and aarch64_num_bp_regs to
3964 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3965
55fac6e0
MS
39662013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3967
3968 * linux-aarch64-low.c (ps_get_thread_area): Replace
3969 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3970
176eb98c
MS
39712013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3972 Marcus Shawcroft <marcus.shawcroft@arm.com>
3973 Nigel Stephens <nigel.stephens@arm.com>
3974 Yufeng Zhang <yufeng.zhang@arm.com>
3975
3976 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3977 (aarch64.c, aarch64-without-fpu.c): New targets.
3978 * configure.srv (aarch64*-*-linux*): New.
3979 * linux-aarch64-low.c: New file.
3980
56f7af9c
MS
39812013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3982
43aaf8b6 3983 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3984 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3985 (dequeue_one_deferred_signal, linux_resume_one_thread)
3986 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3987 (linux_tracefork_grandchild, linux_test_for_tracefork)
3988 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3989 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3990 where the argument is 0.
3991
60f662b0
YQ
39922013-01-25 Yao Qi <yao@codesourcery.com>
3993
3994 * event-loop.c: Include "queue.h".
3995 (gdb_event_p): New typedef.
3996 (struct gdb_event) <next_event>: Remove.
3997 (event_queue): Change to QUEUE(gdb_event_p).
3998 (async_queue_event): Remove.
3999 (gdb_event_xfree): New.
4000 (initialize_event_loop): New.
4001 (process_event): Use API from QUEUE.
4002 (wait_for_event): Likewise.
4003 * server.c (main): Call initialize_event_loop.
4004 * server.h (initialize_event_loop): Declare.
4005
5ae4861a
YQ
40062013-01-18 Yao Qi <yao@codesourcery.com>
4007
4008 * ax.h (struct eval_agent_expr_context): New.
4009 (gdb_eval_agent_expr): Update declaration.
4010 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4011 TFRAME. Add new argument CTX.
4012 * server.h (struct eval_agent_expr_context): Declare.
4013 (agent_mem_read, agent_tsv_read): Update declaration.
4014 (agent_mem_read_string): Likewise.
4015 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4016 (add_traceframe_block): Add new argument TPOINT.
4017 Increase TPOINT->traceframe_usage.
4018 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4019 eval_tracepoint_agent_expr.
4020 (condition_true_at_tracepoint): Likewise.
4021 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4022 (agent_mem_read_string, agent_tsv_read): Likewise.
4023
85e00e85
YQ
40242013-01-16 Yao Qi <yao@codesourcery.com>
4025
4026 * linux-low.c (linux_resume_one_lwp): Don't check
4027 'lwp->bp_reinsert != 0'.
4028
4039cf45
JB
40292013-01-07 Joel Brobecker <brobecker@adacore.com>
4030 Pedro Alves <palves@redhat.com>
4031
4032 * lynx-low.c (ptrace_request_to_str): Define a temporary
4033 macro and use it to simplify this function's implementation.
4034
9044dee2
JB
40352013-01-07 Joel Brobecker <brobecker@adacore.com>
4036
4037 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4038 sets errno.
4039
e6352c8f
JB
40402013-01-07 Joel Brobecker <brobecker@adacore.com>
4041
4042 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4043
50681a27
JB
40442013-01-07 Joel Brobecker <brobecker@adacore.com>
4045
4046 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4047
3f6e77ef
JB
40482013-01-07 Joel Brobecker <brobecker@adacore.com>
4049
4050 * lynx-low.c (lynx_resume): Use the resume_info parameter
4051 to determine the ptid for the lynx_ptrace call, unless
4052 it is equal to minus_one_ptid, in which case we use the
4053 ptid of the current_inferior.
4054 (lynx_wait_1): After having received a thread create/exit
4055 event, resume the inferior's execution using the signaling
4056 thread's ptid, rather than the old ptid.
4057
7fda33ae
JB
40582013-01-07 Joel Brobecker <brobecker@adacore.com>
4059
4060 * lynx-low.c (lynx_resume): Delete variable ret.
4061
b9786c74
JB
40622013-01-01 Joel Brobecker <brobecker@adacore.com>
4063
4064 * gdbreplay.c (gdbreplay_version): Update copyright year.
4065 * server.c (gdbserver_version): Likewise.
4066
8b93d60f
JB
40672012-12-17 Joel Brobecker <brobecker@adacore.com>
4068
4069 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4070 new thread.
4071
037335a7
JB
40722012-12-17 Joel Brobecker <brobecker@adacore.com>
4073
4074 * lynx-low.c (ptrace_request_to_str): Add handling for
4075 PTRACE_GETTRACESIG.
4076
52d4cbd8
JB
40772012-12-17 Joel Brobecker <brobecker@adacore.com>
4078
4079 * lynx-low.c (lynx_attach): Delete variable new_process.
4080
ab8f6ca9
JB
40812012-12-17 Joel Brobecker <brobecker@adacore.com>
4082
4083 * lynx-low.c (lynx_create_inferior): Delete variable
4084 new_process.
4085
78cbc024
JB
40862012-12-17 Joel Brobecker <brobecker@adacore.com>
4087
4088 * lynx-low.c (ptrace_request_to_str): Do not handle
4089 PTRACE_GETTHREADLIST if this macro does not exist.
4090
14a00470
YQ
40912012-12-15 Yao Qi <yao@codesourcery.com>
4092
4093 * Makefile.in (OBS): Add notif.o.
4094 * notif.c, notif.h: New.
4095 * server.c: Include "notif.h".
4096 (struct vstop_notif) <next>: Remove.
4097 <base>: New field.
4098 (queue_stop_reply): Update.
4099 (push_event, send_next_stop_reply): Remove.
4100 (discard_queued_stop_replies): Update.
4101 (notif_stop): New variable.
4102 (handle_v_stopped): Remove.
4103 (handle_v_requests): Don't call handle_v_stopped. Call
4104 handle_ack_notif instead.
4105 (queue_stop_reply_callback): Call notif_event_enque instead
4106 of queue_stop_reply.
4107 (handle_status): Don't call send_next_stop_reply, call
4108 notif_write_event instead.
4109 (kill_inferior_callback): Likewise.
4110 (detach_or_kill_inferior_callback): Likewise.
4111 (main): Call initialize_notif.
4112 (process_serial_event): Call QUEUE_is_empty.
4113 (handle_target_event): Call notif_push instead of push event.
4114 * server.h (push_event): Remove declaration.
4115
61c125b9
TT
41162012-12-10 Tom Tromey <tromey@redhat.com>
4117
4118 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4119 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4120 macros.
4121 (.c.o): Rewrite.
4122 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4123 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4124 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4125 (amd64-linux-ipa.o, ax.o): Rewrite.
4126 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4127 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4128 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4129 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4130 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4131 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4132 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4133 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4134 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4135 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4136 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4137 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4138 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4139 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4140 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4141 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4142 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4143 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4144 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4145 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4146 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4147 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4148 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4149 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4150 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4151 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4152 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4153 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4154 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4155 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4156 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4157 (reg-tilegx.o): Remove.
4158 (all_object_files): New macro.
4159 Include .deps files.
4160 * aclocal.m4, configure: Rebuild.
4161 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4162 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4163 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4164
e90e9ad9
TT
41652012-12-05 Tom Tromey <tromey@redhat.com>
4166
4167 PR gdb/14917:
4168 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4169
02d403bf 41702012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
4171
4172 * configure.ac: Check for linux/perf_event.h.
4173 * config.in: Regenerated.
4174 * configure: Regenerated.
4175
0270a750
PA
41762012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4177
4178 * hostio.c (handle_readlink): Decrease buffer size
4179 parameter passed to readlink by one byte.
4180
8c29b58e
YQ
41812012-11-26 Yao Qi <yao@codesourcery.com>
4182
4183 * configure.ac (build_warnings): Append '-Wempty-body'.
4184 * configure: Regenerated.
4185 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4186 body.
4187
8bdce1ff
PM
41882012-11-15 Pierre Muller <muller@sourceware.org>
4189
4190 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4191 * config.in: Regenerate.
4192 * configure: Regenerate.
4193 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4194 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4195 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4196 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4197 header.
4198 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4199 instead of <sys/wait.h> header.
4200 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4201
02d403bf 42022012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
4203
4204 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4205 (various make rules): Remove -DGDBSERVER
4206
fbd5db48
YQ
42072012-11-09 Yao Qi <yao@codesourcery.com>
4208
4209 * spu-low.c (current_ptid): Move it to ..
4210 * gdbthread.h: ... here. New.
4211 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4212 * server.c (myresume, process_serial_event): Likewise.
4213 * thread-db.c (thread_db_find_new_threads): Likewise.
4214 * tracepoint.c (run_inferior_command): Likewise.
4215
b3dc46ff
AB
42162012-10-01 Andrew Burgess <aburgess@broadcom.com>
4217
4218 * server.c (handle_search_memory_1): Include access length in
4219 warning message.
4220
07c04788
HPN
42212012-09-05 Michael Brandt <michael.brandt@axis.com>
4222
4223 * linux-crisv32-low.c: Fix compile errors.
4224
918d227b
YQ
42252012-09-04 Yao Qi <yao@codesourcery.com>
4226
4227 * tracepoint.c (cmd_qtsv): Adjust debug message.
4228 Don't check CUR_TPOINT.
4229
18c1b81a
YQ
42302012-08-28 Yao Qi <yao@codesourcery.com>
4231
4232 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4233 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4234 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4235 Remove declarations of xmalloc, xreallloc, xstrdup and
4236 freeargv.
4237 * Makefile.in (libiberty_h): New.
4238 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4239 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4240
dc82f37b
YQ
42412012-08-23 Yao Qi <yao@codesourcery.com>
4242
4243 * server.h: Remove declaration of 'xsnprintf'.
4244
406b1477
KS
42452012-08-22 Keith Seitz <keiths@redhat.com>
4246
4247 * server.h: Include build-gnulib-gbserver/config.h.
4248 * gdbreplay.c: Likewise.
4249
e6712ff1
DE
42502012-08-08 Doug Evans <dje@google.com>
4251
4252 * Makefile.in (SFILES): Add gdb_vecs.c.
4253 (OBS): Add gdb_vecs.o.
4254 (gdb_vecs_h, host_defs_h): New variables.
4255 (thread-db.o): Add $(gdb_vecs_h) dependency.
4256 (gdb_vecs.o): New rule.
4257 * thread-db.c: #include "gdb_vecs.h".
4258 (thread_db_load_search): Use a vector to iterate over path elements.
4259 Handle text appearing after "$pdir".
4260
4261 * configure.ac: Add check for strstr.
4262 * config.in: Regenerate.
4263 * configure: Regenerate.
4264
7c3270ae
UW
42652012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4266
4267 * hostio.c (handle_pread): If pread fails, fall back to attempting
4268 lseek/read.
4269 (handle_pwrite): Likewise for pwrite.
4270
b62e2b27
UW
42712012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4272
4273 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4274 between unsupported TYPE and unimplementable ADDR/LEN combination.
4275 (arm_insert_point): Act on new return value.
4276
78a99e91
PA
42772012-07-31 Pedro Alves <palves@redhat.com>
4278
4279 * server.c (process_point_options): Only skip tokens if we find
4280 one that is unrecognized. Don't treat 'X' specially while
4281 skipping unrecognized tokens.
4282
fcf303ab
UW
42832012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4284
4285 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4286 to 4-byte-align HW breakpoint addresses for Thumb.
4287
7255706c
YQ
42882012-07-27 Yao Qi <yao@codesourcery.com>
4289
4290 PR remote/14161.
4291
4292 * server.h: Declare gdb_agent_about_to_close.
4293 * target.c (kill_inferior): Include "agent.h".
4294 New. Send command 'kill'.
4295 * target.h (kill_inferior): Removed macro.
4296 * tracepoint.c (gdb_agent_about_to_close): New.
4297 (gdb_agent_helper_thread): Handle command 'close'.
4298 Wait endlessly until the inferior stops.
4299 Install gdb_agent_remove_socket to atexit hook.
4300 (agent_socket_name): New static variable.
4301 (gdb_agent_socket_init): Replace local variable 'name' with
4302 'agent_socket_name'.
4303 (gdb_agent_remove_socket): New.
4304
5a3f286f
YQ
43052012-07-27 Yao Qi <yao@codesourcery.com>
4306
4307 * server.c (process_point_options): Stop at 'X' when parsing.
4308
961bd387
ME
43092012-07-19 Michael Eager <eager@eagercon.com>
4310
a261b8f5 4311 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
4312 to hw_execute.
4313 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4314 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4315 hardware breakpoint.
4316
aa7c7447
JK
43172012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4318
4319 * gdbserver/linux-low.c (initialize_low): Call
4320 linux_ptrace_init_warnings.
4321
7f216e7c
DE
43222012-07-02 Doug Evans <dje@google.com>
4323
4324 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4325 pointer to int.
4326
d3ce09f5
SS
43272012-07-02 Stan Shebs <stan@codesourcery.com>
4328
4329 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4330 (ax.o): Add it to build rule.
4331 (ax-ipa.o): Ditto.
4332 (OBS): Add format.o.
4333 (IPA_OBS): Add format.o.
4334 * server.c (handle_query): Claim support for breakpoint commands.
4335 (process_point_options): Add command case.
4336 (process_serial_event): Leave running if there are printfs in
4337 effect.
4338 * mem-break.h (any_persistent_commands): Declare.
4339 (add_breakpoint_commands): Declare.
4340 (gdb_no_commands_at_breakpoint): Declare.
4341 (run_breakpoint_commands): Declare.
4342 * mem-break.c (struct point_command_list): New struct.
4343 (struct breakpoint): New field command_list.
4344 (any_persistent_commands): New function.
4345 (add_commands_to_breakpoint): New function.
4346 (add_breakpoint_commands): New function.
4347 (gdb_no_commands_at_breakpoint): New function.
4348 (run_breakpoint_commands): New function.
4349 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4350 locally.
4351 * ax.c: Include format.h.
4352 (ax_printf): New function.
4353 (gdb_eval_agent_expr): Add printf opcode.
4354
2f8f6aed
YQ
43552012-06-13 Yao Qi <yao@codesourcery.com>
4356
4357 * server.c (start_inferior): Remove duplicated writes to fields
4358 'last_resume_kind' and 'last_status' of 'current_inferior'.
4359
0c9070b3
YQ
43602012-06-12 Yao Qi <yao@codesourcery.com>
4361 Pedro Alves <palves@redhat.com>
4362
4363 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4364 comment.
4365 * server.c (handle_v_cont): Extend comment.
4366
c52daf70
YQ
43672012-06-11 Yao Qi <yao@codesourcery.com>
4368
4369 * linux-low.c (linux_attach): Add 'static'.
4370
d38bbb0a
YQ
43712012-06-06 Yao Qi <yao@codesourcery.com>
4372
4373 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4374
89dc0afd
JK
43752012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4376
4377 Fix gcc -flto compilation warning.
4378 * server.c (main): Make variable multi_mode and attach volatile.
4379
75f62ce7
TJB
43802012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4381
4382 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4383 if the platform doesn't know about it.
4384
65f479b6
PA
43852012-05-30 Jeff Kenton <jkenton@tilera.com>
4386
4387 * Makefile.in (SFILES): Add linux-tile-low.c.
4388 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4389 * configure.srv: Handle tilegx-*-linux*.
4390 * linux-tile-low.c: New file.
4391
0c5bf5a9
JK
43922012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4393
4394 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4395
a493e3e2
PA
43962012-05-24 Pedro Alves <palves@redhat.com>
4397
4398 PR gdb/7205
4399
43aaf8b6 4400 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4401
2ea28649
PA
44022012-05-24 Pedro Alves <palves@redhat.com>
4403
4404 PR gdb/7205
4405
4406 Replace target_signal with gdb_signal throughout.
4407
8d409d16
MR
44082012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4409
4410 * linux-low.c (linux_store_registers): Avoid the copying sequence
4411 when no data has been retrieved by ptrace.
4412
23512c01
MGD
44132012-05-22 Will Deacon <will.deacon@arm.com>
4414
4415 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4416 Include asm/ptrace.h.
4417 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4418 already defined.
4419
4934b29e
MR
44202012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4421
4422 * linux-low.c (linux_store_registers): Don't re-retrieve data
4423 with ptrace that has already been obtained from /proc. Always
4424 copy any data retrieved with ptrace to the buffer supplied.
4425
bde24c0a
PA
44262012-05-11 Yao Qi <yao@codesourcery.com>
4427 Pedro Alves <palves@redhat.com>
4428
4429 * linux-low.c (enum stopping_threads_kind): New.
4430 (stopping_threads): Change type to `enum stopping_threads_kind'.
4431 (handle_extended_wait): If stopping and suspending threads, leave
4432 the new_lwp suspended too.
4433 (linux_wait_for_event): Adjust.
4434 (stop_all_lwps): Set `stopping_threads' to
4435 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4436 whether we're suspending threads or just stopping them. Assert no
4437 recursion happens.
4438
623b6bdf
YQ
44392012-04-29 Yao Qi <yao@codesourcery.com>
4440
4441 * server.h: Move some code to ...
4442 * gdbthread.h: ... here. New.
4443 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4444 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4445 (nto-low.o, win32-low.o): Likewise.
4446 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4447 * regcache.c, remote-utils.c, server.c: Likewise.
4448 * target.c, tracepoint.c, win32-low.c: Likewise.
4449
f15f9948
TJB
44502012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4451
4452 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4453 (PTRACE_ARG4_TYPE): Likewise.
4454 (PTRACE_XFER_TYPE): Likewise.
4455 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4456 ptrace to PTRACE_ARG3_TYPE.
4457 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4458 (PTRACE_ARG4_TYPE): Likewise.
4459 (PTRACE_XFER_TYPE): Likewise.
4460 (linux_detach_one_lwp): Cast fourth argument of
4461 ptrace to long then PTRACE_ARG4_TYPE.
4462 (regsets_fetch_inferior_registers): Cast third argument of
4463 ptrace to long then PTRACE_ARG3_TYPE.
4464 (regsets_store_inferior_registers): Likewise.
4465
38ea300a
PA
44662012-04-20 Pedro Alves <palves@redhat.com>
4467
4468 * configure: Regenerate.
4469
c971b7fa
PA
44702012-04-19 Pedro Alves <palves@redhat.com>
4471
43aaf8b6 4472 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4473 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4474 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4475 (all, install-only, uninstall, clean-info, all-lib, clean): No
4476 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4477 (maintainer-clean realclean distclean): Use subdir_do.
4478 (subdir_do): New.
4479 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4480 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4481 * acinclude.m4: Include acx_configure_dir.m4.
4482 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4483 calls. Call AC_PROG_RANLIB. Configure gnulib using
4484 ACX_CONFIGURE_DIR.
4485 (GNULIB): New.
4486 (GNULIB_STDINT_H): Adjust.
4487 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4488 * gdbreplay.c: Include build-gnulib/config.h.
4489 * server.h: Likewise.
4490 * aclocal.m4: Regenerate.
4491 * config.in: Regenerate.
4492 * configure: Regenerate.
c971b7fa 4493
809277f8
PA
44942012-04-19 Pedro Alves <palves@redhat.com>
4495
4496 * Makefile.in (LIBGNU, INCGNU): Adjust.
4497 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4498 (all, install-only, uninstall, clean-info, all-lib, clean)
4499 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4500 * configure.ac: Adjust AC_OUTPUT output.
4501 * aclocal.m4: Regenerate.
4502 * configure: Regenerate.
4503
fd9bb8b8
PA
45042012-04-19 Pedro Alves <palves@redhat.com>
4505
4506 * Makefile.in (generated_files): New.
4507 (server_h): Remove the explicit dependency on config.h, and depend
4508 on $generated_files.
4509
1c298c66
PA
45102012-04-19 Pedro Alves <palves@redhat.com>
4511
4512 * Makefile.in (INCGNU): Add -Ignulib.
4513
57c4b50b
PA
45142012-04-19 Pedro Alves <palves@redhat.com>
4515
4516 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4517 (INCGNU): ... this, and spell out -I here.
4518 (GNULIB_LIB): Rename to ...
4519 (LIBGNU): ... this.
4520 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4521
1030e047
PA
45222012-04-19 Pedro Alves <palves@redhat.com>
4523
4524 * config.in: Regenerate.
4525
447d4319
PA
45262012-04-19 Pedro Alves <palves@redhat.com>
4527
4528 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4529 * server.h (memmem): Remove declaration.
4530 * config.in: Regenerate.
4531 * configure: Regenerate.
4532
aad9eab9
YQ
45332012-04-19 Yao Qi <yao@codesourcery.com>
4534
4535 * Makefile.in (SFILES): Add common/vec.c.
4536 (OBS): Add vec.o.
4537 (vec.o): New rule.
4538
3e10640f
YQ
45392012-04-19 Yao Qi <yao@codesourcery.com>
4540
4541 * remote-utils.c (prepare_resume_reply): Replace with macro
4542 target_core_of_thread.
4543 * server.c (handle_qxfer_threads_proper): Likewise.
4544 * target.h (traget_core_of_thread): New macro.
4545
71622373
PA
45462012-04-18 Pedro Alves <palves@redhat.com>
4547
4548 * aclocal.m4: Regenerate.
4549 * configure: Regenerate.
4550
80d26939
YQ
45512012-04-16 Yao Qi <yao@codesourcery.com>
4552
4553 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4554 duplicated on address.
4555
42476b70
YQ
45562012-04-16 Yao Qi <yao@codesourcery.com>
4557
4558 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4559 (struct tracepoint_action_ops) <send>: New field.
4560 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4561 (agent_expr_send, x_tracepoint_action_send): New.
4562 (l_tracepoint_action_send): New.
4563 (cmd_qtdp): Download and install tracepoint
4564 according to `use_agent'.
4565 (run_inferior_command): Add one more parameter `len'.
4566 Update callers.
4567 (tracepoint_send_agent): New.
4568 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4569
7bc83639
YQ
45702012-04-16 Yao Qi <yao@codesourcery.com>
4571
4572 * tracepoint.c (download_tracepoints): Moved to ...
4573 (cmd_qtstart): ... here.
4574
5f18041e
YQ
45752012-04-14 Yao Qi <yao@codesourcery.com>
4576
4577 * tracepoint.c: Include inttypes.h.
4578 (struct collect_memory_action): Use sized types.
4579 (struct tracepoint): Likewise.
4580 (cmd_qtdp, stop_tracing): Update print specifiers.
4581 (cmd_qtp, response_tracepoint): Likewise.
4582 (collect_data_at_tracepoint): Likewise.
4583 (collect_data_at_step): Likewise.
4584
55a8c076
YQ
45852012-04-14 Yao Qi <yao@codesourcery.com>
4586
4587 Import gnulib module inttypes.
4588 * aclocal.m4, config.in, configure: Regenerated.
4589
dc750257
YQ
45902012-04-14 Yao Qi <yao@codesourcery.com>
4591
4592 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4593 Makefile and config.status at last.
4594
0ab5faf9
YQ
45952012-04-13 Yao Qi <yao@codesourcery.com>
4596
4597 * tracepoint.c: Include stdint.h unconditionally.
4598
18f5fd81
TJB
45992012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4600
4601 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4602 on BFD_HAVE_SYS_PROCFS_TYPE.
4603 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4604 * configure: Regenerate.
4605 * config.in: Likewise.
4606
4d47af5c
L
46072012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4608
4609 * Makefile.in (clean): Also remove x32.c x32-linux.c
4610 x32-avx.c x32-avx-linux.c.
4611 (x32.o): New target.
4612 (x32.c): Likewise.
4613 (x32-linux.o): Likewise.
4614 (x32-linux.c): Likewise.
4615 (x32-avx.o): Likewise.
4616 (x32-avx.c): Likewise.
4617 (x32-avx-linux.o): Likewise.
4618 (x32-avx-linux.c): Likewise.
4619
4620 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4621 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4622 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4623 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4624 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4625 i386/x32-avx-linux.xml.
4626
4627 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4628 (init_registers_x32_avx_linux): Likwise.
4629 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4630 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4631
ecedbe58
PA
46322012-04-13 Pedro Alves <palves@redhat.com>
4633
4634 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4635 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4636 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4637 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4638 the sub-make.
4639
c92b5177
L
46402012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4641
4642 * linux-x86-low.c (compat_x32_clock_t): New.
4643 (compat_x32_siginfo_t): Likewise.
4644 (compat_x32_siginfo_from_siginfo): Likewise.
4645 (siginfo_from_compat_x32_siginfo): Likewise.
4646 (linux_is_elf64): Likewise.
4647 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4648 and siginfo_from_compat_x32_siginfo for x32.
4649 (x86_arch_setup): Set linux_is_elf64.
4650
214d508e
L
46512012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4652
4653 PR gdb/13969
4654 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4655 e_machine field.
4656 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4657 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4658 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4659 compatible with process.
4660
c9a1864a
YQ
46612012-04-12 Yao Qi <yao@codesourcery.com>
4662
4663 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4664 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4665 (install-only, install-info, clean): Handle sub dir gnulib.
4666 (all-lib, am--refresh): New targets.
4667 (memmem.o): Remove target.
4668 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4669 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4670 (AC_REPLACE_FUNCS): Remove memmem.
4671 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4672 (AC_OUTPUT): Generate Makefile in gnulib/.
4673 * aclocal.m4, config.in, configure: Regenerated.
4674
367ba2c2
MR
46752012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4676
4677 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4678
9d236627
PA
46792012-04-05 Pedro Alves <palves@redhat.com>
4680
4681 -Werror=strict-aliasing
4682
4683 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4684 pointer.
4685
111217b3
PA
46862012-04-04 Pedro Alves <palves@redhat.com>
4687
4688 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4689 (sparc_store_gregset_from_stack, sparc_store_gregset)
4690 (sparc_breakpoint_at): Fix formatting.
4691
8365dcf5
TJB
46922012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4693
4694 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4695 are available.
4696 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4697 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4698 * config.in: Regenerate.
4699 * configure: Likewise.
4700
689cc2ae
PA
47012012-03-29 Pedro Alves <palves@redhat.com>
4702
4703 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4704 Correct ptrace arguments.
4705
c14dfd32
PA
47062012-03-28 Pedro Alves <palves@redhat.com>
4707
4708 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4709 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4710 (IA64_FR1_REGNUM): New defines.
4711 (ia64_fetch_register): New.
4712 (the_low_target): Install it.
4713 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4714 field.
4715 * linux-low.c (linux_fetch_registers): Try the
4716 the_low_target.fetch_register hook first.
4717
4718 * linux-arm-low.c (the_low_target): Adjust.
4719 * linux-bfin-low.c (the_low_target): Adjust.
4720 * linux-cris-low.c (the_low_target): Adjust.
4721 * linux-crisv32-low.c (the_low_target): Adjust.
4722 * linux-m32r-low.c (the_low_target): Adjust.
4723 * linux-m68k-low.c (the_low_target): Adjust.
4724 * linux-mips-low.c (the_low_target): Adjust.
4725 * linux-ppc-low.c (the_low_target): Adjust.
4726 * linux-s390-low.c (the_low_target): Adjust.
4727 * linux-sh-low.c (the_low_target): Adjust.
4728 * linux-sparc-low.c (the_low_target): Adjust.
4729 * linux-tic6x-low.c (the_low_target): Adjust.
4730 * linux-x86-low.c (the_low_target): Adjust.
4731 * linux-xtensa-low.c (the_low_target): Adjust.
4732
63c88e13
PA
47332012-03-26 Pedro Alves <palves@redhat.com>
4734
4735 * server.c (handle_qxfer_libraries): Don't bail early if
4736 the_target->qxfer_libraries_svr4 is not NULL.
4737
fb723180
PA
47382012-03-26 Pedro Alves <palves@redhat.com>
4739
4740 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4741
0afae3cf
PA
47422012-03-23 Pedro Alves <palves@redhat.com>
4743
4744 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4745 "library-list-svr4" element's start tag when the the DSO list is
4746 empty.
4747
485f1ee4
PA
47482012-03-23 Pedro Alves <palves@redhat.com>
4749
4750 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4751 a variable whose type size is the same as the inferior's pointer
4752 size.
4753
a5362b9a
TS
47542012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4755
4756 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4757 struct siginfo.
4758 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4759 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4760 * linux-low.h: Include <signal.h>.
4761 (struct siginfo): Remove forward declaration.
4762 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4763 struct siginfo.
4764
d226c142
MF
47652012-03-21 Mike Frysinger <vapier@gentoo.org>
4766
4767 * .gitignore: Ignore more files.
4768
122f36ef
PA
47692012-03-19 Pedro Alves <palves@redhat.com>
4770 Jan Kratochvil <jan.kratochvil@redhat.com>
4771
4772 * server.c (cont_thread, general_thread): Add describing comments.
4773 (start_inferior): Clear `cont_thread'.
4774 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4775 of a process.
4776
fc3e5175
YQ
47772012-03-15 Yao Qi <yao@codesourcery.com>
4778
4779 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4780 handling to ...
4781 (cmd_qtdp): ... here.
4782
8d0d92cd
YQ
47832012-03-15 Yao Qi <yao@codesourcery.com>
4784
4785 * tracepoint.c (struct tracepoint_action_ops): New.
4786 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4787 (m_tracepoint_action_download): New.
4788 (r_tracepoint_action_download): New.
4789 (x_tracepoint_action_download): New.
4790 (l_tracepoint_action_download): New.
4791 (add_tracepoint_action): Install `action->ops' according type.
4792 (download_tracepoint_1): Move code `download' function pointer
4793 of various tracepoint_action_ops.
4794
87b0bb13
JK
47952012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4796
4797 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4798 linux_ptrace_attach_warnings.
4799
5f572dec
JK
48002012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4801
4802 * Makefile.in (linux-ptrace.o): New.
4803 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4804 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4805 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4806 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4807 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4808 of these targets.
4809 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4810
f4647387
YQ
48112012-03-08 Yao Qi <yao@codesourcery.com>
4812 Pedro Alves <palves@redhat.com>
4813
4814 Fix PR server/13392.
4815 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4816 offset of JMP insn.
4817 * tracepoint.c (remove_tracepoint): New.
4818 (cmd_qtdp): Call remove_tracepoint when failed to install.
4819
9b224c5e
PA
48202012-03-07 Pedro Alves <palves@redhat.com>
4821
4822 * linux-low.c (get_detach_signal): New.
4823 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4824 Pass on pending signals to PTRACE_DETACH. Check the result of the
4825 ptrace call.
4826 * server.c (program_signals, program_signals_p): New.
4827 (handle_general_set): Handle QProgramSignals.
4828 * server.h (program_signals, program_signals_p): Declare.
4829
e237a7e2
JK
48302012-03-05 Pedro Alves <palves@redhat.com>
4831 Jan Kratochvil <jan.kratochvil@redhat.com>
4832
4833 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4834 New comment why.
4835
5808517f
YQ
48362012-03-03 Yao Qi <yao@codesourcery.com>
4837
4838 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4839 agent_look_up_symbols.
4840
58b4daa5
YQ
48412012-03-03 Yao Qi <yao@codesourcery.com>
4842
4843 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4844 (linux-x86-low.o): Likewise.
4845 * server.h: Remove in_process_agent_loaded.
4846 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4847 common/agent.c.
4848 Update callers.
4849
8ffcbaaf
YQ
48502012-03-03 Yao Qi <yao@codesourcery.com>
4851
4852 * tracepoint.c (gdb_agent_capability): New global.
4853 (in_process_agent_loaded_ust): Renamed to
4854 `in_process_agent_supports_ust'.
4855 Update callers.
4856 (in_process_agent_supports_ust): Call agent_capability_check.
4857 (clear_installed_tracepoints): Assert that agent supports
4858 agent.
4859
d1feda86
YQ
48602012-03-03 Yao Qi <yao@codesourcery.com>
4861
4862 * linux-low.c (linux_supports_agent): New.
4863 (linux_target_ops): Initialize field `supports_agent' with
4864 linux_supports_agent.
4865 * target.h (struct target_ops) <supports_agent>: New.
4866 (target_supports_agent): New macro.
4867 * server.c (handle_general_set): Handle packet 'QAgent'.
4868 (handle_query): Send `QAgent+'.
4869 * Makefile.in (server.o): Depends on agent.h.
4870
2fa291ac
YQ
48712012-03-03 Yao Qi <yao@codesourcery.com>
4872
4873 * Makefile.in (OBS): Add agent.o.
4874 Add new rule for agent.o.
4875 Track dependence of tracepoint.c on agent.h.
4876 * tracepoint.c (run_inferior_command_1):
4877 (run_inferior_command): Call agent_run_command.
4878 (gdb_ust_connect_sync_socket): Deleted. Move it to
4879 common/agent.c.
4880 (resume_thread, stop_thread): Likewise.
4881 (gdb_ust_socket_init): Renamed to ...
4882 (gdb_agent_socket_init): ... New.
4883 (gdb_ust_thread): Renamed to ...
4884 (gdb_agent_helper_thread): ... New.
4885 (gdb_ust_init): Move some code to ...
4886 (gdb_agent_init): ... here. New.
4887 [HAVE_UST]: Call gdb_ust_init.
4888 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4889 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4890 * config.in, configure: Regenerated.
4891
05044653
PA
48922012-03-02 Pedro Alves <palves@redhat.com>
4893
4894 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4895 * linux-low.c (struct simple_pid_list): New.
4896 (stopped_pids): New a struct simple_pid_list pointer.
4897 (add_to_pid_list, pull_pid_from_list): New.
4898 (handle_extended_wait): Don't assume the first signal new children
4899 report is SIGSTOP. Adjust call to pull_pid_from_list.
4900 (linux_wait_for_lwp): Adjust.
4901
8d00225b
YQ
49022012-03-02 Yao Qi <yao@codesourcery.com>
4903
4904 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4905 debug log.
4906
19560ba5
YQ
49072012-03-02 Yao Qi <yao@codesourcery.com>
4908
4909 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4910 `stop_pc' and `tpoint'. Update caller.
4911
1faeff08
MR
49122012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4913
4914 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4915 * linux-low.c (use_linux_regsets): New macro.
4916 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4917 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4918 (linux_register_in_regsets): New function.
4919 (usr_fetch_inferior_registers): Skip registers covered by
4920 regsets.
4921 (usr_store_inferior_registers): Likewise.
4922 (usr_fetch_inferior_registers): New macro.
4923 (usr_store_inferior_registers): Likewise.
4924 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4925 (linux_store_registers): Likewise.
4926 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4927 prototype.
4928 (init_registers_mips64_dsp_linux): Likewise.
4929 (init_registers_mips_linux): New macro.
4930 (init_registers_mips_dsp_linux): Likewise.
4931 (mips_dsp_num_regs): Likewise.
4932 (DSP_BASE, DSP_CONTROL): New fallback macros.
4933 (mips_base_regs): New macro.
4934 (mips_regmap): Use it. Fix the size.
4935 (mips_dsp_regmap): New variable.
4936 (mips_dsp_regset_bitmap): Likewise.
4937 (mips_arch_setup): New function.
4938 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4939 than mips_regmap.
4940 (mips_cannot_store_register): Likewise.
4941 (the_low_target): Update .arch_setup, .num_regs and .regmap
4942 initializers. Add .regset_bitmap initializer.
4943 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4944 initializer.
4945 * linux-bfin-low.c (the_low_target): Likewise.
4946 * linux-cris-low.c (the_low_target): Likewise.
4947 * linux-crisv32-low.c (the_low_target): Likewise.
4948 * linux-ia64-low.c (the_low_target): Likewise.
4949 * linux-m32r-low.c (the_low_target): Likewise.
4950 * linux-m68k-low.c (the_low_target): Likewise.
4951 * linux-ppc-low.c (the_low_target): Likewise.
4952 * linux-s390-low.c (the_low_target): Likewise.
4953 * linux-sh-low.c (the_low_target): Likewise.
4954 * linux-sparc-low.c (the_low_target): Likewise.
4955 * linux-tic6x-low.c (the_low_target): Likewise.
4956 * linux-x86-low.c (the_low_target): Likewise.
4957 * linux-xtensa-low.c (the_low_target): Likewise.
4958 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4959 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4960 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4961 srv_xmlfiles.
4962 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4963 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4964
c03e6ccc
YQ
49652012-02-29 Yao Qi <yao@codesourcery.com>
4966 Pedro Alves <palves@redhat.com>
4967
4968 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4969 `step_over_finished' is true.
4970
644cebc9
PA
49712012-02-27 Pedro Alves <palves@redhat.com>
4972
4973 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4974 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4975
c14d7ab2
PA
49762012-02-27 Pedro Alves <palves@redhat.com>
4977
4978 PR server/9684
4979 * linux-low.c (pid_is_stopped): New.
4980 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4981
412c89dd
LM
49822012-02-25 Luis Machado <lgustavo@codesourcery.com>
4983
4984 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4985 of conditions.
4986
b745defe
MR
49872012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4988
4989 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4990
9f3a5c85
LM
49912012-02-24 Luis Machado <lgustavo@codesourcery>
4992
4993 * server.c (handle_query): Advertise support for target-side
4994 breakpoint condition evaluation.
4995 (process_point_options): New function.
4996 (process_serial_event): When inserting a breakpoint, check for
4997 a target-side condition that should be evaluated.
4998
4999 * mem-break.c: Include regcache.h and ax.h.
5000 (point_cond_list_t): New data structure.
5001 (breakpoint) <cond_list>: New field.
5002 (find_gdb_breakpoint_at): Make non-static.
5003 (delete_gdb_breakpoint_at): Clear any target-side
5004 conditions.
5005 (clear_gdb_breakpoint_conditions): New function.
5006 (add_condition_to_breakpoint): Likewise.
5007 (add_breakpoint_condition): Likewise.
5008 (gdb_condition_true_at_breakpoint): Likewise.
5009 (gdb_breakpoint_here): Return result directly instead
5010 of going through a local variable.
5011
5012 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5013 (clear_gdb_breakpoint_conditions): Likewise.
5014 (add_breakpoint_condition): Likewise.
5015 (gdb_condition_true_at_breakpoint): Likewise.
5016
5017 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5018 (need_step_over_p): Take target-side breakpoint condition into
5019 consideration.
5020
5e1dc496
LM
50212012-02-24 Luis Machado <lgustavo@codesourcery>
5022
5023 * server.h: Include tracepoint.h.
5024 (agent_mem_read, agent_get_trace_state_variable_value,
5025 agent_set_trace_state_variable_value,
5026 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5027 get_set_tsv_func_addr): New prototypes.
5028
5029 * ax.h: New include file.
5030 * ax.c: New source file.
5031
5032 * tracepoint.c: Include ax.h.
5033 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5034 agent_expr, eval_result_type): Move to ax.h.
5035 (parse_agent_expr): Rename to ...
5036 (gdb_parse_agent_expr): ... this, make it non-static and move
5037 to ax.h.
5038 (unparse_agent_expr) Rename to ...
5039 (gdb_unparse_agent_expr): ... this, make it non-static and move
5040 to ax.h.
5041 (eval_agent_expr): Rename to ...
5042 (eval_tracepoint_agent_expr): ... this.
5043 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5044 forward declarations.
5045 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5046 (agent_get_trace_state_variable_value): New function.
5047 (agent_set_trace_state_variable_value): New function.
5048 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5049 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5050 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5051 (condition_true_at_tracepoint): Likewise.
5052 (parse_agent_expr): Rename to ...
5053 (gdb_parse_agent_expr): ... this and move to ax.c.
5054 (unparse_agent_expr): Rename to ...
5055 (gdb_unparse_agent_expr): ... this and move to ax.c.
5056 (gdb_agent_op_name): Move to ax.c.
5057 (eval_agent_expr): Rename to ...
5058 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5059 and move to ax.c.
5060 (eval_tracepoint_agent_expr): New function.
5061 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 5062 non-static.
5e1dc496
LM
5063 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5064 ax.c.
5065 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5066 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5067 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5068 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5069 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5070 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5071 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5072 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5073 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5074 (compile_bytecodes): Remove forward declaration.
5075 (is_goto_target): Move to ax.c.
5076 (compile_bytecodes): Move to ax.c and call
5077 agent_get_trace_state_variable_value (...) and
5078 agent_set_trace_state_variable_value (...).
5079
5080 * Makefile.in: Update ax.c and IPA dependencies.
5081
277e4e52
PA
50822012-02-24 Pedro Alves <palves@redhat.com>
5083
5084 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5085 (cmd_bigqtbuffer_circular): ... this. Only handle
5086 'QTBuffer:circular:'.
5087 (handle_tracepoint_general_set): Adjust.
5088
bf4c19f7
YQ
50892012-02-16 Yao Qi <yao@codesourcery.com>
5090
5091 * inferiors.c: Move code to ...
5092 * dll.c: .... here. New.
5093 * server.h: Declare clear_dlls.
5094 * Makefile.in (SFILES): Add dll.c.
5095 (OBS): Add dll.o
5096 (dll.o): New rule.
5097
d73f2619
YQ
50982012-02-11 Yao Qi <yao@codesourcery.com>
5099
5100 * server.c: (handle_monitor_command): Add a new parameter
5101 `own_buf'.
5102 (handle_query): Update caller.
5103
f8255c2a
JB
51042012-02-09 Joel Brobecker <brobecker@adacore.com>
5105
5106 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5107 * configure, config.in: Regenerate.
5108 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5109 is not defined.
5110
da84f473
PA
51112012-02-02 Pedro Alves <palves@redhat.com>
5112
5113 Try SIGKILL first, then PTRACE_KILL.
5114 * linux-low.c (linux_kill_one_lwp): New.
5115 (linux_kill_one_lwp): Rename to ...
5116 (kill_one_lwp_callback): ... this. Use the new
5117 linux_kill_one_lwp.
5118
e886a173
PA
51192012-02-02 Pedro Alves <palves@redhat.com>
5120
5121 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5122 inferior.
5123
be07f1a2
PA
51242012-01-27 Pedro Alves <palves@redhat.com>
5125
5126 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5127 (elf_64_file_p): Make static.
5128 (linux_pid_exe_is_elf_64_file): New.
5129 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5130 Delete declarations.
5131 (linux_pid_exe_is_elf_64_file): Declare.
5132 * linux-x86-low.c (x86_arch_setup): Use
5133 linux_pid_exe_is_elf_64_file.
5134
d8301ad1
JK
51352012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5136
5137 * linux-low.c (linux_wait_for_event_1): Rename to ...
5138 (linux_wait_for_event): ... here and merge it with former
5139 linux_wait_for_event - new variable wait_ptid, use it.
5140 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5141
01b17894
PA
51422012-01-23 Pedro Alves <palves@redhat.com>
5143
5144 * server.c (main): Avoid yet another case of infinite loop while
5145 detaching/killing after a longjmp.
5146
e825046f
JK
51472012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5148
5149 Code cleanup.
5150 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5151
b9e7b9c3
UW
51522012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5153
5154 * hostio.c (handle_readlink): New function.
5155 (handle_vFile): Call it to handle "vFile:readlink" packets.
5156
901f9912
UW
51572012-01-20 Pedro Alves <palves@redhat.com>
5158 Ulrich Weigand <ulrich.weigand@linaro.org>
5159
5160 * server.c (handle_v_requests): Only support vAttach and vRun to
5161 start multiple processes when in extended protocol mode.
5162
fc1ab1a0
PA
51632012-01-17 Pedro Alves <palves@redhat.com>
5164
5165 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5166 memalign plus mprotect to allocate the scratch buffer.
5167
7d5d4e98
PA
51682012-01-13 Pedro Alves <palves@redhat.com>
5169
5170 * server.c (attach_inferior): Clear `cont_thread'.
5171
f128d5e9
PA
51722012-01-13 Pedro Alves <palves@redhat.com>
5173
5174 * server.c (main): Avoid infinite loop while detaching/killing
5175 after a longjmp.
5176
06db92f0
DE
51772012-01-09 Doug Evans <dje@google.com>
5178
5179 * server.c (start_inferior): Set last_ptid in --wrapper case.
5180
32d92999
YQ
51812012-01-06 Yao Qi <yao@codesourcery.com>
5182
5183 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5184 defined.
5185 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5186
5e0a92a9
YQ
51872012-01-04 Yao Qi <yao@codesourcery.com>
5188
5189 * tracepoint.c (cmd_qtdp): Print debug message
5190 for static tracepoint.
5191
ae639e8c
YQ
51922012-01-04 Yao Qi <yao@codesourcery.com>
5193
5194 * tracepoint.c (trace_vdebug): Differentiate debug message
5195 between gdbserver and IPA.
5196
f72429c5
YQ
51972012-01-03 Yao Qi <yao@codesourcery.com>
5198
5199 * tracepoint.c (tracepoint_was_hit): Don't collect for
5200 static tracepoint.
5201
12c3e59c
JB
52022012-01-02 Joel Brobecker <brobecker@adacore.com>
5203
5204 * terminal.h: Reformat copyright header.
5205
67827812
JB
52062012-01-02 Joel Brobecker <brobecker@adacore.com>
5207
5208 * server.c (gdbserver_version): Update copyright year.
5209 * gdbreplay.c (gdbreplay_version): Likewise.
5210
3e52c33d
JK
52112011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5212
5213 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5214
5215 Revert:
5216 2011-12-18 Hui Zhu <teawater@gmail.com>
5217 * linux-low.c (linux_create_inferior): Save return value to ret.
5218
66f1260e
HZ
52192011-12-18 Hui Zhu <teawater@gmail.com>
5220
5221 * linux-low.c (linux_create_inferior): Save return value to ret.
5222
e77616d7
DE
52232011-12-16 Doug Evans <dje@google.com>
5224
e7b06c57
DE
5225 * linux-low.c (linux_create_inferior): If stdio connection,
5226 redirect stdin from /dev/null, stdout to stderr.
5227 * remote-utils.c (remote_is_stdio): New static global.
5228 (remote_connection_is_stdio): New function.
5229 (remote_prepare): Handle stdio connection.
5230 (remote_open): Ditto.
5231 (remote_close): Don't close stdin for stdio connections.
5232 (read_prim,write_prim): New functions. Replace all calls to
5233 read/write to these.
5234 * server.c (main): Watch for "-" argument. Move call to
5235 remote_prepare before start_inferior.
5236 * server.h (STDIO_CONNECTION_NAME): New macro.
5237 (remote_connection_is_stdio): Declare.
5238
e77616d7
DE
5239 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5240 in debugging output.
5241
82067193
YQ
52422011-12-15 Yao Qi <yao@codesourcery.com>
5243
5244 * tracepoint.c: Include sys/syscall.h.
5245 (gdb_ust_thread): Remove preprocessor conditional.
5246
82bfbe7e
PA
52472011-12-14 Pedro Alves <pedro@codesourcery.com>
5248
5249 * linux-low.c (linux_detach_one_lwp): Call
5250 the_low_target.prepare_to_resume before detaching.
5251
712c6575
YQ
52522011-12-14 Yao Qi <yao@codesourcery.com>
5253
5254 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5255 of write.
5256
d54d1edf
YQ
52572011-12-14 Yao Qi <yao@codesourcery.com>
5258
5259 * i386-low.c (i386_low_stopped_data_address): Initialize local
5260 variable `control'.
5261
6210a125
PA
52622011-12-13 Pedro Alves <pedro@codesourcery.com>
5263
5264 PR remote/13492
5265
5266 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5267 DR_CONTROL unless necessary. Extend comments.
5268 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5269 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5270
2ece8244
YQ
52712011-12-13 Yao Qi <yao@codesourcery.com>
5272
5273 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5274 macros.
5275 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5276
784867a5
JK
52772011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5278
5279 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5280 Print new debug message for such case.
5281
6bf36717
JK
52822011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5283
5284 Fix overlapping memcpy.
5285 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5286 the read_inferior_memory transfer.
5287 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5288 write_inferior_memory transfer.
5289 (set_fast_tracepoint_jump): New variable buf. Use it for the
5290 read_inferior_memory and write_inferior_memory transfers.
5291 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5292 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5293 Use it for the write_inferior_memory transfer.
5294 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5295 buffers.
5296
50275556
MR
52972011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5298
5299 * linux-low.c (fetch_register, store_register): Make code
5300 consistent, fix formatting.
5301
7325beb4
MR
53022011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5303
5304 * linux-low.c (usr_store_inferior_registers): Factor out code
5305 to handle individual registers into...
5306 (store_register): ... this new function.
5307
c642a434
UW
53082011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5309
5310 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5311 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5312 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5313 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5314 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5315 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5316 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5317 (srv_xmlfiles): Add new XML files.
5318
5319 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5320 and <sys/uio.h>.
5321 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5322 (init_registers_s390_linux32v1): Add prototype.
5323 (init_registers_s390_linux32v2): Likewise.
5324 (init_registers_s390_linux64v1): Likewise.
5325 (init_registers_s390_linux64v2): Likewise.
5326 (init_registers_s390x_linux64v1): Likewise.
5327 (init_registers_s390x_linux64v2): Likewise.
5328 (s390_num_regs): Increment to 52.
5329 (s390_regmap): Add orig_r2 register.
5330 (s390_num_regs_3264): Increment to 68.
5331 (s390_regmap_3264): Add orig_r2 register.
5332 (s390_collect_ptrace_register): Handle orig_r2 register.
5333 (s390_supply_ptrace_register): Likewise.
5334 (s390_fill_last_break): New function.
5335 (s390_store_last_break): Likewise.
5336 (s390_fill_system_call): New function.
5337 (s390_store_system_call): Likewise.
5338 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5339 register sets.
5340 (s390_check_regset): New function.
5341 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5342 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5343 Update target_regsets for available register sets.
5344
2268b414
JK
53452011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5346 Jan Kratochvil <jan.kratochvil@redhat.com>
5347
5348 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5349 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5350 New.
5351 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5352 * linux-low.h (struct process_info_private): New member r_debug.
5353 * server.c (handle_qxfer_libraries): Call
5354 the_target->qxfer_libraries_svr4.
5355 (handle_qxfer_libraries_svr4): New function.
5356 (qxfer_packets): New entry "libraries-svr4".
5357 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5358 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5359 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5360 PACKET_qXfer_libraries_svr4.
5361
d6db1fab
UW
53622011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5363
5364 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5365 PSW address/mask between 8-byte and 16-byte formats.
5366 (s390_supply_ptrace_register): Likewise.
5367 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5368 basic addressing mode bit.
5369
242f5f1c
SS
53702011-11-24 Stan Shebs <stan@codesourcery.com>
5371
5372 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5373
f196051f
SS
53742011-11-17 Stan Shebs <stan@codesourcery.com>
5375
5376 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5377 (tracing_start_time): New global.
5378 (tracing_stop_time): New global.
5379 (tracing_user_name): New global.
5380 (tracing_notes): New global.
5381 (tracing_stop_note): New global.
5382 (cmd_qtstart): Set traceframe_usage, start_time.
5383 (stop_tracing): Set stop_time.
5384 (cmd_qtstatus): Report additional status.
5385 (cmd_qtp): New function.
5386 (handle_tracepoint_query): Call it.
5387 (cmd_qtnotes): New function.
5388 (handle_tracepoint_general_set): Call it.
5389 (get_timestamp): Rename from tsv_get_timestamp.
5390
405f8e94
SS
53912011-11-14 Stan Shebs <stan@codesourcery.com>
5392 Kwok Cheung Yeung <kcy@codesourcery.com>
5393
5394 * linux-x86-low.c (small_jump_insn): New.
5395 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5396 trampoline and error message, build a trampoline and issue a small
5397 jump instruction to it.
5398 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5399 trampoline and error message.
5400 (x86_get_min_fast_tracepoint_insn_len): New.
5401 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5402 * linux-low.h (struct linux_target_ops): Add arguments to
5403 install_fast_tracepoint_jump_pad operation, add new operation.
5404 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5405 arguments.
5406 (linux_get_min_fast_tracepoint_insn_len): New function.
5407 (linux_target_op): Add new operation.
5408 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5409 (gdb_trampoline_buffer_end): Ditto.
5410 (gdb_trampoline_buffer_error): Ditto.
5411 (struct ipa_sym_addresses): Add fields for new IPA variables.
5412 (symbol_list): Add entries for new IPA variables.
5413 (struct tracepoint): Add fields to hold the address range of the
5414 trampoline used by the tracepoint.
5415 (trampoline_buffer_head): New static variable.
5416 (trampoline_buffer_tail): Ditto.
5417 (claim_trampoline_space): New function.
5418 (have_fast_tracepoint_trampoline_buffer): New function.
5419 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5420 structure.
5421 (install_fast_tracepoint): Ditto, also add error buffer argument.
5422 (cmd_qtminftpilen): New function.
5423 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5424 (fast_tracepoint_from_trampoline_address): New function.
5425 (fast_tracepoint_collecting): Handle trampoline as part of jump
5426 pad space.
5427 (set_trampoline_buffer_space): New function.
5428 (initialize_tracepoint): Initialize new IPA variables.
5429 * target.h (struct target_ops): Add arguments to
5430 install_fast_tracepoint_jump_pad operation, add new
5431 get_min_fast_tracepoint_insn_len operation.
5432 (target_get_min_fast_tracepoint_insn_len): New.
5433 (install_fast_tracepoint_jump_pad): Add arguments.
5434 * server.h (IPA_BUFSIZ): Define.
5435 * linux-i386-ipa.c: Include extra header files.
5436 (initialize_fast_tracepoint_trampoline_buffer): New function.
5437 (initialize_low_tracepoint): Call it.
5438 * server.h (set_trampoline_buffer_space): Declare.
5439 (claim_trampoline_space): Ditto.
5440 (have_fast_tracepoint_trampoline_buffer): Ditto.
5441
1e4d1764
YQ
54422011-11-14 Yao Qi <yao@codesourcery.com>
5443
5444 * server.c (handle_query): Handle InstallInTrace for qSupported.
5445 * tracepoint.c (add_tracepoint): Sort list.
5446 (install_tracepoint, download_tracepoint): New.
5447 (cmd_qtdp): Call them to install and download tracepoints.
5448 (sort_tracepoints): Removed.
5449 (cmd_qtstart): Update.
5450
5c73ff4e
YQ
54512011-11-14 Yao Qi <yao@codesourcery.com>
5452
5453 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5454 * mem-break.h: Declare.
5455 * tracepoint.c (cmd_qtstart): Move some code to ...
5456 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5457 New.
5458 (download_tracepoints): Move some code to ...
5459 (download_tracepoint_1): ... here. New.
5460
86a30030
YQ
54612011-11-08 Yao Qi <yao@codesourcery.com>
5462
5463 * remote-utils.c (relocate_instruction): A comment fix.
5464
8d26e50c
JB
54652011-11-07 Joel Brobecker <brobecker@adacore.com>
5466
5467 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5468 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5469 dr_status_mirror and dr_control_mirror from debug_reg_state.
5470 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5471 (i386_initial_stuff): Remove use of deleted globals.
5472 (i386_get_thread_context, i386_set_thread_context,
5473 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5474 from debug_reg_state.
5475
a59306a3
YQ
54762011-11-05 Yao Qi <yao@codesourcery.com>
5477
5478 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5479 address as TPOINT's.
5480
3065dfb6
SS
54812011-11-02 Stan Shebs <stan@codesourcery.com>
5482
5483 * tracepoint.c (agent_mem_read_string): New function.
5484 (eval_agent_expr): Call it for tracenz.
5485 * server.c (handle_query): Report support for tracenz.
5486
fd0d8c7c
YQ
54872011-11-02 Yao Qi <yao@codesourcery.com>
5488
5489 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5490
609086b1
YQ
54912011-11-02 Yao Qi <yao@codesourcery.com>
5492
5493 * target.h: Fix a typo in comment.
5494
b9fd1791
PA
54952011-10-31 Pedro Alves <pedro@codesourcery.com>
5496
5497 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5498 clobber the breakpoints' shadows with fast tracepoint jumps.
5499 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5500 * target.c (write_inferior_memory): Also pass MYADDR down to
5501 check_mem_write.
5502
03583c20
UW
55032011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5504
5505 * configure.ac: Check support for personality routine.
5506 * configure: Regenerate.
5507 * config.in: Likewise.
5508 * linux-low.c: Include <sys/personality.h>.
5509 Define ADDR_NO_RANDOMIZE if necessary.
5510 (linux_create_inferior): Disable address space randomization when
5511 forking inferior, if requested.
5512 (linux_supports_disable_randomization): New function.
5513 (linux_target_ops): Install it.
5514 * server.h (disable_randomization): Declare.
5515 * server.c (disable_randomization): New global variable.
5516 (handle_general_set): Handle QDisableRandomization.
5517 (handle_query): Likewise for qSupported.
5518 (main): Support --disable-randomization and --no-disable-randomization
5519 command line arguments.
5520 * target.h (struct target_ops): Add supports_disable_randomization.
5521 (target_supports_disable_randomization): New macro.
5522
723b724b
MF
55232011-09-29 Mike Frysinger <vapier@gentoo.org>
5524
5525 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5526 ifdef check.
5527 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5528 [!PT_GETDSBT] (target_loadmap): New definition.
5529 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5530 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5531 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5532 and PT_GETDSBT to LINUX_LOADMAP.
5533 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5534 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5535
55329a5c 55362011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5537
5538 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5539 (arm_linux_hwbp_cap): New static variable.
5540 (arm_linux_get_hwbp_cap): Replace by ...
5541 (arm_linux_init_hwbp_cap): ... this new function.
5542 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5543 (arm_linux_get_hw_watchpoint_count): Likewise.
5544 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5545 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5546 (arm_prepare_to_resume): Use perror_with_name instead of error.
5547
55329a5c 55482011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5549
5550 * linux-arm-low.c: Include <signal.h>.
5551 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5552 (struct arm_linux_hwbp_cap): New data type.
5553 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5554 (struct arm_linux_hw_breakpoint): New data type.
5555 (MAX_BPTS, MAX_WPTS): Define.
5556 (struct arch_process_info, struct arch_lwp_info): New data types.
5557 (arm_linux_get_hwbp_cap): New function.
5558 (arm_linux_get_hw_breakpoint_count): Likewise.
5559 (arm_linux_get_hw_watchpoint_count): Likewise.
5560 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5561 (arm_hwbp_control_initialize): Likewise.
5562 (arm_hwbp_control_is_enabled): Likewise.
5563 (arm_hwbp_control_is_initialized): Likewise.
5564 (arm_hwbp_control_disable): Likewise.
5565 (arm_linux_hw_breakpoint_equal): Likewise.
5566 (arm_linux_hw_point_initialize): Likewise.
5567 (struct update_registers_data): New data structure.
5568 (update_registers_callback: New function.
5569 (arm_insert_point): Likewise.
5570 (arm_remove_point): Likewise.
5571 (arm_stopped_by_watchpoint): Likewise.
5572 (arm_stopped_data_address): Likewise.
5573 (arm_new_process): Likewise.
5574 (arm_new_thread): Likewise.
5575 (arm_prepare_to_resume): Likewise.
5576 (the_low_target): Register arm_insert_point, arm_remove_point,
5577 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5578 arm_new_thread, and arm_prepare_to_resume.
5579
6b9801d4
SS
55802011-09-15 Stan Shebs <stan@codesourcery.com>
5581
5582 * server.h (struct emit_ops): Add compare-goto fields.
5583 * tracepoint.c (gdb_agent_op_sizes): New table.
5584 (emit_eq_goto): New function.
5585 (emit_ne_goto): New function.
5586 (emit_lt_goto): New function.
5587 (emit_le_goto): New function.
5588 (emit_gt_goto): New function.
5589 (emit_ge_goto): New function.
5590 (is_goto_target): New function.
5591 (compile_bytecodes): Recognize special cases of compare-goto
5592 combinations and call specialized emitters for them.
5593 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5594 (amd64_emit_ne_goto): New function.
5595 (amd64_emit_lt_goto): New function.
5596 (amd64_emit_le_goto): New function.
5597 (amd64_emit_gt_goto): New function.
5598 (amd64_emit_ge_goto): New function.
5599 (amd64_emit_ops): Add the new functions.
5600 (i386_emit_eq_goto): New function.
5601 (i386_emit_ne_goto): New function.
5602 (i386_emit_lt_goto): New function.
5603 (i386_emit_le_goto): New function.
5604 (i386_emit_gt_goto): New function.
5605 (i386_emit_ge_goto): New function.
5606 (i386_emit_ops): Add the new functions.
5607
bf15cbda
SS
56082011-09-08 Stan Shebs <stan@codesourcery.com>
5609
5610 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5611 (i386_emit_epilogue): Restore %ebx.
5612
943ca1dd
JZ
56132011-08-31 Jie Zhang <jzhang918@gmail.com>
5614
5615 * server.c (step_thread): Remove definition.
5616 (process_serial_event): Don't handle Hs.
5617 * server.h (step_thread): Remove declaration.
5618 * target.c (set_desired_inferior): Remove use of step_thread.
5619
e3deef73
LM
56202011-08-24 Luis Machado <lgustavo@codesourcery.com>
5621
5622 * linux-low.c: Include linux-procfs.h.
5623 (linux_attach_lwp_1): Update comments.
5624 (linux_attach): Scan for existing threads when attaching to a
5625 process that is the tgid.
5626 * Makefile.in: Update dependencies.
5627
13da1c97
LM
56282011-08-24 Luis Machado <lgustavo@codesourcery.com>
5629
5630 * configure.srv: Add linux-procfs.o dependencies.
5631
881127c9
YQ
56322011-08-14 Yao Qi <yao@codesourcery.com>
5633
5634 * target.h (struct target_ops): Fix indent.
5635 * win32-low.c (win32_target_ops): Fix comment.
5636
58dbd541
YQ
56372011-08-14 Andrew Jenner <andrew@codesourcery.com>
5638 Yao Qi <yao@codesourcery.com>
5639
5640 * Makefile.in (clean): Remove tic6x-*.c files.
5641 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5642 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5643 (tic6x-c64xp-linux.c): Likewise.
5644 * configure.srv: Add support for tic6x-*-uclinux.
5645 * linux-tic6x-low.c: New.
5646 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5647
78d85199
YQ
56482011-08-14 Andrew Stubbs <ams@codesourcery.com>
5649 Yao Qi <yao@codesourcery.com>
5650
5651 * target.h (struct target_ops): Add read_loadmap.
5652 * linux-low.c (struct target_loadseg): New type.
5653 (struct target_loadmap): New type.
5654 (linux_read_loadmap): New function.
5655 (linux_target_ops): Add linux_read_loadmap.
5656 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5657 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5658 to NULL.
78d85199 5659
a959a88d
EZ
56602011-08-05 Eli Zaretskii <eliz@gnu.org>
5661
5662 * win32-low.c: Include <stdint.h>.
5663
1ced966e
PA
56642011-07-22 Pedro Alves <pedro@codesourcery.com>
5665
5666 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5667 to the inferior here.
5668 (i386_remove_aligned_watchpoint): Ditto.
5669 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5670 fit part of the watchpoint in the debug registers.
5671 (i386_update_inferior_debug_regs): New.
5672 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5673 registers, and only update the inferior on success.
5674 (i386_low_remove_watchpoint): Ditto.
5675
d26e3629
KY
56762011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5677
5678 * linux-low.c (compare_ints, unique, list_threads, show_process,
5679 linux_core_of_thread): Delete.
5680 (linux_target_ops): Change linux_core_of_thread to
5681 linux_common_core_of_thread.
5682 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5683 * utils.c (malloc_failure): Change type of argument.
5684 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5685 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5686 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5687 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5688 (IPA_OBJS): Add common-utils-ipa.o.
5689 (ptid_h, linux_osdata_h): New macros.
5690 (server_h): Add common/common-utils.h, common/xml-utils.h,
5691 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5692 common/ptid.h.
5693 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5694 ptid.o, buffer.o): New rules.
5695 (linux-low.o): Add common/linux-osdata.h as a dependency.
5696 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5697 * configure.ac: Add AC_HEADER_DIRENT check.
5698 * config.in: Regenerate.
5699 * configure: Regenerate.
5700 * remote-utils.c (xml_escape_text): Delete.
5701 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5702 buffer_xml_printf): Move to common/buffer.c.
5703 * server.c (main): Remove call to initialize_inferiors.
5704 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5705 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5706 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5707 internal_error, gdb_assert, gdb_assert_fail): Delete.
5708 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5709 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5710 common/buffer.h.
5711 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5712 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5713 initialize_inferiors): Delete.
5714
2275a1a7
PA
57152011-07-20 Pedro Alves <pedro@codesourcery.com>
5716
5717 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5718 symbol error.
5719
0a5b1e09
PA
57202011-05-31 Pedro Alves <pedro@codesourcery.com>
5721
5722 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5723 assertion.
5724 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5725
6938fd34
YQ
57262011-05-26 Yao Qi <yao@codesourcery.com>
5727
5728 * Makefile.in (thread-db.o): Track dependence to
5729 common/gdb_thread_db.h.
5730 * thread-db.c: include gdb_thread_db.h from right place.
5731
b481f9e0
TT
57322011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5733
5734 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5735 __FILE__ and __LINE__ to internal_error.
5736
98a5dd13
DE
57372011-05-13 Doug Evans <dje@google.com>
5738
5739 * thread-db.c (try_thread_db_load_from_sdir): New function.
5740 (try_thread_db_load_from_dir): New function.
5741 (thread_db_load_search): Handle $sdir, ignore $pdir.
5742 Remove trying of system directories if search of
5743 libthread-db-search-path fails, that is now done via $sdir.
5744
d248b706
KY
57452011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5746
5747 * server.c (handle_query): Add EnableDisableTracepoints to the list
5748 of supported features.
43aaf8b6 5749 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5750 tracepoints.
43aaf8b6
PA
5751 (cmd_qtenable_disable): New.
5752 (cmd_qtstart): Install tracepoints even if disabled.
5753 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5754 receiving a QTEnable or QTDisable packet.
5755 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5756 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5757 tracepoints.
5758 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5759
84e578fb
DE
57602011-05-10 Doug Evans <dje@google.com>
5761
5762 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5763
71f55dd8
DE
57642011-05-04 Doug Evans <dje@google.com>
5765
5766 * linux-low.c (linux_join): Skip process lookup.
5767 * spu-low.c (spu_join): Ditto.
5768 * server.c (join_inferiors_callback): Delete.
5769 (process_serial_event): For 'D' packet (detach) call join_inferior
5770 directly.
5771
4d393d60
JM
57722011-05-04 Joseph Myers <joseph@codesourcery.com>
5773
5774 * README: Don't mention xscale*-*-linux*.
5775 * configure.srv (xscale*-*-linux*): Don't handle target.
5776
b00ad6ff
NF
57772011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5778
5779 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5780 casting pointers.
5781 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5782 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5783 (i386_emit_void_call_2): Likewise.
5784
af96c192
YQ
57852011-04-26 Yao Qi <yao@codesourcery.com>
5786
43aaf8b6
PA
5787 * linux-low.c: Move common macros to linux-ptrace.h.
5788 Include linux-ptrace.h.
af96c192
YQ
5789 * Makefile.in (linux_ptrace_h): New.
5790 (linux-low.o): Depends on linux-ptrace.h.
5791
03f2bd59
JK
57922011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5793
5794 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5795 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5796 (remote_prepare): New function with most of the TCP code from ...
5797 (remote_open): ... here. Detect PORT here unconditionally. Move also
5798 setting transport_is_reliable.
5799 * server.c (run_once): New variable.
5800 (gdbserver_usage): Document it.
5801 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5802 the first run if RUN_ONCE.
5803 * server.h (run_once, remote_prepare): New declarations.
5804
7a9dd1b2
TT
58052011-04-19 Tom Tromey <tromey@redhat.com>
5806
5807 * win32-low.c (handle_load_dll): Remove duplicate "the".
5808
81239425
PM
58092011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5810
5811 Remove support for old Cygwin 1.5 versions.
5812 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5813 function to avoid warning.
5814 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5815 warning.
5816
9e0627f1
PM
58172011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5818
5819 * gdbserver/server.h (Macro _): Define it if not available.
5820
588eebee
MS
58212011-03-14 Michael Snyder <msnyder@vmware.com>
5822
348af9f7 5823 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5824
43f70d4c
JB
58252011-03-10 Joel Brobecker <brobecker@adacore.com>
5826
5827 * Makefile.in (maintainer-clean realclean distclean): Remove
5828 "make ... subdir_do" command.
5829
348af9f7
MS
58302011-03-10 Michael Snyder <msnyder@vmware.com>
5831
5832 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5833
5834 * server.c (handle_v_run): Free alloced buffer on early return.
5835
e637a4f5
YQ
58362011-03-09 Yao Qi <yao@codesourcery.com>
5837
5838 Revert:
5839 2011-03-04 Yao Qi <yao@codesourcery.com>
5840
5841 * Makefile.in: Remove GNU make feature --directory.
5842
5843 2011-03-05 Yao Qi <yao@codesourcery.com>
5844
5845 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5846 (subdir_do): New make target. Copied from gdb/Makefile.
5847 (maintainer-clean, realclean, distclean, clean): Call corresponding
5848 make targets in common/Makefile.
5849
5850 2011-02-11 Yao Qi <yao@codesourcery.com>
5851
5852 * configure.ac: Call AC_PROG_RANLIB.
5853 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5854 * configure: Regenerate.
5855
e6edda56
JK
58562011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5857
5858 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5859
e5141119
JB
58602011-03-06 Yao Qi <yao@codesourcery.com>
5861
5862 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5863
64794aa4
JB
58642011-03-05 Yao Qi <yao@codesourcery.com>
5865
5866 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5867 (subdir_do): New make target. Copied from gdb/Makefile.
5868 (maintainer-clean, realclean, distclean, clean): Call corresponding
5869 make targets in common/Makefile.
5870
7a762829
YQ
58712011-03-04 Yao Qi <yao@codesourcery.com>
5872
5873 * Makefile.in: Remove GNU make feature --directory.
5874
348af9f7
MS
58752011-03-04 Michael Snyder <msnyder@vmware.com>
5876
5877 * server.c (queue_stop_reply): Call xmalloc not malloc.
5878
58792011-03-02 Michael Snyder <msnyder@vmware.com>
5880
5881 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5882
9f72fee2
MS
58832011-02-28 Michael Snyder <msnyder@vmware.com>
5884
588eebee
MS
5885 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5886 (cmd_qtframe): Ditto.
5887 (cmd_qtbuffer): Ditto.
5888 (cmd_bigqtbuffer): Ditto.
5889
9f72fee2
MS
5890 * utils.c (decimal2str): Initialize 'width' to nine, then
5891 don't mess with it.
5892
8040bd49
UW
58932011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5894
5895 * hostio.c (require_data): Free *data, not data.
5896
7e52cbd0
JK
58972011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5898
5899 * hostio.c (require_data): Use free, not xfree.
5900
9130f83e
MS
59012011-02-27 Michael Snyder <msnyder@vmware.com>
5902
4b812f4e
MS
5903 * server.c (handle_query): Discard unused value.
5904
9130f83e
MS
5905 * hostio.c (require_data): Free malloc memory before returning
5906 error.
5907
69d37113
MS
59082011-02-26 Michael Snyder <msnyder@vmware.com>
5909
5910 * linux-low.c (list_threads): Call closedir for dirent.
5911
35f5825a
MS
59122011-02-27 Michael Snyder <msnyder@vmware.com>
5913
2a589cef
MS
5914 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5915 a case statement falls through.
5916
0adea5f7
MS
5917 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5918
35f5825a
MS
5919 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5920 in comparison.
5921
238f1c74
MS
59222011-02-26 Michael Snyder <msnyder@vmware.com>
5923
5924 * utils.c (decimal2str): Eliminate dead code and dead param.
5925 (pulongest): Drop dead param from call to decimal2str.
5926 (plongest): Ditto.
5927
633ff500
JB
59282011-02-24 Joel Brobecker <brobecker@adacore.com>
5929
5930 Revert the following patch (not approved yet):
5931 2011-02-21 Hui Zhu <teawater@gmail.com>
5932 * tracepoint.c (tp_printf): New function.
5933 (eval_agent_expr): Handle gdb_agent_op_printf.
5934
f9c6ff72
HZ
59352011-02-21 Hui Zhu <teawater@gmail.com>
5936
5937 * tracepoint.c (tp_printf): New function.
5938 (eval_agent_expr): Handle gdb_agent_op_printf.
5939
94d5e490
TT
59402011-02-18 Tom Tromey <tromey@redhat.com>
5941
5942 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5943 (tracepoint.o): Likewise.
5944 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5945 (gdb_agent_op_names): Likewise.
5946
c7f96d2b
TT
59472011-02-18 Tom Tromey <tromey@redhat.com>
5948
5949 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5950 gdb_agent_op_rot>: New constants.
5951 (gdb_agent_op_names): Add pick and roll.
5952 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5953 cases.
5954
0feedb2c
JK
59552011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5956
5957 * aclocal.m4: Regenerated with aclocal-1.11.1.
5958
b3b9301e
PA
59592011-02-14 Pedro Alves <pedro@codesourcery.com>
5960
5961 * server.c (handle_qxfer_traceframe_info): New.
5962 (qxfer_packets): Register "traceframe-info".
5963 (handle_query): Report support for qXfer:traceframe-info:read+.
5964 * tracepoint.c (match_blocktype): New.
5965 (traceframe_find_block_type): Rename to ...
5966 (traceframe_walk_blocks): ... this. Add callback filter argument,
5967 and use it.
5968 (traceframe_find_block_type): New, reimplemented on top of
5969 traceframe_walk_blocks.
5970 (build_traceframe_info_xml): New.
5971 (traceframe_read_info): New.
5972 * server.h (traceframe_read_info): Declare.
5973
4f3e6fb7
YQ
59742011-02-11 Yao Qi <yao@codesourcery.com>
5975
5976 * configure.ac: Call AC_PROG_RANLIB.
5977 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5978 * configure: Regenerate.
5979
764880b7
PA
59802011-02-07 Pedro Alves <pedro@codesourcery.com>
5981
5982 * server.c (gdb_read_memory): Change return semantics to allow
5983 partial transfers.
5984 (handle_search_memory_1): Adjust.
5985 (process_serial_event) <'m' packet>: Handle partial transfers.
5986 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5987
1c79eb8a
PA
59882011-01-28 Pedro Alves <pedro@codesourcery.com>
5989
5990 * regcache.c (init_register_cache): Initialize
5991 regcache->register_status.
5992 (free_register_cache): Release regcache->register_status.
5993 (regcache_cpy): Copy register_status.
5994 (registers_to_string): Print 'x's for unavailable registers.
5995 (supply_register): Mark the register's status valid or
5996 unavailable, depending on whether a buffer was passed in or not.
5997 (supply_register_zeroed): New.
5998 (supply_regblock): Mark the registers' status valid or
5999 unavailable, depending on whether a buffer was passed in or not.
6000 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6001 (struct regcache): New `register_status' field.
6002 (supply_register_zeroed): Declare.
6003 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6004 supply_register_zeroed, rather than passing a NULL buffer to
6005 supply_register.
6006 * tracepoint.c (fetch_traceframe_registers): Update comment.
6007
85724a0e
PA
60082011-01-28 Pedro Alves <pedro@codesourcery.com>
6009
6010 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6011 buffer explicit.
6012
d08aafef
PA
60132011-01-25 Pedro Alves <pedro@codesourcery.com>
6014
6015 * server.h (decode_xfer_write): Change prototype.
6016 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6017 and don't extract the annex here.
6018 * server.c (decode_xfer_read): Remove `annex' parameter,
6019 and don't extract the annex here.
6020 (decode_xfer): New.
6021 (struct qxfer): New.
6022 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6023 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6024 (handle_qxfer_statictrace): New functions, abstracted out from
6025 handle_query, and made to use the struct qxfer interface.
6026 (handle_threads_qxfer_proper): Rename to ...
6027 (handle_qxfer_threads_proper): ... this.
6028 (handle_threads_qxfer): Rename to ...
6029 (handle_qxfer_threads): ... this. Adjust.
6030 (qxfer_packets): New array.
6031 (handle_qxfer): New function.
6032 (handle_query): Use handle_qxfer.
6033
493e2a69
MS
60342011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6035
6036 * gdbreplay.c: Shorten lines of >= 80 columns.
6037 * linux-low.c: Ditto.
6038 * linux-ppc-low.c: Ditto.
6039 * linux-s390-low.c: Ditto.
6040 * linux-sparc-low.c: Ditto.
6041 * linux-x86-low.c: Ditto.
6042 * linux-xtensa-low.c: Ditto.
6043 * mem-break.c: Ditto.
6044 * nto-low.c: Ditto.
6045 * regcache.h: Ditto.
6046 * remote-utils.c: Ditto.
6047 * server.c: Ditto.
6048 * server.h: Ditto.
6049 * thread-db.c: Ditto.
6050 * tracepoint.c: Ditto.
6051 * utils.c: Ditto.
6052 * win32-low.h: Ditto.
6053
44944448
JB
60542011-01-05 Joel Brobecker <brobecker@adacore.com>
6055
6056 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6057 update.
6058
71ce852c
JB
60592011-01-01 Joel Brobecker <brobecker@adacore.com>
6060
6061 * server.c (gdbserver_version): Update copyright year in version
6062 output.
6063 * gdbreplay.c (gdbreplay_version): Ditto.
6064
eb826dc6
MF
60652010-12-29 Jie Zhang <jie.zhang@analog.com>
6066
6067 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6068 * linux-bfin-low.c: New file.
6069 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6070 PT_DATA_ADDR for BFIN targets.
6071 * Makefile.in (SFILES): Add linux-bfin-low.c.
6072 (clean): Remove reg-bfin.c.
6073 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6074 * README: Mention supported Blackfin targets.
6075
39ab222a
MF
60762010-12-23 Mike Frysinger <vapier@gentoo.org>
6077
6078 * .gitignore: New file.
6079
a1f2ce7d
MF
60802010-11-16 Mike Frysinger <vapier@gentoo.org>
6081
6082 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6083
f474844c
JZ
60842010-10-22 Jie Zhang <jie@codesourcery.com>
6085
6086 * Makefile.in: Add FLAGS_TO_PASS variable.
6087 (install): Remove dependency of install-only and recursively
6088 invoke make for install-only.
6089
f1048712
DE
60902010-10-04 Doug Evans <dje@google.com>
6091
6092 * Makefile.in (uninstall): Use $(DESTDIR).
6093
b53a1623
PA
60942010-09-24 Pedro Alves <pedro@codesourcery.com>
6095
e6ee044d
PA
6096 PR gdb/11842
6097
b53a1623
PA
6098 * linux-x86-low.c (compat_siginfo_from_siginfo)
6099 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6100 si_code is < 0. Check for si_code == SI_TIMER before checking for
6101 si_code < 0.
6102
fa1bd1e4
JB
61032010-09-13 Joel Brobecker <brobecker@adacore.com>
6104
6105 * lynx-i386-low.c: New file.
6106 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6107
47fac8f8
JB
61082010-09-13 Joel Brobecker <brobecker@adacore.com>
6109
6110 * lynx-low.c (ptrace_request_to_str): Remove handling for
6111 request values that have been removed in LynxOS 5.x.
6112
1adfc54d
JB
61132010-09-13 Joel Brobecker <brobecker@adacore.com>
6114
6115 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6116 <ptrace.h>
6117
c2a66c29
NS
61182010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6119
6120 * configure.ac: Add --enable-inprocess-agent option.
6121 * configure: Rebuilt.
6122
32fcada3
YQ
61232010-09-06 Yao Qi <yao@codesourcery.com>
6124
6125 * linux-low.c (linux_kill): Remove unused variable.
6126 (linux_stabilize_threads): Likewise.
6127 * server.c (start_inferior): Likewise.
6128 (queue_stop_reply_callback): Likewise.
6129 * tracepoint.c (do_action_at_tracepoint): Likewise.
6130
0cccb683
YQ
61312010-09-06 Yao Qi <yao@codesourcery.com>
6132
6133 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6134 on return.
6135
423ec54c
JK
61362010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6137
6138 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6139
12ac6819
PA
61402010-09-06 Pedro Alves <pedro@codesourcery.com>
6141
6142 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6143 "$(IPA_DEPFILES)".
6144
8ed54b31
JB
61452010-09-01 Joel Brobecker <brobecker@adacore.com>
6146
6147 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6148 gdbserver/lynx-ppc-low.c: New files.
6149 * Makefile.in (lynx_low_h): New variable.
6150 (lynx-low.o, lynx-ppc-low.o): New rules.
6151 * configure.ac: On LynxOS, link with -lnetinet.
6152 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6153 * configure: regenerate.
6154
bb0116a4
JB
61552010-09-01 Joel Brobecker <brobecker@adacore.com>
6156
6157 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6158 * configure.ac: Add check for vasprintf and vsnprintf.
6159 * configure, config.in: Regenerate.
6160 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6161
a778ab81 61622010-09-01 Joel Brobecker <brobecker@adacore.com>
6163
6164 * gdbreplay.c: Move include of alloca.h up, next to include of
6165 malloc.h.
6166 * server.h: Add include of malloc.h.
6167 * mem-break.c: Remove include of malloc.h.
6168 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6169
8b034a19 61702010-09-01 Joel Brobecker <brobecker@adacore.com>
6171
6172 * Makefile.in (memmem.o): Build with -Wno-error.
6173
61742010-09-01 Joel Brobecker <brobecker@adacore.com>
6175
6176 * utils.c (xsnprintf): Make non-static.
6177 * server.h: Add xsnprintf declaration.
6178 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6179 replace calls to snprintf by calls to xsnprintf throughout.
6180
61812010-09-01 Joel Brobecker <brobecker@adacore.com>
6182
6183 * configure.ac: Add configure check for alloca.
6184 * configure, config.in: Regenerate.
6185 * server.h: Include alloca.h if it exists.
6186 * gdbreplay.c: Include alloca.h if it exists.
6187
1a981360
PA
61882010-08-28 Pedro Alves <pedro@codesourcery.com>
6189
6190 * linux-low.c (__SIGRTMIN): Define if not already defined.
6191 (linux_create_inferior): Check for __ANDROID__ rather than
6192 __SIGRTMIN.
6193 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6194 are already deferred.
6195 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6196 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6197 stopped and already has a pending signal to report.
6198 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6199 a pending signal to report or is moving out of a jump pad.
6200 (linux_init_signals): Check for __ANDROID__ rather than
6201 __SIGRTMIN.
6202
b4d51a55
PA
62032010-08-28 Pedro Alves <pedro@codesourcery.com>
6204
6205 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6206 debug_threads check. Avoid a linear search when not doing debug
6207 output.
6208
ec48365d
PA
62092010-08-27 Pedro Alves <pedro@codesourcery.com>
6210
6211 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6212 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6213 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6214 (process_event): Change local fd's type to gdb_fildes_t.
6215 (create_file_handler): Adjust prototype.
6216 (delete_file_handler): Adjust prototype.
6217 (handle_file_event): Adjust prototype. Use pfildes.
6218 (create_file_event): Adjsut prototype.
6219 * remote-utils.c (remote_desc, listen_desc): Change type to
6220 gdb_fildes_t.
6221 * server.h: New gdb_fildes_t typedef.
6222 [USE_WIN32API]: Include winsock2.h.
6223 (delete_file_handler, add_file_handler): Adjust prototypes.
6224 (pfildes): Declare.
6225 * utils.c (pfildes): New.
6226
854d88f0
PA
62272010-08-27 Pedro Alves <pedro@codesourcery.com>
6228
6229 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6230 * configure: Regenerate.
6231
0146f85b
PA
62322010-08-27 Pedro Alves <pedro@codesourcery.com>
6233
6234 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6235 (linux_done_accessing_memory): ... this.
6236 (linux_target_ops): Adjust.
6237 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6238 * nto-low.c (nto_target_ops): Adjust comment.
6239 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6240 * spu-low.c (spu_target_ops): Adjust comment.
6241 * target.h (target_ops): Rename unprepare_to_access_memory field
6242 to done_accessing_memory.
6243 (unprepare_to_access_memory): Rename to ...
6244 (done_accessing_memory): ... this.
6245
90d74c30
PA
62462010-08-26 Pedro Alves <pedro@codesourcery.com>
6247
6248 * linux-low.c (linux_prepare_to_access_memory): New.
6249 (linux_unprepare_to_access_memory): New.
6250 (linux_target_ops): Install them.
6251 * server.c (read_memory): Rename to ...
6252 (gdb_read_memory): ... this. Use
6253 prepare_to_access_memory/prepare_to_access_memory.
6254 (write_memory): Rename to ...
6255 (gdb_write_memory): ... this. Use
6256 prepare_to_access_memory/prepare_to_access_memory.
6257 (handle_search_memory_1): Adjust.
6258 (process_serial_event): Adjust.
6259 * target.h (struct target_ops): New fields
6260 prepare_to_access_memory and unprepare_to_access_memory.
6261 (prepare_to_access_memory, unprepare_to_access_memory): New.
6262 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6263 prepare_to_access_memory/prepare_to_access_memory.
6264 * nto-low.c (nto_target_ops): Adjust.
6265 * spu-low.c (spu_target_ops): Adjust.
6266 * win32-low.c (win32_target_ops): Adjust.
6267
fd467969
PA
62682010-08-26 Pedro Alves <pedro@codesourcery.com>
6269
6270 * Makefile.in (WARN_CFLAGS): Get it from configure.
6271 (WERROR_CFLAGS): New.
6272 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6273 * configure.ac: Introduce --enable-werror, which adds -Werror to
6274 the compiler command line. Enabled by default. Disable with
6275 --disable-werror. Add -Wdeclaration-after-statement
6276 Wpointer-arith and -Wformat-nonliteral to warning flags.
6277 * configure: Regenerate.
6278
331e2f5f
PA
62792010-08-26 Pedro Alves <pedro@codesourcery.com>
6280
6281 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6282
e581f2b4
PA
62832010-08-26 Pedro Alves <pedro@codesourcery.com>
6284
6285 * gdbreplay.c (remote_error): New.
6286 (gdbchar): New.
6287 (expect): Use gdbchar. Check for error reading from GDB.
6288 Clarify sync error output.
6289 (play): Check for errors writing to GDB.
6290 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6291 * remote-utils.c (getpkt): Check for errors writing to the remote
6292 descriptor.
6293
3c11dd79
PA
62942010-08-25 Pedro Alves <pedro@codesourcery.com>
6295
6296 * linux-low.c (linux_wait_1): Move non-debugging code out of
6297 `debug_threads' control.
6298
d20a8ad9
PA
62992010-08-25 Pedro Alves <pedro@codesourcery.com>
6300
6301 * linux-low.c (linux_wait_1): Don't set last_status here.
6302 * server.c (push_event, queue_stop_reply_callback): Assert we're
6303 not pushing a TARGET_WAITKIND_IGNORE event.
6304 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6305 (myresume, handle_target_event): Set the thread's last_resume_kind
6306 and last_status from the target returned status.
6307
964e4306
PA
63082010-08-25 Pedro Alves <pedro@codesourcery.com>
6309
6310 PR threads/10729
6311
6312 * linux-x86-low.c (update_debug_registers_callback): New.
6313 (i386_dr_low_set_addr): Use it.
6314 (i386_dr_low_get_addr): New.
6315 (i386_dr_low_set_control): Use update_debug_registers_callback.
6316 (i386_dr_low_get_control): New.
6317 (i386_dr_low_get_status): Adjust.
6318 * linux-low.c (linux_stop_lwp): New.
6319 * linux-low.h (linux_stop_lwp): Declare.
6320
6321 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6322 argument instead of a i386_debug_reg_state.
6323 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6324 a i386_debug_reg_state.
6325 (i386_insert_aligned_watchpoint): Adjust.
6326 (i386_remove_aligned_watchpoint): Adjust.
6327 (i386_low_stopped_data_address): Read the debug registers from the
6328 inferior instead of from the mirrors.
6329 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6330 (i386_dr_low_get_addr): Declare.
6331 (i386_dr_low_get_control): Declare.
6332 (i386_dr_low_get_status): Change prototype.
6333
6334 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6335 (i386_dr_low_get_addr): New.
6336 (i386_dr_low_get_control): New.
6337 (i386_dr_low_get_status): Adjust prototype. Return
6338 dr_status_mirror.
6339 (i386_initial_stuff): Clear dr_status_mirror and
6340 dr_control_mirror.
6341 (i386_get_thread_context): Adjust.
6342 (i386_set_thread_context): Adjust.
6343 (i386_thread_added): Adjust.
6344
5f21a75b
PA
63452010-08-24 Pedro Alves <pedro@codesourcery.com>
6346
6347 * linux-low.h (linux_thread_area): Delete declaration.
6348
3e4c1235
TS
63492010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6350
6351 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6352 after its termination.
6353
1971b033
PA
63542010-08-09 Pedro Alves <pedro@codesourcery.com>
6355
6356 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6357 (gdb_wants_all_stopped): Delete.
6358 (linux_wait_1): Don't call them.
6359 * server.c (handle_v_cont): Tag all threads as want-stopped.
6360 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6361 stopped as "client-wants-stopped".
6362
310444ac
PA
63632010-07-31 Pedro Alves <pedro@codesourcery.com>
6364
6365 * Makefile.in (signals_h): New.
6366 (server_h): Depend on it.
6367 (server.o): Don't depend on $(signals_def).
6368 (signals.o): Depend on $(signals_def).
6369
a19cae16
JK
63702010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6371
6372 * Makefile.in (signals_def): New.
6373 (server_h): Append include/gdb/signals.h and signals_def.
6374 (server.o): Append signals_def.
6375
30d50328
JK
63762010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6377
6378 * server.c (handle_target_event): Use target_signal_to_host for
6379 resume_info.sig initialization.
6380 * target.h (struct thread_resume) <sig>: New comment.
6381
5c3216e2
OS
63822010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6383
c6f46ca0
OS
6384 * server.c (handle_query): strcpy() the returned string from paddress()
6385 instead of sprintf().
5c3216e2
OS
6386 * utils.c (paddress): Return phex_nz().
6387
6bd31874
JB
63882010-07-07 Joel Brobecker <brobecker@adacore.com>
6389
6390 * server.c (handle_v_cont): Call mourn_inferior if process
6391 just exited.
6392 (myresume): Likewise.
6393
0fb4aa4b
PA
63942010-07-01 Pedro Alves <pedro@codesourcery.com>
6395
6396 Static tracepoints, and integration with UST.
6397
6398 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6399 * mem-break.c (uninsert_all_breakpoints)
6400 (reinsert_all_breakpoints): New.
6401 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6402 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6403 (gdb_agent_ust_loaded, helper_thread_id)
6404 (gdb_agent_helper_thread_id): New macros.
6405 (struct ipa_sym_addresses): Add addr_ust_loaded,
6406 addr_helper_thread_id, addr_cmd_buf.
6407 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6408 (in_process_agent_loaded_ust): New.
6409 (write_e_ust_not_loaded): New.
6410 (maybe_write_ipa_ust_not_loaded): New.
6411 (struct collect_static_trace_data_action): New.
6412 (enum tracepoint_type) <static_tracepoint>: New.
6413 (struct tracepoint) <handle>: Mention static tracepoints.
6414 (struct static_tracepoint_ctx): New.
6415 (CMD_BUF_SIZE): New.
6416 (add_tracepoint_action): Handle static tracepoint actions.
6417 (unprobe_marker_at): New.
6418 (clear_installed_tracepoints): Handle static tracepoints.
6419 (cmd_qtdp): Handle static tracepoints.
6420 (probe_marker_at): New.
6421 (cmd_qtstart): Handle static tracepoints.
6422 (response_tracepoint): Handle static tracepoints.
6423 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6424 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6425 (get_context_regcache): Handle static tracepoints.
6426 (do_action_at_tracepoint): Handle static tracepoint actions.
6427 (traceframe_find_block_type): Handle static trace data blocks.
6428 (traceframe_read_sdata): New.
6429 (download_tracepoints): Download static tracepoint actions.
6430 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6431 (GDB_PROBE_NAME): New.
6432 (ust_ops): New.
6433 (GET_UST_SYM): New.
6434 (USTF): New.
6435 (dlsym_ust): New.
6436 (ust_marker_to_static_tracepoint): New.
6437 (gdb_probe): New.
6438 (collect_ust_data_at_tracepoint): New.
6439 (gdb_ust_probe): New.
6440 (UNIX_PATH_MAX, SOCK_DIR): New.
6441 (gdb_ust_connect_sync_socket): New.
6442 (resume_thread, stop_thread): New.
6443 (run_inferior_command): New.
6444 (init_named_socket): New.
6445 (gdb_ust_socket_init): New.
6446 (cstr_to_hexstr): New.
6447 (next_st): New.
6448 (first_marker, next_marker): New.
6449 (response_ust_marker): New.
6450 (cmd_qtfstm, cmd_qtsstm): New.
6451 (unprobe_marker_at, probe_marker_at): New.
6452 (cmd_qtstmat, gdb_ust_thread): New.
6453 (gdb_ust_init): New.
6454 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6455 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6456 (ST_REGENTRY): New.
6457 (x86_64_st_collect_regmap): New.
6458 (X86_64_NUM_ST_COLLECT_GREGS): New.
6459 (AMD64_RIP_REGNUM): New.
6460 (supply_static_tracepoint_registers): New.
6461 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6462 (ST_REGENTRY): New.
6463 (i386_st_collect_regmap): New.
6464 (i386_NUM_ST_COLLECT_GREGS): New.
6465 (supply_static_tracepoint_registers): New.
6466 * server.c (handle_query): Handle qXfer:statictrace:read.
6467 <qSupported>: Report support for StaticTracepoints, and
6468 qXfer:statictrace:read features.
6469 * server.h (traceframe_read_sdata)
6470 (supply_static_tracepoint_registers): Declare.
6471 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6472 (unpack_varlen_hex): Include in IPA build.
6473 * Makefile.in (ustlibs, ustinc): New.
6474 (IPA_OBJS): Add remote-utils-ipa.o.
6475 ($(IPA_LIB)): Link -ldl and -lpthread.
6476 (UST_CFLAGS): New.
6477 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6478 * config.in, configure: Regenerate.
6479
9e4344e5
PA
64802010-06-20 Ian Lance Taylor <iant@google.com>
6481 Pedro Alves <pedro@codesourcery.com>
6482
6483 * linux-x86-low.c (always_true): Delete.
6484 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6485 trying to fool the compiler with always_true.
6486
c6beb2cb
PA
64872010-06-20 Pedro Alves <pedro@codesourcery.com>
6488
6489 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6490 conditions in gdbserver.
6491
d2ed6730
UW
64922010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6493
6494 * spu-low.c (spu_read_memory): Wrap around local store limit.
6495 (spu_write_memory): Likewise.
6496
4e29fb54
PA
64972010-06-15 Pedro Alves <pedro@codesourcery.com>
6498
6499 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6500 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6501 LONGEST uses.
6502 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6503 uses.
6504 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6505 uses with LONGEST uses.
6506
6a271cae
PA
65072010-06-14 Stan Shebs <stan@codesourcery.com>
6508 Pedro Alves <pedro@codesourcery.com>
6509
6510 Bytecode compiler.
6511
6512 * linux-x86-low.c: Include limits.h.
6513 (add_insns): New.
6514 (always_true): New.
6515 (EMIT_ASM): New.
6516 (EMIT_ASM32): New.
6517 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6518 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6519 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6520 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6521 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6522 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6523 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6524 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6525 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6526 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6527 (amd64_emit_void_call_2): New.
6528 (amd64_emit_ops): New.
6529 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6530 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6531 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6532 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6533 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6534 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6535 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6536 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6537 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6538 (i386_emit_stack_adjust, i386_emit_int_call_1)
6539 (i386_emit_void_call_2): New.
6540 (i386_emit_ops): New.
6541 (x86_emit_ops): New.
6542 (the_low_target): Install x86_emit_ops.
6543 * server.h (struct emit_ops): New.
6544 (get_raw_reg_func_addr): Declare.
6545 (current_insn_ptr, emit_error): Declare.
6546 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6547 (set_trace_state_variable_value): New defines.
6548 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6549 addr_get_trace_state_variable_value and
6550 addr_set_trace_state_variable_value.
6551 (symbol_list): New fields for get_raw_reg,
6552 get_trace_state_variable_value and set_trace_state_variable_value.
6553 (condfn): New typedef.
6554 (struct tracepoint): New field `compiled_cond'.
6555 (do_action_at_tracepoint): Clear compiled_cond.
6556 (get_trace_state_variable_value, set_trace_state_variable_value):
6557 Export in the IPA.
6558 (condition_true_at_tracepoint): If there's a compiled condition,
6559 run that.
6560 (current_insn_ptr, emit_error): New globals.
6561 (struct bytecode_address): New.
6562 (get_raw_reg_func_addr): New.
6563 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6564 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6565 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6566 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6567 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6568 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6569 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6570 (compile_tracepoint_condition, compile_bytecodes): New.
6571 * target.h (emit_ops): Forward declare.
6572 (struct target_ops): New field emit_ops.
6573 (target_emit_ops): New.
6574 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6575 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6576 * linux-low.c (linux_emit_ops): New.
6577 (linux_target_ops): Install it.
6578 * linux-low.h (struct linux_target_ops): New field emit_ops.
6579
92b72907
UW
65802010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6581
6582 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6583 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6584
fa593d66
PA
65852010-06-01 Pedro Alves <pedro@codesourcery.com>
6586 Stan Shebs <stan@codesourcery.com>
6587
6588 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6589 (all): Depend on $(extra_libraries).
6590 (install-only): Install the IPA.
6591 (IPA_OBJS, IPA_LIB): New.
6592 (clean): Remove the IPA lib.
6593 (IPAGENT_CFLAGS): New.
6594 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6595 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6596 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6597 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6598 * configure.ac: Check for atomic builtins support in the compiler.
6599 (IPA_DEPFILES, extra_libraries): Define.
6600 * configure.srv (ipa_obj): Add description.
6601 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6602 (i[34567]86-*-linux*): Set ipa_obj.
6603 (x86_64-*-linux*): Set ipa_obj.
6604 * linux-low.c (stabilizing_threads): New.
6605 (supports_fast_tracepoints): New.
6606 (linux_detach): Stabilize threads before detaching.
6607 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6608 the lwp is either not stabilizing, or is moving out of a jump pad.
6609 (linux_fast_tracepoint_collecting): New.
6610 (maybe_move_out_of_jump_pad): New.
6611 (enqueue_one_deferred_signal): New.
6612 (dequeue_one_deferred_signal): New.
6613 (linux_wait_for_event_1): If moving out of a jump pad, defer
6614 pending signals to later.
6615 (linux_stabilize_threads): New.
6616 (linux_wait_1): Check if threads need moving out of jump pads, and
6617 do it if so.
6618 (stuck_in_jump_pad_callback): New.
6619 (move_out_of_jump_pad_callback): New.
6620 (lwp_running): New.
6621 (linux_resume_one_lwp): Handle moving out of jump pads.
6622 (linux_set_resume_request): Dequeue deferred signals.
6623 (need_step_over_p): Also step over fast tracepoint jumps.
6624 (start_step_over): Also uninsert fast tracepoint jumps.
6625 (finish_step_over): Also reinsert fast tracepoint jumps.
6626 (linux_install_fast_tracepoint_jump): New.
6627 (linux_target_ops): Install linux_stabilize_threads and
6628 linux_install_fast_tracepoint_jump_pad.
6629 * linux-low.h (linux_target_ops) <get_thread_area,
6630 install_fast_tracepoint_jump_pad>: New fields.
6631 (struct lwp_info) <collecting_fast_tracepoint,
6632 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6633 (linux_get_thread_area): Declare.
6634 * linux-x86-low.c (jump_insn): New.
6635 (x86_get_thread_area): New.
6636 (append_insns): New.
6637 (push_opcode): New.
6638 (amd64_install_fast_tracepoint_jump_pad): New.
6639 (i386_install_fast_tracepoint_jump_pad): New.
6640 (x86_install_fast_tracepoint_jump_pad): New.
6641 (the_low_target): Install x86_get_thread_area and
6642 x86_install_fast_tracepoint_jump_pad.
6643 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6644 (struct fast_tracepoint_jump): New.
6645 (fast_tracepoint_jump_insn): New.
6646 (fast_tracepoint_jump_shadow): New.
6647 (find_fast_tracepoint_jump_at): New.
6648 (fast_tracepoint_jump_here): New.
6649 (delete_fast_tracepoint_jump): New.
6650 (set_fast_tracepoint_jump): New.
6651 (uninsert_fast_tracepoint_jumps_at): New.
6652 (reinsert_fast_tracepoint_jumps_at): New.
6653 (set_breakpoint_at): Use write_inferior_memory.
6654 (uninsert_raw_breakpoint): Use write_inferior_memory.
6655 (check_mem_read): Mask out fast tracepoint jumps.
6656 (check_mem_write): Mask out fast tracepoint jumps.
6657 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6658 (set_fast_tracepoint_jump): Declare.
6659 (delete_fast_tracepoint_jump)
6660 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6661 (reinsert_fast_tracepoint_jumps_at): Declare.
6662 * regcache.c: Don't compile many functions when building the
6663 in-process agent library.
6664 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6665 the register buffer in the heap.
6666 (free_register_cache): If the register buffer isn't owned by the
6667 regcache, don't free it.
6668 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6669 pre-existing register caches.
6670 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6671 type.
6672 (convert_ascii_to_int): : Constify `from' parameter type.
6673 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6674 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6675 the needed buffer in-place.
6676 (relocate_instruction): New.
6677 * server.c (handle_query) <qSymbols>: If the target supports
6678 tracepoints, give it a chance of looking up symbols. Report
6679 support for fast tracepoints.
6680 (handle_status): Stabilize threads.
6681 (process_serial_event): Adjust.
6682 * server.h (struct fast_tracepoint_jump): Forward declare.
6683 (struct process_info) <fast_tracepoint_jumps>: New field.
6684 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6685 (decode_X_packet, decode_M_packet): Adjust.
6686 (relocate_instruction): Declare.
6687 (in_process_agent_loaded): Declare.
6688 (tracepoint_look_up_symbols): Declare.
6689 (struct fast_tpoint_collect_status): Declare.
6690 (fast_tracepoint_collecting): Declare.
6691 (force_unlock_trace_buffer): Declare.
6692 (handle_tracepoint_bkpts): Declare.
6693 (initialize_low_tracepoint)
6694 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6695 * target.h (struct target_ops) <stabilize_threads,
6696 install_fast_tracepoint_jump_pad>: New fields.
6697 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6698 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6699 [HAVE_STDINT_H]: Include stdint.h.
6700 (trace_debug_1): Rename to ...
6701 (trace_vdebug): ... this.
6702 (trace_debug): Rename to ...
6703 (trace_debug_1): ... this. Add `level' parameter.
6704 (trace_debug): New.
6705 (ATTR_USED, ATTR_NOINLINE): New.
6706 (IP_AGENT_EXPORT): New.
6707 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6708 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6709 (about_to_request_buffer_space, trace_buffer_is_full)
6710 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6711 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6712 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6713 (traceframe_write_count, traceframes_created)
6714 (trace_state_variables)
6715 New renaming defines.
6716 (struct ipa_sym_addresses): New.
6717 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6718 (symbol_list): New.
6719 (ipa_sym_addrs): New.
6720 (all_tracepoint_symbols_looked_up): New.
6721 (in_process_agent_loaded): New.
6722 (write_e_ipa_not_loaded): New.
6723 (maybe_write_ipa_not_loaded): New.
6724 (tracepoint_look_up_symbols): New.
6725 (debug_threads) [IN_PROCESS_AGENT]: New.
6726 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6727 (UNKNOWN_SIDE_EFFECTS): New.
6728 (stop_tracing): New.
6729 (flush_trace_buffer): New.
6730 (stop_tracing_bkpt): New.
6731 (flush_trace_buffer_bkpt): New.
6732 (read_inferior_integer): New.
6733 (read_inferior_uinteger): New.
6734 (read_inferior_data_pointer): New.
6735 (write_inferior_data_pointer): New.
6736 (write_inferior_integer): New.
6737 (write_inferior_uinteger): New.
6738 (struct collect_static_trace_data_action): Delete.
6739 (enum tracepoint_type): New.
6740 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6741 <actions_str, step_actions, step_actions_str>: Only include in
6742 GDBserver.
fa593d66
PA
6743 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6744 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6745 (tracepoints): Use IP_AGENT_EXPORT.
6746 (last_tracepoint): Don't include in the IPA.
6747 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6748 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6749 (alloced_trace_state_variables): New.
6750 (trace_state_variables): Use IP_AGENT_EXPORT.
6751 (traceframe_t): Delete unused variable.
6752 (circular_trace_buffer): Don't include in the IPA.
6753 (trace_buffer_start): Delete.
6754 (struct trace_buffer_control): New.
6755 (trace_buffer_free): Delete.
6756 (struct ipa_trace_buffer_control): New.
6757 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6758 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6759 New.
6760 (trace_buffer_ctrl): New.
6761 (TRACE_BUFFER_CTRL_CURR): New.
6762 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6763 Reimplement as macros.
6764 (trace_buffer_wrap): Delete.
6765 (traceframe_write_count, traceframe_read_count)
6766 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6767 (struct tracepoint_hit_ctx) <type>: New field.
6768 (struct fast_tracepoint_ctx): New.
6769 (memory_barrier): New.
6770 (cmpxchg): New.
6771 (record_tracepoint_error): Update atomically in the IPA.
6772 (clear_inferior_trace_buffer): New.
6773 (about_to_request_buffer_space): New.
6774 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6775 updating the same buffer.
6776 (add_tracepoint): Default the tracepoint's type to trap
6777 tracepoint, and orig_size to -1.
6778 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6779 internal variables.
6780 (create_trace_state_variable): New parameter `gdb'. Handle it.
6781 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6782 (cmd_qtdp): Handle fast tracepoints.
6783 (cmd_qtdv): Adjust.
6784 (max_jump_pad_size): New.
6785 (gdb_jump_pad_head): New.
6786 (get_jump_space_head): New.
6787 (claim_jump_space): New.
6788 (sort_tracepoints): New.
6789 (MAX_JUMP_SIZE): New.
6790 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6791 IPA.
6792 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6793 support. Upload fast traceframes, and delete internal IPA
6794 breakpoints.
6795 (stop_tracing_handler): New.
6796 (flush_trace_buffer_handler): New.
6797 (cmd_qtstop): Upload fast tracepoints.
6798 (response_tracepoint): Handle fast tracepoints.
6799 (tracepoint_finished_step): Upload fast traceframes. Set the
6800 tracepoint hit context's tracepoint type.
6801 (handle_tracepoint_bkpts): New.
6802 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6803 type. Add comment about fast tracepoints.
6804 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6805 non-existing action_str field.
6806 (get_context_regcache): Handle fast tracepoints.
6807 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6808 to the regcache.
6809 (fast_tracepoint_from_jump_pad_address): New.
6810 (fast_tracepoint_from_ipa_tpoint_address): New.
6811 (collecting_t): New.
6812 (force_unlock_trace_buffer): New.
6813 (fast_tracepoint_collecting): New.
6814 (collecting): New.
6815 (gdb_collect): New.
6816 (write_inferior_data_ptr): New.
6817 (target_tp_heap): New.
6818 (target_malloc): New.
6819 (download_agent_expr): New.
6820 (UALIGN): New.
6821 (download_tracepoints): New.
6822 (download_trace_state_variables): New.
6823 (upload_fast_traceframes): New.
6824 (IPA_FIRST_TRACEFRAME): New.
6825 (IPA_NEXT_TRACEFRAME_1): New.
6826 (IPA_NEXT_TRACEFRAME): New.
6827 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6828 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6829 (gdb_jump_pad_buffer_end): New.
6830 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6831 (initialize_tracepoint): Adjust.
6832 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6833 buffer. Initialize the low module.
6834 * utils.c (PREFIX, TOOLNAME): New.
6835 (malloc_failure): Use PREFIX.
6836 (error): In the IPA, an error causes an exit.
6837 (fatal, warning): Use PREFIX.
6838 (internal_error): Use TOOLNAME.
6839 (NUMCELLS): Increase to 10.
6840 * configure, config.in: Regenerate.
6841
d149dd1d
PA
68422010-06-01 Pedro Alves <pedro@codesourcery.com>
6843
6844 * server.c (handle_query) <qSupported>: Do two passes over the
6845 qSupported string to avoid nesting strtok.
6846
f6528abd
JK
68472010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6848
6849 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6850 (CDEPS): New.
6851 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6852 -Wl,--dynamic-list.
6853 * configure: Regenerate.
6854 * proc-service.list: New.
6855
ca2a87a0
JK
68562010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6857
6858 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6859 New comment.
6860
363a6e9f
OS
68612010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6862
6863 * gdbreplay.c (remote_open): Check error return from socket() call by
6864 its equality to -1 not by it being negative.
6865 * remote-utils.c (remote_open): Likewise.
6866
d23b6cb1
PA
68672010-05-23 Pedro Alves <pedro@codesourcery.com>
6868
6869 * config.h: Regenerate.
6870
28d3cf85
MK
68712010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6872
6873 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6874 doesn't provide PTRACE_GET_THREAD_AREA.
6875
fea36a59
MK
68762010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6877
6878 * linux-m68k-low.c: Include <asm/ptrace.h>
6879 (ps_get_thread_area): Implement.
6880
24b066ba
DE
68812010-05-03 Doug Evans <dje@google.com>
6882
6883 * event-loop.c (struct callback_event): New struct.
6884 (callback_list): New global.
6885 (append_callback_event, delete_callback_event): New functions.
6886 (process_callback): New function.
6887 (start_event_loop): Call it.
6888 * remote-utils.c (NOT_SCHEDULED): Define.
6889 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6890 moved out of readchar.
6891 (readchar): Rewrite. Call reschedule before returning.
6892 (reset_readchar): New function.
6893 (remote_close): Call it.
6894 (process_remaining, reschedule): New functions.
6895 * server.h (callback_handler_func): New typedef.
6896 (append_callback_event, delete_callback_event): Declare.
6897
9836d6ea
PA
68982010-05-03 Pedro Alves <pedro@codesourcery.com>
6899
6900 * proc-service.c (ps_pglobal_lookup): Use
6901 thread_db_look_up_one_symbol.
6902 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6903 parameter. Use it instead of all_symbols_looked_up.
6904 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6905 field.
6906 (all_symbols_looked_up): Don't declare.
6907 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6908 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6909 field.
6910 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6911 Set all_symbols_looked_up here.
6912 (thread_db_look_up_one_symbol): New.
6913 (thread_db_get_tls_address): Adjust.
6914 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6915 thread_db object on the heap, and tentatively set it in the
6916 process structure.
6917 (thread_db_init): Don't set all_symbols_looked_up here.
6918 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6919
7984d532
PA
69202010-05-03 Pedro Alves <pedro@codesourcery.com>
6921
6922 * linux-low.c (linux_kill, linux_detach): Adjust.
6923 (status_pending_p_callback): Remove redundant statement. Check
6924 for !TARGET_WAITIKIND_IGNORE, instead of
6925 TARGET_WAITKIND_STOPPED.
6926 (handle_tracepoints): Make sure LWP is locked. Adjust.
6927 (linux_wait_for_event_1): Adjust.
6928 (linux_cancel_breakpoints): New.
6929 (unsuspend_one_lwp): New.
6930 (unsuspend_all_lwps): New.
6931 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6932 (send_sigstop_callback): Change return type to int, add new
6933 `except' parameter and handle it.
6934 (suspend_and_send_sigstop_callback): New.
6935 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6936 pass them down. If SUSPEND, also increment the lwp's suspend
6937 count.
6938 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6939 (need_step_over_p): Don't consider suspended LWPs.
6940 (start_step_over): Adjust.
6941 (proceed_one_lwp): Change return type to int, add new `except'
6942 parameter and handle it.
6943 (unsuspend_and_proceed_one_lwp): New.
6944 (proceed_all_lwps): Use find_inferior instead of
6945 for_each_inferior.
6946 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6947 also decrement the suspend count of LWPs. Pass `except' down,
6948 instead of hacking its suspend count.
6949 (linux_pause_all): Add `freeze' parameter. Adjust.
6950 (linux_unpause_all): New.
6951 (linux_target_ops): Install linux_unpause_all.
6952 * server.c (handle_status): Adjust.
6953 * target.h (struct target_ops): New fields `unpause_all' and
6954 `cancel_breakpoints'. Add new parameter to `pause_all'.
6955 (pause_all): Add new `freeze' parameter.
6956 (unpause_all): New.
6957 (cancel_breakpoints): New.
6958 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6959 cancel breakpoints.
6960 (cmd_qtstart): Pause threads.
6961 (stop_tracing): Pause threads, and cancel breakpoints.
6962 * win32-low.c (win32_target_ops): Adjust.
6963
e471f25b
PA
69642010-05-03 Pedro Alves <pedro@codesourcery.com>
6965
6966 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6967 the inferior right away from here...
6968 (linux_wait_1): ... to here, and adjust to check the thread's
6969 last_resume_kind instead of the lwp's step or stop_expected flags.
6970
1915ef4f
PA
69712010-05-02 Pedro Alves <pedro@codesourcery.com>
6972
6973 * README: Use consistent `GDB' and `GDBserver' spellings.
6974
f9e39928
PA
69752010-05-02 Pedro Alves <pedro@codesourcery.com>
6976
6977 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6978 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6979 (linux_detach_one_lwp): Assume the lwp is stopped.
6980 (any_thread_of): Delete.
6981 (linux_detach): Stop all lwps here. Don't blindly delete all
6982 breakpoints.
6983 (delete_lwp_callback): New.
6984 (linux_mourn): Delete all lwps of the process that is gone.
6985 (linux_wait_1): Don't delete the last lwp of the process here.
6986 * mem-break.h (mark_breakpoints_out): Declare.
6987 * mem-break.c (mark_breakpoints_out): New.
6988 (free_all_breakpoints): Use it.
6989 * server.c (handle_target_event): If the process is gone, mark
6990 breakpoints out.
6991 * thread-db.c (struct thread_db) <create_bp>: New field.
6992 (thread_db_enable_reporting): Fix prototype. Store a thread event
6993 breakpoint reference in the thread_db struct.
6994 (thread_db_load_search): Clear the thread_db object.
6995 (try_thread_db_load_1): Ditto.
6996 (switch_to_process): New.
6997 (disable_thread_event_reporting): Use it.
6998 (remove_thread_event_breakpoints): New.
6999 (thread_db_detach, thread_db_mourn): Use it.
7000
1e7fc18c
PA
70012010-05-01 Pedro Alves <pedro@codesourcery.com>
7002
7003 * linux-low.c (linux_enable_event_reporting): New.
7004 (linux_wait_for_event_1, handle_extended_wait): Use it.
7005
02fc4de7
PA
70062010-04-30 Pedro Alves <pedro@codesourcery.com>
7007
7008 * linux-low.c (linux_kill_one_lwp, linux_kill)
7009 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7010 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7011 SIGSTOP even if the LWP is stopped.
7012 (send_sigstop_callback): New.
7013 (stop_all_lwps): Use send_sigstop_callback instead.
7014 (linux_resume_one_thread): Adjust.
7015 (proceed_one_lwp): Still proceed an LWP that the client has
7016 requested to stop, if we haven't reported it as stopped yet. Make
7017 sure that LWPs the client want stopped, have a pending SIGSTOP.
7018
bc3b5632
DE
70192010-04-26 Doug Evans <dje@google.com>
7020
ae1ada35
DE
7021 * server.c (handle_general_set): Make static.
7022
bc3b5632
DE
7023 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7024 Print received char after testing for error/eof instead of before.
7025 (input_interrupt): Tweak comment.
7026
65730243
DE
70272010-04-23 Doug Evans <dje@google.com>
7028
7029 * server.c (start_inferior): Print inferior argv if --debug.
7030
a8ae7dc0
AR
70312010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7032
7033 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7034 * nto-x86-low.c: Include server.h
7035
1c07cc19
PM
70362010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7037
7038 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7039 be consistent with other sources of this directory.
7040 (init_registers_amd64): Correct name of source file of this function
7041 in the comment.
7042
e0a61e09
PM
70432010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7044
7045 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7046 64-bit executables.
7047
54709339
PM
70482010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7049
7050 * win32-i386-low.c: Add 64-bit support.
7051 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7052 (init_registers_amd64): Declare.
7053 (mappings): Add 64-bit version of array.
7054 (init_windows_x86): New function.
7055 (the_low_target): Change init_arch field to init_windows_x86.
7056
e8f0053d
PM
70572010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7058
7059 * win32-low.c: Adapt to support also 64-bit architecture.
7060 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7061 (get_image_name): Use SIZE_T type for local variable `done'.
7062 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7063 (toolhelp_get_dll_name): Idem.
7064 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7065 Use uintptr_t typecast to avoid warning.
7066 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7067 (handle_exception): Use phex_nz to avoid warning.
7068 (win32_wait): Remove unused local variable `process'.
7069
c481e77e
PM
70702010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7071
7072 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7073 `amd64-avx.o'.
7074
12ea4b69
PM
70752010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7076
7077 * configure.ac: Use `ws2_32' library for srv_mingw.
7078 * configure: Regenerate.
7079 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7080 * remote-utils.c: Likewise.
7081
f6d1620c
L
70822010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7083
7084 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7085 if __x86_64__ is defined.
7086
8e642873
PM
70872010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7088
7089 * configure: Regenerate.
7090
711e434b
PM
70912010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7092
7093 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7094 * target.h (target_ops): New get_tib_address field.
7095 * win32-low.h (win32_thread_info): Add thread_local_base field.
7096 * win32-low.c (child_add_thread): Add tlb argument.
7097 Set thread_local_base field to TLB.
7098 (get_child_debug_event): Adapt to child_add_thread change.
7099 (win32_get_tib_address): New function.
7100 (win32_target_ops): Set get_tib_address field to
7101 win32_get_tib_address.
7102 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7103
505106cd
PA
71042010-04-12 Pedro Alves <pedro@codesourcery.com>
7105
505106cd
PA
7106 * linux-low.c (linux_mourn): Also remove the process.
7107 * server.c (handle_target_event): Don't remove the process here.
7108 * nto-low.c (nto_mourn): New.
7109 (nto_target_ops): Install it.
7110 * spu-low.c (spu_mourn): New.
7111 (spu_target_ops): Install it.
7112 * win32-low.c (win32_mourn): New.
7113 (win32_target_ops): Install it.
7114
e8470a06
PA
71152010-04-12 Pedro Alves <pedro@codesourcery.com>
7116
7117 * server.h (buffer_xml_printf): Remove redundant `;'.
7118
45ba0d02
PA
71192010-04-12 Pedro Alves <pedro@codesourcery.com>
7120
7121 * regcache.c (set_register_cache): Invalidate regcaches before
7122 changing the register cache layout.
7123 (regcache_invalidate_one): Allow a NULL regcache.
7124 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7125 regcaches before changing the register cache layout or the target
7126 regsets.
7127
59e04013
L
71282010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7129
7130 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7131 variable warning on Linux/x86-64.
7132
8336d594
PA
71332010-04-11 Pedro Alves <pedro@codesourcery.com>
7134
7135 GDBserver disconnected tracing support.
7136
7137 * linux-low.c (linux_remove_process): Delete.
7138 (add_lwp): Don't set last_resume_kind here.
7139 (linux_kill): Use `mourn'.
7140 (linux_detach): Use `thread_db_detach', and `mourn'.
7141 (linux_mourn): New.
7142 (linux_attach_lwp_1): Adjust comment.
7143 (linux_attach): last_resume_kind moved the thread_info; adjust.
7144 (status_pending_p_callback): Adjust.
7145 (linux_wait_for_event_1): Adjust.
7146 (count_events_callback, select_singlestep_lwp_callback)
7147 (select_event_lwp_callback, cancel_breakpoints_callback)
7148 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7149 (proceed_one_lwp): Adjust.
7150 (linux_async): Add debug output.
7151 (linux_thread_stopped): New.
7152 (linux_pause_all): New.
7153 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7154 linux_pause_all.
7155 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7156 (thread_db_free): Delete declaration.
7157 (thread_db_detach, thread_db_mourn): Declare.
7158 * thread-db.c (thread_db_init): Use thread_db_mourn.
7159 (thread_db_free): Delete, split in two.
7160 (disable_thread_event_reporting): New.
7161 (thread_db_detach): New.
7162 (thread_db_mourn): New.
7163
7164 * server.h (struct thread_info) <last_resume_kind>: New field.
7165 <attached>: Add comment.
7166 <gdb_detached>: New field.
7167 (handler_func): Change return type to int.
7168 (handle_serial_event, handle_target_event): Ditto.
7169 (gdb_connected): Declare.
7170 (tracing): Delete.
7171 (disconnected_tracing): Declare.
7172 (stop_tracing): Declare.
7173
7174 * server.c (handle_query) <qSupported>: Report support for
7175 disconnected tracing.
7176 (queue_stop_reply_callback): Account for running threads.
7177 (gdb_wants_thread_stopped): New.
7178 (gdb_wants_all_threads_stopped): New.
7179 (gdb_reattached_process): New.
7180 (handle_status): Clear the `gdb_detached' flag of all processes.
7181 In all-stop, stop all threads.
7182 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7183 (process_serial_event): If the remote connection breaks, or if an
7184 exit was forced with "monitor exit", force an event loop exit.
7185 Handle disconnected tracing on detach.
7186 (handle_serial_event): Adjust.
7187 (handle_target_event): If GDB isn't connected, forward events back
7188 to the inferior, unless the last process exited, in which case,
7189 exit gdbserver. Adjust interface.
7190
7191 * remote-utils.c (remote_open): Don't block in accept. Instead
7192 register an event loop source on the listen socket file
7193 descriptor. Refactor bits into ...
7194 (listen_desc): ... this new global.
7195 (gdb_connected): ... this new function.
7196 (enable_async_notification): ... this new function.
7197 (handle_accept_event): ... this new function.
7198 (remote_close): Clear remote_desc.
7199
7200 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7201
7202 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7203 New fields.
7204 (mourn_inferior): Define.
7205 (target_process_qsupported): Avoid the dangling else problem.
7206 (thread_stopped): Define.
7207 (pause_all): Define.
7208 (target_waitstatus_to_string): Declare.
7209 * target.c (target_waitstatus_to_string): New.
7210
7211 * tracepoint.c (tracing): Make extern.
7212 (disconnected_tracing): New.
7213 (stop_tracing): Make extern. Handle tracing stops due to GDB
7214 disconnecting.
7215 (cmd_qtdisconnected): New.
7216 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7217 (handle_tracepoint_general_set): Handle QTDisconnected.
7218
7219 * event-loop.c (event_handler_func): Change return type to int.
7220 (process_event): Bail out if the event handler wants the event
7221 loop to stop.
7222 (handle_file_event): Ditto.
7223 (start_event_loop): Bail out if the event handler wants the event
7224 loop to stop.
7225
7226 * nto-low.c (nto_target_ops): Adjust.
7227 * spu-low.c (spu_wait): Don't remove the process here.
7228 (spu_target_ops): Adjust.
7229 * win32-low.c (win32_wait): Don't remove the process here.
7230 (win32_target_ops): Adjust.
7231
5d267c4c
PA
72322010-04-11 Pedro Alves <pedro@codesourcery.com>
7233
7234 * regcache.c (realloc_register_cache): Invalidate inferior's
7235 regcache before recreating it.
7236
623ccd72
PA
72372010-04-09 Pedro Alves <pedro@codesourcery.com>
7238
7239 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7240
219f2f23
PA
72412010-04-09 Stan Shebs <stan@codesourcery.com>
7242 Pedro Alves <pedro@codesourcery.com>
7243
7244 * server.h (LONGEST): New.
7245 (struct thread_info) <while_stepping>: New field.
7246 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7247 Declare.
7248 (initialize_tracepoint, handle_tracepoint_general_set)
7249 (handle_tracepoint_query, tracepoint_finished_step)
7250 (tracepoint_was_hit, release_while_stepping_state_list):
7251 (current_traceframe): Declare.
7252 * server.c (handle_general_set): Handle tracepoint packets.
7253 (read_memory): New.
7254 (write_memory): New.
7255 (handle_search_memory_1): Use read_memory.
7256 (handle_query): Report support for conditional tracepoints, trace
7257 state variables, and tracepoint sources. Handle tracepoint
7258 queries.
7259 (main): Initialize the tracepoints module.
7260 (process_serial_event): Handle traceframe reads/writes.
7261
7262 * linux-low.c (handle_tracepoints): New.
7263 (linux_wait_1): Call it.
7264 (linux_resume_one_lwp): Handle while-stepping.
7265 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7266 (linux_target_ops): Install them.
7267 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7268 New field.
7269 * linux-x86-low.c (x86_supports_tracepoints): New.
7270 (the_low_target). Install it.
7271
7272 * mem-break.h (delete_breakpoint): Declare.
7273 * mem-break.c (delete_breakpoint): Make external.
7274
7275 * target.h (struct target_ops): Add `supports_tracepoints',
7276 `read_pc', and `write_pc' fields.
7277 (target_supports_tracepoints): Define.
7278 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7279 (phex_nz): New.
7280
7281 * regcache.h (struct regcache) <registers_owned>: New field.
7282 (init_register_cache, regcache_cpy): Declare.
7283 (regcache_read_pc, regcache_write_pc): Declare.
7284 (register_cache_size): Declare.
7285 (supply_regblock): Declare.
7286 * regcache.c (init_register_cache): New.
7287 (new_register_cache): Use it.
7288 (regcache_cpy): New.
7289 (register_cache_size): New.
7290 (supply_regblock): New.
7291 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 7292
219f2f23
PA
7293 * tracepoint.c: New.
7294
7295 * Makefile.in (OBS): Add tracepoint.o.
7296 (tracepoint.o): New rule.
7297
3a13a53b
L
72982010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7299
7300 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7301 (i386-mmx.o): New.
7302 (i386-mmx.c): Likewise.
7303 (i386-mmx-linux.o): Likewise.
7304 (i386-mmx-linux.c): Likewise.
7305
7306 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7307 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7308 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7309 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7310
7311 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7312 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7313 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7314
1570b33e
L
73152010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7316
7317 * Makefile.in (clean): Updated.
7318 (i386-avx.o): New.
7319 (i386-avx.c): Likewise.
7320 (i386-avx-linux.o): Likewise.
7321 (i386-avx-linux.c): Likewise.
7322 (amd64-avx.o): Likewise.
7323 (amd64-avx.c): Likewise.
7324 (amd64-avx-linux.o): Likewise.
7325 (amd64-avx-linux.c): Likewise.
7326
7327 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7328 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7329 (srv_amd64_regobj): Add amd64-avx.o.
7330 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7331 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7332 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7333 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7334 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7335 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7336 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7337
7338 * i387-fp.c: Include "i386-xstate.h".
7339 (i387_xsave): New.
7340 (i387_cache_to_xsave): Likewise.
7341 (i387_xsave_to_cache): Likewise.
7342 (x86_xcr0): Likewise.
7343
7344 * i387-fp.h (i387_cache_to_xsave): Likewise.
7345 (i387_xsave_to_cache): Likewise.
7346 (x86_xcr0): Likewise.
7347
7348 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7349 * linux-crisv32-low.c (target_regsets): Likewise.
7350 * linux-m68k-low.c (target_regsets): Likewise.
7351 * linux-mips-low.c (target_regsets): Likewise.
7352 * linux-ppc-low.c (target_regsets): Likewise.
7353 * linux-s390-low.c (target_regsets): Likewise.
7354 * linux-sh-low.c (target_regsets): Likewise.
7355 * linux-sparc-low.c (target_regsets): Likewise.
7356 * linux-xtensa-low.c (target_regsets): Likewise.
7357
7358 * linux-low.c: Include <sys/uio.h>.
7359 (regsets_fetch_inferior_registers): Support nt_type.
7360 (regsets_store_inferior_registers): Likewise.
7361 (linux_process_qsupported): New.
7362 (linux_target_ops): Add linux_process_qsupported.
7363
7364 * linux-low.h (regset_info): Add nt_type.
7365 (linux_target_ops): Add process_qsupported.
7366
7367 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7368 and <sys/uio.h>.
7369 (init_registers_i386_avx_linux): New.
7370 (init_registers_amd64_avx_linux): Likewise.
7371 (xmltarget_i386_linux_no_xml): Likewise.
7372 (xmltarget_amd64_linux_no_xml): Likewise.
7373 (PTRACE_GETREGSET): Likewise.
7374 (PTRACE_SETREGSET): Likewise.
7375 (x86_fill_xstateregset): Likewise.
7376 (x86_store_xstateregset): Likewise.
7377 (use_xml): Likewise.
7378 (x86_linux_update_xmltarget): Likewise.
7379 (x86_linux_process_qsupported): Likewise.
7380 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7381 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7382 init_registers_i386_linux here. Call
7383 x86_linux_update_xmltarget.
7384 (the_low_target): Add x86_linux_process_qsupported.
7385
7386 * server.c (handle_query): Call target_process_qsupported.
7387
7388 * target.h (target_ops): Add process_qsupported.
7389 (target_process_qsupported): New.
7390
fc7238bb
PA
73912010-04-03 Pedro Alves <pedro@codesourcery.com>
7392
7393 * inferiors.c (add_thread): Set last_status kind to
7394 TARGET_WAITKIND_IGNORE.
7395 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7396 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7397 (linux_wait_1): Move `thread' local definition to block that uses
7398 it. Don't NULL initialize `event_child'.
7399 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7400 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7401 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7402
bdabb078
PA
74032010-04-01 Pedro Alves <pedro@codesourcery.com>
7404
7405 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7406 an extended waitstatus, or by a watchpoint.
7407 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7408 thread was stepping or has been stopped by a watchpoint.
7409
d3bbe7a0
PA
74102010-04-01 Pedro Alves <pedro@codesourcery.com>
7411
7412 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7413 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7414 of another, then delete the previous, and validate all
7415 breakpoints.
7416 (validate_inserted_breakpoint): New.
7417 (delete_disabled_breakpoints): New.
7418 (validate_breakpoints): New.
7419 (check_mem_read): Validate breakpoints before trusting their
7420 shadow. Delete disabled breakpoints.
7421 (check_mem_write): Validate breakpoints before trusting they
7422 should be inserted. Delete disabled breakpoints.
7423 * mem-break.h (validate_breakpoints):
7424 * server.c (handle_query): Validate breakpoints when we see a
7425 qSymbol query.
7426
8b07ae33
PA
74272010-04-01 Pedro Alves <pedro@codesourcery.com>
7428
7429 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7430 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7431 if we could tell there's a GDB breakpoint at stop_pc.
7432 (need_step_over_p): Don't do a step over if we find a GDB
7433 breakpoint at the resume PC.
7434
7435 * mem-break.c (struct raw_breakpoint): New.
7436 (enum bkpt_type): New type `gdb_breakpoint'.
7437 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7438 fields. New field `raw'.
7439 (find_raw_breakpoint_at): New.
7440 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7441 breakpoint instead.
7442 (set_breakpoint_at): Adjust.
7443 (delete_raw_breakpoint): New.
7444 (release_breakpoint): New.
7445 (delete_breakpoint): Rename to...
7446 (delete_breakpoint_1): ... this. Add proc parameter. Use
7447 release_breakpoint. Return ENOENT.
7448 (delete_breakpoint): Reimplement.
7449 (find_breakpoint_at): Delete.
7450 (find_gdb_breakpoint_at): New.
7451 (delete_breakpoint_at): Delete.
7452 (set_gdb_breakpoint_at): New.
7453 (delete_gdb_breakpoint_at): New.
7454 (gdb_breakpoint_here): New.
7455 (set_reinsert_breakpoint): Use release_breakpoint.
7456 (uninsert_breakpoint): Rename to ...
7457 (uninsert_raw_breakpoint): ... this.
7458 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7459 (reinsert_raw_breakpoint): Change parameter type to
7460 raw_breakpoint.
7461 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7462 instead.
7463 (check_breakpoints): Adjust. Use release_breakpoint.
7464 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7465 (breakpoint_inserted_here): Ditto.
7466 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7467 Don't trust the breakpoint's shadow if it is not inserted.
7468 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7469 (delete_all_breakpoints): Adjust.
7470 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7471 use delete_breakpoint_1.
7472
7473 * mem-break.h (breakpoints_supported): Delete declaration.
7474 (set_gdb_breakpoint_at): Declare.
7475 (gdb_breakpoint_here): Declare.
7476 (delete_breakpoint_at): Delete.
7477 (delete_gdb_breakpoint_at): Declare.
7478
7479 * server.h (struct raw_breakpoint): Forward declare.
7480 (struct process_info): New field `raw_breakpoints'.
7481
7482 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7483 breakpoints.
7484
6bf5e0ba
PA
74852010-03-24 Pedro Alves <pedro@codesourcery.com>
7486
7487 * linux-low.c (status_pending_p_callback): Fix comment.
7488 (linux_wait_for_event_1): Move most of the internal breakpoint
7489 handling from here...
7490 (linux_wait_1): ... to here.
7491 (count_events_callback): New.
7492 (select_singlestep_lwp_callback): New.
7493 (select_event_lwp_callback): New.
7494 (cancel_breakpoints_callback): New.
7495 (select_event_lwp): New.
7496 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7497 priority to all LWPs that have had events that should be reported
7498 to the client. Cancel breakpoints when about to reporting the
7499 event to the client, not while stopping lwps. No longer cancel
7500 finished single-steps here.
7501 (cancel_finished_single_step): Delete.
7502 (cancel_finished_single_steps): Delete.
7503
414a389f
PA
75042010-03-24 Pedro Alves <pedro@codesourcery.com>
7505
7506 * mem-break.c (enum bkpt_type): New.
7507 (struct breakpoint): New field `type'.
7508 (set_breakpoint_at): Change return type to struct breakpoint
7509 pointer. Set type to `other_breakpoint' by default.
7510 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7511 in the breakpoint list.
7512 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7513 (reinsert_breakpoint): Rename to ...
7514 (reinsert_raw_breakpoint): ... this.
7515 (reinsert_breakpoints_at): Adjust.
7516 * mem-break.h (struct breakpoint): Declare.
7517 (set_breakpoint_at): Change return type to struct breakpoint
7518 pointer.
7519
2280c721
PA
75202010-03-24 Pedro Alves <pedro@codesourcery.com>
7521
7522 * server.c (handle_query): Assign, not compare.
7523
d50171e4
PA
75242010-03-24 Pedro Alves <pedro@codesourcery.com>
7525
7526 Teach linux gdbserver to step-over-breakpoints.
7527
7528 * linux-low.c (can_hardware_single_step): New.
7529 (supports_breakpoints): New.
7530 (handle_extended_wait): If stopping threads, read the stop pc of
7531 the new cloned LWP.
7532 (get_pc): New.
7533 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7534 low target doesn't support retrieving the PC.
7535 (add_lwp): Set last_resume_kind to resume_continue.
7536 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7537 (linux_attach): Don't clear stop_expected. Set the lwp's
7538 last_resume_kind to resume_stop.
7539 (linux_detach_one_lwp): Don't check for removed breakpoints.
7540 (check_removed_breakpoint): Delete.
7541 (status_pending_p): Rename to ...
7542 (status_pending_p_callback): ... this. Don't check for removed
7543 breakpoints. Don't consider threads that are stopped from GDB's
7544 perspective.
7545 (linux_wait_for_lwp): Always read the stop_pc here.
7546 (cancel_breakpoint): New.
7547 (step_over_bkpt): New global.
7548 (linux_wait_for_event_1): Implement stepping over breakpoints.
7549 (gdb_wants_lwp_stopped): New.
7550 (gdb_wants_all_stopped): New.
7551 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7552 single-step traps here. Store the thread's last reported target
7553 wait status.
7554 (send_sigstop): Don't clear stop_expected. Always set it,
7555 instead.
7556 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7557 (cancel_finished_single_step): New.
7558 (cancel_finished_single_steps): New.
7559 (wait_for_sigstop): Don't cancel finished single-step traps here.
7560 (linux_resume_one_lwp): Don't check for removed breakpoints.
7561 Don't set `step' on non-hardware step archs.
7562 (linux_set_resume_request): Ignore resume_stop requests if already
7563 stopping or stopped. Set the lwp's last_resume_kind.
7564 (resume_status_pending_p): Don't check for removed breakpoints.
7565 (need_step_over_p): New.
7566 (start_step_over): New.
7567 (finish_step_over): New.
7568 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7569 requests. Clear the thread's last reported target waitstatus.
7570 Don't use the `suspended' flag. Don't consider pending breakpoints.
7571 (linux_resume): Start a step-over if necessary.
7572 (proceed_one_lwp): New.
7573 (proceed_all_lwps): New.
7574 (unstop_all_lwps): New.
7575 * linux-low.h (struct lwp_info): Rewrite comment for the
7576 `suspended' flag. Add the `stop_pc' field. Delete the
7577 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7578 Add `'last_resume_kind' and `need_step_over' fields.
7579 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7580 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7581 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7582 (set_raw_breakpoint_at): New.
7583 (set_breakpoint_at): Rewrite to use it.
7584 (reinsert_breakpoint_handler): Delete.
7585 (set_reinsert_breakpoint): New.
7586 (reinsert_breakpoint_by_bp): Delete.
7587 (delete_reinsert_breakpoints): New.
7588 (uninsert_breakpoint): Rewrite.
7589 (uninsert_breakpoints_at): New.
7590 (reinsert_breakpoint): Rewrite.
7591 (reinsert_breakpoints_at): New.
7592 (check_breakpoints): Rewrite.
7593 (breakpoint_here): New.
7594 (breakpoint_inserted_here): New.
7595 (check_mem_read): Adjust.
7596 * mem-break.h (breakpoints_supported, breakpoint_here)
7597 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7598 (reinsert_breakpoint_by_bp): Delete declaration.
7599 (delete_reinsert_breakpoints): Declare.
7600 (reinsert_breakpoint): Delete declaration.
7601 (reinsert_breakpoints_at): Declare.
7602 (uninsert_breakpoint): Delete declaration.
7603 (uninsert_breakpoints_at): Declare.
7604 (check_breakpoints): Adjust prototype.
7605 * server.h: Adjust include order.
7606 (struct thread_info): Declare here. Add a `last_status' field.
7607
30ba68cb
MS
76082010-03-23 Michael Snyder <msnyder@vmware.com>
7609
7610 * server.c (crc32): New function.
7611 (handle_query): Add handling for 'qCRC:' request.
7612
b9a881c2
PA
76132010-03-23 Pedro Alves <pedro@codesourcery.com>
7614
7615 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7616 lwp had been stopped by a watchpoint.
7617
e92d13d5
PA
76182010-03-16 Pedro Alves <pedro@codesourcery.com>
7619
7620 * server.h (internal_error): Declare.
7621 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7622 * utils.c (internal_error): New function.
7623
64daa791
AS
76242010-03-15 Andreas Schwab <schwab@redhat.com>
7625
7626 * configure.srv: Fix typo setting srv_regobj.
7627
f52cd8cd
PA
76282010-03-15 Pedro Alves <pedro@codesourcery.com>
7629
7630 * linux-low.c (fetch_register): Avoid passing a non string literal
7631 format to `error'.
7632 (usr_store_inferior_registers): Ditto.
7633
93ae6fdc
PA
76342010-03-14 Pedro Alves <pedro@codesourcery.com>
7635
7636 * linux-low.c (linux_write_memory): Bail out early if peeking
7637 memory failed.
7638
c3adc08c
PA
76392010-03-14 Pedro Alves <pedro@codesourcery.com>
7640
7641 * linux-low.h (struct lwp_info): New fields
7642 `stopped_by_watchpoint' and `stopped_data_address'.
7643 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7644 here, and cache them in the lwp object.
7645 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7646 directly.
7647 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7648 field.
7649 (linux_stopped_by_watchpoint): Rewrite.
7650 (linux_stopped_data_address): Rewrite.
7651
bce522a2
PA
76522010-03-06 Simo Melenius <simo.melenius@iki.fi>
7653
7654 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7655 switching the current inferior, not before.
7656
90884b2b
L
76572010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7658
7659 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7660 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7661 i386-linux.c and amd64-linux.c.
7662 (reg-i386.o): Removed.
7663 (reg-i386.c): Likewise.
7664 (reg-i386-linux.o): Likewise.
7665 (reg-i386-linux.c): Likewise.
7666 (reg-x86-64.o): Likewise.
7667 (reg-x86-64.c): Likewise.
7668 (reg-x86-64-linux.o): Likewise.
7669 (reg-x86-64-linux.c): Likewise.
7670 (i386.o): New.
7671 (i386.c): Likewise.
7672 (i386-linux.o): Likewise.
7673 (i386-linux.c): Likewise.
7674 (amd64.o): Likewise.
7675 (amd64.c): Likewise.
7676 (amd64-linux.o): Likewise.
7677 (amd64-linux.c): Likewise.
7678
7679 * configure.srv (srv_i386_regobj): New.
7680 (srv_i386_linux_regobj): Likewise.
7681 (srv_amd64_regobj): Likewise.
7682 (srv_amd64_linux_regobj): Likewise.
7683 (srv_i386_32bit_xmlfiles): Likewise.
7684 (srv_i386_64bit_xmlfiles): Likewise.
7685 (srv_i386_xmlfiles): Likewise.
7686 (srv_amd64_xmlfiles): Likewise.
7687 (srv_i386_linux_xmlfiles): Likewise.
7688 (srv_amd64_linux_xmlfiles): Likewise.
7689 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7690 srv_xmlfiles to $srv_i386_xmlfiles.
7691 (i[34567]86-*-mingw32ce*): Likewise.
7692 (i[34567]86-*-mingw*): Likewise.
7693 (i[34567]86-*-nto*): Likewise.
7694 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7695 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7696 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7697 (x86_64-*-linux*): Likewise.
7698
7699 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7700 (init_registers_amd64_linux): New.
7701 (x86_arch_setup): Replace init_registers_x86_64_linux with
7702 init_registers_amd64_linux.
7703
193f13e6
MK
77042010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7705
7706 * configure.ac: Check for libdl. If it is not available link against
7707 static libthread_db.
7708 * configure: Regenerate.
7709
85d721b8
PA
77102010-02-22 Pedro Alves <pedro@codesourcery.com>
7711
7712 PR9605
7713
7714 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7715 handing a read watchpoint.
7716 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7717
6076632b
DE
77182010-02-12 Doug Evans <dje@google.com>
7719
7720 * linux-low.c (linux_supports_tracefork_flag): Document.
7721 (linux_look_up_symbols): Add comment.
7722
3327ccf7
L
77232010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7724
7725 * regcache.c (supply_register): Clear regcache if buf is NULL.
7726
0718675c 77272010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7728 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7729
7730 * inferiors.c (find_inferior): Add function documentation.
7731 (unloaded_dll): Handle the case where the unloaded dll has not
7732 been previously registered in the dll list.
7733
177321bd
DJ
77342010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7735
7736 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7737 (thumb2_breakpoint): New.
7738 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7739
2b009048
DJ
77402010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7741
7742 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7743 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7744 breakpoints.
7745
3be029c7
PA
77462010-01-21 Pedro Alves <pedro@codesourcery.com>
7747
7748 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7749
18f5de3b
JK
77502010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7751
7752 * linux-s390-low.c (s390_collect_ptrace_register)
7753 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7754
3743bb4f
DE
77552010-01-21 Doug Evans <dje@google.com>
7756
14ce3065
DE
7757 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7758 (PTRACE_ARG4_TYPE): New macro.
7759 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7760 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7761 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7762 (usr_store_inferior_registers): Ditto.
7763 (linux_read_memory, linux_write_memory): Ditto.
7764 (linux_test_for_tracefork): Ditto.
7765
3743bb4f
DE
7766 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7767 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7768
8b315be5
PA
77692010-01-21 Pedro Alves <pedro@codesourcery.com>
7770
7771 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7772 target.
7773
85492558
PA
77742010-01-21 Pedro Alves <pedro@codesourcery.com>
7775
7776 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7777 prototype to take a regcache. Adjust.
7778
442ea881
PA
77792010-01-20 Pedro Alves <pedro@codesourcery.com>
7780
7781 * regcache.h (struct thread_info): Forward declare.
7782 (struct regcache): New.
7783 (new_register_cache): Adjust prototype.
7784 (get_thread_regcache): Declare.
7785 (free_register_cache): Adjust prototype.
7786 (registers_to_string, registers_from_string): Ditto.
7787 (supply_register, supply_register_by_name, collect_register)
7788 (collect_register_as_string, collect_register_by_name): Ditto.
7789 * regcache.c (struct inferior_regcache_data): Delete.
7790 (get_regcache): Rename to ...
7791 (get_thread_regcache): ... this. Adjust. Switch inferior before
7792 fetching registers.
7793 (regcache_invalidate_one): Adjust.
7794 (regcache_invalidate): Fix prototype.
7795 (new_register_cache): Return the new register cache.
7796 (free_register_cache): Change prototype.
7797 (realloc_register_cache): Adjust.
7798 (registers_to_string): Change prototype to take a regcache. Adjust.
7799 (registers_from_string): Ditto.
7800 (register_data): Ditto.
7801 (supply_register): Ditto.
7802 (supply_register_by_name): Ditto.
7803 (collect_register): Ditto.
7804 (collect_register_as_string): Ditto.
7805 (collect_register_by_name): Ditto.
7806 * server.c (process_serial_event): Adjust.
7807 * linux-low.h (regset_fill_func, regset_store_func): Change
7808 prototype.
7809 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7810 Change prototype.
7811 * linux-low.c (get_stop_pc): Adjust.
7812 (check_removed_breakpoint): Adjust.
7813 (linux_wait_for_event): Adjust.
7814 (linux_resume_one_lwp): Adjust.
7815 (fetch_register): Add regcache parameter. Adjust.
7816 (usr_store_inferior_registers): Ditto.
7817 (regsets_fetch_inferior_registers): Ditto.
7818 (regsets_store_inferior_registers): Ditto.
7819 (linux_fetch_registers, linux_store_registers): Ditto.
7820 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7821 regcache. Adjust.
43aaf8b6
PA
7822 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7823 Ditto.
442ea881
PA
7824 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7825 prototype to take a regcache.
7826 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7827 * remote-utils.c (convert_ascii_to_int, outreg)
7828 (prepare_resume_reply): Change prototype to take a regcache.
7829 Adjust.
7830 * target.h (struct target_ops) <fetch_registers, store_registers>:
7831 Change prototype to take a regcache.
7832 (fetch_inferior_registers, store_inferior_registers): Change
7833 prototype to take a regcache. Adjust.
7834 * proc-service.c (ps_lgetregs): Adjust.
7835 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7836 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7837 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7838 take a regcache. Adjust.
7839 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7840 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7841 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7842 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7843 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7844 (cris_cannot_fetch_register):
7845 (cris_breakpoint_at): Change prototype to take a regcache.
7846 Adjust.
7847 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7848 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7849 to take a regcache. Adjust.
7850 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7851 Adjust.
7852 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7853 take a regcache. Adjust.
7854 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7855 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7856 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7857 * linux-mips-low.c (mips_get_pc):
7858 (mips_set_pc): Change prototype to take a regcache. Adjust.
7859 (mips_reinsert_addr): Adjust.
7860 (mips_collect_register): Change prototype to take a regcache.
7861 Adjust.
7862 (mips_supply_register):
7863 (mips_collect_register_32bit, mips_supply_register_32bit)
7864 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7865 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7866 * linux-ppc-low.c (ppc_supply_ptrace_register)
7867 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7868 (parse_spufs_run): Adjust.
7869 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7870 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7871 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7872 take a regcache. Adjust.
7873 * linux-s390-low.c (s390_collect_ptrace_register)
7874 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7875 (s390_set_pc): Change prototype to take a regcache. Adjust.
7876 (s390_arch_setup): Adjust.
7877 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7878 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7879 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7880 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7881 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7882 regcache. Adjust.
7883 (sparc_breakpoint_at): Adjust.
7884 * linux-xtensa-low.c (xtensa_fill_gregset):
7885 (xtensa_store_gregset):
7886 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7887 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7888 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7889 prototype to take a regcache. Adjust.
7890 * win32-arm-low.c (arm_fetch_inferior_register)
7891 (arm_store_inferior_register): Change prototype to take a
7892 regcache. Adjust.
7893 * win32-i386-low.c (i386_fetch_inferior_register)
7894 (i386_store_inferior_register): Change prototype to take a
7895 regcache. Adjust.
7896 * win32-low.c (child_fetch_inferior_registers)
7897 (child_store_inferior_registers): Change prototype to take a
7898 regcache. Adjust.
7899 (win32_wait): Adjust.
7900 (win32_fetch_inferior_registers): Change prototype to take a
7901 regcache. Adjust.
7902 (win32_store_inferior_registers): Adjust.
7903 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7904 store_inferior_register>: Change prototype to take a regcache.
7905
60c3d7b0
DE
79062010-01-20 Doug Evans <dje@google.com>
7907
7908 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7909 #ifdef.
7910 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7911 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7912
dc146f7c
VP
79132010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7914
7915 * linux-low.c (linux_core_of_thread): New.
7916 (compare_ints, show_process, list_threads): New.
7917 (linux_qxfer_osdata): Report threads and cores.
7918 (linux_target_op): Register linux_core_of_thread.
7919 * remote-utils.c (prepare_resume_reply): Report the core.
7920 (buffer_xml_printf): Support %d specifier.
7921 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7922 New.
7923 (handle_query): Handle qXfer:threads. Announce availability
7924 thereof.
7925 * target.h (struct target_ops): New field core_of_thread.
7926
7803799a
UW
79272010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7928
7929 * Makefile.in (clean): Remove new generated files.
7930 (reg-s390.o, reg-s390.c): Remove rules.
7931 (reg-s390x.o, reg-s390x.c): Likewise.
7932 (s390-linux32.o, s390-linux32.c): Add rules.
7933 (s390-linux64.o, s390-linux64.c): Likewise.
7934 (s390x-linux64.o, s390x-linux64.c): Likewise.
7935 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7936 * linux-s390-low.c: Include <elf.h>.
7937 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7938 (init_registers_s390): Remove prototype.
7939 (init_registers_s390x): Likewise.
7940 (init_registers_s390_linux32): Add prototype.
7941 (init_registers_s390_linux64): Likewise.
7942 (init_registers_s390x_linux64): Likewise.
7943 (s390_num_regs_3264): New define.
7944 (s390_regmap_3264): New global variable.
7945 (s390_cannot_fetch_register): Remove obsolete check.
7946 (s390_cannot_store_register): Likewise.
7947 (s390_collect_ptrace_register): Handle upper/lower register halves.
7948 (s390_supply_ptrace_register): Likewise.
7949 (s390_fill_gregset): Update to register number changes.
7950 (s390_get_hwcap): New routine.
7951 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7952 Install appropriate regmap and register set.
7953
6e7ffa39
JB
79542010-01-01 Joel Brobecker <brobecker@adacore.com>
7955
7956 * server.c (gdbserver_version): Update copyright year to 2010.
7957 * gdbreplay.c (gdbreplay_version): Likewise.
7958
957f3f49
DE
79592009-12-28 Doug Evans <dje@google.com>
7960
7961 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7962 elf/external.h. Include <elf.h> instead but only if necessary.
7963
ca5c370d
PA
79642009-12-28 Pedro Alves <pedro@codesourcery.com>
7965
7966 * linux-low.c (linux_remove_process): Remove `detaching'
7967 parameter. Don't release/detach from thread_db here.
7968 (linux_kill): Release/detach from thread_db here, ...
7969 (linux_detach): ... and here, before actually detaching.
7970 (linux_wait_1): ... and here, when a process exits.
7971 * thread-db.c (any_thread_of): New.
7972 (thread_db_free): Switch the current inferior to a thread of the
7973 passed in process.
7974
4ee62156
DE
79752009-12-21 Doug Evans <dje@google.com>
7976
d90e6a88
DE
7977 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7978
c5f62d5f
DE
7979 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7980 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7981 warning ifndef __NR_tkill. Move setting of errno there too.
7982 Delete unnecessary resetting of errno after syscall.
7983 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7984
10e86dd7
DE
7985 * configure.ac: Check for dladdr.
7986 * config.in: Regenerate.
7987 * configure: Regenerate.
7988 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7989 (try_thread_db_load): Update.
7990
4ee62156
DE
7991 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7992
00f515da
DE
79932009-12-18 Doug Evans <dje@google.com>
7994
e9464885
DE
7995 * event-loop.c: Include unistd.h if it exists.
7996
07d4f67e
DE
7997 * linux-low.c (my_waitpid): Move definition away from being in
7998 between linux_tracefork_child/linux_test_for_tracefork.
7999
00f515da
DE
8000 * gdb_proc_service.h (psaddr_t): Fix type.
8001 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8002 signature to match glibc.
8003
1de1badb
DE
80042009-12-16 Doug Evans <dje@google.com>
8005
8006 * linux-low.c (linux_read_memory): Fix argument to read.
8007
aeeb81d1
PA
80082009-11-26 Pedro Alves <pedro@codesourcery.com>
8009
8010 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8011 events, don't leave current_inferior pointing at null.
8012
10357975
PA
80132009-11-26 Pedro Alves <pedro@codesourcery.com>
8014
8015 * win32-low.c (LOG): Delete.
8016 (OUTMSG): Output to stderr.
8017 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8018 on compile time LOG macro.
8019 (win32_wait): Fix debug output.
8020
cf6e3471
PA
80212009-11-26 Pedro Alves <pedro@codesourcery.com>
8022
8023 * win32-low.c (win32_add_one_solib): If the dll name is
8024 "ntdll.dll", prepend the system directory to the dll path.
8025
0c85e18e
MK
80262009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8027
8028 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8029
9ac544ce 80302009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 8031 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
8032
8033 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8034 * configure.ac: Check for __mcoldfire__ and set
8035 gdb_cv_m68k_is_coldfire.
8036 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8037 reg-cf.o and reg-m68k.o.
8038 * configure: Regenerated.
8039
fd7dd3e6
PA
80402009-11-16 Pedro Alves <pedro@codesourcery.com>
8041
8042 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8043 Pass it to thread_db_free.
8044 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8045 proper `detaching' argument to linux_remove_process.
8046 * linux-low.h (thread_db_free): Add `detaching' parameter.
8047 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8048 to thread_db_free.
8049 (thread_db_free): Add `detaching' parameter. Only
8050 call td_ta_clear_event if detaching from process.
8051
75aa492e
MK
80522009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8053
8054 * thread-db.c (thread_db_free): Fix typo.
8055
21e1bee4
PP
80562009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8057
8058 PR gdb/10838
8059 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8060
8838b45e
NS
80612009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8062
8063 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8064 with an i686 compiler.
8065 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8066 needed.
8067 * configure: Rebuilt.
8068
8a35fb51
SL
80692009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8070
8071 PR gdb/10783
8072
8073 * server.c (handle_search_memory_1): Correct read_addr initialization
8074 in loop for searching subsequent chunks.
8075
96f15937
PP
80762009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8077
8078 * configure.ac: New --with-libthread-db option.
8079 * thread-db.c: Allow direct dependence on libthread_db.
8080 (thread_db_free): Adjust.
8081 * config.in: Regenerate.
8082 * configure: Likewise.
889bf7c5 8083
5f7d1694
PP
80842009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8085
8086 PR gdb/10757
8087 * thread-db.c (attach_thread): New function.
8088 (maybe_attach_thread): Return success/failure.
8089 (find_new_threads_callback): Adjust.
889bf7c5
PA
8090 (thread_db_find_new_threads): Loop until no new threads.
8091
88e3b899
PA
80922009-10-13 Pedro Alves <pedro@codesourcery.com>
8093
8094 * proc-service.c (ps_lgetregs): Formatting.
8095
cdbfd419
PP
80962009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8097
8098 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8099 * configure.ac: Adjust.
8100 * linux-low.h (struct process_info_private): Move members to struct
8101 thread_db.
8102 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8103 * linux-low.c (linux_remove_process): Adjust.
8104 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8105 * server.c (handle_query): Move code ...
8106 (handle_monitor_command): ... here. New function.
8107 * target.h (struct target_ops): New member.
8108 * thread-db.c (struct thread_db): New.
8109 (libthread_db_search_path): New variable.
8110 (thread_db_create_event, thread_db_enable_reporting)
8111 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8112 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8113 (try_thread_db_load_1, dladdr_to_soname): New functions.
8114 (try_thread_db_load, thread_db_load_search): New functions.
8115 (thread_db_init): Search for libthread_db.
8116 (thread_db_free): New function.
8117 (thread_db_handle_monitor_command): Likewise.
8118 * config.in: Regenerate.
8119 * configure: Regenerate.
889bf7c5 8120
4168d2d6
UW
81212009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8122
8123 * spu-low.c (spu_kill): Wait for inferior to terminate.
8124 Call clear_inferiors.
8125 (spu_detach): Call clear_inferiors.
8126
81ecdfbb
RW
81272009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8128
8129 * aclocal.m4: Regenerate.
8130 * config.in: Likewise.
8131 * configure: Likewise.
8132
0b9ff2c0
UW
81332009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8134
8135 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8136 (parse_spufs_run): New function.
8137 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8138 (ppc_breakpoint_at): Handle SPU breakpoints.
8139
efcbbd14
UW
81402009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8141
8142 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8143 (SPUFS_MAGIC): Define.
8144 (spu_enumerate_spu_ids): New function.
8145 (linux_qxfer_spu): New function.
8146 (linux_target_ops): Install linux_qxfer_spu.
8147
f4d9bade
UW
81482009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8149
8150 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8151 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8152 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8153 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8154 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8155 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8156 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8157 (init_registers_powerpc_cell32l): Add prototype.
8158 (init_registers_powerpc_cell64l): Likewise.
8159 (ppc_arch_setup): Detect Cell/B.E. architecture.
8160
96e946ca
RW
81612009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8162
8163 * Makefile.in (datarootdir): New variable.
8164
58d6951d
DJ
81652009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8166
8167 * linux-low.c (linux_write_memory): Update debugging output.
8168 * Makefile.in (clean): Add new descriptions.
8169 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8170 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8171 * configure.srv: Add new files for arm*-*-linux*.
8172 * linux-arm-low.c: Add new declarations.
8173 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8174 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8175 (HWCAP_VFPv3D16): New.
8176 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8177 instead of __IWMMXT__.
8178 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8179 (arm_arch_setup): New.
8180 (target_regsets): Remove #ifdef. Add VFP regset.
8181 (the_low_target): Use arm_arch_setup.
8182
12b42a12
DJ
81832009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8184
8185 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8186 the main thread again.
8187
ac8c974e
AR
81882009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8189
8190 Adding Neutrino gdbserver.
8191 * configure: Regenerated.
8192 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8193 * configure.srv (i[34567]86-*-nto*): New target.
8194 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8195 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8196 (nto_comctrl) [__QNX__]: New function.
8197 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8198
4424e0c3 81992009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
8200
8201 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8202 srv_tgtobj.
8203
912cf4ba
PA
82042009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8205 Pedro Alves <pedro@codesourcery.com>
8206
8207 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8208 don't support CONTEXT_EXTENDED_REGISTERS.
8209 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8210 (the_low_target): Install them.
8211 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8212 failing with ERROR_PIPE_NOT_CONNECTED.
8213
aa5ca48f
DE
82142009-06-30 Doug Evans <dje@google.com>
8215 Pierre Muller <muller@ics.u-strasbg.fr>
8216
8217 Add h/w watchpoint support to x86-linux, win32-i386.
8218 * Makefile.in (SFILES): Add i386-low.c
8219 (i386_low_h): Define.
8220 (i386-low.o): Add dependencies.
8221 (linux-x86-low.o): Add i386-low.h dependency.
8222 (win32-i386-low.o): Ditto.
8223 * i386-low.c: New file.
8224 * i386-low.h: New file.
8225 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8226 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8227 * linux-low.c (linux_add_process): Initialize arch_private.
8228 (linux_remove_process): Free arch_private.
8229 (add_lwp): Initialize arch_private.
8230 (delete_lwp): Free arch_private.
8231 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8232 provided.
8233 * linux-low.h (process_info_private): New member arch_private.
8234 (lwp_info): New member arch_private.
8235 (linux_target_ops): New members new_process, new_thread,
8236 prepare_to_resume.
8237 (ptid_of): New macro.
8238 * linux-x86-low.c: Include stddef.h, i386-low.h.
8239 (arch_process_info): New struct.
8240 (arch_lwp_info): New struct.
8241 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8242 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8243 (i386_dr_low_get_status): New function.
8244 (x86_insert_point, x86_remove_point): New functions.
8245 (x86_stopped_by_watchpoint): New function.
8246 (x86_stopped_data_address): New function.
8247 (x86_linux_new_process, x86_linux_new_thread): New functions.
8248 (x86_linux_prepare_to_resume): New function.
8249 (the_low_target): Add entries for insert_point, remove_point,
8250 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8251 prepare_to_resume.
8252 * server.c (debug_hw_points): New global.
8253 (monitor_show_help): Document set debug-hw-points.
8254 (handle_query): Process "set debug-hw-points".
8255 * server.h (debug_hw_points): Declare.
8256 (paddress): Declare.
8257 * utils.c (NUMCELLS, CELLSIZE): New macros.
8258 (get_sell, xsnprintf, paddress): New functions.
8259 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8260 remove_point, stopped_by_watchpoint, stopped_data_address.
8261 * win32-i386-low.c: Include i386-low.h.
8262 (debug_reg_state): Replaces dr.
8263 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8264 (i386_dr_low_get_status): New function.
8265 (i386_insert_point, i386_remove_point): New functions.
8266 (i386_stopped_by_watchpoint): New function.
8267 (i386_stopped_data_address): New function.
8268 (i386_initial_stuff): Update.
8269 (get_thread_context,set_thread_context,i386_thread_added): Update.
8270 (the_low_target): Add entries for insert_point,
8271 remove_point, stopped_by_watchpoint, stopped_data_address.
8272 * win32-low.c (win32_insert_watchpoint): New function.
8273 (win32_remove_watchpoint): New function.
8274 (win32_stopped_by_watchpoint): New function.
8275 (win32_stopped_data_address): New function.
8276 (win32_target_ops): Add entries for insert_watchpoint,
8277 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8278 * win32-low.h (win32_target_ops): New members insert_point,
8279 remove_point, stopped_by_watchpoint, stopped_data_address.
8280
d993e290
PA
82812009-06-25 Pedro Alves <pedro@codesourcery.com>
8282
8283 * server.c (process_serial_event): Re-return unsupported, not
8284 error, if the type isn't recognized. Re-allow supporting only
8285 insert or remove packets. Also call require_running for
8286 breakpoints. Add missing break statement to default case. Tidy.
8287 * target.h (struct target_ops): Rename insert_watchpoint to
8288 insert_point, and remove_watchpoint to remove_point.
8289
8290 * linux-low.h (struct linux_target_ops): Likewise.
8291 * linux-low.c (linux_insert_watchpoint): Rename to ...
8292 (linux_insert_point): ... this. Adjust.
8293 (linux_remove_watchpoint): Rename to ...
8294 (linux_remove_point): ... this. Adjust.
8295 (linux_target_ops): Adjust.
8296 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8297 (cris_insert_point): ... this.
8298 (cris_remove_watchpoint): Rename to ...
8299 (cris_remove_point): ... this.
8300 (the_low_target): Adjust.
8301
0f54c268
PM
83022009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8303
8304 * server.c (handle_v_kill): Pass signal_pid to
8305 kill_inferior if multi_process is zero.
8306
c6314022
AR
83072009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8308
8309 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8310 * target.h (target_ops): Comment for *_watchpoint to make it clear
8311 the functions can get types '0' and '1'.
8312
4463ce24
AR
83132009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8314
8315 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8316 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8317 * regcache.c (get_regcache): Likewise.
8318 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8319 * win32-low.c (child_fetch_inferior_registers): Remove check for
8320 regno 0.
8321
cf8fd78b
PA
83222009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8323 Pedro Alves <pedro@codesourcery.com>
8324
8325 * target.h (struct target_ops) <supports_multi_process>: New
8326 callback.
8327 (target_supports_multi_process): New.
8328 * server.c (handle_query): Even if GDB reports support, only
8329 enable multi-process if the target also supports it. Report
8330 multi-process support only if the target backend supports it.
8331 * linux-low.c (linux_supports_multi_process): New function.
8332 (linux_target_ops): Install it as target_supports_multi_process
8333 callback.
8334
47c0c975
DE
83352009-05-24 Doug Evans <dje@google.com>
8336
e09875d4
DE
8337 Global renaming of find_thread_pid to find_thread_ptid.
8338 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8339 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8340 All callers updated.
8341
e27d73f6
DE
8342 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8343 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8344 directly.
8345
47c0c975
DE
8346 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8347 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8348 (linux_resume_one_lwp): Ditto.
8349
2acc282a
DE
83502009-05-23 Doug Evans <dje@google.com>
8351
8352 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8353 from struct inferior_list_entry * to struct lwp_info *.
8354 All callers updated.
8355
9f1036c1
DE
83562009-05-13 Doug Evans <dje@google.com>
8357
8358 * linux-x86-low.c: Don't include assert.h.
8359 (x86_siginfo_fixup): Use fatal, not assert.
8360 (x86_arch_setup): Fix comment.
8361
d0722149
DE
83622009-05-12 Doug Evans <dje@google.com>
8363
8364 Biarch support for i386/amd64 gdbserver.
8365 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8366 Add linux-x86-low.c.
8367 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8368 (linux-x86-low.o): Add.
8369 * linux-x86-64-low.c: Delete.
8370 * linux-i386-low.c: Delete.
8371 * linux-x86-low.c: New file.
8372 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8373 linux-x86-low.o.
8374 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8375 linux-x86-low.o.
8376 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8377 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8378 (linux_child_pid_to_exec_file): New function.
8379 (elf_64_header_p, elf_64_file_p): New functions.
8380 (siginfo_fixup): New function.
8381 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8382 give target a chance to convert layout.
8383 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8384 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8385
fdeb2a12
DE
83862009-05-07 Doug Evans <dje@google.com>
8387
8388 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8389 (regsets_store_inferior_registers): Ditto.
8390
a6dbe5df
PA
83912009-05-06 Pedro Alves <pedro@codesourcery.com>
8392
8393 PR server/10048
8394
8395 * linux-low.c (must_set_ptrace_flags): Delete.
8396 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8397 of the global.
8398 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8399 `lwp->must_set_ptrace_flags' instead.
ba42693b 8400 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8401 (linux_wait_1): ... not here.
8402
5091eb23
DE
84032009-04-30 Doug Evans <dje@google.com>
8404
9f767825
DE
8405 * inferiors.c (started_inferior_callback): New function.
8406 (attached_inferior_callback): New function.
8407 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8408 * server.c (print_started_pid, print_attached_pid): New functions.
8409 (detach_or_kill_for_exit): New function.
8410 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8411 * server.h (have_started_inferiors_p): Declare.
8412 (have_attached_inferiors_p): Declare.
8413
5091eb23
DE
8414 * inferiors.c (remove_process): Fix memory leak, free process.
8415 * linux-low.c (linux_remove_process): New function.
8416 (linux_kill): Call it instead of remove_process.
8417 (linux_detach, linux_wait_1): Ditto.
8418
155c8968
PA
84192009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8420
8421 * configure.srv: Add x86 Windows CE target.
8422
7fe519cb
UW
84232009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8424
8425 * inferiors.c (get_thread_process): Make global.
8426 * server.h (get_thread_process): Add prototype.
8427 * thread-db.c (find_one_thread): Use get_thread_process
8428 instead of current_process.
8429 (thread_db_get_tls_address): Do not crash if called when
8430 thread layer is not yet initialized.
8431
5472f405
UW
84322009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8433
8434 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8435 * spu-low.c (current_tid): Rename to ...
8436 (current_ptid): ... this.
8437 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8438 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8439 ptid_get_lwp (current_ptid) instead of current_tid.
8440 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8441 instead of current_tid. Use find_process_pid to verify pid
8442 argument is valid. Pass proper argument to remove_process.
8443 (spu_thread_alive): Compare current_ptid instead of current_tid.
8444 (spu_resume): Likewise.
8445
55ac2b99
PA
84462009-04-02 Pedro Alves <pedro@codesourcery.com>
8447
8448 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8449 variable.
8450
95954743
PA
84512009-04-01 Pedro Alves <pedro@codesourcery.com>
8452
8453 Implement the multiprocess extensions, and add linux multiprocess
8454 support.
8455
8456 * server.h (ULONGEST): Declare.
8457 (struct ptid, ptid_t): New.
8458 (minus_one_ptid, null_ptid): Declare.
8459 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8460 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8461 (struct inferior_list_entry): Change `id' type from unsigned from
8462 to ptid_t.
8463 (struct sym_cache, struct breakpoint, struct
8464 process_info_private): Forward declare.
8465 (struct process_info): Declare.
8466 (current_process): Declare.
8467 (all_processes): Declare.
8468 (initialize_inferiors): Declare.
8469 (add_thread): Adjust to use ptid_t.
8470 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8471 (add_process, remove_process, find_thread_pid): Declare.
8472 (find_inferior_id): Adjust to use ptid_t.
8473 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8474 (multi_process): Declare.
8475 (push_event): Adjust to use ptid_t.
8476 (read_ptid, write_ptid): Declare.
8477 (prepare_resume_reply): Adjust to use ptid_t.
8478 (clear_symbol_cache): Declare.
8479 * inferiors.c (all_processes): New.
8480 (null_ptid, minus_one_ptid): New.
8481 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8482 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8483 (add_thread): Change unsigned long to ptid. Remove gdb_id
8484 parameter. Adjust.
8485 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8486 (gdb_id_to_thread): Rename to ...
8487 (find_thread_pid): ... this. Change unsigned long to ptid.
8488 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8489 (loaded_dll, pull_pid_from_list): Adjust.
8490 (add_process, remove_process, find_process_pid)
8491 (get_thread_process, current_process, initialize_inferiors): New.
8492 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8493 (struct target_waitstatus) <related_pid>: Ditto.
8494 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8495 return type to int.
8496 (struct target_ops) <join>: Add `pid' argument.
8497 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8498 (struct target_ops) <wait>: Add `ptid' field. Change return type
8499 to ptid.
8500 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8501 (mywait): Add `ptid' argument. Change return type to ptid_t.
8502 (target_pid_to_str): Declare.
8503 * target.c (set_desired_inferior): Adjust to use ptids.
8504 (mywait): Add new `ptid' argument. Adjust.
8505 (target_pid_to_str): New.
8506 * mem-break.h (free_all_breakpoints): Declare.
8507 * mem-break.c (breakpoints): Delelete.
8508 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8509 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8510 to use per-process breakpoint list.
8511 (free_all_breakpoints): New.
8512 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8513 (symbol_cache, all_symbols_looked_up): Delete.
8514 (hexchars): New.
8515 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8516 read_ptid): New.
8517 (prepare_resume_reply): Change ptid argument's type from unsigned
8518 long to ptid_t. Adjust. Implement W;process and X;process.
8519 (free_sym_cache, clear_symbol_cache): New.
8520 (look_up_one_symbol): Adjust to per-process symbol cache. *
8521 * server.c (cont_thread, general_thread, step_thread): Change type
8522 to ptid_t.
8523 (attached): Delete.
8524 (multi_process): New.
8525 (last_ptid): Change type to ptid_t.
8526 (struct vstop_notif) <ptid>: Change type to ptid_t.
8527 (queue_stop_reply, push_event): Change `ptid' argument's type to
8528 ptid_t.
8529 (discard_queued_stop_replies): Add `pid' argument.
8530 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8531 changes. Don't reference the `attached' global.
8532 (attach_inferior): Adjust to mywait interface changes.
8533 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8534 features. Handle and report "multiprocess+". Handle
8535 "qAttached:PID".
8536 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8537 changes.
8538 (handle_v_kill): New.
8539 (handle_v_stopped): Adjust to use target_pid_to_str.
8540 (handle_v_requests): Allow multiple attaches and runs when
8541 multiprocess extensions are in effect. Handle "vKill".
8542 (myresume): Adjust to use ptids.
8543 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8544 (handle_status): Adjust to discard_queued_stop_replies interface
8545 change.
8546 (first_thread_of, kill_inferior_callback)
8547 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8548 (main): Call initialize_inferiors. Adjust to use ptids, killing
8549 and detaching from all inferiors. Handle multiprocess packet
8550 variants.
8551 * linux-low.h: Include gdb_proc_service.h.
8552 (struct process_info_private): New.
8553 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8554 <lwpid_of>: Use ptid_get_lwp.
8555 (get_lwp_thread): Adjust.
8556 (struct lwp_info): Add `dead' member.
8557 (find_lwp_pid): Declare.
8558 * linux-low.c (thread_db_active): Delete.
8559 (new_inferior): Adjust comment.
8560 (inferior_pid): Delete.
8561 (linux_add_process): New.
8562 (handle_extended_wait): Adjust.
8563 (add_lwp): Change unsigned long to ptid.
8564 (linux_create_inferior): Add process to processes table. Adjust
8565 to use ptids. Don't set new_inferior here.
8566 (linux_attach_lwp): Rename to ...
8567 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8568 it. Adjust to use ptids.
8569 (linux_attach_lwp): New.
8570 (linux_attach): Add process to processes table. Don't set
8571 new_inferior here.
8572 (struct counter): New.
8573 (second_thread_of_pid_p, last_thread_of_process_p): New.
8574 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8575 multiple processes.
8576 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8577 processes. Remove process from process table.
8578 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8579 to multiple processes.
8580 (any_thread_of): New.
8581 (linux_detach): Add `pid' argument, and handle it. Remove process
8582 from processes table.
8583 (linux_join): Add `pid' argument. Handle it.
8584 (linux_thread_alive): Change unsighed long argument to ptid_t.
8585 Consider dead lwps as not being alive.
8586 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8587 threads we're not interested in.
8588 (same_lwp, find_lwp_pid): New.
8589 (linux_wait_for_lwp): Change `pid' argument's type from int to
8590 ptid_t. Adjust.
8591 (linux_wait_for_event): Rename to ...
8592 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8593 from int to ptid_t. Adjust.
8594 (linux_wait_for_event): New.
8595 (linux_wait_1): Add `ptid' argument. Change return type to
8596 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8597 that exit from the process table.
8598 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8599 Adjust.
8600 (mark_lwp_dead): New.
8601 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8602 stopping all threads, mark its main lwp as dead.
8603 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8604 ptids.
8605 (fetch_register, usr_store_inferior_registers)
8606 (regsets_fetch_inferior_registers)
8607 (regsets_store_inferior_registers, linux_read_memory)
8608 (linux_write_memory): Inline `inferior_pid'.
8609 (linux_look_up_symbols): Adjust to use per-process
8610 `thread_db_active'.
8611 (linux_request_interrupt): Adjust to use ptids.
8612 (linux_read_auxv): Inline `inferior_pid'.
8613 (initialize_low): Don't reference thread_db_active.
8614 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8615 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8616 (ps_getpid): Return the pid of the current inferior.
8617 * thread-db.c (proc_handle, thread_agent): Delete.
8618 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8619 per-process data.
8620 (find_one_thread): Change argument type to ptid_t. Adjust to
8621 per-process data.
8622 (maybe_attach_thread): Adjust to per-process data and ptids.
8623 (thread_db_find_new_threads): Ditto.
8624 (thread_db_init): Ditto.
8625 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8626 processes table. Adjust to use ptids.
8627 (spu_kill, spu_detach): Adjust interface. Remove process from
8628 processes table.
8629 (spu_join, spu_thread_alive): Adjust interface.
8630 (spu_wait): Adjust interface. Remove process from processes
8631 table. Adjust to use ptids.
8632 * win32-low.c (current_inferior_tid): Delete.
8633 (current_inferior_ptid): New.
8634 (debug_event_ptid): New.
8635 (thread_rec): Take a ptid. Adjust.
8636 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8637 (child_delete_thread): Ditto.
8638 (do_initial_child_stuff): Add `attached' argument. Add process to
8639 processes table.
8640 (child_fetch_inferior_registers, child_store_inferior_registers):
8641 Adjust.
8642 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8643 (win32_attach): Pass 1 to do_initial_child_stuff.
8644 (win32_kill): Adjust interface. Remove process from processes
8645 table.
8646 (win32_detach): Ditto.
8647 (win32_join): Adjust interface.
8648 (win32_thread_alive): Take a ptid.
8649 (win32_resume): Adjust to use ptids.
8650 (get_child_debug_event): Ditto.
8651 (win32_wait): Adjust interface. Remove exiting process from
8652 processes table.
8653
bd99dc85
PA
86542009-04-01 Pedro Alves <pedro@codesourcery.com>
8655
8656 Non-stop mode support.
8657
8658 * server.h (non_stop): Declare.
8659 (gdb_client_data, handler_func): Declare.
8660 (delete_file_handler, add_file_handler, start_event_loop):
8661 Declare.
8662 (handle_serial_event, handle_target_event, push_event)
8663 (putpkt_notif): Declare.
8664 * target.h (enum resume_kind): New.
8665 (struct thread_resume): Replace `step' field by `kind' field.
8666 (TARGET_WNOHANG): Define.
8667 (struct target_ops) <wait>: Add `options' argument.
8668 <supports_non_stop, async, start_non_stop>: New fields.
8669 (target_supports_non_stop, target_async): New.
8670 (start_non_stop): Declare.
8671 (mywait): Add `options' argument.
8672 * target.c (mywait): Add `options' argument. Print child exit
8673 notifications here.
8674 (start_non_stop): New.
8675 * server.c (non_stop, own_buf, mem_buf): New globals.
8676 (struct vstop_notif): New.
8677 (notif_queue): New global.
8678 (queue_stop_reply, push_event, discard_queued_stop_replies)
8679 (send_next_stop_reply): New.
8680 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8681 interface changes.
8682 (attach_inferior): In non-stop mode, don't wait for the target
8683 here.
8684 (handle_general_set): Handle QNonStop.
8685 (handle_query): When handling qC, return the current general
8686 thread, instead of the first thread of the list.
8687 (handle_query): If the backend supports non-stop mode, include
8688 QNonStop+ in the qSupported query response.
8689 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8690 and non-stop mode.
8691 (handle_v_attach, handle_v_run): Handle non-stop mode.
8692 (handle_v_stopped): New.
8693 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8694 (myresume): Adjust to use resume_kind. Handle non-stop.
8695 (queue_stop_reply_callback): New.
8696 (handle_status): Handle non-stop mode.
8697 (main): Clear non_stop flag on reconnection. Use the event-loop.
8698 Refactor serial protocol handling from here ...
8699 (process_serial_event): ... to this new function. When GDB
8700 selects any thread, select one here. In non-stop mode, wait until
8701 GDB acks all pending events before exiting.
8702 (handle_serial_event, handle_target_event): New.
8703 * remote-utils.c (remote_open): Install remote_desc in the event
8704 loop.
8705 (remote_close): Remove remote_desc from the event loop.
8706 (putpkt_binary): Rename to...
8707 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8708 (putpkt_binary): New as wrapper around putpkt_binary_1.
8709 (putpkt_notif): New.
8710 (prepare_resume_reply): In non-stop mode, don't change the
8711 general_thread.
8712 * event-loop.c: New.
8713 * Makefile.in (OBJ): Add event-loop.o.
8714 (event-loop.o): New rule.
8715
8716 * linux-low.h (pid_of): Moved here.
8717 (lwpid_of): New.
8718 (get_lwp_thread): Use lwpid_of.
8719 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8720 * linux-low.c (pid_of): Delete.
8721 (inferior_pid): Use lwpid_of.
8722 (linux_event_pipe): New.
8723 (target_is_async_p): New.
8724 (delete_lwp): New.
8725 (handle_extended_wait): Use lwpid_of.
8726 (add_lwp): Don't set lwpid field.
8727 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8728 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8729 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8730 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8731 first. Adjust to linux_wait_for_event interface changes. Use
8732 lwpid_of.
8733 (linux_detach): Don't delete the main lwp here.
8734 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8735 (status_pending_p): Don't consider explicitly suspended lwps.
8736 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8737 pointer. Add OPTIONS argument. Change return type to int. Use
8738 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8739 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8740 pointer. Add status pointer argument. Return a pid instead of a
8741 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8742 changes. In non-stop mode, don't switch to a random thread.
8743 (linux_wait): Rename to...
8744 (linux_wait_1): ... this. Add target_options argument, and handle
8745 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8746 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8747 clean exit and signal exit code. Don't stop all threads in
8748 non-stop mode. In all-stop mode, only stop all threads when
8749 reporting a stop to GDB. Handle explicit thread stop requests.
8750 (async_file_flush, async_file_mark): New.
8751 (linux_wait): New.
8752 (send_sigstop): Use lwpid_of.
8753 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8754 interface changes. In non-stop mode, don't switch to a random
8755 thread.
8756 (linux_resume_one_lwp): Use lwpid_of.
8757 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8758 (linux_resume_one_thread): ... this. Handle resume_stop. In
8759 non-stop mode, don't look for pending flag in all threads.
8760 (resume_status_pending_p): Don't consider explicitly suspended
8761 threads.
8762 (my_waitpid): Reimplement. Emulate __WALL.
8763 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8764 Use lwpid_of.
8765 (sigchld_handler, linux_supports_non_stop, linux_async)
8766 (linux_start_non_stop): New.
8767 (linux_target_ops): Register linux_supports_non_stop, linux_async
8768 and linux_start_non_stop.
8769 (initialize_low): Install SIGCHLD handler.
8770 * thread-db.c (thread_db_create_event, find_one_thread)
8771 (thread_db_get_tls_address): Use lwpid_of.
8772 * win32-low.c (win32_detach): Adjust to use resume_kind.
8773 (win32_wait): Add `options' argument.
8774 * spu-low.c (spu_resume): Adjust to use resume_kind.
8775 (spu_wait): Add `options' argument.
8776
5b1c542e
PA
87772009-04-01 Pedro Alves <pedro@codesourcery.com>
8778
8779 Decouple target code from remote protocol.
8780
8781 * target.h (enum target_waitkind): New.
8782 (struct target_waitstatus): New.
8783 (struct target_ops) <wait>: Return an unsigned long. Take a
8784 target_waitstatus pointer instead of a char pointer.
8785 (mywait): Likewise.
8786 * target.c (mywait): Change prototype to return an unsigned long.
8787 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8788 * server.h (thread_from_wait, old_thread_from_wait): Delete
8789 declarations.
8790 (prepare_resume_reply): Change prototype to take a
8791 target_waitstatus.
8792 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8793 (last_status, last_ptid): New.
8794 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8795 pid instead of a signal.
8796 (attach_inferior): Remove "status" and "signal" parameters.
8797 Adjust.
8798 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8799 not as an address.
8800 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8801 (handle_v_requests, myresume): Remove "status" and "signal"
8802 parameters. Adjust.
8803 (handle_status): New.
8804 (main): Delete local `status'. Adjust.
8805 * remote-utils.c: Include target.h.
8806 (prepare_resume_reply): Change prototype to take a
8807 target_waitstatus. Adjust.
8808
8809 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8810 interface.
8811 * spu-low.c (spu_wait): Adjust.
8812 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8813 Delete.
8814 (win32_wait): Adjust.
8815
2bd7c093
PA
88162009-04-01 Pedro Alves <pedro@codesourcery.com>
8817
8818 * target.h (struct thread_resume): Delete leave_stopped member.
8819 (struct target_ops): Add a `n' argument to the `resume' callback.
8820 * server.c (start_inferior): Adjust.
8821 (handle_v_cont, myresume): Adjust.
8822 * linux-low.c (check_removed_breakpoint): Adjust to resume
8823 interface change, and to removed leave_stopped field.
8824 (resume_ptr): Delete.
8825 (struct thread_resume_array): New.
8826 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8827 resume interface change.
8828 (linux_continue_one_thread, linux_queue_one_thread)
8829 (resume_status_pending_p): Check if the resume field is NULL
8830 instead of checking the leave_stopped member.
8831 (linux_resume): Adjust to the target resume interface change.
8832 * spu-low.c (spu_resume): Adjust to the target resume interface
8833 change.
8834 * win32-low.c (win32_detach, win32_resume): Ditto.
8835
c35fafde
PA
88362009-04-01 Pedro Alves <pedro@codesourcery.com>
8837
8838 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8839 flag.
8840 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8841 pending.
8842 (linux_continue_one_thread): Only preserve the stepping flag if
8843 there's a pending breakpoint.
8844
0a59d50b
PA
88452009-03-31 Pedro Alves <pedro@codesourcery.com>
8846
8847 * server.c (main): After the inferior having exited, call
8848 remote_close before exiting gdbserver.
8849
f04c6d38
TJB
88502009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8851
8852 Fix size of FPSCR in Power 7 processors.
8853 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8854 (PPC_FEATURE_HAS_DFP): New #define.
8855 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8856 size of the FPSCR.
8857
78e5cee6
PA
88582009-03-23 Pedro Alves <pedro@codesourcery.com>
8859
8860 * server.c (handle_query) Whitespace and formatting.
8861
1b3f6016
PA
88622009-03-22 Pedro Alves <pedro@codesourcery.com>
8863
8864 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8865 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8866 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8867 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8868 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8869 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8870 Makefile.in, configure.ac: Fix whitespace throughout.
8871 * configure: Regenerate.
8872
a07b2135
PA
88732009-03-22 Pedro Alves <pedro@codesourcery.com>
8874
8875 * inferiors.c (find_inferior): Make it safe for the callback
8876 function to delete the currently iterated inferior.
8877
67cc2626
PA
88782009-03-22 Pedro Alves <pedro@codesourcery.com>
8879
8880 * Makefile.in (linuw_low_h): Move higher.
8881 (thread-db.o): Depend on $(linux_low_h).
8882
54a0b537
PA
88832009-03-17 Pedro Alves <pedro@codesourcery.com>
8884
8885 Rename "process" to "lwp" throughout.
8886
8887 * linux-low.c (all_processes): Rename to...
8888 (all_lwps): ... this.
8889 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8890 (add_process): Rename to ...
8891 (add_lwp): ... this. Adjust.
8892 (linux_create_inferior): Adjust.
8893 (linux_attach_lwp): Adjust.
8894 (linux_attach): Adjust.
8895 (linux_kill_one_process): Rename to ...
8896 (linux_kill_one_lwp): ... this. Adjust.
8897 (linux_kill): Adjust.
8898 (linux_detach_one_process): Rename to ...
8899 (linux_detach_one_lwp): ... this. Adjust.
8900 (linux_detach): Adjust.
8901 (check_removed_breakpoint): Adjust.
8902 (status_pending_p): Adjust.
8903 (linux_wait_for_process): Rename to ...
8904 (linux_wait_for_lwp): ... this. Adjust.
8905 (linux_wait_for_event): Adjust.
8906 (send_sigstop): Adjust.
8907 (wait_for_sigstop): Adjust.
8908 (stop_all_processes): Rename to ...
8909 (stop_all_lwps): ... this.
8910 (linux_resume_one_process): Rename to ...
8911 (linux_resume_one_lwp): ... this. Adjust.
8912 (linux_set_resume_request, linux_continue_one_thread)
8913 (linux_queue_one_thread, resume_status_pending_p)
8914 (usr_store_inferior_registers, regsets_store_inferior_registers)
8915 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8916 Adjust.
8917 * linux-low.h (get_process): Rename to ...
8918 (get_lwp): ... this. Adjust.
8919 (get_thread_process): Rename to ...
8920 (get_thread_lwp): ... this. Adjust.
8921 (get_process_thread): Rename to ...
8922 (get_lwp_thread): ... this. Adjust.
8923 (struct process_info): Rename to ...
8924 (struct lwp_info): ... this.
8925 (all_processes): Rename to ...
8926 (all_lwps): ... this.
8927 * proc-service.c (ps_lgetregs): Adjust.
8928 * thread-db.c (thread_db_create_event, find_one_thread)
8929 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8930
0b16c5cf
PA
89312009-03-14 Pedro Alves <pedro@codesourcery.com>
8932
8933 * server.c (handle_query): Handle "qAttached".
8934
32de4b9d
NS
89352009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8936
8937 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8938 GPLv3, update license URL.
8939
2aecd87f
DE
89402009-03-01 Doug Evans <dje@google.com>
8941
93efd302 8942 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8943 (server_h): Add gdb_signals.h.
8944 (signals.o): Update.
8945 * server.h (target_signal_from_host,target_signal_to_host_p)
8946 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8947
86b1f9c5
PM
89482009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8949
8950 * remote-utils.c (getpkt): Also generate remote-debug
8951 information if noack_mode is set.
8952
4aa995e1
PA
89532009-02-06 Pedro Alves <pedro@codesourcery.com>
8954
8955 * server.c (handle_query): Report qXfer:siginfo:read and
8956 qXfer:siginfo:write as supported and handle them.
8957 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8958 * linux-low.c (linux_xfer_siginfo): New.
8959 (linux_target_ops): Set it.
8960
62709adf
PA
89612009-01-26 Pedro Alves <pedro@codesourcery.com>
8962
8963 * server.c (gdbserver_usage): Mention --remote-debug.
8964 (main): Accept '--remote-debug' switch.
8965
aef93bd7
DE
89662009-01-18 Doug Evans <dje@google.com>
8967
8968 * regcache.c (new_register_cache): No need to check result of xcalloc.
8969 * server.c (handle_search_memory): Back out calls to xmalloc,
8970 result is checked and error is returned to user upon failure.
8971 (handle_query): Ditto. Add more checks for result of malloc.
8972 (handle_v_cont): Check result of malloc, report error back to
8973 user upon failure.
8974 (handle_v_run): Ditto. Call freeargv.
8975 * server.h (freeargv): Declare.
8976 * utils.c (freeargv): New fn.
8977
54363045
DE
89782009-01-15 Doug Evans <dje@google.com>
8979
f626972c
DE
8980 * gdbreplay.c (perror_with_name): Make arg const char *.
8981 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8982 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8983 * utils.c (perror_with_name): Make arg const char *.
54363045 8984
18aae699
PA
89852009-01-14 Pedro Alves <pedro@codesourcery.com>
8986
8987 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8988 when handling a EXIT_PROCESS_DEBUG_EVENT.
8989
ff703abe
JB
89902009-01-06 Joel Brobecker <brobecker@adacore.com>
8991
8992 * gdbreplay.c (gdbreplay_version): Update copyright year.
8993 * server.c (gdbserver_version): Likewise.
8994
f21cc1a2 89952009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8996
8997 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8998 (handle_extended_wait): Improve comment.
0e21c1ec 8999
bca929d3
DE
90002008-12-13 Doug Evans <dje@google.com>
9001
9002 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9003 * server.h (ATTR_MALLOC): New macro.
9004 (xmalloc,xcalloc,xstrdup): Declare.
9005 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9006 * inferiors.c: Ditto.
9007 * linux-low.c: Ditto.
9008 * mem-break.c: Ditto.
9009 * regcache.c: Ditto.
9010 * remote-utils.c: Ditto.
9011 * server.c: Ditto.
9012 * target.c: Ditto.
9013 * win32-low.c: Ditto.
9014
97438e3f
DE
90152008-12-12 Doug Evans <dje@google.com>
9016
896c7fbb
DE
9017 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9018 in debugging printf.
9019
97438e3f
DE
9020 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9021
e3b886f8
DE
90222008-12-09 Doug Evans <dje@google.com>
9023
9024 * linux-low.h (struct process_info): Delete member tid, unused.
9025 * thread-db.c (find_one_thread): Update.
9026 (maybe_attach_thread): Update.
9027
07e059b5
VP
90282008-12-02 Pedro Alves <pedro@codesourcery.com>
9029
889bf7c5
PA
9030 * target.h (struct target_ops): Add qxfer_osdata member.
9031 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9032 and dirent.h.
9033 (linux_qxfer_osdata): New functions.
9034 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9035 callback.
9036 * server.c (handle_query): Handle "qXfer:osdata:read:".
9037 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9038 (buffer_xml_printf): New functions.
9039 * server.h (struct buffer): New.
9040 (buffer_grow_str, buffer_grow_str0): New macros.
9041 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9042 (buffer_xml_printf): Declare.
07e059b5 9043
4cab47ab
DE
90442008-11-24 Doug Evans <dje@google.com>
9045
9046 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9047
f142445f
DJ
90482008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9049
9050 * server.c (handle_v_run): Always use the supplied argument list.
9051
d0107bb6 90522008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 9053
d0107bb6
BW
9054 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9055 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 9056
2c4ad781
TJB
90572008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9058
9059 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9060 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9061 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9062 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9063 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9064 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9065 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9066 XML target descriptions.
9067 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9068 when inferior is running on an ISA 2.05 or later processor. Add
9069 special case to return offset for full 64-bit slot of FPSCR when
9070 in 32-bits.
9071
dfb64f85
DJ
90722008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9073
9074 * Makefile.in (SFILES, clean): Added sparc64 files.
9075 (reg-sparc64.o, reg-sparc64.c): New.
9076 * configure.srv (sparc*-*-linux*): New configuration.
9077 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9078 syscall arguments for SPARC.
9079 (regsets_store_inferior_registers): Likewise.
9080 * linux-sparc-low.c: New file.
9081
66b6e1dd
DE
90822008-10-21 Doug Evans <dje@google.com>
9083
9084 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9085 (READLINE_DIR,READLINE_DEP): Delete.
9086 (INTERNAL_CFLAGS): Update.
9087 (LINTFLAGS): Update.
9088
9b710a42
PA
90892008-10-10 Pedro Alves <pedro@codesourcery.com>
9090
9091 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9092 whole argv from the last run, not just argv[0].
9093
5822d809
PA
90942008-09-08 Pedro Alves <pedro@codesourcery.com>
9095
9096 * regcache.c (new_register_cache): Return NULL if the register
9097 cache size isn't known yet.
9098 (free_register_cache): Avoid dereferencing a NULL regcache.
9099
74aac56f
DJ
91002008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9101
9102 * configure.srv: Merge MIPS and MIPS64.
9103
400b20f5
MR
91042008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9105
9106 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9107
677c5bb1
LM
91082008-08-18 Luis Machado <luisgpm@br.ibm.com>
9109
9110 * Makefile.in: Add required vsx dependencies.
9111
9112 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9113 Declare init_registers_powerpc_vsx32l.
9114 Declare init_registers_powerpc_vsx64l.
9115 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9116 (ppc_arch_setup): Check for VSX in hwcap.
9117 (ppc_fill_vsxregset): New function.
9118 (ppc_store_vsxregset): New function.
9119 Add new VSX entry in regset_info target_regsets.
9120
9121 * configure.srv: Add new VSX dependencies.
9122
a6f3e723
SL
91232008-08-12 Pedro Alves <pedro@codesourcery.com>
9124
9125 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9126 (remote_open): Set or clear transport_is_reliable.
9127 (putpkt_binary): Don't expect acks in noack mode.
9128 (getpkt): Don't send ack/nac in noack mode.
9129 * server.c (handle_general_set): Handle QStartNoAckMode.
9130 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9131 qSupported.
9132 (main): Reset noack_mode on every connection.
9133 * server.h (noack_mode): Declare.
9134
a417dc56
RW
91352008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9136
9137 * Makefile.in (GDBREPLAY_OBS): New variable.
9138 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9139
3221518c
UW
91402008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9141 Daniel Jacobowitz <dan@codesourcery.com>
9142
9143 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9144 (usr_store_inferior_registers): Likewise.
9145 (regsets_store_inferior_registers): Likewise.
9146
ec56be1b
PA
91472008-07-31 Rolf Jansen <rj@surtec.com>
9148 Pedro Alves <pedro@codesourcery.com>
9149
9150 * configure.ac: Check for memmem declaration.
9151 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9152 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9153 (disable_packet_qfThreadInfo): Unconditionally compile.
9154 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9155 * configure, config.in: Regenerate.
9156
2fe5e3ff
DE
91572008-07-28 Doug Kwan <dougkwan@google.com>
9158
9159 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9160 (linux_write_memory): Remove declaration of errno.
9161
836acd6d
UW
91622008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9163
9164 * linux-low.c (handle_extended_wait): Do not use "status"
9165 variable uninitialized.
9166
aeba519e
PA
91672008-07-07 Pedro Alves <pedro@codesourcery.com>
9168
9169 * server.c (handle_v_attach): Inhibit reporting dll changes.
9170
db42f210
PA
91712008-06-27 Pedro Alves <pedro@codesourcery.com>
9172
9173 * remote-utils.c (prepare_resume_reply): If requested, don't
9174 output "thread:TID" in the T stop reply.
9175
9176 * server.c (disable_packet_vCont, disable_packet_Tthread)
9177 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9178 (handle_query): If requested, disable support for qC, qfThreadInfo
9179 and qsThreadInfo.
9180 (handle_v_requests): If requested, disable support for vCont.
9181 (gdbserver_show_disableable): New.
9182 (main): Handle --disable-packet and --disable-packet=LIST.
9183
9184 * server.h (disable_packet_vCont, disable_packet_Tthread)
9185 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9186
8e4c5421
CD
91872008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9188
9189 * server.c (gdbserver_usage): Mention --version.
9190
6e23a804
DJ
91912008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9192
9193 * Makefile.in (gdbreplay.o): New rule.
9194
90aa6a40
JM
91952008-06-06 Joseph Myers <joseph@codesourcery.com>
9196
9197 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9198 message, not gdbserver.
9199
c16158bc 92002008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
9201 Nathan Sidwell <nathan@codesourcery.com>
9202 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
9203
9204 * acinclude.m4: Include ../../config/acx.m4.
9205 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9206 * configure, config.in: Regenerate.
9207 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9208 * server.c (gdbserver_version): Print PKGVERSION.
9209 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9210 (main): Adjust gdbserver_usage calls.
9211 * gdbreplay.c (version, host_name): Add declarations.
9212 (gdbreplay_version, gdbreplay_usage): New.
9213 (main): Accept --version and --help options.
9214
aeb75bf5
DJ
92152008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9216
9217 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9218 (arm_breakpoint_at): Handle Thumb.
9219 (the_low_target): Add comment.
9220
76b233dd
UW
92212008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9222
9223 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9224
08388c79
DE
92252008-05-09 Doug Evans <dje@google.com>
9226
a3c83fae
DE
9227 * server.h (decode_search_memory_packet): Declare.
9228 * remote-utils.c (decode_search_memory_packet): New fn.
9229 * server.c (handle_search_memory_1): New fn.
08388c79
DE
9230 (handle_search_memory): New fn.
9231 (handle_query): Process qSearch:memory packets.
9232
bb9c3d36
UW
92332008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9234
9235 * regcache.c (registers_length): Remove.
9236 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9237 full register packet.
9238 * regcache.h (registers_length): Remove prototype.
9239 * server.h (PBUFSIZ): Define to 16384.
9240
7284e1be
UW
92412008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9242
9243 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9244 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9245 powerpc-64l.o, and powerpc-altivec64l.o.
9246 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9247 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9248 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9249 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9250 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9251 to srv_xmlfiles.
9252
9253 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9254 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9255 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9256 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9257 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9258 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9259 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9260 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9261 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9262 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9263 (clean): Update.
9264
9265 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9266 (init_registers_powerpc_32l): ... this new prototype.
9267 (init_registers_powerpc_32): Remove, replace by ...
9268 (init_registers_powerpc_altivec32l): ... this new prototype.
9269 (init_registers_powerpc_e500): Remove, replace by ...
9270 (init_registers_powerpc_e500l): ... this new prototype.
9271 (init_registers_ppc64): Remove, replace by ...
9272 (init_registers_powerpc_64l): ... this new prototype.
9273 (init_registers_powerpc_64): Remove, replace by ...
9274 (init_registers_powerpc_altivec64l): ... this new prototype.
9275 (ppc_num_regs): Set to 73.
9276 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9277 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9278 (ppc_cannot_store_register): Handle orig_r3 and trap.
9279 (ppc_arch_setup): Update init_registers_... calls.
9280 (ppc_fill_gregset): Handle orig_r3 and trap.
9281
9282 * inferiors.c (clear_inferiors): Reset current_inferior.
9283
fdc59709
PB
92842008-04-23 Paolo Bonzini <bonzini@gnu.org>
9285
889bf7c5
PA
9286 * acinclude.m4: Add override.m4.
9287 * configure: Regenerate.
fdc59709 9288
c9b2f845
UW
92892008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9290
9291 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9292 initial call to init_register_ppc64.
9293
550512b8
UW
92942008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9295
43aaf8b6
PA
9296 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9297 single powerpc*-*-linux* case.
550512b8
UW
9298 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9299
b6430ec3
UW
93002008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9301
9302 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 9303 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
9304 from reg_xmlfiles.
9305 * linux-ppc-low.c: Include <elf.h>.
9306 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9307 (ppc_hwcap): New global variable.
9308 (ppc_regmap): Remove __SPE__ #ifdef sections.
9309 (ppc_regmap_e500): New global variable.
9310 (ppc_cannot_store_register): Update __SPE__ special case.
9311 (ppc_get_hwcap): New function.
9312 (ppc_arch_setup): Use it to determine whether inferior supports
9313 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9314 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9315 Do not access registers if target does not support AltiVec.
9316 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9317 Do not access registers if target does not support SPE.
9318 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9319
52fa2412
UW
93202008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9321
9322 * linux-low.c (disabled_regsets, num_regsets): New.
9323 (use_regsets_p): Delete.
9324 (linux_wait_for_process): Clear disabled_regsets.
9325 (regsets_fetch_inferior_registers): Check and set it.
9326 (regsets_store_inferior_registers): Likewise.
9327 (linux_fetch_registers, linux_store_registers): Do not use
9328 use_regsets_p.
9329 (initialize_low): Allocate disabled_regsets.
9330
e28b3332
DJ
93312008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9332
9333 * Makefile.in (LIBOBJS): New.
9334 (OBS): Use LIBOBJS.
9335 (memmem.o): New rule.
9336 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9337 * configure: Regenerated.
9338
4536995d
UW
93392008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9340
9341 * server.c (handle_query): Never return "unsupported" for
9342 qXfer:features:read queries.
9343
221c031f
UW
93442008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9345
9346 * server.c (get_features_xml): Fix inverted condition.
9347 (handle_query): Always support qXfer:feature:read.
9348
ccd213ac
DJ
93492008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9350
9351 * server.c (wrapper_argv): New.
9352 (start_inferior): Handle wrapper_argv. If set, expect an extra
9353 trap.
9354 (gdbserver_usage): Document --wrapper.
9355 (main): Parse --wrapper.
9356
6fe305f7
UW
93572008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9358
9359 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9360 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9361 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9362 (ppc_set_pc): Likewise.
9363 (ppc_arch_setup): New function.
9364 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9365 of collect_register.
889bf7c5 9366 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9367
5b0a002e
UW
93682008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9369
9370 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9371 instead of linux-ppc64-low.o.
9372 * linux-ppc64-low.c: Remove file.
9373 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9374 (linux-ppc64-low.o): Remove rule.
9375
9376 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9377 (init_registers_powerpc_64): Likewise.
9378 (ppc_regmap): Conditionally define depending on __powerpc64__.
9379 (ppc_cannot_store_register): Do not special-case "fpscr" when
9380 compiled on __powerpc64__.
9381 (ppc_collect_ptrace_register): New function.
9382 (ppc_supply_ptrace_register): New function.
9383 (ppc_breakpoint): Change type to "unsigned int".
9384 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9385 (the_low_target): Conditionally provide initializers for the
889bf7c5 9386 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9387 collect_ptrace_register and supply_ptrace_register members.
9388
9b4b61c8
UW
93892008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9390
9391 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9392 * server.c (gdbserver_xmltarget): Define.
9393 (get_features_xml): Use it to replace "target.xml" and arch_string.
9394
9395 * configure.srv: Remove srv_xmltarget. Add XML files that were
9396 mentioned there to srv_xmlfiles instead. Remove conditional tests
9397 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9398 srv_xmlfiles and srv_regobj to include all possible choices.
9399 * configure.ac (srv_xmltarget): Remove.
9400 (srv_xmlfiles): Do not add "target.xml".
9401 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9402 checks for supplementary target information.
9403 * configure: Regenerate.
9404 * Makefile.in (XML_TARGET): Remove.
9405 (target.xml): Remove rule.
9406 (clean): Do not clean up target.xml.
9407 (.PRECIOUS): Do not mention target.xml.
9408
9409 * target.h (struct target_ops): Remove arch_string member.
9410 * linux-low.c (linux_arch_string): Remove.
9411 (linux_target_ops): Remove arch_string initializer.
9412 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9413 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9414 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9415 * spu-low.c (spu_arch_string): Remove.
9416 (spu_target_ops): Remove arch_string initializer.
9417 * win32-low.c (win32_arch_string): Remove.
9418 (win32_target_ops): Remove arch_string initializer.
9419 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9420 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9421 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9422
ee1a7ae4
UW
94232008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9424
9425 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9426 by collect_ptrace_register and supply_ptrace_register hooks.
9427 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9428 instead of checking for the_low_target.left_pad_xfer.
9429 (usr_store_inferior_registers): Use collect_ptrace_register callback
9430 instead of checking for the_low_target.left_pad_xfer.
9431
9432 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9433 (s390_supply_ptrace_register): Likewise.
9434 (s390_fill_gregset): Call s390_collect_ptrace_register.
9435 (the_low_target): Update.
9436
9437 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9438 (ppc_supply_ptrace_register): Likewise.
9439 (the_low_target): Update.
9440
9441 * linux-i386-low.c (the_low_target): Update.
9442 * linux-x86-64-low.c (the_low_target): Update.
9443
d61ddec4
UW
94442008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9445
9446 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9447 reg-s390.o and reg-s390x.o.
9448
9449 * linux-low.c (new_inferior): New global variable.
9450 (linux_create_inferior, linux_attach): Set it.
9451 (linux_wait_for_process): Call the_low_target.arch_setup after the
9452 target has stopped for the first time.
9453 (initialize_low): Do not call the_low_target.arch_setup.
9454
9455 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9456 (s390_set_pc): Likewise.
9457 (s390_arch_setup): New function.
9458 (the_low_target): Use s390_arch_setup as arch_setup routine.
9459
9460 * regcache.c (realloc_register_cache): New function.
9461 (set_register_cache): Call it for each existing regcache.
9462
d05b4ac3
UW
94632008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9464
9465 * server.h (init_registers): Remove prototype.
9466
9467 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9468 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9469 instead of init_registers ().
9470 * linux-arm-low.c (init_registers_arm): Add prototype.
9471 (init_registers_arm_with_iwmmxt): Likewise.
9472 (the_low_target): Add initializer for arch_setup field.
9473 * linux-cris-low.c (init_registers_cris): Add prototype.
9474 (the_low_target): Add initializer for arch_setup field.
9475 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9476 (the_low_target): Add initializer for arch_setup field.
9477 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9478 (the_low_target): Add initializer for arch_setup field.
9479 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9480 (the_low_target): Add initializer for arch_setup field.
9481 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9482 (the_low_target): Add initializer for arch_setup field.
9483 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9484 (the_low_target): Add initializer for arch_setup field.
9485 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9486 (init_registers_mips64_linux): Likewise.
9487 (the_low_target): Add initializer for arch_setup field.
9488 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9489 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9490 (the_low_target): Add initializer for arch_setup field.
9491 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9492 (init_registers_powerpc_64): Likewise.
9493 (the_low_target): Add initializer for arch_setup field.
9494 * linux-s390-low.c (init_registers_s390): Add prototype.
9495 (init_registers_s390x): Likewise.
9496 (the_low_target): Add initializer for arch_setup field.
9497 * linux-sh-low.c (init_registers_sh): Add prototype.
9498 (the_low_target): Add initializer for arch_setup field.
9499 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9500 (the_low_target): Add initializer for arch_setup field.
9501 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9502 (the_low_target): Add initializer for arch_setup field.
9503
9504 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9505 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9506 instead of init_registers ().
9507 * win32-arm-low.c (init_registers_arm): Add prototype.
9508 (the_low_target): Add initializer for arch_setup field.
9509 * win32-i386-low.c (init_registers_i386): Add prototype.
9510 (the_low_target): Add initializer for arch_setup field.
9511
9512 * spu-low.c (init_registers_spu): Add prototype.
9513 (initialize_low): Call initialie_registers_spu () instead of
9514 initialize_registers ().
9515
fd96d250
PA
95162008-02-19 Pedro Alves <pedro@codesourcery.com>
9517
9518 * server.c (handle_v_requests): When handling the vRun and vAttach
9519 packets, if already debugging a process, don't kill it. Return an
9520 error instead.
9521
d41b6bb4
DJ
95222008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9523
9524 * server.c (handle_query): Correct length check.
9525
5ac588cf
PA
95262008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9527
9528 * win32-low.c (do_initial_child_stuff): Add process handle
9529 parameter. Set current_process_handle and current_process_id from the
9530 parameters. Clear globals.
9531 (win32_create_inferior): Don't set current_process_handle and
9532 current_process_id here. Instead pass them on the call to
9533 do_initial_child_stuff.
9534 (win32_attach): Likewise.
9535 (win32_clear_inferiors): New.
9536 (win32_kill): Don't close the current process handle or the
9537 current thread handle here. Instead call win32_clear_inferiors.
9538 (win32_detach): Don't open a new handle to the process. Call
9539 win32_clear_inferiors.
9540 (win32_join): Don't rely on current_process_handle; open a new
9541 handle using the process id.
9542 (win32_wait): Call win32_clear_inferiors when the inferior process
9543 has exited.
9544
ecd7ecbc
DJ
95452008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9546
9547 * server.c (monitor_show_help): Add "exit".
9548
1525d545
MG
95492008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9550
ecd7ecbc 9551 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9552 (clean): Add reg-xtensa.c.
9553 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9554 * configure.srv (xtensa*-*-linux*) New target.
9555 * linux-xtensa-low.c: New.
9556 * xtensa-xtregs.c: New.
1525d545 9557
59a016f0
PA
95582008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9559
9560 * hostio.c: Don't include errno.h.
9561 (errno_to_fileio_errno): Move to hostio-errno.
9562 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9563 error number outputting to the target->hostio_last_error callback.
9564 (hostio_packet_error): Use FILEIO_EINVAL directly.
9565 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9566 calls to hostio_error.
9567 * hostio-errno.c: New.
9568 * server.h (hostio_last_error_from_errno): Declare.
9569 * target.h (target_ops): Add hostio_last_error member.
9570 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9571 as hostio_last_error handler.
889bf7c5 9572 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9573 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9574 (wince_hostio_last_error): New functions.
9575 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9576 as hostio_last_error handler.
9577 (win32_target_ops) [!_WIN32_WCE]: Register
9578 hostio_last_error_from_errno as hostio_last_error handler.
9579 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9580 (hostio-errno.o): New rule.
9581 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9582 * configure.srv (srv_hostio_err_objs): New variable. Default to
9583 hostio-errno.o.
9584 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9585 * configure: Regenerate.
9586
2d717e4f
DJ
95872008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9588
9589 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9590 (linux_kill, linux_detach): Clean up the process list.
9591 * remote-utils.c (remote_open): Improve port number parsing.
9592 (putpkt_binary, input_interrupt): Only send interrupts if the target
9593 is running.
9594 * server.c (extended_protocol): Make static.
9595 (attached): Define earlier.
9596 (exit_requested, response_needed, program_argv): New variables.
9597 (target_running): New.
9598 (start_inferior): Clear attached here.
9599 (attach_inferior): Set attached here.
9600 (require_running): Define.
9601 (handle_query): Use require_running and target_running. Implement
9602 "monitor exit".
9603 (handle_v_attach, handle_v_run): New.
9604 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9605 (gdbserver_usage): Update.
9606 (main): Redo argument parsing. Handle --debug and --multi. Handle
9607 --attach along with other options or after the port. Save
9608 program_argv. Support no initial program. Resynchronize
9609 communication with GDB after an error. Handle "monitor exit".
9610 Use require_running and target_running. Always allow the extended
9611 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9612 restart in extended mode.
9613 * README: Refer to the GDB manual. Update --attach usage.
9614
7407e2de
AS
96152007-12-20 Andreas Schwab <schwab@suse.de>
9616
9617 * linux-low.c (STACK_SIZE): Define.
9618 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9619 (linux_test_for_tracefork): Likewise.
9620
b65d95c5
DJ
96212007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9622
9623 * linux-low.c (linux_wait_for_event): Update messages. Do not
9624 reinsert auto-delete breakpoints.
9625 * mem-break.c (struct breakpoint): Change return type of handler to
9626 int.
9627 (set_breakpoint_at): Update handler type.
9628 (reinsert_breakpoint_handler): Return 1 instead of calling
9629 delete_breakpoint.
9630 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9631 setting a new one.
9632 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9633 * mem-break.h (set_breakpoint_at): Update handler type.
9634 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9635 * win32-low.c (auto_delete_breakpoint): New.
9636 (get_child_debug_event): Use it.
9637
4e799345
DJ
96382007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9639
9640 * configure.ac: Check for pread and pwrite.
9641 * hostio.c (handle_pread): Fall back to lseek and read.
9642 (handle_pwrite): Fall back to lseek and write.
9643 * config.in, configure: Regenerated.
9644
27524b67
DJ
96452007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9646
9647 * server.c (myresume): Add own_buf argument.
9648 (main): Update calls.
9649
a20d5e98
DJ
96502007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9651
9652 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9653 * remote-utils.c (remote_open): Do not call disable_async_io.
9654 (block_async_io): Delete.
9655 (unblock_async_io): Make static.
9656 (initialize_async_io): New.
9657 * server.c (handle_v_cont): Handle async I/O here.
9658 (myresume): Likewise. Move other common resume tasks here...
9659 (main): ... from here. Call initialize_async_io. Disable async
9660 I/O before the main loop.
9661 * server.h (initialize_async_io): Declare.
9662 (block_async_io, unblock_async_io): Delete prototypes.
9663 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9664
b79d787e
DJ
96652007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9666
9667 * remote-utils.c (readchar): Allow binary data in received messages.
9668
d97903b2
PA
96692007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9670
9671 * win32-low.c (attaching): New global.
9672 (win32_create_inferior): Clear the `attaching' global.
9673 (win32_attach): Set the `attaching' global.
9674 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9675 attaching. Only set a breakpoint at the entry point if not
9676 attaching.
9677
311de423
PA
96782007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9679
9680 * server.c (main): Don't report dll events on the initial
9681 connection on attaches.
9682
6c2d16d2
PA
96832007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9684
9685 * server.c (main): Relax numerical bases supported for the pid of
9686 the --attach command line argument.
9687
5ca906e6
PA
96882007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9689
9690 * win32-low.c (win32_attach): Call OpenProcess before
9691 DebugActiveProcess, not after. Add last error output to error
9692 call.
9693
9c6c8194
PA
96942007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9695
9696 * win32-low.c (win32_get_thread_context)
9697 (win32_set_thread_context): New functions.
9698 (thread_rec): Use win32_get_thread_context.
9699 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9700 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9701 field.
9702
4d5d1aaa
PA
97032007-12-03 Leo Zayas
9704 Pedro Alves <pedro_alves@portugalmail.pt>
9705
9706 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9707 global variables.
9708 (child_add_thread): Minor cleanup.
9709 (child_continue): Resume artificially suspended threads before
9710 calling ContinueDebugEvent.
9711 (suspend_one_thread): New.
9712 (fake_breakpoint_event): New.
9713 (get_child_debug_event): Change return type to int. Check here if
9714 gdb sent an interrupt request. If a soft interrupt was requested,
9715 fake a breakpoint event. Return 0 if there is no event to handle,
9716 and 1 otherwise.
9717 (win32_wait): Don't check here if gdb sent an interrupt request.
9718 Ensure there is a valid event to handle.
9719 (win32_request_interrupt): Add soft interruption method as last
9720 resort.
9721
c436e841
PA
97222007-12-03 Leo Zayas
9723 Pedro Alves <pedro_alves@portugalmail.pt>
9724
9725 * win32-low.h (win32_thread_info): Add descriptions to the
9726 structure members. Replace `suspend_count' counter by a
9727 `suspended' flag.
9728 * win32-low.c (thread_rec): Update condition of when to get the
9729 context from the inferior. Rely on ContextFlags being set if it
9730 has already been retrieved. Only suspend the inferior thread if
9731 we haven't already. Warn if that fails.
9732 (continue_one_thread): s/suspend_count/suspended/. Only call
9733 ResumeThread once. Warn if that fails.
9734
e7b5fa67
PA
97352007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9736
9737 * win32-low.c (win32_wait): Don't read from the inferior when it
9738 has already exited.
9739
a385171d
PA
97402007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9741
9742 * Makefile.in (win32_low_h): New variable.
9743 (win32-low.o): Add dependency on $(win32_low_h).
9744 (win32-arm-low.o, win32-i386-low.o): New rules.
9745
f80c84b3
DJ
97462007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9747
9748 * hostio.c: Correct copyright year.
9749
a6b151f1
DJ
97502007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9751
9752 * Makefile.in (OBS): Add hostio.o.
9753 (hostio.o): New rule.
9754 * server.h (handle_vFile): Declare.
9755 * hostio.c: New file.
9756 * server.c (handle_v_requests): Take packet_len and new_packet_len
9757 for binary packets. Call handle_vFile.
9758 (main): Update call to handle_v_requests.
9759
f9387fc3
DJ
97602007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9761
9762 * linux-low.c: Include <sched.h>.
9763
51c2684e
DJ
97642007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9765
9766 * linux-low.c (linux_tracefork_grandchild): New.
9767 (linux_tracefork_child): Use clone.
9768 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9769
75f83163
JB
97702007-10-31 Joel Brobecker <brobecker@adacore.com>
9771
9772 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9773
da5898ce
DJ
97742007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9775
9776 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9777
24a09b5f
DJ
97782007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9779
9780 * inferiors.c (change_inferior_id): Delete.
9781 (add_pid_to_list, pull_pid_from_list): New.
9782 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9783 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9784 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9785 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9786 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9787 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9788 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9789 (using_threads): Always set to 1.
9790 (handle_extended_wait): New.
9791 (add_process): Do not set TID.
9792 (linux_create_inferior): Set must_set_ptrace_flags.
9793 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9794 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9795 (linux_thread_alive): Rename TID argument to LWPID.
9796 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9797 (linux_wait_for_event): Do not use TID or check using_threads. Update
9798 call to dead_thread_notify. Call handle_extended_wait.
9799 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9800 (send_sigstop): Delete sigstop_sent.
9801 (wait_for_sigstop): Avoid TID.
9802 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9803 (linux_test_for_tracefork): New.
9804 (linux_lookup_signals): Use thread_db_active and
9805 linux_supports_tracefork_flag.
9806 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9807 * linux-low.h (get_process_thread): Avoid TID.
9808 (struct process_ifo): Move thread_known and tid to the end. Remove
9809 sigstop_sent.
9810 (linux_attach_lwp, thread_db_init): Update prototypes.
9811 * server.h (change_inferior_id): Delete prototype.
9812 (add_pid_to_list, pull_pid_from_list): New prototypes.
9813 * thread-db.c (thread_db_use_events): New.
9814 (find_first_thread): Rename to...
9815 (find_one_thread): ...this. Update callers and messages. Do not
9816 call fatal. Check thread_db_use_events. Do not call
9817 change_inferior_id or new_thread_notify.
9818 (maybe_attach_thread): Update. Do not call new_thread_notify.
9819 (thread_db_init): Set thread_db_use_events. Check use_events.
9820 * utils.c (fatal, warning): Correct message prefix.
9821
30ed0a8f
DJ
98222007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9823
9824 * Makefile.in (clean): Remove new files.
9825 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9826 (powerpc-64.o, powerpc-64.c): New rules.
9827 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9828 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9829 with SPE.
9830 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9831 SPE targets.
9832 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9833 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9834 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9835 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9836 (target_regsets): Add AltiVec and SPE register sets.
9837 * configure.ac: Check for AltiVec and SPE.
9838 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9839 (ppc_fill_vrregset, ppc_store_vrregset): New.
9840 (target_regsets): Add AltiVec register set.
9841 * configure: Regenerated.
9842
fd462a61
DJ
98432007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9844
9845 * linux-low.c (O_LARGEFILE): Define.
9846 (linux_read_memory): Use /proc/PID/mem.
9847 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9848 * configure, config.in: Regenerated.
9849
69f223ed
DJ
98502007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9851
9852 * linux-low.c (linux_wait_for_event): Do not pass signals while
9853 single-stepping.
9854
aec18585
PA
98552007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9856
9857 * win32-low.c (create_process): New.
9858 (win32_create_inferior): Use create_process instead of
9859 CreateProcess. If create_process failed retry appending an ".exe"
9860 suffix. Store the GetLastError result immediatelly after
9861 create_process calls and use it on the call to error.
9862
34d86ddd
PA
98632007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9864
9865 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9866
5a0e3bd0
JB
98672007-08-23 Joel Brobecker <brobecker@adacore.com>
9868
9869 * configure.ac: Switch license to GPLv3.
9870
f88c79e6
MS
98712007-08-01 Michael Snyder <msnyder@access-company.com>
9872
9873 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9874
6b3d9b83
PA
98752007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9876
9877 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9878 typedef.
9879 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9880 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9881 CloseToolhelp32Snapshot.
9882 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9883 CloseToolhelp32Snapshot.
9884
c588c53c
MS
98852007-07-27 Michael Snyder <michael.snyder@access-company.com>
9886
9887 * server.c (main): Check for inferior exit before main loop.
9888
aa0403d9
PA
98892007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9890
9891 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9892 instead of on tmp_desc.
9893
255e7678
DJ
98942007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9895 Daniel Jacobowitz <dan@codesourcery.com>
9896
9897 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9898 (add_thread): Minor cleanups.
9899 (clear_inferiors): Move lower in the file. Clear the DLL
9900 list.
9901 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9902 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9903 (xml_escape_text): New.
9904 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9905 for qSupported.
9906 (handle_v_cont): Report errors.
9907 (gdbserver_version): Update.
9908 (main): Correct size of own_buf. Do not report initial DLL events.
9909 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9910 (unloaded_dll, xml_escape_text): New.
9911 * win32-low.c (enum target_waitkind): Update comments.
9912 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9913 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9914 (win32_EnumProcessModules, win32_GetModuleInformation)
9915 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9916 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9917 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9918 (win32_Module32First, win32_Module32Next, load_toolhelp)
9919 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9920 (get_child_debug_event): Handle DLL events.
9921 (win32_wait): Likewise.
9922
0d37add9
DJ
99232007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9924
9925 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9926 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9927
45e2715e
PA
99282007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9929
9930 * win32-low.c (handle_output_debug_string): Ignore event if not
9931 waiting.
9932
c5674cf1
PA
99332007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9934
9935 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9936
2bbe3cc1
DJ
99372007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9938
9939 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9940
ae13219e
DJ
99412007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9942
9943 * inferiors.c (change_inferior_id): Add comment.
9944 * linux-low.c (check_removed_breakpoint): Add an early
9945 prototype. Improve debug output.
9946 (linux_attach): Doc update.
9947 (linux_detach_one_process, linux_detach): Clean up before releasing
9948 each process.
9949 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9950 * linux-low.h (struct process_info): Doc improvement.
9951 * mem-break.c (delete_all_breakpoints): New.
9952 * mem-break.h (delete_all_breakpoints): New prototype.
9953 * thread-db.c (find_first_thread): New.
9954 (thread_db_create_event): Call it instead of
9955 thread_db_find_new_threads. Clean up unused variables.
9956 (maybe_attach_thread): Remove first thread handling.
9957 (thread_db_find_new_threads): Use find_first_thread.
9958 (thread_db_get_tls_address): Likewise.
9959
4105de34
DJ
99602007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9961
9962 * thread-db.c (thread_db_find_new_threads): Add prototype.
9963 (thread_db_create_event): Check for the main thread before adding
9964 a new thread.
9965 (maybe_attach_thread): Only enable event reporting if TID == 0.
9966 (thread_db_get_tls_address): Check for new threads.
9967
2b876972
DJ
99682007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9969
9970 * linux-low.c (linux_create_inferior): Try execv before execvp.
9971 * spu-low.c (spu_create_inferior): Likewise.
9972
7a245884
DJ
99732007-06-13 Mike Frysinger <vapier@gentoo.org>
9974
9975 * linux-low.c (linux_create_inferior): Change execv to execvp.
9976 * spu-low.c (spu_create_inferior): Likewies.
9977
117ce543
DJ
99782007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9979
9980 * Makefile.in (clean): Clean new files instead of deleted ones.
9981 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9982 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9983 rules.
9984 * configure.srv: Specify XML files and new regformats for MIPS and
9985 MIPS64 GNU/Linux.
9986 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9987 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9988 an entry for the restart register.
9989 (mips_cannot_fetch_register, mips_cannot_store_register)
9990 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9991 register names to match the XML descriptions.
9992 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9993 restart register instead of $0.
9994
0e7f50da
UW
99952007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9996 Markus Deuling <deuling@de.ibm.com>
9997
9998 * remote-utils.c (decode_xfer_write): New function.
9999 * server.h (decode_xfer_write): Add prototype.
10000 * server.c (handle_query): Add PACKET_LEN argument. Support
10001 qXfer:spu:read and qXfer:spu:write packets.
10002 (main): Pass packet_len to handle_query.
10003 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10004 * target.h (target_ops): Add qxfer_spu.
10005
374c1d38
UW
100062007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10007
10008 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10009 accessing non-seekable spufs files.
10010
bb63802a
UW
100112007-05-16 Markus Deuling <deuling@de.ibm.com>
10012
889bf7c5 10013 * server.c (handle_query): Add reply for qC packet.
bb63802a 10014
7390519e
PA
100152007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10016 Leo Zayas <lerele@champenstudios@com>
10017
10018 * server.h (check_remote_input_interrupt_request): New function.
10019 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10020 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10021 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10022 (check_remote_input_interrupt_request): New function.
10023 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 10024 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
10025 winapi_GenerateConsoleCtrlEvent): New typedefs.
10026 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10027 to 250 ms.
10028 (win32_wait): Check for remote interrupt request
10029 with check_remote_input_interrupt_request.
10030 (win32_request_interrupt): New function.
10031 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10032
34b34921
PA
100332007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10034
10035 * win32-low.c (debug_registers_changed,
10036 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10037 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10038 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10039 (thread_rec): Get context using the low target.
10040 (child_add_thread): Call thread_added on the low target,
10041 which does the same thing.
10042 (regptr): Delete.
10043 (do_initial_child_stuff): Remove debug registers references.
10044 Set context using the low target. Resume threads after
10045 setting the contexts.
10046 (child_continue): Remove dead variable. Remove debug
10047 registers references.
10048 (child_fetch_inferior_registers): Go through the low target.
10049 (do_child_store_inferior_registers): Remove.
10050 (child_store_inferior_registers): Go through the low target.
10051 (win32_resume): Remove debug registers references.
10052 Set context using the low target.
10053 (handle_exception): Change return type to void. Don't record
10054 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10055 first chance exception.
889bf7c5 10056 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
10057 goto loop. Always return after waiting for debug event.
10058 (win32_wait): Convert to switch statement. Handle spurious
10059 events.
10060
10061 * win32-i386-low.c (debug_registers_changed,
10062 debug_registers_used): New.
10063 (initial_stuff): Rename to ...
10064 (i386_initial_stuff): ... this. Clear debug registers
10065 state variables.
10066 (store_debug_registers): Delete.
10067 (i386_get_thread_context): New.
10068 (load_debug_registers): Delete.
10069 (i386_set_thread_context): New.
10070 (i386_thread_added): New.
10071 (single_step): Rename to ...
10072 (i386_single_step): ... this.
10073 (do_fetch_inferior_registers): Rename to ...
10074 (i386_fetch_inferior_register): ... this.
10075 (i386_store_inferior_register): New.
10076 (the_low_target): Adapt to new interface.
10077
10078 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10079 (arm_get_thread_context): New.
10080 (arm_set_thread_context): New.
10081 (regptr): New.
10082 (do_fetch_inferior_registers): Rename to ...
10083 (arm_fetch_inferior_register): ... this.
10084 (arm_store_inferior_register): New.
10085 (arm_wince_breakpoint): Reimplement as unsigned long.
10086 (arm_wince_breakpoint_len): Define.
10087 (the_low_target): Adapt to new interface.
10088
10089 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10090 load_debug_registers. Add get_thread_context, set_thread_context,
10091 thread_added and store_inferior_register. Rename
10092 fetch_inferior_registers to fetch_inferior_register.
10093 (regptr): Remove declaration.
10094
dd6953e1
PA
100952007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10096
10097 * linux-low.c (linux_detach): Change return type to int. Return 0.
10098 * spu-low.c (spu_detach): Likewise.
10099
444d6139
PA
101002007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10101
10102 * target.h (target_ops): Change return type of detach to int.
10103 Add join.
10104 (join_inferior): New.
10105 * server.c (main): Don't skip detach support on mingw32.
10106 If the inferior doesn't support detaching return error.
10107 Call join_inferior instead of using waitpid.
10108 * linux-low.c (linux_join): New.
10109 (linux_target_op): Add linux_join.
10110 * spu-low.c (spu_join): New.
10111 (spu_target_ops): Add spu_join.
10112 * win32-low.c (win32_detach): Adapt to new interface.
10113 Reopen current_process_handle before detaching. Issue a child
10114 resume before detaching.
10115 (win32_join): New.
10116 (win32_target_op): Add win32_join.
10117
1d5315fe
PA
101182007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10119
10120 * win32-low.c (win32-attach): Fix return value.
10121 * target.h (target_ops): Describe ATTACH return values.
10122
bf914831
PA
101232007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10124
10125 * win32-low.c (GETPROCADDRESS): Define.
10126 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10127 (winapi_DebugSetProcessKillOnExit): Likewise.
10128 (win32_create_inferior): Force usage of ansi CreateProcessA.
10129 (win32_attach): Use GETPROCADDRESS.
10130 (win32_detach): Likewise.
10131
f72f3e60
PA
101322007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10133
10134 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10135
ed50f18f
PA
101362007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10137
10138 * win32-low.c: Commit leftover changes from 2007-03-29.
10139
0c2ead7e
DJ
101402007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10141
10142 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10143 fields short instead of int. Add explicit padding.
10144 (i387_cache_to_fsave): Remove unnecessary casts.
10145 (i387_fsave_to_cache): Doc fix.
10146 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10147
73725ff3
DJ
101482007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10149
10150 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10151 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10152
d99f33d8
PA
101532007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10154
10155 * configure.srv (arm*-*-mingw32ce*): Move near the other
10156 arm targets.
10157
68070c10
PA
101582007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10159
2482afc6 10160 * configure.ac: Add errno checking.
68070c10
PA
10161 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10162 sys/file.h and malloc.h.
10163 (AC_CHECK_DECLS): Add perror.
10164 (srv_mingwce): Handle.
2482afc6 10165 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
10166 win32-i386-low.o to srv_tgtobj.
10167 (i[34567]86-*-mingw*): Likewise.
10168 (arm*-*-mingw32ce*): Add case.
10169 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10170 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10171 [__MINGW32CE__] (strerror): New function.
10172 [__MINGW32CE__] (errno): Define to GetLastError.
10173 [__MINGW32CE__] (COUNTOF): New macro.
10174 (remote_open): Remove extra close call.
10175 * mem-break.c (delete_breakpoint_at): New function.
10176 * mem-break.h (delete_breakpoint_at): Declare.
10177 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10178 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10179 [USE_WIN32API] (read, write): Add char* casts.
10180 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10181 * server.h: Include wincecompat.h on Windows CE.
10182 [HAVE_ERRNO_H]: Check.
10183 (perror): Declare if not declared.
10184 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10185 (perror_with_name): Remove errno declaration.
10186 * wincecompat.h: New.
10187 * wincecompat.c: New.
10188 * win32-low.h: New.
10189 * win32-arm-low.c: New.
10190 * win32-i386-low.c: New.
10191 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10192 (OUTMSG2): Make it safe.
10193 (_T): New macro.
10194 (COUNTOF): New macro.
10195 (NUM_REGS): Get it from the low target.
10196 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10197 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10198 (thread_rec): Let low target handle debug registers.
10199 (child_add_thread): Likewise.
10200 (child_init_thread_list): Likewise.
10201 (continue_one_thread): Likewise.
10202 (regptr): New.
10203 (do_child_fetch_inferior_registers): Move to ...
10204 * win32-i386-low.c: ... here, and rename to ...
10205 (do_fetch_inferior_registers): ... this.
889bf7c5 10206 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
10207 Go through the low target.
10208 (do_child_store_inferior_registers): Use regptr.
10209 (strwinerror): New function.
10210 (win32_create_inferior): Handle Windows CE.
10211 Use strwinerror instead of strerror on Windows error
10212 codes. Add program to the error output.
10213 Don't close the main thread handle on Windows CE.
10214 (win32_attach): Use coredll.dll on Windows CE.
10215 (win32_kill): Close current process and current
10216 thread handles.
10217 (win32_detach): Use coredll.dll on Windows CE.
10218 (win32_resume): Let low target handle debug registers, and
10219 step request.
10220 (handle_exception): Add/Remove initial breakpoint. Avoid
10221 non-existant WSTOPSIG on Windows CE.
10222 (win32_read_inferior_memory): Cast to remove warning.
10223 (win32_arch_string): Go through the low target.
10224 (initialize_low): Call set_breakpoint_data with the low
10225 target's breakpoint.
10226 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10227 FOP_REGNUM, mappings): Move to ...
10228 * win32-i386-low.c: ... here.
10229 * win32-low.c (win32_thread_info): Move to ...
10230 * win32-low.h: ... here.
10231 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10232 win32-arm-low.c and wincecompat.c.
10233 (all:): Add $EXEEXT.
10234 (install-only:): Likewise.
10235 (gdbserver:): Likewise.
10236 (gdbreplay:): Likewise.
10237 * config.in: Regenerate.
10238 * configure: Regenerate.
10239
41093d81
PA
102402007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10241
10242 * win32-low.c: Rename typedef thread_info to
10243 win32_thread_info throughout.
10244
544afa54
PA
102452007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10246
10247 * win32-i386-low.c: Rename to ...
10248 * win32-low.c: ... this.
10249 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10250 * Makefile.in: Likewise.
10251
bce7165d
PA
102522007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10253
10254 * remote-utils.c (monitor_output): Constify msg parameter.
10255 * server.h (monitor_output): Likewise.
10256 * win32-i386-low.c (handle_output_debug_string): New.
10257 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10258 handle_output_debug_string.
10259 (get_child_debug_event): Likewise.
10260
506c7aa0
DJ
102612007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10262
10263 * server.c (main): Correct strtoul check.
10264
42c81e2a
DJ
102652007-03-27 Jon Ringle <jon@ringle.org>
10266
10267 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10268
9453113a
DJ
102692007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10270
10271 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10272
64a69107
DJ
102732007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10274
10275 * terminal.h: Check HAVE_SGTTY_H.
10276
102772007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
10278
10279 * remote-utils.c (remote_open): Print out the assigned port number.
10280
c74d0ad8
DJ
102812007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10282
10283 * remote-utils.c (monitor_output): New function.
10284 * server.c (debug_threads): Define here.
10285 (monitor_show_help): New function.
10286 (handle_query): Handle qRcmd.
10287 (main): Do not handle 'd' packet.
10288 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10289 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10290 of debug_threads.
10291
de7c3b4a
PA
102922007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10293
10294 * Makefile.in (EXEEXT): New.
10295 (clean): Use $(EXEEXT).
10296
ef57601b
PA
102972007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10298
10299 * target.h (target_ops): Rename send_signal to request_interrupt,
10300 and remove enum target_signal parameter.
10301 * linux-low.c (linux_request_interrupt): Rename from
10302 linux_send_signal, and always send SIGINT.
10303 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10304 and always send SIGINT.
10305 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10306 of send_signal.
10307 (input_interrupt): Likewise.
10308
820f2bda
PA
103092007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10310
10311 * server.c (get_features_xml): Check if target implemented
10312 arch_string.
10313 * win32-i386-low.c (win32_arch_string): New.
10314 (win32_target_ops): Add win32_arch_string as arch_string member.
10315
ab39bf24
UW
103162007-02-22 Markus Deuling <deuling@de.ibm.com>
10317
10318 * spu-low.c (spu_arch_string): New.
10319 (spu_target_ops): Add spu_arch_string.
10320
61ff6e04
DJ
103212007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10322
10323 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10324 * configure.ac: Do not check for terminal.h.
10325 * configure, config.in: Regenerated.
10326
fb1e4ffc
DJ
103272007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10328
10329 * Makefile.in (OBS): Add $(XML_BUILTIN).
10330 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10331 (clean): Update.
10332 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10333 (arm-with-iwmmxt.c): New.
10334 * config.in, configure: Regenerate.
10335 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10336 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10337 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10338 (arm*-*-linux*): Add iWMMXt and regset support.
10339 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10340 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10341 (arm_store_wmmxregset, target_regsets): New.
10342 * server.c (get_features_xml): Take annex argument. Check builtin
10343 XML documents.
10344 (handle_query): Handle multiple annexes.
10345
0f48aa01
DJ
103462007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10347
10348 * remote-utils.c [USE_WIN32API] (read, write): Define.
10349 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10350 write.
10351
23181151
DJ
103522007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10353
10354 * linux-i386-low.c (the_low_target): Set arch_string.
10355 * linux-x86-64-low.c (the_low_target): Likewise.
10356 * linux-low.c (linux_arch_string): New.
10357 (linux_target_ops): Add it.
10358 * linux-low.h (struct linux_target_ops): Add arch_string.
10359 * server.c (write_qxfer_response): Use const void * for DATA.
10360 (get_features_xml): New.
10361 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10362 * target.h (struct target_ops): Add arch_string method.
10363
9d606399
DJ
103642007-01-03 Denis Pilat <denis.pilat@st.com>
10365 Daniel Jacobowitz <dan@codesourcery.com>
10366
10367 * linux-low.c (linux_kill): Handle being called with no threads.
10368 * win32-i386-low.c (win32_kill): Likewise.
10369 (get_child_debug_event): Clear current_process_handle.
10370
103712006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10372 Daniel Jacobowitz <dan@codesourcery.com>
10373
10374 * remote-utils.c (remote_open): Check the type of specified
10375 serial port devices before opening them.
10376 * server.c (main): Kill the inferior if an error occurs during
10377 the first remote_open.
10378
a5e13d24
DJ
103792006-12-05 Markus Deuling <deuling@de.ibm.com>
10380
10381 * README: Update supported targets.
10382
186947f7
DJ
103832006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10384
10385 * Makefile.in (clean): Remove reg-mips64.c.
10386 (reg-mips64.c, reg-mips64.o): New rules.
10387 * configure.srv: Handle mips64. Include regset support for mips.
10388 * linux-mips-low.c (union mips_register): New.
10389 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10390 (mips_breakpoint, mips_breakpoint_at): Use int.
10391 (mips_collect_register, mips_supply_register)
10392 (mips_collect_register_32bit, mips_supply_register_32bit)
10393 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10394 (mips_store_fpregset, target_regsets): New.
10395 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10396
a13e2c95
UW
103972006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10398
10399 * configure.srv: Add target "spu*-*-*".
10400 * Makefile.in (clean): Remove reg-spu.c.
10401 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10402 * spu-low.c: New file.
10403
cb7283db
DJ
104042006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10405
10406 * configure.ac: Correct td_thr_tls_get_addr test.
10407 * configure: Regenerated.
10408
89be2091
DJ
104092006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10410
10411 * linux-low.c (linux_wait_for_event): Reformat. Use the
10412 pass_signals array.
10413 * remote-utils.c (decode_address_to_semicolon): New.
10414 * server.c (pass_signals, handle_general_set): New.
10415 (handle_query): Mention QPassSignals for qSupported.
10416 (main): Call handle_general_set.
10417 * server.h (pass_signals, decode_address_to_semicolon): New.
10418
000ef4f0
DJ
104192006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10420
10421 * server.c (handle_query): Correct error handling for read_auxv.
10422
b7149293
UW
104232005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10424
10425 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10426 and srv_linux_thread_db to yes.
10427 * linux-s390-low.c (s390_fill_gregset): New function.
10428 (target_regsets): Define data structure.
10429
dae5f5cf
DJ
104302006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10431
10432 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10433 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10434 * config.in, configure: Regenerated.
10435 * inferiors.c (gdb_id_to_thread): New function.
10436 (gdb_id_to_thread_id): Use it.
10437 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10438 * linux-low.h (struct process_info): Add th member.
10439 (thread_db_get_tls_address): New prototype.
10440 * remote-utils.c (decode_address): Make non-static.
10441 * server.c (handle_query): Handle qGetTLSAddr.
10442 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10443 * target.h (struct target_ops): Add get_tls_address.
10444 * thread-db.c (maybe_attach_thread): Save the thread handle.
10445 (thread_db_get_tls_address): New.
10446
32ca6d61
DJ
104472006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10448
10449 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10450 (linux_resume_one_process): Take a siginfo_t *. Update all
10451 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10452 (struct pending_signals): Add a siginfo_t.
10453 (linux_wait_for_process): Always set last_status.
10454 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10455 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10456 * linux-low.h (struct process_info): Add last_status.
10457
5ffff7c1
DJ
104582006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10459
10460 * remote-utils.c (try_rle): New function.
10461 (putpkt_binary): Use it.
10462
8695c747
DJ
104632006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10464
10465 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10466 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10467 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10468 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10469 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10470 point registers.
10471
290fadea
RS
104722006-08-08 Richard Sandiford <richard@codesourcery.com>
10473
10474 * server.c (terminal_fd): New variable.
10475 (old_foreground_pgrp): Likewise.
10476 (restore_old_foreground_pgrp): New function.
10477 (start_inferior): Record the terminal file descriptor in terminal_fd
10478 and its original foreground group in old_foreground_pgrp. Register
10479 restore_old_foreground_pgrp with atexit().
10480
9f2e1e63
DJ
104812006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10482
10483 * server.c (handle_query): Correct qPart to qXfer.
10484
b80864fb
DJ
104852006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10486
10487 * configure.ac: Check for more headers which are missing on
10488 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10489 * configure.srv: Add Cygwin and mingw32.
10490 * remote-utils.c: Don't include headers unconditionally which
10491 are missing on mingw32. Include <winsock.h> for mingw32.
10492 (remote_open): Adjust for mingw32 support. Flush
10493 standard error after writing to it.
10494 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10495 (unblock_async_io, enable_async_io, disable_async_io)
10496 (readchar, getpkt): Update for Winsock support.
10497 (prepare_resume_reply): Expect a protocol signal number.
10498 * server.c: Disable <sys/wait.h> on mingw32.
10499 (start_inferior): Adjust for mingw32 support. Flush
10500 standard error after writing to it.
10501 (attach_inferior): Likewise. Use protocol signal
10502 numbers.
10503 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10504 and names.
10505 * win32-i386-low.c: New file.
10506 * Makefile.in (XM_CLIBS): Set.
10507 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10508 (win32-i386-low.o): New dependency rule.
10509 * linux-low.c (linux_wait): Use target signal numbers.
10510 * target.h (struct target_ops): Doc fix.
10511 * server.h (target_signal_to_name): New prototype.
10512 * gdbreplay.c: Don't include headers unconditionally which
10513 are missing on mingw32. Include <winsock.h> for mingw32.
10514 (remote_close, remote_open): Adjust for Winsock support.
10515 * configure, config.in: Regenerated.
10516
0876f84a
DJ
105172006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10518
10519 * server.c (decode_xfer_read, write_qxfer_response): New.
10520 (handle_query): Take a packet length argument. Handle
10521 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10522 the qSupported response.
10523 (main): Update call to handle_query.
10524
01f9e8fa
DJ
105252006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10526
10527 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10528 (putpkt_binary): Renamed from putpkt and adjusted for binary
10529 data.
10530 (putpkt): New wrapper for putpkt_binary.
10531 (readchar): Don't mask off the high bit.
10532 (decode_X_packet): New function.
10533 * server.c (main): Call putpkt_binary if a handler sets the packet
10534 length. Save the length of the incoming packet. Handle 'X'.
10535 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10536
be2a5f71
DJ
105372006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10538
10539 * server.c (handle_query): Handle qSupported.
10540
ea025f5f
DJ
105412006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10542
10543 * remote-utils.c (all_symbols_looked_up): New variable.
10544 (look_up_one_symbol): Check it.
10545 * server.h (look_up_one_symbol): New declaration.
10546 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10547
9308fc88
DJ
105482006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10549
10550 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10551 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10552 (PTRACE_GET_THREAD_AREA): Define.
10553 (ps_get_thread_area): New function.
10554
52fb6437
NS
105552006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10556
10557 * configure.srv (m68k*-*-uclinux*): New target.
10558 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10559 (linux_resume_one_process): Remove extraneous cast.
10560 (linux_read_offsets): New.
10561 (linux_target_op): Add linux_read_offsets on mmuless systems.
10562 * server.c (handle_query): Add qOffsets logic.
10563 * target.h (struct target_ops): Add read_offsets.
10564
21b0f40c
DJ
105652006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10566
10567 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10568 (PTRACE_GET_THREAD_AREA): Define.
10569 (ps_get_thread_area): New function.
10570 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10571 (linux-x86-64-low.o): Update.
10572
0050a760
DJ
105732006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10574
10575 * configure.ac: Remove checks for prfpregset_t.
10576 * gdb_proc_service.h: New file.
10577 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10578 new "gdb_proc_service.h".
10579 * proc-service.c: Likewise.
10580 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10581 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10582 * Makefile.in (gdb_proc_service_h): Updated.
10583 * configure, config.in: Regenerated.
10584
b92a518e
DJ
105852006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10586
10587 * remote-utils.c (prepare_resume_reply): Move declaration
10588 of gdb_id_from_wait to the top of the block.
10589
545587ee
DJ
105902006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10591
10592 * linux-low.c (regsets_store_inferior_registers): Read the regset
10593 from the target before filling it.
10594
9db87ebd
DJ
105952006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10596
10597 * server.c (attach_inferior): Return SIGTRAP for a successful
10598 attach.
10599
dd24457d
DJ
106002006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10601
10602 * Makefile.in (OBS): Add version.o.
10603 (STAGESTUFF): Delete.
10604 (version.o): Add dependencies.
10605 (version.c): Replace rule.
10606 (clean): Remove version.c.
10607 * server.c (gdbserver_version): New.
10608 (gdbserver_usage): Use printf.
10609 (main): Handle --version and --help.
10610 * server.h (version, host_name): Add declarations.
10611
6f0f660e
EZ
106122005-12-23 Eli Zaretskii <eliz@gnu.org>
10613
889bf7c5
PA
10614 * linux-arm-low.c:
10615 * linux-arm-low.c:
10616 * inferiors.c:
10617 * i387-fp.h:
10618 * i387-fp.c:
10619 * gdbreplay.c:
10620 * regcache.c:
10621 * proc-service.c:
10622 * mem-break.h:
10623 * mem-break.c:
10624 * linux-x86-64-low.c:
10625 * linux-sh-low.c:
10626 * linux-s390-low.c:
10627 * linux-ppc64-low.c:
10628 * linux-ppc-low.c:
10629 * linux-mips-low.c:
10630 * linux-m68k-low.c:
10631 * linux-m32r-low.c:
10632 * linux-low.h:
10633 * linux-low.c:
10634 * linux-ia64-low.c:
10635 * linux-i386-low.c:
10636 * linux-crisv32-low.c:
10637 * thread-db.c:
10638 * terminal.h:
10639 * target.h:
10640 * target.c:
10641 * server.h:
10642 * server.c:
10643 * remote-utils.c:
10644 * regcache.h:
10645 * utils.c:
10646 * Makefile.in:
10647 * configure.ac:
6f0f660e
EZ
10648 * gdbserver.1: Add (C) after Copyright. Update the FSF
10649 address.
10650
9d1fb177
DJ
106512005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10652
10653 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10654 (arm_breakpoint_at): Recognize both breakpoints.
10655 (the_low_target): Use the correct breakpoint instruction.
10656
011a70c2
DJ
106572005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10658
10659 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10660 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10661 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10662 (the_low_target): Update.
10663
7fb85e41
AS
106642005-10-25 Andreas Schwab <schwab@suse.de>
10665
10666 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10667
10668 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10669 (ia64_num_regs): Reduce to 462.
10670
3db0444b
DJ
106712005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10672
10673 * acinclude.m4: Correct quoting.
10674 * aclocal.m4: Regenerated.
10675
10676 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10677 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10678 (thread_db_init): Call thread_db_err_str.
10679 * configure.ac: Check for TD_VERSION.
10680 * config.in, configure: Regenerated.
10681
bee0189a
DJ
106822005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10683
10684 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10685
e9d25b98
DJ
106862005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10687
10688 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10689 is not available. Define HAVE_PTRACE_GETREGS if it is.
10690 * config.in, configure: Regenerated.
10691 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10692 * linux-i386-low.c, linux-m68k-low.c: Update to use
10693 HAVE_PTRACE_GETREGS.
10694 * linux-low.c (regsets_fetch_inferior_registers)
10695 (regsets_store_inferior_registers): Only return 0 if we processed
10696 GENERAL_REGS.
10697 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10698 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10699
a06660f7
DJ
107002005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10701
10702 * inferiors.c (struct thread_info): Add gdb_id.
10703 (add_thread): Add gdb_id argument.
10704 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10705 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10706 calls to add_thread.
10707 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10708 * server.c (handle_query): Use thread_to_gdb_id.
10709 (handle_v_cont, main): Use gdb_id_to_thread_id.
10710 * server.h (add_thread): Update prototype.
10711 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10712 prototypes.
10713
5a1f5858
DJ
107142005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10715
10716 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10717 left-padded registers.
10718 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10719 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10720
e122f1f5
SE
107212005-07-01 Steve Ellcey <sje@cup.hp.com>
10722
10723 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10724 * configure: Regenerate.
10725 * config.in: Regenerate.
10726 * server.h (NEED_DECLARATION_STRERROR):
10727 Replace with !HAVE_DECL_STRERROR.
10728
d592fa2f
DJ
107292005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10730
10731 * linux-low.c (linux_wait, linux_send_signal): Don't test
10732 an unsigned long variable for > 0 if it could be MAX_ULONG.
10733 * server.c (myresume): Likewise.
10734 * target.c (set_desired_inferior): Likewise.
10735
ccbd4912
MK
107362005-06-13 Mark Kettenis <kettenis@gnu.org>
10737
10738 * configure.ac: Simplify and improve check for socklen_t.
10739 * configure, config.in: Regenerate.
10740
f450004a
DJ
107412005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10742
10743 * acconfig.h: Remove.
10744 * configure.ac: Add a test for socklen_t. Use three-argument
10745 AC_DEFINE throughout.
10746 * config.in: Regenerated using autoheader 2.59.
10747 * configure: Regenerated.
10748
10749 * gdbreplay.c (socklen_t): Provide a default.
10750 (remote_open): Use socklen_t.
10751 * remote-utils.c (socklen_t): Provide a default.
10752 (remote_open): Use socklen_t.
10753 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10754 unsigned char.
10755
10756 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10757 char for buffers.
10758 * linux-low.c (linux_read_memory, linux_write_memory)
10759 (linux_read_auxv): Likewise.
10760 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10761 (check_mem_write): Likewise.
10762 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10763 Likewise.
10764 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10765 (registers_from_string, register_data): Likewise.
10766 * server.c (handle_query, main): Likewise.
10767 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10768 (decode_M_packet): Likewise.
10769 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10770 * target.h (struct target_ops): Update read_memory, write_memory,
10771 and read_auxv.
10772 (read_inferior_memory, write_inferior_memory): Update.
10773 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10774 to unsigned char *.
10775 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10776 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10777 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10778 linux-s390-low.c, linux-sh-low.c: Update for changes in
10779 read_inferior_memory and the_low_target->breakpoint.
10780
eee84df1
DJ
107812005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10782
10783 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10784 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10785 * configure.srv: Add powerpc64-*-linux*.
10786 * linux-ppc64-low.c: New file.
10787
45b134e5
OF
107882005-05-23 Orjan Friberg <orjanf@axis.com>
10789
10790 * linux-cris-low.c: New file with support for CRIS.
10791 * linux-crisv32-low.c: Ditto for CRISv32.
10792 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10793 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10794 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10795 reg-crisv32.o, and reg-crisv32.c to make rules.
10796 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10797 recognized targets.
10798
48d93c75
UW
107992005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10800
10801 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10802 of sizeof (PTRACE_XFER_TYPE).
10803 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10804
e013ee27
OF
108052005-05-12 Orjan Friberg <orjanf@axis.com>
10806
889bf7c5 10807 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10808 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10809 pointers for hardware watchpoint support.
10810 * linux-low.h (struct linux_target_ops): Ditto.
10811 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10812 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10813 to linux_target_ops.
10814 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10815 reply packet.
10816 * server.c (main): Recognize 'Z' and 'z' packets.
10817
b0ded00b
UW
108182005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10819
10820 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10821 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10822 (the_low_target): Add new members.
10823
8643e2ad
DJ
108242005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10825
10826 * proc-service.c (ps_lgetregs): Search all_processes instead of
10827 all_threads.
10828
fc620387
DJ
108292005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10830
10831 * server.c (start_inferior): Change return type to int.
10832 (attach_inferior): Change sigptr to int *.
10833 (handle_v_cont, handle_v_requests): Change signal to int *.
10834 (main): Change signal to int.
10835
108362005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10837
10838 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10839 * configure.srv: Add m32r*-*-linux*.
10840 * linux-m32r-low.c: New file.
10841
e0e76420
DJ
108422005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10843
10844 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10845
a1928bad
DJ
108462005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10847
10848 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10849 Take unsigned long arguments for PIDs.
10850 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10851 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10852 (wait_for_sigstop, linux_resume_one_process)
10853 (regsets_fetch_inferior_registers, linux_send_signal)
10854 (linux_read_auxv): Likewise. Update the types of variables holding
10855 PIDs. Update format string specifiers.
10856 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10857 * remote-utils.c (prepare_resume_reply): Likewise.
10858 * server.c (cont_thread, general_thread, step_thread)
10859 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10860 unsigned long.
10861 (handle_query): Update format specifiers.
10862 (handle_v_cont, main): Use strtoul for thread IDs.
10863 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10864 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10865 (general_thread, step_thread, thread_from_wait)
10866 (old_thread_from_wait): Update.
10867 * target.h (struct thread_resume): Use unsigned long for THREAD.
10868 (struct target_ops): Use unsigned long for arguments to attach and
10869 thread_alive.
10870
dcdb98d2
DJ
108712005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10872
10873 * acinclude.m4: Include bfd/bfd.m4 directly.
10874 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10875 <agriffis@toolchain.org>.
10876 * aclocal.m4, configure: Regenerated.
10877
bec39cab
AC
108782005-01-07 Andrew Cagney <cagney@gnu.org>
10879
10880 * configure.ac: Rename configure.in, require autoconf 2.59.
10881 * configure: Re-generate.
10882
434c4c77
DJ
108832004-12-08 Daniel Jacobowitz <dan@debian.org>
10884
10885 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10886 LIBS when finished.
10887 * aclocal.m4: Regenerated.
10888 * configure: Regenerated.
10889
db1d3e1b
AS
108902004-11-21 Andreas Schwab <schwab@suse.de>
10891
10892 * linux-m68k-low.c (m68k_num_gregs): Define.
10893 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10894 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10895 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10896 (m68k_breakpoint_at): New. Add to the_low_target.
10897
10898 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10899 srv_linux_thread_db to yes.
10900
43360365
JB
109012004-10-20 Joel Brobecker <brobecker@gnat.com>
10902
10903 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10904 (ARCH_SET_FS): Likewise.
10905 (ARCH_GET_FS): Likewise.
10906 (ARCH_GET_GS): Likewise.
10907
fd500816
DJ
109082004-10-16 Daniel Jacobowitz <dan@debian.org>
10909
10910 * linux-i386-low.c (ps_get_thread_area): New.
10911 * linux-x86-64-low.c (ps_get_thread_area): New.
10912 * linux-low.c: Include <sys/syscall.h>.
10913 (linux_kill_one_process): Don't kill the first thread here.
10914 (linux_kill): Kill the first thread here.
10915 (kill_lwp): New function.
10916 (send_sigstop, linux_send_signal): Use it.
10917 * proc-service.c: Clean up #ifdefs.
10918 (fpregset_info): Delete.
10919 (ps_lgetregs): Update and enable implementation.
10920 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10921 implementations.
10922 * remote-utils.c (struct sym_cache, symbol_cache): New.
10923 (input_interrupt): Print a clearer message.
10924 (async_io_enabled): New variable.
10925 (enable_async_io, disable_async_io): Use it. Update comments.
10926 (look_up_one_symbol): Use the symbol cache.
10927 * thread-db.c (thread_db_look_up_symbols): New function.
10928 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10929
f6de3c42
DJ
109302004-10-16 Daniel Jacobowitz <dan@debian.org>
10931
10932 * configure.in: Test for -rdynamic.
10933 * configure: Regenerated.
10934 * Makefile (INTERNAL_LDFLAGS): New.
10935 (gdbserver, gdbreplay): Use it.
10936
2c0fc042
AC
109372004-09-02 Andrew Cagney <cagney@gnu.org>
10938
10939 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10940
075b3282
DJ
109412004-03-23 Daniel Jacobowitz <drow@mvista.com>
10942
10943 * linux-low.c (linux_wait): Clear all_processes list also.
10944
fa6a77dc
DJ
109452004-03-12 Daniel Jacobowitz <drow@mvista.com>
10946
10947 * linux-low.c: Include <errno.h>. Remove extern declaration of
10948 errno.
10949
6d782a97
DJ
109502004-03-12 Daniel Jacobowitz <drow@mvista.com>
10951
10952 * gdbreplay.c, server.h, utils.c: Update copyright years.
10953
3a7fb99b
DJ
109542004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10955
10956 * server.c (main): Print child status or termination signal from
10957 variable 'signal', not 'sig'.
10958
c3e735a6
DJ
109592004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10960
10961 * linux-low.c (linux_read_memory): Change return type to
10962 int. Check for and return error from ptrace().
10963 * target.c (read_inferior_memory): Change return type to int. Pass
10964 back return status from the_target->read_memory().
10965 * target.h (struct target_ops): Adapt *read_memory() prototype.
10966 Update comment.
10967 (read_inferior_memory): Adapt prototype.
10968 * server.c (main): Return an error packet if
10969 read_inferior_memory() returns an error.
10970
a59d1c82
DJ
109712004-03-04 Daniel Jacobowitz <drow@mvista.com>
10972
10973 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10974 Unify with other clean targets.
10975
dc3f8883
DJ
109762004-02-29 Daniel Jacobowitz <drow@mvista.com>
10977
10978 * server.c (handle_v_cont): Call set_desired_inferior.
10979
89a208da
DJ
109802004-02-29 Daniel Jacobowitz <drow@mvista.com>
10981
10982 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10983
62ea82f5
DJ
109842004-02-29 Daniel Jacobowitz <drow@mvista.com>
10985
10986 * linux-low.c (linux_wait): Unblock async I/O.
10987 (linux_resume): Block and enable async I/O.
10988 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10989 * server.h (block_async_io, unblock_async_io): Add prototypes.
10990
6910d122
DJ
109912004-02-29 Daniel Jacobowitz <drow@mvista.com>
10992
10993 * remote-utils.c (remote_open): Print a status notice after
10994 opening a TCP port.
10995 * server.c (attach_inferior): Print a status notice after
10996 attaching.
10997
109982004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10999
11000 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11001
c89dc5d4
DJ
110022004-02-26 Daniel Jacobowitz <drow@mvista.com>
11003
11004 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11005 error packet.
11006 * server.c, target.h: Update copyright years.
11007
4b8dad4a
RM
110082004-02-25 Roland McGrath <roland@redhat.com>
11009
11010 * target.h (struct target_ops): New member `read_auxv'.
11011 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11012 * linux-low.c (linux_read_auxv): New function.
11013 (linux_target_ops): Initialize `read_auxv' member to that.
11014
d7446758
JB
110152004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11016
11017 Committed by Jim Blandy <jimb@redhat.com>.
11018
11019 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 11020 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
11021 instead of GPR_SIZE to distiguish s390 and s390x targets.
11022
5544ad89
DJ
110232004-01-31 Daniel Jacobowitz <drow@mvista.com>
11024
11025 * linux-low.c: Update copyright year.
11026 (check_removed_breakpoint): Clear pending_is_breakpoint.
11027 (linux_set_resume_request, linux_queue_one_thread)
11028 (resume_status_pending_p): New functions.
11029 (linux_continue_one_thread): Use process->resume.
11030 (linux_resume): Only resume threads if there are no pending events.
11031 * linux-low.h (struct process_info): Add resume request
11032 pointer.
11033
2a68b70e
DJ
110342004-01-30 Daniel Jacobowitz <drow@mvista.com>
11035
11036 * regcache.c (new_register_cache): Clear the allocated register
11037 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11038
64386c31
DJ
110392003-10-13 Daniel Jacobowitz <drow@mvista.com>
11040
11041 * linux-low.c (linux_resume): Take a struct thread_resume *
11042 argument.
11043 (linux_wait): Update call.
11044 (resume_ptr): New static variable.
11045 (linux_continue_one_thread): Renamed from
11046 linux_continue_one_process. Use resume_ptr.
11047 (linux_resume): Use linux_continue_one_thread.
11048 * server.c (handle_v_cont, handle_v_requests): New functions.
11049 (myresume): New function.
11050 (main): Handle 'v' case.
11051 * target.h (struct thread_resume): New type.
11052 (struct target_ops): Change argument of "resume" to struct
11053 thread_resume *.
11054 (myresume): Delete macro.
11055
c938e9b0
L
110562003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11057
11058 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11059 (uninstall): Support DESTDIR.
11060
7f313d07
BC
11061Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11062
11063 * configure.srv: Add xscale*linux copy of arm*linux entry.
11064
3b2fc2ea
DJ
110652003-07-24 Daniel Jacobowitz <drow@mvista.com>
11066
11067 * linux-arm-low.c (arm_reinsert_addr): New function.
11068 (the_low_target): Add arm_reinsert_addr.
11069
1c0a559e
MK
110702003-07-08 Mark Kettenis <kettenis@gnu.org>
11071
11072 * mem-break.c: Remove whitespace at end of file.
11073
43d5792c
DJ
110742003-06-28 Daniel Jacobowitz <drow@mvista.com>
11075
11076 * configure.in: Check whether we need to prototype strerror.
11077 * server.h: Optionally prototype strerror.
11078 * gdbreplay.c (perror_with_name): Use strerror.
11079 * linux-low.c (linux_attach_lwp): Use strerror.
11080 * utils.c (perror_with_name): Use strerror.
11081 * config.in, configure: Regenerated.
11082
c8a86edf
DJ
110832003-06-28 Daniel Jacobowitz <drow@mvista.com>
11084
11085 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11086 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11087
73d37363
DJ
110882003-06-20 Daniel Jacobowitz <drow@mvista.com>
11089
11090 * Makefile.in (SFILES): Update.
11091 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11092 low-sun3.c: Remove files.
11093
6ad8ae5c
DJ
110942003-06-17 Daniel Jacobowitz <drow@mvista.com>
11095
11096 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11097 (linux_detach_one_process, linux_detach): New functions.
11098 (linux_target_ops): Add linux_detach.
11099 * server.c (main): Handle 'D' packet.
11100 * target.h (struct target_ops): Add "detach" member.
11101 (detach_inferior): Define.
11102
1581182a
MK
111032003-06-13 Mark Kettenis <kettenis@gnu.org>
11104
11105 From Kelley Cook <kelleycook@wideopenwest.com>:
11106 * configure.srv: Accept i[34567]86 variants.
11107
e5379b03
DJ
111082003-06-05 Daniel Jacobowitz <drow@mvista.com>
11109
11110 * linux-low.c (linux_wait_for_event): Correct comment typos.
11111 (linux_resume_one_process): Call check_removed_breakpoint.
11112 (linux_send_signal): New function.
11113 (linux_target_ops): Add linux_send_signal.
11114 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11115 of kill.
11116 * target.h (struct target_ops): Add send_signal.
11117
2ff29de4
JB
111182003-05-29 Jim Blandy <jimb@redhat.com>
11119
11120 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11121 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11122 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11123 away part of the register's value.
11124
254787d4
DJ
111252003-03-26 Daniel Jacobowitz <drow@mvista.com>
11126
11127 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11128 (linux_wait_for_event, linux_init_signals): Likewise.
11129
94e10508
DJ
111302003-03-17 Daniel Jacobowitz <drow@mvista.com>
11131
11132 * configure.in: Check for stdlib.h.
11133 * configure: Regenerated.
11134 * config.in: Regenerated.
11135
4c0711e0
DJ
111362003-01-04 Andreas Schwab <schwab@suse.de>
11137
11138 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11139
ef66e766
AC
111402003-01-02 Andrew Cagney <ac131313@redhat.com>
11141
11142 * Makefile.in: Remove obsolete code.
11143
a1358604
DJ
111442002-11-20 Daniel Jacobowitz <drow@mvista.com>
11145
11146 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11147 defined(PT_FPR0_HI).
11148
23ce3b1c
DJ
111492002-11-17 Stuart Hughes <seh@zee2.com>
11150
11151 * linux-arm-low.c (arm_num_regs): Increase.
11152 (arm_regmap): Include status register.
11153
111542002-11-17 Daniel Jacobowitz <drow@mvista.com>
11155
11156 * linux-low.c (register_addr): Remove incorrect -1 check.
11157
a9fa9f7d
DJ
111582002-08-29 Daniel Jacobowitz <drow@mvista.com>
11159
11160 * linux-low.c (linux_create_inferior): Call setpgid. Return
11161 the new PID.
11162 (unstopped_p, linux_signal_pid): Remove.
11163 (linux_target_ops): Remove linux_signal_pid.
11164 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11165 global instead of target method.
11166 * target.h (struct target_ops): Remove signal_pid. Update comment
11167 for create_inferior.
11168 * server.c (signal_pid): New variable.
11169 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 11170 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
11171 (attach_inferior): Set signal_pid.
11172
17574093
DJ
111732002-08-23 Daniel Jacobowitz <drow@mvista.com>
11174
11175 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11176
111772002-08-20 Jim Blandy <jimb@redhat.com>
11178
11179 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11180 default for this.
11181
111822002-08-01 Andrew Cagney <cagney@redhat.com>
11183
11184 * Makefile.in: Make chill references obsolete.
11185
111862002-07-24 Kevin Buettner <kevinb@redhat.com>
11187
11188 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11189 * configure: Regenerate.
11190 * config.in: Regenerate.
11191
111922002-07-09 David O'Brien <obrien@FreeBSD.org>
11193
11194 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11195 (perror_with_name, remote_close, remote_open, expect, play): Static.
11196
111972002-07-04 Michal Ludvig <mludvig@suse.cz>
11198
4b8dad4a 11199 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
11200 byte offsets instead of an array of indexes.
11201 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11202
112032002-06-13 Daniel Jacobowitz <drow@mvista.com>
11204
11205 * regcache.c: Add comment.
11206
112072002-06-11 Daniel Jacobowitz <drow@mvista.com>
11208
11209 * thread-db.c: New file.
11210 * proc-service.c: New file.
11211 * acinclude.m4: New file.
11212 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11213 proc-service.o, and thread-db.o.
11214 (linux-low.o): Add USE_THREAD_DB.
11215 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11216 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11217 * aclocal.m4: Regenerated.
11218 * config.in: Regenerated.
11219 * configure: Regenerated.
11220 * configure.in: Check for proc_service.h, sys/procfs.h,
11221 thread_db.h, and linux/elf.h headrs.
11222 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11223 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11224 Check for -lthread_db and thread support.
11225 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11226 PowerPC, and SuperH.
11227 * i387-fp.c: Constify arguments.
11228 * i387-fp.h: Likewise.
11229 * inferiors.c: (struct thread_info): Renamed from
11230 `struct inferior_info'. Remove PID member. Use generic inferior
11231 list header. All uses updated.
11232 (inferiors, signal_pid): Removed.
11233 (all_threads): New variable.
11234 (get_thread): Define.
11235 (add_inferior_to_list): New function.
11236 (for_each_inferior): New function.
11237 (change_inferior_id): New function.
11238 (add_inferior): Removed.
11239 (remove_inferior): New function.
11240 (add_thread): New function.
11241 (free_one_thread): New function.
11242 (remove_thread): New function.
11243 (clear_inferiors): Use for_each_inferior and free_one_thread.
11244 (find_inferior): New function.
11245 (find_inferior_id): New function.
11246 (inferior_target_data): Update argument type.
11247 (set_inferior_target_data): Likewise.
11248 (inferior_regcache_data): Likewise.
11249 (set_inferior_regcache_data): Likewise.
11250 * linux-low.c (linux_bp_reinsert): Remove.
11251 (all_processes, stopping_threads, using_thrads)
11252 (struct pending_signals, debug_threads, pid_of): New.
11253 (inferior_pid): Replace with macro.
11254 (struct inferior_linux_data): Remove.
11255 (get_stop_pc, add_process): New functions.
11256 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11257 Use add_process and add_thread.
11258 (linux_attach_lwp): New function, based on old linux_attach. Use
11259 add_process and add_thread. Set stop_expected for new threads.
11260 (linux_attach): New function.
11261 (linux_kill_one_process): New function.
11262 (linux_kill): Kill all LWPs.
11263 (linux_thread_alive): Use find_inferior_id.
11264 (check_removed_breakpoints, status_pending_p): New functions.
11265 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11266 Update. Use WNOHANG. Wait for cloned processes also. Update process
11267 struct for the found process.
11268 (linux_wait_for_event): New function.
11269 (linux_wait): Use it. Support LWPs.
11270 (send_sigstop, wait_for_sigstop, stop_all_processes)
11271 (linux_resume_one_process, linux_continue_one_process): New functions.
11272 (linux_resume): Support LWPs.
11273 (REGISTER_RAW_SIZE): Remove.
11274 (fetch_register): Use register_size instead. Call supply_register.
11275 (usr_store_inferior_registers): Likewise. Call collect_register.
11276 Fix recursive case.
11277 (regsets_fetch_inferior_registers): Improve error message.
11278 (regsets_store_inferior_registers): Add debugging.
11279 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11280 (unstopped_p, linux_signal_pid): New functions.
11281 (linux_target_ops): Add linux_signal_pid.
11282 (linux_init_signals): New function.
11283 (initialize_low): Call it. Initialize using_threads.
11284 * regcache.c (inferior_regcache_data): Add valid
11285 flag.
11286 (get_regcache): Fetch registers lazily. Add fetch argument
11287 and update all callers.
11288 (regcache_invalidate_one, regcache_invalidate): New
11289 functions.
11290 (new_register_cache): Renamed from create_register_cache.
11291 Return the new regcache.
11292 (free_register_cache): Change argument to a void *.
11293 (registers_to_string, registers_from_string): Call get_regcache
11294 with fetch flag set.
11295 (register_data): Make static. Pass fetch flag to get_regcache.
11296 (supply_register): Call get_regcache with fetch flag clear.
11297 (collect_register): Call get_regcache with fetch flag set.
11298 (collect_register_as_string): New function.
11299 * regcache.h: Update.
11300 * remote-utils.c (putpkt): Flush after debug output and use
11301 stderr.
11302 Handle input interrupts while waiting for an ACK.
11303 (input_interrupt): Use signal_pid method.
11304 (getpkt): Flush after debug output and use stderr.
11305 (outreg): Use collect_register_as_string.
11306 (new_thread_notify, dead_thread_notify): New functions.
11307 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11308 and general_thread.
11309 (look_up_one_symbol): Flush after debug output.
11310 * server.c (step_thread, server_waiting): New variables.
11311 (start_inferior): Don't use signal_pid. Update call to mywait.
11312 (attach_inferior): Update call to mywait.
11313 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11314 (main): Don't fetch/store registers explicitly. Use
11315 set_desired_inferior. Support proposed ``Hs'' packet. Update
11316 calls to mywait.
11317 * server.h: Update.
11318 (struct inferior_list, struct_inferior_list_entry): New.
11319 * target.c (set_desired_inferior): New.
11320 (write_inferior_memory): Constify.
11321 (mywait): New function.
11322 * target.h: Update.
11323 (struct target_ops): New signal_pid method.
11324 (mywait): Removed macro, added prototype.
11325
11326 * linux-low.h (regset_func): Removed.
11327 (regset_fill_func, regset_store_func): New.
11328 (enum regset_type): New.
11329 (struct regset_info): Add type field. Use new operation types.
11330 (struct linux_target_ops): stop_pc renamed to get_pc.
11331 Add decr_pc_after_break and breakpoint_at.
11332 (get_process, get_thread_proess, get_process_thread)
11333 (strut process_info, all_processes, linux_attach_lwp)
11334 (thread_db_init): New.
11335
11336 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11337 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11338 (the_low_target): Add new members.
11339 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11340 (i386_store_fpxregset): Constify.
11341 (target_regsets): Add new kind identifier.
11342 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11343 (i386_set_pc): Add debugging.
11344 (i386_breakpoint_at): New function.
11345 (the_low_target): Add new members.
11346 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11347 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11348 (mips_breakpoint_at): New.
11349 (the_low_target): Add new members.
11350 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11351 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11352 (the_low_target): Add new members.
11353 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11354 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11355 (the_low_target): Add new members.
11356 * linux-x86-64-low.c (target_regsets): Add new kind
11357 identifier.
11358
113592002-05-15 Daniel Jacobowitz <drow@mvista.com>
11360
11361 From Martin Pool <mbp@samba.org>:
11362 * server.c (gdbserver_usage): New function.
11363 (main): Call it.
11364
113652002-05-14 Daniel Jacobowitz <drow@mvista.com>
11366
11367 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11368 stop_at -> stop_pc.
11369
113702002-05-04 Andrew Cagney <ac131313@redhat.com>
11371
11372 * Makefile.in: Remove obsolete code.
11373
113742002-04-24 Michal Ludvig <mludvig@suse.cz>
11375
11376 * linux-low.c (regsets_fetch_inferior_registers),
11377 (regsets_store_inferior_registers): Removed cast to int from
11378 ptrace() calls.
11379 * regcache.h: Added declaration of struct inferior_info.
11380
113812002-04-20 Daniel Jacobowitz <drow@mvista.com>
11382
11383 * inferiors.c (struct inferior_info): Add regcache_data.
11384 (add_inferior): Call create_register_cache.
11385 (clear_inferiors): Call free_register_cache.
11386 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11387 * regcache.c (struct inferior_regcache_data): New.
11388 (registers): Remove.
11389 (get_regcache): New function.
11390 (create_register_cache, free_register_cache): New functions.
11391 (set_register_cache): Don't initialize the register cache here.
11392 (registers_to_string, registers_from_string, register_data): Call
11393 get_regcache.
11394 * regcache.h: Add prototypes.
11395 * server.h: Likewise.
11396
113972002-04-20 Daniel Jacobowitz <drow@mvista.com>
11398
11399 * mem-break.c: New file.
11400 * mem-break.h: New file.
11401 * Makefile.in: Add mem-break.o rule; update server.h
11402 dependencies.
11403 * inferiors.c (struct inferior_info): Add target_data
11404 member.
11405 (clear_inferiors): Free target_data member if set.
11406 (inferior_target_data, set_inferior_target_data): New functions.
11407 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11408 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11409 * linux-low.c (linux_bp_reinsert): New variable.
11410 (struct inferior_linux_data): New.
11411 (linux_create_inferior): Use set_inferior_target_data.
11412 (linux_attach): Likewise. Call add_inferior.
11413 (linux_wait_for_one_inferior): New function.
11414 (linux_wait): Call it.
11415 (linux_write_memory): Add const.
11416 (initialize_low): Call set_breakpoint_data.
11417 * linux-low.h (struct linux_target_ops): Add breakpoint
11418 handling members.
11419 * server.c (attach_inferior): Remove extra add_inferior
11420 call.
11421 * server.h: Include mem-break.h. Update inferior.c
11422 prototypes.
11423 * target.c (read_inferior_memory)
11424 (write_inferior_memory): New functions.
11425 * target.h (read_inferior_memory)
11426 (write_inferior_memory): Change macros to prototypes.
11427 (struct target_ops): Update comments. Add const to write_memory
11428 definition.
11429
114302002-04-11 Daniel Jacobowitz <drow@mvista.com>
11431
11432 * linux-low.c (usr_store_inferior_registers): Support
11433 registers which are allowed to fail to store.
11434 * linux-low.h (linux_target_ops): Likewise.
11435 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11436 (ppc_cannot_store_register): FPSCR may not be storable.
11437
114382002-04-09 Daniel Jacobowitz <drow@mvista.com>
11439
11440 * server.h: Include <string.h> if HAVE_STRING_H.
11441 * ChangeLog: Correct paths in last ChangeLog entry.
11442
114432002-04-09 Daniel Jacobowitz <drow@mvista.com>
11444
11445 * linux-low.h: Remove obsolete prototypes.
11446 (struct linux_target_ops): New.
11447 (extern the_low_target): New.
11448 * linux-low.c (num_regs, regmap): Remove declarations.
11449 (register_addr): Use the_low_target explicitly.
11450 (fetch_register): Likewise.
11451 (usr_fetch_inferior_registers): Likewise.
11452 (usr_store_inferior_registers): Likewise.
11453 * linux-arm-low.c (num_regs): Remove.
11454 (arm_num_regs): Define.
11455 (arm_regmap): Renamed from regmap, made static.
11456 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11457 made static.
11458 (arm_cannot_store_register): Renamed from cannot_store_register,
11459 made static.
11460 (the_low_target): New.
11461 * linux-i386-low.c (num_regs): Remove.
11462 (i386_num_regs): Define.
11463 (i386_regmap): Renamed from regmap, made static.
11464 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11465 made static.
11466 (i386_cannot_store_register): Renamed from cannot_store_register,
11467 made static.
11468 (the_low_target): New.
11469 * linux-ia64-low.c (num_regs): Remove.
11470 (ia64_num_regs): Define.
11471 (ia64_regmap): Renamed from regmap, made static.
11472 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11473 made static.
11474 (ia64_cannot_store_register): Renamed from cannot_store_register,
11475 made static.
11476 (the_low_target): New.
11477 * linux-m68k-low.c (num_regs): Remove.
11478 (m68k_num_regs): Define.
11479 (m68k_regmap): Renamed from regmap, made static.
11480 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11481 made static.
11482 (m68k_cannot_store_register): Renamed from cannot_store_register,
11483 made static.
11484 (the_low_target): New.
11485 * linux-mips-low.c (num_regs): Remove.
11486 (mips_num_regs): Define.
11487 (mips_regmap): Renamed from regmap, made static.
11488 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11489 made static.
11490 (mips_cannot_store_register): Renamed from cannot_store_register,
11491 made static.
11492 (the_low_target): New.
11493 * linux-ppc-low.c (num_regs): Remove.
11494 (ppc_num_regs): Define.
11495 (ppc_regmap): Renamed from regmap, made static.
11496 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11497 made static.
11498 (ppc_cannot_store_register): Renamed from cannot_store_register,
11499 made static.
11500 (the_low_target): New.
11501 * linux-s390-low.c (num_regs): Remove.
11502 (s390_num_regs): Define.
11503 (s390_regmap): Renamed from regmap, made static.
11504 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11505 made static.
11506 (s390_cannot_store_register): Renamed from cannot_store_register,
11507 made static.
11508 (the_low_target): New.
11509 * linux-sh-low.c (num_regs): Remove.
11510 (sh_num_regs): Define.
11511 (sh_regmap): Renamed from regmap, made static.
11512 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11513 made static.
11514 (sh_cannot_store_register): Renamed from cannot_store_register,
11515 made static.
11516 (the_low_target): New.
11517 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11518 (the_low_target): New.
11519
115202002-04-09 Daniel Jacobowitz <drow@mvista.com>
11521
11522 * Makefile.in: Add stamp-h target.
11523 * configure.in: Create stamp-h.
11524 * configure: Regenerated.
11525
115262002-04-09 Daniel Jacobowitz <drow@mvista.com>
11527
11528 * inferiors.c: New file.
11529 * target.c: New file.
11530 * target.h: New file.
11531 * Makefile.in: Add target.o and inferiors.o. Update
11532 dependencies.
11533 * linux-low.c (inferior_pid): New static variable,
11534 moved from server.c.
11535 (linux_create_inferior): Renamed from create_inferior.
11536 Call add_inferior. Return 0 on success instead of a PID.
11537 (linux_attach): Renamed from myattach.
11538 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11539 (linux_thread_alive): Renamed from mythread_alive.
11540 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11541 child dies.
11542 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11543 (regsets_store_inferior_registers): Correct error message.
11544 Add missing ``return 0''.
11545 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11546 (linux_store_registers): Renamed from store_inferior_registers.
11547 (linux_read_memory): Renamed from read_inferior_memory.
11548 (linux_write_memory): Renamed from write_inferior_memory.
11549 (linux_target_ops): New structure.
11550 (initialize_low): Call set_target_ops ().
11551 * remote-utils.c (unhexify): New function.
11552 (hexify): New function.
11553 (input_interrupt): Send signals to ``signal_pid''.
11554 * server.c (inferior_pid): Remove.
11555 (start_inferior): Update create_inferior call.
11556 (attach_inferior): Call add_inferior.
11557 (handle_query): New function.
11558 (main): Call handle_query for `q' packets.
11559 * server.h: Include "target.h". Remove obsolete prototypes.
11560 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11561
115622002-04-09 Daniel Jacobowitz <drow@mvista.com>
11563
11564 * Makefile.in: Add WARN_CFLAGS. Update configury
11565 dependencies.
11566 * configure.in: Check for <string.h>
11567 * configure: Regenerate.
11568 * config.in: Regenerate.
11569 * gdbreplay.c: Include needed system headers.
11570 (remote_open): Remove strchr prototype.
11571 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11572 * regcache.c (supply_register): Change buf argument to const void *.
11573 (supply_register_by_name): Likewise.
11574 (collect_register): Change buf argument to void *.
11575 (collect_register_by_name): Likewise.
11576 * regcache.h: Add missing prototypes.
11577 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11578 * server.c (handle_query): New function.
11579 (attached): New static variable, moved out of main.
11580 (main): Quiet longjmp clobber warnings.
11581 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11582 * utils.c (error): Remove NORETURN.
11583 (fatal): Likewise.
This page took 1.4844 seconds and 4 git commands to generate.