]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
batch-preserve-term-settings.exp: use send_quit_command some more
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
50904b25
YQ
12015-07-27 Yao Qi <yao.qi@linaro.org>
2
3 * configure.srv (case aarch64*-*-linux*): Don't set
4 srv_linux_usrregs.
5
5826e159
PA
62015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7
8 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
9 sys/ptrace.h.
10 * linux-arm-low.c: Likewise.
11 * linux-cris-low.c: Likewise.
12 * linux-crisv32-low.c: Likewise.
13 * linux-low.c: Likewise.
14 * linux-m68k-low.c: Likewise.
15 * linux-mips-low.c: Likewise.
16 * linux-nios2-low.c: Likewise.
17 * linux-s390-low.c: Likewise.
18 * linux-sparc-low.c: Likewise.
19 * linux-tic6x-low.c: Likewise.
20 * linux-tile-low.c: Likewise.
21 * linux-x86-low.c: Likewise.
22
54019719
PA
232015-07-24 Pedro Alves <palves@redhat.com>
24
25 * config.in: Regenerate.
26 * configure: Regenerate.
27
eb7aa561
PA
282015-07-24 Pedro Alves <palves@redhat.com>
29
30 * acinclude.m4: Include ../ptrace.m4.
31 * configure.ac: Call GDB_AC_PTRACE.
32 * config.in, configure: Regenerate.
33
55d7b841
YQ
342015-07-24 Yao Qi <yao.qi@linaro.org>
35
36 * linux-low.c (linux_create_inferior): Remove setting to
37 proc->priv->new_inferior.
38 (linux_attach): Likewise.
39 (linux_low_filter_event): Likewise.
40 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
41
c06cbd92
YQ
422015-07-24 Yao Qi <yao.qi@linaro.org>
43
44 * linux-low.c (linux_arch_setup): New function.
45 (linux_low_filter_event): If proc->tdesc is NULL and
46 proc->attached is true, call the_low_target.arch_setup.
47 Otherwise, keep status pending, and return.
48 (linux_resume_one_lwp_throw): Don't call get_pc if
49 thread->while_stepping isn't NULL. Don't call
50 get_thread_regcache if proc->tdesc is NULL.
51 (need_step_over_p): Return 0 if proc->tdesc is NULL.
52 (linux_target_ops): Install arch_setup.
53 * server.c (start_inferior): Call the_target->arch_setup.
54 * target.h (struct target_ops) <arch_setup>: New field.
55 (target_arch_setup): New marco.
56 * lynx-low.c (lynx_target_ops): Update.
57 * nto-low.c (nto_target_ops): Update.
58 * spu-low.c (spu_target_ops): Update.
59 * win32-low.c (win32_target_ops): Update.
60
5ae3ebba
YQ
612015-07-24 Yao Qi <yao.qi@linaro.org>
62
63 * linux-low.c (linux_add_process): Don't set
64 proc->priv->new_inferior.
65 (linux_create_inferior): Set proc->priv->new_inferior to 1.
66 (linux_attach): Likewise.
67
eb97750b
YQ
682015-07-24 Yao Qi <yao.qi@linaro.org>
69
70 * server.c (start_inferior): Code refactor.
71
51aee833
YQ
722015-07-24 Yao Qi <yao.qi@linaro.org>
73
74 * server.c (process_serial_event): Set general_thread.
75
af1b22f3
YQ
762015-07-21 Yao Qi <yao.qi@linaro.org>
77
78 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
79 aarch64_linux_get_debug_reg_capacity.
80
554717a3
YQ
812015-07-17 Yao Qi <yao.qi@linaro.org>
82
83 * Makefile.in (aarch64-linux-hw-point.o): New rule.
84 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
85 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
86 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
87 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
88 (AARCH64_HWP_ALIGNMENT): Likewise.
89 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
90 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
91 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
92 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
93 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
94 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
95 (struct aarch64_debug_reg_state): Likewise.
96 (struct arch_lwp_info): Likewise.
97 (aarch64_align_watchpoint): Likewise.
98 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
99 (aarch64_watchpoint_length): Likewise.
100 (aarch64_point_encode_ctrl_reg): Likewise
101 (aarch64_point_is_aligned): Likewise.
102 (aarch64_align_watchpoint): Likewise.
103 (aarch64_linux_set_debug_regs):
104 (aarch64_dr_state_insert_one_point): Likewise.
105 (aarch64_dr_state_remove_one_point): Likewise.
106 (aarch64_handle_breakpoint): Likewise.
107 (aarch64_handle_aligned_watchpoint): Likewise.
108 (aarch64_handle_unaligned_watchpoint): Likewise.
109 (aarch64_handle_watchpoint): Likewise.
110
c67ca4de
YQ
1112015-07-17 Yao Qi <yao.qi@linaro.org>
112
113 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
114 and don't aarch64_get_debug_reg_state. All callers update.
115 (aarch64_handle_aligned_watchpoint): Likewise.
116 (aarch64_handle_unaligned_watchpoint): Likewise.
117 (aarch64_handle_watchpoint): Likewise.
118 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
119 (aarch64_remove_point): Likewise.
120
25abf979
YQ
1212015-07-17 Yao Qi <yao.qi@linaro.org>
122
123 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
124 debug_printf.
125 (aarch64_handle_unaligned_watchpoint): Likewise.
126
db1ff28b
JK
1272015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
128
129 Revert the previous 3 commits:
130 Move gdb_regex* to common/
131 Move linux_find_memory_regions_full & co.
132 gdbserver build-id attribute generator
133
700ca40f
JK
1342015-07-15 Aleksandar Ristovski <aristovski@qnx.com
135 Jan Kratochvil <jan.kratochvil@redhat.com>
136
137 gdbserver build-id attribute generator.
138 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
139 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
140 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
141 (find_phdr): New.
142 (get_dynamic): Use find_pdhr to traverse program headers.
143 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
144 (compare_mapping_entry_range, struct find_memory_region_callback_data)
145 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
146 (get_hex_build_id): New.
147 (linux_qxfer_libraries_svr4): Add optional build-id attribute
148 to reply XML document.
149
9904185c
JK
1502015-07-15 Aleksandar Ristovski <aristovski@qnx.com
151 Jan Kratochvil <jan.kratochvil@redhat.com>
152
153 * target.c: Include target/target-utils.h and fcntl.h.
154 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
155 (target_fileio_read_stralloc): New functions.
156
6e5b4429
JK
1572015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
158
159 * Makefile.in (OBS): Add gdb_regex.o.
160 (gdb_regex.o): New.
161 * config.in: Rebuilt.
162 * configure: Rebuilt.
163
ddc98fbf
JK
1642015-07-15 Aleksandar Ristovski <aristovski@qnx.com
165 Jan Kratochvil <jan.kratochvil@redhat.com>
166
167 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
168 * Makefile.in (OBS): Add target-utils.o.
169 (linux-maps.o, target-utils.o): New.
170 * configure.srv (srv_linux_obj): Add linux-maps.o.
171
e57bb7a0
PL
1722015-07-15 Pierre Langlois <pierre.langlois@arm.com>
173
174 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
175 function, return 1.
176 (the_low_target): Install it.
177
586b02a9
PA
1782015-07-14 Pedro Alves <palves@redhat.com>
179
180 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
181 Instead, ignore ECHILD, and throw an error for other errnos.
182
58c1b36c
PA
1832015-07-10 Pedro Alves <palves@redhat.com>
184
185 * event-loop.c (struct callback_event) <data>: Change type to
186 gdb_client_data instance instead of gdb_client_data pointer.
187 (append_callback_event): Adjust.
188
421530db
PL
1892015-07-10 Pierre Langlois <pierre.langlois@arm.com>
190
191 * linux-aarch64-low.c: Add comments for each linux_target_ops
192 method. Remove comments already covered in target_ops and
193 linux_target_ops definitions.
194 (the_low_target): Add comments for each unimplemented method.
195
c2d65f38
YQ
1962015-07-09 Yao Qi <yao.qi@linaro.org>
197
198 * linux-aarch64-low.c (aarch64_regmap): Remove.
199 (aarch64_usrregs_info): Remove.
200 (regs_info): Set field usrregs to NULL.
201
b20a6524
MM
2022015-07-02 Markus Metzger <markus.t.metzger@intel.com>
203
204 * linux-low.c: Include "rsp-low.h"
205 (linux_low_encode_pt_config, linux_low_encode_raw): New.
206 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
207 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
208 (handle_btrace_enable_pt): New.
209 (handle_btrace_general_set): Support "pt".
210 (handle_btrace_conf_general_set): Support "pt:size".
211
96c97461
PL
2122015-06-29 Pierre Langlois <pierre.langlois@arm.com>
213
214 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
215 Z_PACKET_SW_BP.
216
37d66942
PL
2172015-06-29 Pierre Langlois <pierre.langlois@arm.com>
218
219 * linux-aarch64-low.c: Remove comment about endianness.
220 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
221 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
222 memcmp.
223
dc06243f
GB
2242015-06-24 Gary Benson <gbenson@redhat.com>
225
226 * linux-i386-ipa.c (stdint.h): Do not include.
227 * lynx-i386-low.c (stdint.h): Likewise.
228 * lynx-ppc-low.c (stdint.h): Likewise.
229 * mem-break.c (stdint.h): Likewise.
230 * thread-db.c (stdint.h): Likewise.
231 * tracepoint.c (stdint.h): Likewise.
232 * win32-low.c (stdint.h): Likewise.
233
124e13d9
SM
2342015-06-18 Simon Marchi <simon.marchi@ericsson.com>
235
236 * server.c (write_qxfer_response): Update call to
237 remote_escape_output.
238
909c2cda
JK
2392015-06-15 Aleksandar Ristovski <aristovski@qnx.com
240 Jan Kratochvil <jan.kratochvil@redhat.com>
241
242 Merge multiple hex conversions.
243 * gdbreplay.c (tohex): Rename to 'fromhex'.
244 (logchar): Use fromhex.
245
24c05f46
JK
2462015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
247
248 * server.c (handle_qxfer_libraries): Set `version' attribute for
249 <library-list>.
250
14d2069a
GB
2512015-06-10 Gary Benson <gbenson@redhat.com>
252
253 * target.h (struct target_ops) <multifs_open>: New field.
254 <multifs_unlink>: Likewise.
255 <multifs_readlink>: Likewise.
256 * linux-low.c (nat/linux-namespaces.h): New include.
257 (linux_target_ops): Initialize the_target->multifs_open,
258 the_target->multifs_unlink and the_target->multifs_readlink.
259 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
260 * hostio.c (hostio_fs_pid): New static variable.
261 (hostio_handle_new_gdb_connection): New function.
262 (handle_setfs): Likewise.
263 (handle_open): Use the_target->multifs_open as appropriate.
264 (handle_unlink): Use the_target->multifs_unlink as appropriate.
265 (handle_readlink): Use the_target->multifs_readlink as
266 appropriate.
267 (handle_vFile): Handle vFile:setfs packets.
268 * server.c (handle_query): Call hostio_handle_new_gdb_connection
269 after target_handle_new_gdb_connection.
270
4b8b5e72
GB
2712015-06-10 Gary Benson <gbenson@redhat.com>
272
273 * configure.ac (AC_CHECK_FUNCS): Add setns.
274 * config.in: Regenerate.
275 * configure: Likewise.
276 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
277 (linux-namespaces.o): New rule.
278 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
279
3ac2e371
GB
2802015-06-09 Gary Benson <gbenson@redhat.com>
281
282 * hostio.c (handle_open): Process mode argument with
283 fileio_to_host_mode.
284
ca9b78ce
YQ
2852015-06-01 Yao Qi <yao.qi@linaro.org>
286
287 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
288 * linux-x86-low.c: Likewise.
289
bfacd19d
DB
2902015-05-28 Don Breazeal <donb@codesourcery.com>
291
292 * linux-low.c (handle_extended_wait): Initialize
293 thread_info.last_resume_kind for new fork children.
294
452003ef
PA
2952015-05-15 Pedro Alves <palves@redhat.com>
296
297 * target.h (target_handle_new_gdb_connection): Rewrite using if
298 wrapped in do/while.
299
1041a03c
JB
3002015-05-14 Joel Brobecker <brobecker@adacore.com>
301
302 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
303 * configure, config.in: Regenerate.
304 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
305 Declare typedef.
306
c269dbdb
DB
3072015-05-12 Don Breazeal <donb@codesourcery.com>
308
309 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
310 PTRACE_EVENT_VFORK_DONE.
311 (linux_low_ptrace_options, extended_event_reported): Add vfork
312 events.
313 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
314 and "vforkdone" for RSP 'T' Stop Reply Packet.
315 * server.h (report_vfork_events): Declare
316 global variable.
317
3a8a0396
DB
3182015-05-12 Don Breazeal <donb@codesourcery.com>
319
320 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
321 (the_low_target) <new_fork>: Initialize new member.
322 * linux-arm-low.c (arm_new_fork): New function.
323 (the_low_target) <new_fork>: Initialize new member.
324 * linux-low.c (handle_extended_wait): Call new target function
325 new_fork.
326 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
327 * linux-mips-low.c (mips_add_watchpoint): New function
328 extracted from mips_insert_point.
329 (the_low_target) <new_fork>: Initialize new member.
330 (mips_linux_new_fork): New function.
331 (mips_insert_point): Call mips_add_watchpoint.
332 * linux-x86-low.c (x86_linux_new_fork): New function.
333 (the_low_target) <new_fork>: Initialize new member.
334
de0d863e
DB
3352015-05-12 Don Breazeal <donb@codesourcery.com>
336
337 * linux-low.c (handle_extended_wait): Implement return value,
338 rename argument 'event_child' to 'event_lwp', handle
339 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
340 (linux_low_ptrace_options): New function.
341 (linux_low_filter_event): Call linux_low_ptrace_options,
342 use different argument fo linux_enable_event_reporting,
343 use return value from handle_extended_wait.
344 (extended_event_reported): New function.
345 (linux_wait_1): Call extended_event_reported and set
346 status to report fork events.
347 (linux_write_memory): Add pid to debug message.
348 (reset_lwp_ptrace_options_callback): New function.
349 (linux_handle_new_gdb_connection): New function.
350 (linux_target_ops): Initialize new structure member.
351 * linux-low.h (struct lwp_info) <waitstatus>: New member.
352 * lynx-low.c: Initialize new structure member.
353 * remote-utils.c (prepare_resume_reply): Implement stop reason
354 "fork" for "T" stop message.
355 * server.c (handle_query): Call handle_new_gdb_connection.
356 * server.h (report_fork_events): Declare global flag.
357 * target.h (struct target_ops) <handle_new_gdb_connection>:
358 New member.
359 (target_handle_new_gdb_connection): New macro.
360 * win32-low.c: Initialize new structure member.
361
ddcbc397
DB
3622015-05-12 Don Breazeal <donb@codesourcery.com>
363
364 * mem-break.c (APPEND_TO_LIST): Define macro.
365 (clone_agent_expr): New function.
366 (clone_one_breakpoint): New function.
367 (clone_all_breakpoints): New function.
368 * mem-break.h: Declare new functions.
369
89245bc0
DB
3702015-05-12 Don Breazeal <donb@codesourcery.com>
371
372 * linux-low.c (linux_supports_fork_events): New function.
373 (linux_supports_vfork_events): New function.
374 (linux_target_ops): Initialize new structure members.
375 (initialize_low): Call linux_check_ptrace_features.
376 * lynx-low.c (lynx_target_ops): Initialize new structure
377 members.
378 * server.c (report_fork_events, report_vfork_events):
379 New global flags.
380 (handle_query): Add new features to qSupported packet and
381 response.
382 (captured_main): Initialize new global variables.
383 * target.h (struct target_ops) <supports_fork_events>:
384 New member.
385 <supports_vfork_events>: New member.
386 (target_supports_fork_events): New macro.
387 (target_supports_vfork_events): New macro.
388 * win32-low.c (win32_target_ops): Initialize new structure
389 members.
390
835205d0
GB
3912015-05-12 Gary Benson <gbenson@redhat.com>
392
393 * server.c (handle_qxfer_exec_file): Use current process
394 if annex is empty.
395
21e94bd9
SL
3962015-05-08 Sandra Loosemore <sandra@codesourcery.com>
397
398 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
399 Remove HAVE_PTRACE_GETREGS conditionals.
400 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
401 instead of PTRACE_GETREGS and PTRACE_SETREGS.
402
45614f15
YQ
4032015-05-08 Yao Qi <yao.qi@linaro.org>
404
405 * linux-low.c (linux_supports_conditional_breakpoints): New
406 function.
407 (linux_target_ops): Install new target method.
408 * lynx-low.c (lynx_target_ops): Install NULL hook for
409 supports_conditional_breakpoints.
410 * nto-low.c (nto_target_ops): Likewise.
411 * spu-low.c (spu_target_ops): Likewise.
412 * win32-low.c (win32_target_ops): Likewise.
413 * server.c (handle_query): Check
414 target_supports_conditional_breakpoints.
415 * target.h (struct target_ops) <supports_conditional_breakpoints>:
416 New field.
417 (target_supports_conditional_breakpoints): New macro.
418
80ad801e
PA
4192015-05-06 Pedro Alves <palves@redhat.com>
420
421 PR server/18081
422 * server.c (start_inferior): If the process exits, mourn it.
423
819843c7
GB
4242015-04-21 Gary Benson <gbenson@redhat.com>
425
426 * hostio.c (fileio_open_flags_to_host): Factored out to
427 fileio_to_host_openflags in common/fileio.c. Single use
428 updated.
429
a2d5a9d7
MF
4302015-04-17 Max Filippov <jcmvbkbc@gmail.com>
431
432 * linux-xtensa-low.c (xtensa_fill_gregset)
433 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
434 XCHAL_HAVE_LOOP.
435
deb44829
MF
4362015-04-17 Max Filippov <jcmvbkbc@gmail.com>
437
438 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
439 (regs_info): Replace usrregs pointer with NULL.
440
e57f1de3
GB
4412015-04-17 Gary Benson <gbenson@redhat.com>
442
443 * target.h (struct target_ops) <pid_to_exec_file>: New field.
444 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
445 * server.c (handle_qxfer_exec_file): New function.
446 (qxfer_packets): Add exec-file entry.
447 (handle_query): Report qXfer:exec-file:read as supported packet.
448
62828379
RN
4492015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
450
451 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
452
b88bb450
GB
4532015-04-09 Gary Benson <gbenson@redhat.com>
454
455 * hostio-errno.c (errno_to_fileio_error): Remove function.
456 Update caller to use remote_fileio_to_fio_error.
457
c8f4bfdd
YQ
4582015-04-09 Yao Qi <yao.qi@linaro.org>
459
460 * linux-low.c (linux_insert_point): Call
461 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
462 (linux_remove_point): Call remove_memory_breakpoint if type is
463 raw_bkpt_type_sw.
464 * linux-x86-low.c (x86_insert_point): Don't call
465 insert_memory_breakpoint.
466 (x86_remove_point): Don't call remove_memory_breakpoint.
467
41f98f02
PA
4682015-04-01 Pedro Alves <palves@redhat.com>
469 Cleber Rosa <crosa@redhat.com>
470
471 * server.c (gdbserver_usage): Reorganize and extend the usage
472 message.
473
2bf6fb9d
PA
4742015-03-24 Pedro Alves <palves@redhat.com>
475
476 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
477 output. Also dump TRAP_TRACE.
478 (linux_low_filter_event): In debug output, distinguish a
479 resume_stop SIGSTOP from a delayed SIGSTOP.
480
369f6daa
GB
4812015-03-24 Gary Benson <gbenson@redhat.com>
482
483 * linux-x86-low.c (x86_linux_new_thread): Moved to
484 nat/x86-linux.c.
485 (x86_linux_prepare_to_resume): Likewise.
486
8e5d4070
GB
4872015-03-24 Gary Benson <gbenson@redhat.com>
488
489 * Makefile.in (x86-linux-dregs.o): New rule.
490 * configure.srv: Add x86-linux-dregs.o to relevant targets.
491 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
492 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
493 (x86_linux_dr_get): Likewise.
494 (x86_linux_dr_set): Likewise.
495 (update_debug_registers_callback): Likewise.
496 (x86_linux_dr_set_addr): Likewise.
497 (x86_linux_dr_get_addr): Likewise.
498 (x86_linux_dr_set_control): Likewise.
499 (x86_linux_dr_get_control): Likewise.
500 (x86_linux_dr_get_status): Likewise.
501 (x86_linux_update_debug_registers): Likewise.
502
2b95d440
GB
5032015-03-24 Gary Benson <gbenson@redhat.com>
504
505 * linux-x86-low.c (x86_linux_update_debug_registers):
506 New function, factored out from...
507 (x86_linux_prepare_to_resume): ...this.
508
14b0bc68
GB
5092015-03-24 Gary Benson <gbenson@redhat.com>
510
511 * linux-x86-low.c (x86_linux_dr_get): Update comments.
512 (x86_linux_dr_set): Likewise.
513 (update_debug_registers_callback): Likewise.
514 (x86_linux_dr_set_addr): Likewise.
515 (x86_linux_dr_get_addr): Likewise.
516 (x86_linux_dr_set_control): Likewise.
517 (x86_linux_dr_get_control): Likewise.
518 (x86_linux_dr_get_status): Likewise.
519 (x86_linux_prepare_to_resume): Likewise.
520
5dfe6ca8
GB
5212015-03-24 Gary Benson <gbenson@redhat.com>
522
523 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
524 Use perror_with_name. Pass string through gettext.
525 (x86_linux_dr_set): Likewise.
526
d33472ad
GB
5272015-03-24 Gary Benson <gbenson@redhat.com>
528
529 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
530 (x86_linux_dr_set_addr): ...this.
531 (x86_dr_low_get_addr): Rename to...
532 (x86_linux_dr_get_addr): ...this.
533 (x86_dr_low_set_control): Rename to...
534 (x86_linux_dr_set_control): ...this.
535 (x86_dr_low_get_control): Rename to...
536 (x86_linux_dr_get_control): ...this.
537 (x86_dr_low_get_status): Rename to...
538 (x86_linux_dr_get_status): ...this.
539 (x86_dr_low): Update with new function names.
540
4b134ca1
GB
5412015-03-24 Gary Benson <gbenson@redhat.com>
542
543 * Makefile.in (x86-linux.o): New rule.
544 * configure.srv: Add x86-linux.o to relevant targets.
545 * linux-low.c (lwp_set_arch_private_info): New function.
546 (lwp_arch_private_info): Likewise.
547 * linux-x86-low.c: Include nat/x86-linux.h.
548 (arch_lwp_info): Removed structure.
549 (update_debug_registers_callback):
550 Use lwp_set_debug_registers_changed.
551 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
552 and lwp_set_debug_registers_changed.
553 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
554
34c703da
GB
5552015-03-24 Gary Benson <gbenson@redhat.com>
556
557 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
558 * linux-arm-low.c (arm_new_thread): Likewise.
559 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
560 * linux-mips-low.c (mips_linux_new_thread): Likewise.
561 * linux-x86-low.c (x86_linux_new_thread): Likewise.
562 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
563
cff068da
GB
5642015-03-24 Gary Benson <gbenson@redhat.com>
565
566 * linux-low.c (ptid_of_lwp): New function.
567 (lwp_is_stopped): Likewise.
568 (lwp_stop_reason): Likewise.
569 * linux-x86-low.c (update_debug_registers_callback):
570 Use lwp_is_stopped.
571 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
572 lwp_stop_reason.
573
b2f7c7e8
GB
5742015-03-24 Gary Benson <gbenson@redhat.com>
575
576 * linux-low.h (linux_stop_lwp): Remove declaration.
577
6d4ee8c6
GB
5782015-03-24 Gary Benson <gbenson@redhat.com>
579
580 * linux-low.h: Include nat/linux-nat.h.
581 * linux-low.c (iterate_over_lwps_args): New structure.
582 (iterate_over_lwps_filter): New function.
583 (iterate_over_lwps): Likewise.
584 * linux-x86-low.c (update_debug_registers_callback):
585 Update signature to what iterate_over_lwps expects.
586 Remove PID check that iterate_over_lwps now performs.
587 (x86_dr_low_set_addr): Use iterate_over_lwps.
588 (x86_dr_low_set_control): Likewise.
589
70a0bb6b
GB
5902015-03-24 Gary Benson <gbenson@redhat.com>
591
592 * linux-x86-low.c (x86_debug_reg_state): New function.
593 (x86_linux_prepare_to_resume): Use the above.
594
7b669087
GB
5952015-03-24 Gary Benson <gbenson@redhat.com>
596
597 * linux-low.c (current_lwp_ptid): New function.
598 * linux-x86-low.c: Include nat/linux-nat.h.
599 (x86_dr_low_get_addr): Use current_lwp_ptid.
600 (x86_dr_low_get_control): Likewise.
601 (x86_dr_low_get_status): Likewise.
602
eef49a3d
PA
6032015-03-20 Pedro Alves <palves@redhat.com>
604
605 * tracepoint.c (cmd_qtstatus): Make "str" const.
606
b2333d22
PA
6072015-03-20 Pedro Alves <palves@redhat.com>
608
609 * server.c (handle_general_set): Make "req_str" const.
610
23f238d3
PA
6112015-03-19 Pedro Alves <palves@redhat.com>
612
613 * linux-low.c (linux_resume_one_lwp): Rename to ...
614 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
615 instead call perror_with_name.
616 (check_ptrace_stopped_lwp_gone): New function.
617 (linux_resume_one_lwp): Reimplement as wrapper around
618 linux_resume_one_lwp_throw that swallows errors if the LWP is
619 gone.
620
91baf43f
PA
6212015-03-19 Pedro Alves <palves@redhat.com>
622
623 * linux-low.c (count_events_callback, select_event_lwp_callback):
624 No longer check whether the thread has resume_stop as last resume
625 kind.
626
8bf3b159
PA
6272015-03-19 Pedro Alves <palves@redhat.com>
628
629 * linux-low.c (count_events_callback, select_event_lwp_callback):
630 Use the lwp's status_pending_p field, not the thread's.
631
b90fc188
PA
6322015-03-19 Pedro Alves <palves@redhat.com>
633
634 * linux-low.c (select_event_lwp_callback): Update comments to
635 no longer mention SIGTRAP.
636
464b0089
GB
6372015-03-18 Gary Benson <gbenson@redhat.com>
638
639 * server.c (handle_query): Do not report vFile:fstat as supported.
640
aa9e327f
GB
6412015-03-11 Gary Benson <gbenson@redhat.com>
642
643 * hostio.c (sys/types.h): New include.
644 (sys/stat.h): Likewise.
645 (common-remote-fileio.h): Likewise.
646 (handle_fstat): New function.
647 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 648
791c0056
GB
6492015-03-11 Gary Benson <gbenson@redhat.com>
650
651 * configure.ac (AC_CHECK_MEMBERS): Add checks for
652 struct stat.st_blocks and struct stat.st_blksize.
653 * configure: Regenerate.
654 * config.in: Likewise.
655 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
656 (OBS): Add common-remote-fileio.o.
657 (common-remote-fileio.o): New rule.
658
9a9df970
PA
6592015-03-09 Pedro Alves <palves@redhat.com>
660
661 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
662 'struct sockaddr' pointer in 'accept' call.
663
9eb1356e
PA
6642015-03-09 Pedro Alves <palves@redhat.com>
665
666 Revert:
667 2015-03-07 Pedro Alves <palves@redhat.com>
668 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
669 or <winsock2.h> here. Instead include "gdb_socket.h".
670 (remote_open): Use union gdb_sockaddr_u.
671 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
672 or <winsock2.h> here. Instead include "gdb_socket.h".
673 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
674 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
675 or <sys/un.h>.
676 (init_named_socket, gdb_agent_helper_thread): Use union
677 gdb_sockaddr_u.
678
aac331e4
PA
6792015-03-07 Pedro Alves <palves@redhat.com>
680
681 * configure.ac (build_warnings): Move
682 -Wdeclaration-after-statement to the C-specific set.
683 * configure: Regenerate.
684
366c75fc
PA
6852015-03-07 Pedro Alves <palves@redhat.com>
686
687 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
688 or <winsock2.h> here. Instead include "gdb_socket.h".
689 (remote_open): Use union gdb_sockaddr_u.
690 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
691 or <winsock2.h> here. Instead include "gdb_socket.h".
692 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
693 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
694 or <sys/un.h>.
695 (init_named_socket, gdb_agent_helper_thread): Use union
696 gdb_sockaddr_u.
697
492d29ea
PA
6982015-03-07 Pedro Alves <palves@redhat.com>
699
700 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
701 instead.
702
60a191ed
YQ
7032015-03-06 Yao Qi <yao.qi@linaro.org>
704
705 * linux-aarch64-low.c (aarch64_insert_point): Use
706 show_debug_regs as a boolean.
707 (aarch64_remove_point): Likewise.
708
f5771b1d
PA
7092015-03-05 Pedro Alves <palves@redhat.com>
710
711 * lynx-low.c (lynx_target_ops): Install NULL hooks for
712 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
713 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
714 * nto-low.c (nto_target_ops): Likewise.
715 * spu-low.c (spu_target_ops): Likewise.
716 * win32-low.c (win32_target_ops): Likewise.
717
3e572f71
PA
7182015-03-04 Pedro Alves <palves@redhat.com>
719
72f4393d 720 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
721 Decide whether a breakpoint triggered based on the SIGTRAP's
722 siginfo.si_code.
72f4393d
L
723 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
724 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
725 (linux_low_filter_event): Check for breakpoints before checking
726 watchpoints.
727 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
728 siginfo.si_code.
72f4393d
L
729 (linux_stopped_by_sw_breakpoint)
730 (linux_supports_stopped_by_sw_breakpoint)
731 (linux_stopped_by_hw_breakpoint)
732 (linux_supports_stopped_by_hw_breakpoint): New functions.
733 (linux_target_ops): Install new target methods.
3e572f71 734
1ec68e26
PA
7352015-03-04 Pedro Alves <palves@redhat.com>
736
737 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
738 * server.c (swbreak_feature, hwbreak_feature): New globals.
739 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
740 (captured_main): Clear swbreak_feature and hwbreak_feature.
741 * server.h (swbreak_feature, hwbreak_feature): Declare.
742 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
743 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
744 supports_stopped_by_hw_breakpoint>: New fields.
745 (target_supports_stopped_by_sw_breakpoint)
746 (target_stopped_by_sw_breakpoint)
747 (target_supports_stopped_by_hw_breakpoint)
748 (target_stopped_by_hw_breakpoint): Declare.
749
15c66dd6
PA
7502015-03-04 Pedro Alves <palves@redhat.com>
751
752 enum lwp_stop_reason -> enum target_stop_reason
753 * linux-low.c (check_stopped_by_breakpoint): Adjust.
754 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
755 (linux_wait_1, stuck_in_jump_pad_callback)
756 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
757 (linux_stopped_by_watchpoint):
758 * linux-low.h (enum lwp_stop_reason): Delete.
759 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
760 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
761
98fc70d6
YQ
7622015-03-04 Yao Qi <yao.qi@linaro.org>
763
764 * Makefile.in (SFILES): Add linux-aarch64-low.c.
765
dd2ac174
GB
7662015-03-03 Gary Benson <gbenson@redhat.com>
767
768 * hostio.c (handle_vFile): Fix prefix lengths.
769
d68e53f4
MM
7702015-03-03 Markus Metzger <markus.t.metzger@intel.com>
771
772 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
773 ptr_bits.
774
bf2d68ab
AA
7752015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
776
777 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
778 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
779 (clean): Add "rm -f" for above C files.
780 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
781 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
782 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
783 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
784 * linux-s390-low.c (HWCAP_S390_VX): New macro.
785 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
786 (init_registers_s390x_vx_linux64)
787 (init_registers_s390x_tevx_linux64)
788 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
789 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
790 declarations.
791 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
792 (s390_store_vxrs_high): New functions.
793 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
794 NT_S390_VXRS_HIGH.
795 (s390_arch_setup): Add logic for selecting one of the new target
796 descriptions. Activate the new vector regsets if applicable.
797 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
798 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
799 and init_registers_s390x_tevx_linux64.
800
c966a859
PA
8012015-03-01 Pedro Alves <palves@redhat.com>
802
803 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
804 parameter.
805
4180215b
PA
8062015-02-27 Pedro Alves <palves@redhat.com>
807
808 * linux-x86-low.c (u_debugreg_offset): New function.
809 (x86_linux_dr_get, x86_linux_dr_set): Use it.
810
749bab01
PA
8112015-02-27 Pedro Alves <palves@redhat.com>
812
813 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
814 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
815 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
816 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
817 (ps_lsetfpregs, ps_getpid)
818 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
819 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
820 (ps_lsetxregs, ps_plog): Declare.
821
3c14e5a3
PA
8222015-02-27 Pedro Alves <palves@redhat.com>
823
824 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
825 IP_AGENT_EXPORT_FUNC.
826 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
827 IP_AGENT_EXPORT_FUNC.
828 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
829 (IP_AGENT_EXPORT): Delete.
830 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
831 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
832 (gdb_trampoline_buffer_error, collecting, gdb_collect)
833 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
834 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
835 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
836 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
837 (traceframe_read_count, traceframe_write_count)
838 (traceframes_created, trace_state_variables, get_raw_reg)
839 (get_trace_state_variable_value, set_trace_state_variable_value)
840 (ust_loaded, helper_thread_id, cmd_buf): Use
841 IPA_SYM_EXPORTED_NAME.
842 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
843 (tracepoints) Use IP_AGENT_EXPORT_VAR.
844 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
845 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
846 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
847 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
848 EXTERN_C_PUSH/EXTERN_C_POP.
849 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
850 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
851 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
852 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
853 (traceframe_write_count, traceframe_read_count)
854 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
855 (about_to_request_buffer_space, get_trace_state_variable_value)
856 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
857 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
858 EXTERN_C_PUSH/EXTERN_C_POP.
859 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
860 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
861 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
862 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
863 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
864 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
865 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
866 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
867 Define.
868 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
869 (IP_AGENT_EXPORT_VAR_DECL): Define.
870 (tracing): Declare.
871 (gdb_agent_get_raw_reg): Declare.
872
fe978cb0
PA
8732015-02-27 Tom Tromey <tromey@redhat.com>
874 Pedro Alves <palves@redhat.com>
875
876 Rename symbols whose names are reserved C++ keywords throughout.
877
3bc3d82a
PA
8782015-02-27 Pedro Alves <palves@redhat.com>
879
880 * Makefile.in (COMPILER): New, get it from autoconf.
881 (CXX): Get from autoconf instead.
882 (COMPILE.pre): Use COMPILER.
883 (CC-LD): Rename to ...
884 (CC_LD): ... this. Use COMPILER.
885 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
886 (CXX_FOR_TARGET): Default to g++ instead of gcc.
887 * acinclude.m4: Include build-with-cxx.m4.
888 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
889 Disable -Werror by default if building in C++ mode.
890 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
891 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
892 the C++ compiler. Save/restore CXXFLAGS too.
893 * configure: Regenerate.
894
07697489
PA
8952015-02-27 Pedro Alves <palves@redhat.com>
896
897 * acinclude.m4: Include libiberty.m4.
898 * configure.ac: Call libiberty_INIT.
899 * config.in, configure: Regenerate.
900
9beb7c4e
PA
9012015-02-26 Pedro Alves <palves@redhat.com>
902
903 * linux-low.c (linux_wait_1): When incrementing the PC past a
904 program breakpoint always use the_low_target.breakpoint_len as
905 increment, rather than the maximum between that and
906 the_low_target.decr_pc_after_break.
907
8090aef2
PA
9082015-02-23 Pedro Alves <palves@redhat.com>
909
910 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
911 thread was doing a step-over; always adjust the PC if
912 we stepped over a permanent breakpoint.
913 (linux_wait_1): If we stepped over breakpoint that was on top of a
914 permanent breakpoint, manually advance the PC past it.
915
bc9540e8
PA
9162015-02-23 Pedro Alves <palves@redhat.com>
917
918 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
919 modes.
920 (x86_fill_gregset, x86_store_gregset): Use it when handling
921 $orig_eax.
922
2db9a427
PA
9232015-02-20 Pedro Alves <palves@redhat.com>
924
925 * thread-db.c: Include "nat/linux-procfs.h".
926 (thread_db_init): Skip listing new threads if the kernel supports
927 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
928
afa8d396
PA
9292015-02-20 Pedro Alves <palves@redhat.com>
930
931 * linux-low.c (status_pending_p_callback): Use ptid_match.
932
c9587f88
AT
9332015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
934
935 PR breakpoints/16812
936 * linux-low.c (wstatus_maybe_breakpoint): Remove.
937 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
938 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
939
b05ec7a5
AT
9402015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
941
942 PR breakpoints/15956
943 * tracepoint.c (cmd_qtinit): Add check for current_thread.
944
d33501a5
MM
9452015-02-09 Markus Metzger <markus.t.metzger@intel.com>
946
947 * linux-low.c (linux_low_btrace_conf): Print size.
948 * server.c (handle_btrace_conf_general_set): New.
949 (hanle_general_set): Call handle_btrace_conf_general_set.
950 (handle_query): Report Qbtrace-conf:bts:size as supported.
951
f4abbc16
MM
9522015-02-09 Markus Metzger <markus.t.metzger@intel.com>
953
954 * linux-low.c (linux_low_enable_btrace): Update parameters.
955 (linux_low_btrace_conf): New.
956 (linux_target_ops)<to_btrace_conf>: Initialize.
957 * server.c (current_btrace_conf): New.
958 (handle_btrace_enable): Rename to ...
959 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
960 to target_enable_btrace. Update comment. Update users.
961 (handle_qxfer_btrace_conf): New.
962 (qxfer_packets): Add btrace-conf entry.
963 (handle_query): Report qXfer:btrace-conf:read as supported packet.
964 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
965 (target_ops)<read_btrace_conf>: New.
966 (target_enable_btrace): Update parameters.
967 (target_read_btrace_conf): New.
968
043c3577
MM
9692015-02-09 Markus Metzger <markus.t.metzger@intel.com>
970
971 * server.c (handle_btrace_general_set): Remove call to
972 target_supports_btrace.
973 (supported_btrace_packets): New.
974 (handle_query): Call supported_btrace_packets.
975 * target.h: include btrace-common.h.
976 (btrace_target_info): Removed.
977 (supports_btrace, target_supports_btrace): Update parameters.
978
734b0e4b
MM
9792015-02-09 Markus Metzger <markus.t.metzger@intel.com>
980
981 * Makefile.in (SFILES): Add common/btrace-common.c.
982 (OBS): Add common/btrace-common.o.
983 (btrace-common.o): Add build rules.
984 * linux-low: Include btrace-common.h.
985 (linux_low_read_btrace): Use struct btrace_data. Call
986 btrace_data_init and btrace_data_fini.
987
d6c146e9
PA
9882015-02-06 Pedro Alves <palves@redhat.com>
989
990 * thread-db.c (find_new_threads_callback): Add debug output.
991
20ba1ce6
PA
9922015-02-04 Pedro Alves <palves@redhat.com>
993
994 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
995 (resume_stopped_resumed_lwps): New function.
996 (linux_wait_for_event_filtered): Use it.
997
8cc73a39
SDJ
9982015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
999
1000 * Makefile.in (SFILES): Add linux-personality.c.
1001 (linux-personality.o): New rule.
1002 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1003 list of objects to be built.
1004 * linux-low.c: Include nat/linux-personality.h.
1005 (linux_create_inferior): Remove code to disable address space
1006 randomization (moved to ../nat/linux-personality.c). Create
1007 cleanup to disable address space randomization.
1008
fb23d554
SDJ
10092015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1010
1011 * Makefile.in (posix-strerror.o): New rule.
1012 (mingw-strerror.o): Likewise.
1013 * configure: Regenerated.
1014 * configure.ac: Source file ../common/common.host. Initialize new
1015 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1016
cdf43629
YQ
10172015-01-14 Yao Qi <yao@codesourcery.com>
1018
1019 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1020 (ppc-linux.o): New rule.
1021 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1022 * configure.ac: AC_CHECK_FUNCS(getauxval).
1023 * config.in: Re-generated.
1024 * configure: Re-generated.
1025 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1026 ppc64_64bit_inferior_p
1027
514c5338
YQ
10282015-01-14 Yao Qi <yao@codesourcery.com>
1029
1030 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1031 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1032 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1033 (PT_ORIG_R3, PT_TRAP): Likewise.
1034 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1035 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1036 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1037
3368c1e5
JB
10382015-01-10 Joel Brobecker <brobecker@adacore.com>
1039
1040 * i387-fp.c (i387_cache_to_xsave): In look over
1041 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1042 zmmh_low_space field by use of zmmh_high_space.
1043
582511be
PA
10442015-01-09 Pedro Alves <palves@redhat.com>
1045
1046 * linux-low.c (step_over_bkpt): Move higher up in the file.
1047 (handle_extended_wait): Don't store the stop_pc here.
1048 (get_stop_pc): Adjust comments and rename to ...
1049 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1050 stopped for a software breakpoint or hardware breakpoint.
1051 (thread_still_has_status_pending_p): New function.
1052 (status_pending_p_callback): Use
1053 thread_still_has_status_pending_p. If the event is no longer
1054 interesting, resume the LWP.
1055 (handle_tracepoints): Add assert.
1056 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1057 (wstatus_maybe_breakpoint): New function.
1058 (cancel_breakpoint): Delete function.
1059 (check_stopped_by_watchpoint): New function, factored out from
1060 linux_low_filter_event.
1061 (lp_status_maybe_breakpoint): Delete function.
1062 (linux_low_filter_event): Remove filter_ptid argument.
1063 Leave thread group exits pending here. Store the LWP's stop PC.
1064 Always leave events pending.
1065 (linux_wait_for_event_filtered): Pull all events out of the
1066 kernel, and leave them all pending.
1067 (count_events_callback, select_event_lwp_callback): Consider all
1068 events.
1069 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1070 (select_event_lwp): Only give preference to the stepping LWP in
1071 all-stop mode. Adjust comments.
1072 (ignore_event): New function.
1073 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1074 references to cancel_breakpoints. Adjust to renames. Also give
1075 equal priority to all LWPs that have had events in non-stop mode.
1076 If reporting a software breakpoint event, unadjust the LWP's PC.
1077 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1078 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1079 Adjust.
1080 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1081 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1082 (linux_stopped_by_watchpoint): Adjust.
1083 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1084 * linux-low.h (enum lwp_stop_reason): New.
1085 (struct lwp_info) <stop_pc>: Adjust comment.
1086 <stopped_by_watchpoint>: Delete field.
1087 <stop_reason>: New field.
1088 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1089 * mem-break.c (software_breakpoint_inserted_here)
1090 (hardware_breakpoint_inserted_here): New function.
1091 * mem-break.h (software_breakpoint_inserted_here)
1092 (hardware_breakpoint_inserted_here): Declare.
1093 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1094 (cancel_breakpoints): Delete.
1095 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1096 (upload_fast_traceframes): Remove references to
1097 cancel_breakpoints.
1098
a33e3959
PA
10992015-01-09 Pedro Alves <palves@redhat.com>
1100
1101 * thread-db.c (find_new_threads_callback): Ignore thread if the
1102 kernel thread ID is -1.
1103
8784d563
PA
11042015-01-09 Pedro Alves <palves@redhat.com>
1105
1106 * linux-low.c (linux_attach_fail_reason_string): Move to
1107 nat/linux-ptrace.c, and rename.
1108 (linux_attach_lwp): Update comment.
1109 (attach_proc_task_lwp_callback): New function.
1110 (linux_attach): Adjust to rename and use
1111 linux_proc_attach_tgid_threads.
1112 (linux_attach_fail_reason_string): Delete declaration.
1113
76f2b779
JB
11142015-01-01 Joel Brobecker <brobecker@adacore.com>
1115
1116 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1117 * server.c (gdbserver_version): Likewise.
1118
fafcc06a
SDJ
11192014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1120
1121 * remote-utils.c: Include ctype.h.
1122 (input_interrupt): Explicitly handle the case when the char
1123 received is the NUL byte. Improve the printing of non-ASCII
1124 characters.
1125
beed38b8
JB
11262014-12-16 Joel Brobecker <brobecker@adacore.com>
1127
1128 * linux-low.c (linux_low_filter_event): Update call to
1129 linux_enable_event_reporting following the addition of
1130 a new parameter to that function.
1131
bf330350
CU
11322014-12-16 Catalin Udma <catalin.udma@freescale.com>
1133
1134 PR server/17457
1135 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1136 (AARCH64_FPCR_REGNO): Likewise.
1137 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1138 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1139 (aarch64_store_fpregset): Likewise.
1140
5227d625
JB
11412014-12-15 Joel Brobecker <brobecker@adacore.com>
1142
1143 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1144 Remove FIXME comment about assumption about N.
1145
f93b65a0
JB
11462014-12-13 Joel Brobecker <brobecker@adacore.com>
1147
1148 * configure.ac: If large-file support is disabled in GDBserver,
1149 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1150 * configure: Regenerate.
1151
e5a9158d
AA
11522014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1153
1154 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1155 warning upon ENODATA from ptrace.
1156 * linux-s390-low.c (s390_store_tdb): New.
1157 (s390_regsets): Add regset for NT_S390_TDB.
1158
feea5f36
AA
11592014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1160
1161 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1162 without a fill_function.
1163 * linux-s390-low.c (s390_fill_last_break): Remove.
1164 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1165 (s390_arch_setup): Use regset's size instead of fill_function for
1166 loop end condition.
1167
098dbe61
AA
11682014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1169
1170 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1171 the regset's store function when ptrace returned an error.
1172 * regcache.c (get_thread_regcache): Invalidate register cache
1173 before fetching inferior's registers.
1174
28eef672
AA
11752014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1176
1177 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1178 while-loop as for-loop.
1179 (regsets_store_inferior_registers): Likewise.
1180
bdca27a2
YQ
11812014-11-28 Yao Qi <yao@codesourcery.com>
1182
1183 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1184 * config.in, configure: Re-generate.
1185 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1186 is defined.
1187
9c232dda
YQ
11882014-11-21 Yao Qi <yao@codesourcery.com>
1189
1190 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1191 (AC_CHECK_HEADERS): Remove malloc.h.
1192 * configure: Re-generated.
1193 * config.in: Re-generated.
1194 * server.h: Don't include alloca.h and malloc.h.
1195 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1196 Don't include malloc.h.
1197
43968415
JB
11982014-11-17 Joel Brobecker <brobecker@adacore.com>
1199
1200 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1201 corresponding ERRNO check in same block.
1202
40e91bc7
PA
12032014-11-12 Pedro Alves <palves@redhat.com>
1204
1205 * server.c (cont_thread): Update comment.
1206 (start_inferior, attach_inferior): No longer clear cont_thread.
1207 (handle_v_cont): No longer set cont_thread.
1208 (captured_main): Clear cont_thread each time a GDB connects.
1209
c2c118cf
PA
12102014-11-12 Pedro Alves <palves@redhat.com>
1211
1212 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1213 thread, and don't resume all threads if the Hc thread has exited.
1214
78708b7c
PA
12152014-11-12 Pedro Alves <palves@redhat.com>
1216
1217 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1218 the process group instead of to a specific LWP.
1219
a2abc7de
PA
12202014-10-15 Pedro Alves <palves@redhat.com>
1221
1222 PR server/17487
1223 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1224 parameter.
1225 (arm_set_thread_context): Delete.
1226 (the_low_target): Adjust.
1227 * win32-i386-low.c (debug_registers_changed)
1228 (debug_registers_used): Delete.
1229 (update_debug_registers_callback): New function.
1230 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1231 needing to update their debug registers.
1232 (win32_get_current_dr): New function.
1233 (x86_dr_low_get_addr, x86_dr_low_get_control)
1234 (x86_dr_low_get_status): Fetch the debug register from the thread
1235 record's context.
1236 (i386_initial_stuff): Adjust.
1237 (i386_get_thread_context): Remove current_event parameter. Don't
1238 clear debug_registers_changed nor copy DR values to
1239 debug_reg_state.
1240 (i386_set_thread_context): Delete.
1241 (i386_prepare_to_resume): New function.
1242 (i386_thread_added): Mark the thread as needing to update irs
1243 debug registers.
1244 (the_low_target): Remove i386_set_thread_context and install
1245 i386_prepare_to_resume.
1246 * win32-low.c (win32_get_thread_context): Adjust.
1247 (win32_set_thread_context): Use SetThreadContext
1248 directly.
1249 (win32_prepare_to_resume): New function.
1250 (win32_require_context): New function, factored out from ...
1251 (thread_rec): ... this.
1252 (continue_one_thread): Call win32_prepare_to_resume on each thread
1253 we're about to continue.
1254 (win32_resume): Call win32_prepare_to_resume on the event thread.
1255 * win32-low.h (struct win32_thread_info)
1256 <debug_registers_changed>: New field.
1257 (struct win32_target_ops): Change prototype of set_thread_context,
1258 delete set_thread_context and add prepare_to_resume.
1259 (win32_require_context): New declaration.
1260
a442d071
GB
12612014-10-08 Gary Benson <gbenson@redhat.com>
1262
1263 * server.h: Do not include common-exceptions.h.
1264
6f1947e8
GB
12652014-10-08 Gary Benson <gbenson@redhat.com>
1266
1267 * server.h: Do not include cleanups.h.
1268
63b434a4
JH
12692014-09-30 James Hogan <james.hogan@imgtec.com>
1270
1271 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1272 mips64-dsp-linux.c.
1273
c4d9ceb6
YQ
12742014-09-23 Yao Qi <yao@codesourcery.com>
1275
1276 * linux-low.c (lp_status_maybe_breakpoint): New function.
1277 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1278 (count_events_callback): Likewise.
1279 (select_event_lwp_callback): Likewise.
1280 (cancel_breakpoints_callback): Likewise.
1281
89a5711c
DB
12822014-09-19 Don Breazeal <donb@codesourcery.com>
1283
1284 * linux-low.c (handle_extended_wait): Call
1285 linux_ptrace_get_extended_event.
1286 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1287 linux_is_extended_waitstatus.
1288
bffc0964
JB
12892014-09-16 Joel Brobecker <brobecker@adacore.com>
1290
1291 * Makefile.in (CPPFLAGS): Define.
1292 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1293 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1294
0bfdf32f
GB
12952014-09-16 Gary Benson <gbenson@redhat.com>
1296
1297 * inferiors.h (current_inferior): Renamed as...
1298 (current_thread): New variable. All uses updated.
1299 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1300 (maybe_move_out_of_jump_pad): Likewise.
1301 (cancel_breakpoint): Likewise.
1302 (linux_low_filter_event): Likewise.
1303 (wait_for_sigstop): Likewise.
1304 (linux_resume_one_lwp): Likewise.
1305 (need_step_over_p): Likewise.
1306 (start_step_over): Likewise.
1307 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1308 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1309 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1310 and save_inferior as saved_thread.
1311 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1312 saved_thread.
1313 (regcache_invalidate_thread): Likewise.
1314 * remote-utils.c (prepare_resume_reply): Likewise.
1315 * thread-db.c (thread_db_get_tls_address): Likewise.
1316 (disable_thread_event_reporting): Likewise.
1317 (remove_thread_event_breakpoints): Likewise.
1318 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1319 as saved_thread.
1320 * target.h (set_desired_inferior): Renamed as...
1321 (set_desired_thread): New declaration. All uses updated.
1322 * server.c (myresume): Updated comment to reference thread instead
1323 of inferior.
1324 (handle_serial_event): Likewise.
1325 (handle_target_event): Likewise.
1326
361c8ade
GB
13272014-09-12 Tom Tromey <tromey@redhat.com>
1328 Gary Benson <gbenson@redhat.com>
1329
1330 * regcache.h: Include common-regcache.h.
1331 (regcache_read_pc): Don't declare.
1332 * regcache.c (get_thread_regcache_for_ptid): New function.
1333
bd9269f7
GB
13342014-09-11 Tom Tromey <tromey@redhat.com>
1335 Gary Benson <gbenson@redhat.com>
1336
1337 * symbol.c: New file.
1338 * Makefile.in (SFILES): Add symbol.c.
1339 (OBS): Add symbol.o.
1340
f8c1d06b
GB
13412014-09-11 Gary Benson <gbenson@redhat.com>
1342
1343 * target.c (target_stop_ptid, target_continue_ptid): New
1344 functions.
1345
721ec300
GB
13462014-09-11 Tom Tromey <tromey@redhat.com>
1347 Gary Benson <gbenson@redhat.com>
1348
1349 * target.h: Include target/target.h.
1350 * target.c (target_read_memory, target_read_uint32)
1351 (target_write_memory): New functions.
1352
c5e92cca
GB
13532014-09-11 Gary Benson <gbenson@redhat.com>
1354
1355 * server.h (debug_hw_points): Don't declare.
1356 * server.c (debug_hw_points): Don't define. Replace all uses
1357 with show_debug_regs.
1358 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1359 all uses with show_debug_regs.
1360
2e4bb98a
EBM
13612014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1362
1363 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1364 endianness into account.
1365 (ppc_supply_ptrace_register): Likewise.
1366
ac740bc7
JH
13672014-09-03 James Hogan <james.hogan@imgtec.com>
1368
1369 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1370 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1371
97ea6506
GB
13722014-09-03 Gary Benson <gbenson@redhat.com>
1373
1374 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1375 ALL_DEBUG_ADDRESS_REGISTERS.
1376
df7e5265
GB
13772014-09-02 Gary Benson <gbenson@redhat.com>
1378
1379 * i386-low.h: Renamed as...
1380 * x86-low.h: New file. All type, function and variable name
1381 prefixes changed from "i386_" to "x86_". All references updated.
1382 * i386-low.c: Renamed as...
1383 * x86-low.c: New file. All type, function and variable name
1384 prefixes changed from "i386_" to "x86_". All references updated.
1385
ed859da7
GB
13862014-09-02 Gary Benson <gbenson@redhat.com>
1387
1388 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1389 (x86_linux_new_thread): Likewise.
1390
860789c7
GB
13912014-08-29 Gary Benson <gbenson@redhat.com>
1392
1393 * server.h (setjmp.h): Do not include.
1394 (toplevel): Do not declare.
1395 (common-exceptions.h): Include.
1396 (cleanups.h): Likewise.
1397 * server.c (toplevel): Do not define.
1398 (exit_code): New static global.
1399 (detach_or_kill_for_exit_cleanup): New function.
1400 (main): New function. Original main renamed to...
1401 (captured_main): New function.
1402 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1403
ff55e1b5
GB
14042014-08-29 Gary Benson <gbenson@redhat.com>
1405
1406 * Makefile.in (SFILES): Add common/common-exceptions.c.
1407 (OBS): Add common-exceptions.o.
1408 (common-exceptions.o): New rule.
1409 * utils.c (prepare_to_throw_exception): New function.
1410
e9bcb658
GB
14112014-08-29 Gary Benson <gbenson@redhat.com>
1412
1413 * config.in: Regenerate.
1414 * configure: Likewise.
1415
e3180625
GB
14162014-08-29 Gary Benson <gbenson@redhat.com>
1417
1418 * Makefile.in (SFILES): Add common/cleanups.c.
1419 (OBS): cleanups.o.
1420 (cleanups.o): New rule.
1421
e3d6ba5d
GB
14222014-08-29 Gary Benson <gbenson@redhat.com>
1423
1424 * utils.c (internal_vwarning): New function.
1425
7096e886
GB
14262014-08-28 Gary Benson <gbenson@redhat.com>
1427
1428 * utils.h (fatal): Remove declaration.
1429 * utils.c (fatal): Remove function.
1430
14ce3192
GB
14312014-08-28 Gary Benson <gbenson@redhat.com>
1432
1433 * tracepoint.c (gdb_agent_init): Replace fatal with
1434 perror_with_name.
1435 (initialize_tracepoint): Likewise.
1436
50278d59
GB
14372014-08-28 Gary Benson <gbenson@redhat.com>
1438
1439 * remote-utils.c (remote_prepare): Replace fatal with error.
1440
aa96c426
GB
14412014-08-28 Gary Benson <gbenson@redhat.com>
1442
1443 * linux-low.c (linux_async): Replace fatal with warning.
1444 Tidy up and return.
1445 (linux_start_non_stop): Return -1 if linux_async failed.
1446
f7160e97
GB
14472014-08-28 Gary Benson <gbenson@redhat.com>
1448
1449 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1450 gdb_assert.
1451 (i386_dr_low_get_addr): Remove vague comment.
1452 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1453 gdb_assert.
1454
38e08fca
GB
14552014-08-28 Gary Benson <gbenson@redhat.com>
1456
1457 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1458 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1459 internal_error.
1460 (linux_resume_one_lwp): Likewise.
1461 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1462 gdb_assert.
1463 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1464 with internal_error.
1465 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1466 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1467 (find_register_by_name): Replace fatal with internal_error.
1468 (find_regno): Likewise.
1469 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1470 * thread-db.c (thread_db_create_event): Likewise.
1471 (thread_db_load_search): Likewise.
1472 (try_thread_db_load_1): Likewise.
1473 * tracepoint.c (get_jump_space_head): Replace fatal with
1474 internal_error.
1475 (claim_trampoline_space): Likewise.
1476 (have_fast_tracepoint_trampoline_buffer): Likewise.
1477 (cmd_qtstart): Likewise.
1478 (stop_tracing): Likewise.
1479 (fast_tracepoint_collecting): Likewise.
1480 (target_malloc): Likewise.
1481 (download_tracepoint): Likewise.
1482 (download_trace_state_variables): Replace check with gdb_assert.
1483 (upload_fast_traceframes): Replace fatal with internal_error.
1484
34abf635
GB
14852014-08-19 Tom Tromey <tromey@redhat.com>
1486 Gary Benson <gbenson@redhat.com>
1487
1488 * Makefile.in (SFILES): Add common/common-debug.c.
1489 (OBS): Add common-debug.o.
1490 (common-debug.o): New rule.
1491 * debug.h (debug_printf): Don't declare.
1492 * debug.c (debug_printf): Renamed and rewritten as...
1493 (debug_vprintf): New function.
1494
f6e94d78
GB
14952014-08-19 Gary Benson <gbenson@redhat.com>
1496
1497 * utils.h: Do not include print-utils.h.
1498
9239eeab
GB
14992014-08-19 Tom Tromey <tromey@redhat.com>
1500 Gary Benson <gbenson@redhat.com>
1501
1502 * server.h: Add static assertion.
1503 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1504
ef87c8bb
GB
15052014-08-19 Tom Tromey <tromey@redhat.com>
1506 Gary Benson <gbenson@redhat.com>
1507
1508 * Makefile.in (SFILES): Add common/errors.c.
1509 (OBS): Add errors.o.
1510 (IPA_OBS): Add errors-ipa.o.
1511 (errors.o): New rule.
1512 (errors-ipa.o): Likewise.
1513 * utils.h (perror_with_name, error, warning): Don't declare.
1514 * utils.c (warning): Renamed and rewritten as...
1515 (vwarning): New function.
1516 (error): Renamed and rewritten as...
1517 (verror): New function.
1518 (internal_error): Renamed and rewritten as...
1519 (internal_verror): New function.
1520
bb974a24
GB
15212014-08-07 Gary Benson <gbenson@redhat.com>
1522
1523 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1524 * configure: Regenerate.
1525 * config.in: Likewise.
1526 * server.h: Do not include errno.h.
1527 * event-loop.c: Likewise.
1528 * hostio-errno.c: Likewise.
1529 * linux-low.c: Likewise.
1530 * remote-utils.c: Likewise.
1531 * spu-low.c: Likewise.
1532 * utils.c: Likewise.
1533 * gdbreplay.c: Unconditionally include errno.h.
1534
6d3d12eb
GB
15352014-08-07 Gary Benson <gbenson@redhat.com>
1536
1537 * server.h: Do not include string.h.
1538 * event-loop.c: Likewise.
1539 * linux-low.c: Likewise.
1540 * regcache.c: Likewise.
1541 * remote-utils.c: Likewise.
1542 * spu-low.c: Likewise.
1543 * utils.c: Likewise.
1544
dccbb609
GB
15452014-08-07 Gary Benson <gbenson@redhat.com>
1546
1547 * server.h: Do not include gdb_assert.h.
1548
e76df0d0
GB
15492014-08-07 Gary Benson <gbenson@redhat.com>
1550
1551 * server.h: Do not include common-utils.h.
1552
4cb9c816
GB
15532014-08-07 Gary Benson <gbenson@redhat.com>
1554
1555 * server.h: Do not include ptid.h.
1556 * notif.h: Likewise.
1557
3995eeee
GB
15582014-08-07 Gary Benson <gbenson@redhat.com>
1559
1560 * server.h: Do not include gdb_locale.h.
1561
cb9f1a9b
GB
15622014-08-07 Gary Benson <gbenson@redhat.com>
1563
1564 * server.h: Do not include gdb/signals.h.
1565 * win32-low.c: Likewise.
1566
a5fceff8
GB
15672014-08-07 Gary Benson <gbenson@redhat.com>
1568
1569 * server.h: Do not include pathmax.h.
1570
b9391142
GB
15712014-08-07 Gary Benson <gbenson@redhat.com>
1572
1573 * server.h: Do not include libiberty.h.
1574 * linux-bfin-low.c: Likewise.
1575
0e443c87
GB
15762014-08-07 Gary Benson <gbenson@redhat.com>
1577
1578 * server.h: Do not include ansidecl.h.
1579
8ebb3f56
GB
15802014-08-07 Gary Benson <gbenson@redhat.com>
1581
1582 * linux-x86-low.c: Do not include stddef.h.
1583 * lynx-ppc-low.c: Likewise.
1584 * tracepoint.c: Likewise.
1585
8980bdf6
GB
15862014-08-07 Gary Benson <gbenson@redhat.com>
1587
1588 * server.h: Do not include stdarg.h.
1589 * nto-low.c: Likewise.
1590
d7096f71
GB
15912014-08-07 Gary Benson <gbenson@redhat.com>
1592
1593 * server.h: Do not include stdlib.h.
1594 * inferiors.c: Likewise.
1595 * linux-low.c: Likewise.
1596 * regcache.c: Likewise.
1597 * spu-low.c: Likewise.
1598 * tracepoint.c: Likewise.
1599 * utils.c: Likewise.
1600
d02f550d
GB
16012014-08-07 Gary Benson <gbenson@redhat.com>
1602
1603 * server.h: Do not include stdio.h.
1604 * linux-low.c: Likewise.
1605 * remote-utils.c: Likewise.
1606 * spu-low.c: Likewise.
1607 * utils.c: Likewise.
1608 * wincecompat.c: Likewise.
1609
87f6c4e3
GB
16102014-08-06 Gary Benson <gbenson@redhat.com>
1611
1612 * regcache.c (init_register_cache): Move conditionals inside if.
1613
7089dca4
GB
16142014-08-06 Gary Benson <gbenson@redhat.com>
1615
1616 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1617
462f517e
GB
16182014-07-31 Gary Benson <gbenson@redhat.com>
1619
1620 * ax.h: Do not include server.h.
1621 * gdbthread.h: Likewise.
1622 * lynx-low.h: Likewise.
1623 * notif.h: Likewise.
1624
976411d6
GB
16252014-07-30 Gary Benson <gbenson@redhat.com>
1626
1627 * server.h: Include common-defs.h.
1628 Do not include config.h or build-gnulib-gdbserver/config.h.
1629
d41f6d8e
GB
16302014-07-30 Gary Benson <gbenson@redhat.com>
1631
1632 * hostio-errno.c: Move server.h to top of includes list.
1633 * inferiors.c: Likewise.
1634 * linux-x86-low.c: Likewise.
1635 * notif.c: Include server.h.
1636
314c6a35
TT
16372014-07-24 Tom Tromey <tromey@redhat.com>
1638 Gary Benson <gbenson@redhat.com>
1639
1640 * server.h (CORE_ADDR): Now unsigned.
1641
69ff6be5
PA
16422014-07-16 Pedro Alves <palves@redhat.com>
1643
1644 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1645
ce9e3fe7
PA
16462014-07-15 Pedro Alves <palves@redhat.com>
1647
1648 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1649 copy.
1650
e76126e8
PA
16512014-07-11 Pedro Alves <palves@redhat.com>
1652
1653 * linux-low.c (kill_wait_lwp): New function, based on
1654 kill_one_lwp_callback, but use my_waitpid directly.
1655 (kill_one_lwp_callback, linux_kill): Use it.
1656
8e9db26e
PA
16572014-06-23 Pedro Alves <palves@redhat.com>
1658
1659 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1660 before setting DR0..DR3.
1661
698b3e08
GB
16622014-06-20 Gary Benson <gbenson@redhat.com>
1663
1664 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1665 * configure: Regenerated.
1666 * config.in: Likewise.
1667
125f8a3d
GB
16682014-06-20 Gary Benson <gbenson@redhat.com>
1669
1670 * Makefile.in (SFILES): Update locations for files moved
1671 from common to nat.
1672 (object file files): Reordered.
1673
42995dbd
GB
16742014-06-20 Gary Benson <gbenson@redhat.com>
1675
1676 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1677 (i386_dr_low_set_addr): Likewise.
1678 (i386_dr_low_get_addr): Likewise.
1679 (i386_dr_low_can_set_control): Likewise.
1680 (i386_dr_low_set_control): Likewise.
1681 (i386_dr_low_get_control): Likewise.
1682 (i386_dr_low_get_status): Likewise.
1683 (i386_get_debug_register_length): Likewise.
1684 * linux-x86-low.c (i386_dr_low_set_addr):
1685 Changed signature. Made static.
1686 (i386_dr_low_get_addr): Likewise.
1687 (i386_dr_low_set_control): Likewise.
1688 (i386_dr_low_get_control): Likewise.
1689 (i386_dr_low_get_status): Likewise.
1690 (i386_dr_low): New global variable.
1691 * win32-i386-low.c (i386_dr_low_set_addr):
1692 Changed signature. Made static.
1693 (i386_dr_low_get_addr): Likewise.
1694 (i386_dr_low_set_control): Likewise.
1695 (i386_dr_low_get_control): Likewise.
1696 (i386_dr_low_get_status): Likewise.
1697 (i386_dr_low): New global variable.
1698
e1d2394b
MS
16992014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1700
1701 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1702 * Makefile.in (AR, AR_FLAGS): Define.
1703 * configure: Regenerate.
1704
3a8ee006
GB
17052014-06-19 Gary Benson <gbenson@redhat.com>
1706
1707 * Makefile.in (i386-dregs.o): New rule.
1708 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1709 * i386-low.c (target.h): Remove include.
1710 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1711 (DR_CONTROL_SHIFT): Likewise.
1712 (DR_CONTROL_SIZE): Likewise.
1713 (DR_RW_EXECUTE): Likewise.
1714 (DR_RW_WRITE): Likewise.
1715 (DR_RW_READ): Likewise.
1716 (DR_RW_IORW): Likewise.
1717 (DR_LEN_1): Likewise.
1718 (DR_LEN_2): Likewise.
1719 (DR_LEN_4): Likewise.
1720 (DR_LEN_8): Likewise.
1721 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1722 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1723 (DR_ENABLE_SIZE): Likewise.
1724 (DR_LOCAL_SLOWDOWN): Likewise.
1725 (DR_GLOBAL_SLOWDOWN): Likewise.
1726 (DR_CONTROL_RESERVED): Likewise.
1727 (I386_DR_CONTROL_MASK): Likewise.
1728 (I386_DR_VACANT): Likewise.
1729 (I386_DR_LOCAL_ENABLE): Likewise.
1730 (I386_DR_GLOBAL_ENABLE): Likewise.
1731 (I386_DR_DISABLE): Likewise.
1732 (I386_DR_SET_RW_LEN): Likewise.
1733 (I386_DR_GET_RW_LEN): Likewise.
1734 (I386_DR_WATCH_HIT): Likewise.
1735 (i386_wp_op_t): Likewise.
1736 (i386_show_dr): Likewise.
1737 (i386_length_and_rw_bits): Likewise.
1738 (i386_insert_aligned_watchpoint): Likewise.
1739 (i386_remove_aligned_watchpoint): Likewise.
1740 (i386_handle_nonaligned_watchpoint): Likewise.
1741 i386_update_inferior_debug_regs(): Likewise.
1742 (i386_dr_insert_watchpoint): Likewise.
1743 (i386_dr_remove_watchpoint): Likewise.
1744 (i386_dr_region_ok_for_watchpoint): Likewise.
1745 (i386_dr_stopped_data_address): Likewise.
1746 (i386_dr_stopped_by_watchpoint): Likewise.
1747
8f26655c
GB
17482014-06-19 Gary Benson <gbenson@redhat.com>
1749
1750 * i386-low.c (i386_dr_show): Renamed to
1751 i386_show_dr and made static. All uses updated.
1752 (i386_dr_length_and_rw_bits): Renamed to
1753 i386_length_and_rw_bits and made static.
1754 All uses updated.
1755 (i386_dr_insert_aligned_watchpoint): Renamed to
1756 i386_insert_aligned_watchpoint and made static.
1757 All uses updated.
1758 (i386_dr_remove_aligned_watchpoint): Renamed to
1759 i386_remove_aligned_watchpoint and made static.
1760 All uses updated.
1761 (i386_dr_update_inferior_debug_regs): Renamed to
1762 i386_update_inferior_debug_regs and made static.
1763 All uses updated.
1764
b9228891
GB
17652014-06-18 Gary Benson <gbenson@redhat.com>
1766
5171def3
GB
1767 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1768 (i386_dr_low_can_set_control): Likewise.
1769 (i386_get_debug_register_length): Likewise.
1770 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1771 (i386_dr_low_can_set_control): Likewise.
1772 (i386_get_debug_register_length): Likewise.
1773
17742014-06-17 Gary Benson <gbenson@redhat.com>
1775
b9228891
GB
1776 * i386-low.h (i386-dregs.h): New include.
1777 (DR_FIRSTADDR): Now in i386-dregs.h.
1778 (DR_LASTADDR): Likewise.
1779 (DR_NADDR): Likewise.
1780 (DR_STATUS): Likewise.
1781 (DR_CONTROL): Likewise.
1782 (i386_debug_reg_state): Likewise.
1783 (i386_dr_insert_watchpoint): Likewise.
1784 (i386_dr_remove_watchpoint): Likewise.
1785 (i386_dr_region_ok_for_watchpoint): Likewise.
1786 (i386_dr_stopped_data_address): Likewise.
1787 (i386_dr_stopped_by_watchpoint): Likewise.
1788 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1789
4be83cc2
GB
17902014-06-18 Gary Benson <gbenson@redhat.com>
1791
1792 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1793 i386_dr_insert_watchpoint.
1794 (i386_low_remove_watchpoint): Renamed to
1795 i386_dr_remove_watchpoint.
1796 (i386_low_region_ok_for_watchpoint): Renamed to
1797 i386_dr_region_ok_for_watchpoint.
1798 (i386_low_stopped_data_address): Renamed to
1799 i386_dr_stopped_data_address.
1800 (i386_low_stopped_by_watchpoint): Renamed to
1801 i386_dr_stopped_by_watchpoint.
1802 * i386-low.c (i386_show_dr): Renamed to
1803 i386_dr_show and made nonstatic. All uses updated.
1804 (i386_length_and_rw_bits): Renamed to
1805 i386_dr_length_and_rw_bits and made nonstatic.
1806 All uses updated.
1807 (i386_insert_aligned_watchpoint): Renamed to
1808 i386_dr_insert_aligned_watchpoint and made nonstatic.
1809 All uses updated.
1810 (i386_remove_aligned_watchpoint): Renamed to
1811 i386_dr_remove_aligned_watchpoint and made nonstatic.
1812 All uses updated.
1813 (i386_update_inferior_debug_regs): Renamed to
1814 i386_dr_update_inferior_debug_regs and made nonstatic.
1815 All uses updated.
1816 (i386_low_insert_watchpoint): Renamed to
1817 i386_dr_insert_watchpoint. All uses updated.
1818 (i386_low_remove_watchpoint): Renamed to
1819 i386_dr_remove_watchpoint. All uses updated.
1820 (i386_low_region_ok_for_watchpoint): Renamed to
1821 i386_dr_region_ok_for_watchpoint. All uses updated.
1822 (i386_low_stopped_data_address): Renamed to
1823 i386_dr_stopped_data_address. All uses updated.
1824 (i386_low_stopped_by_watchpoint): Renamed to
1825 i386_dr_stopped_by_watchpoint. All uses updated.
1826
131aa0d4
GB
18272014-06-18 Gary Benson <gbenson@redhat.com>
1828
1829 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1830 (i386_dr_low_can_set_control): Likewise.
1831 (i386_insert_aligned_watchpoint): New check.
1832
d9305f7f
GB
18332014-06-18 Gary Benson <gbenson@redhat.com>
1834
1835 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1836 Renamed to state.
1837
e927c9fc
GB
18382014-06-18 Gary Benson <gbenson@redhat.com>
1839
1840 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1841 instead of fatal and error.
1842 (i386_handle_nonaligned_watchpoint): Likewise.
1843
1b6d4134
GB
18442014-06-18 Gary Benson <gbenson@redhat.com>
1845
1846 * i386-low.c (i386_get_debug_register_length): New macro.
1847 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1848 (i386_show_dr): Use debug_printf instead of fprintf. Use
1849 phex to format values.
1850
6e62758f
GB
18512014-06-18 Gary Benson <gbenson@redhat.com>
1852
1853 * i386-low.h: Comment changes.
1854 * i386-low.c: Likewise.
1855
fc6e2f03
GB
18562014-06-18 Gary Benson <gbenson@redhat.com>
1857
1858 * i386-low.c: Whitespace changes.
1859
f9d1eeed
TT
18602014-06-12 Tom Tromey <tromey@redhat.com>
1861
1862 * utils.c (freeargv): Remove.
1863
0b04e523
TT
18642014-06-12 Tom Tromey <tromey@redhat.com>
1865
1866 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1867 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1868 (parse_debug_format_options): Likewise.
1869 (gdbserver_usage): Likewise.
1870 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1871 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1872 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1873 against libiberty.
1874 ($(LIBGNU)): Depend on libiberty.
1875 (all-lib): Recurse into all subdirs.
1876 (install-only): Invoke "install" target in subdirs.
1877 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1878 targets.
1879 * configure: Rebuild.
1880 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1881 for vasprintf, vsnprintf, or gettimeofday.
1882 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1883 srv_tgtobj.
1884
270c9937
JB
18852014-06-05 Joel Brobecker <brobecker@adacore.com>
1886
1887 * development.sh: Delete.
1888 * Makefile.in (config.status): Adjust dependency on development.sh.
1889 * configure.ac: Adjust development.sh source call.
1890 * configure: Regenerate.
1891
0a261ed8
PA
18922014-06-02 Pedro Alves <palves@redhat.com>
1893
1894 * ax.c (gdb_free_agent_expr): New function.
1895 * ax.h (gdb_free_agent_expr): New declaration.
1896 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1897 list.
1898 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1899 static.
1900 (clear_breakpoint_conditions_and_commands): New function.
1901 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1902 (clear_breakpoint_conditions_and_commands): New declaration.
1903
e9dae05e
RR
19042014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1905
1906 * linux-aarch64-low.c (asm/ptrace.h): Include.
1907
5876f503
JK
19082014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1909
1910 Fix TLS access for -static -pthread.
1911 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1912 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1913 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1914
802e8e6d
PA
19152014-05-20 Pedro Alves <palves@redhat.com>
1916
1917 * linux-aarch64-low.c (aarch64_insert_point)
1918 (aarch64_remove_point): No longer check whether the type is
1919 supported here. Adjust to new interface.
1920 (the_low_target): Install aarch64_supports_z_point_type as
1921 supports_z_point_type method.
1922 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1923 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1924 instead of a Z packet char. Adjust.
1925 (arm_supports_z_point_type): New function.
1926 (arm_insert_point, arm_remove_point): Adjust to new interface.
1927 (the_low_target): Install arm_supports_z_point_type.
1928 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1929 (cris_insert_point, cris_remove_point): Adjust to new interface.
1930 Don't check whether the type is supported here.
1931 (the_low_target): Install cris_supports_z_point_type.
1932 * linux-low.c (linux_supports_z_point_type): New function.
1933 (linux_insert_point, linux_remove_point): Adjust to new interface.
1934 * linux-low.h (struct linux_target_ops) <insert_point,
1935 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1936 raw_breakpoint pointer parameter.
1937 <supports_z_point_type>: New method.
1938 * linux-mips-low.c (mips_supports_z_point_type): New function.
1939 (mips_insert_point, mips_remove_point): Adjust to new interface.
1940 Use mips_supports_z_point_type.
1941 (the_low_target): Install mips_supports_z_point_type.
1942 * linux-ppc-low.c (the_low_target): Install NULL as
1943 supports_z_point_type method.
1944 * linux-s390-low.c (the_low_target): Install NULL as
1945 supports_z_point_type method.
1946 * linux-sparc-low.c (the_low_target): Install NULL as
1947 supports_z_point_type method.
1948 * linux-x86-low.c (x86_supports_z_point_type): New function.
1949 (x86_insert_point): Adjust to new insert_point interface. Use
1950 insert_memory_breakpoint. Adjust to new
1951 i386_low_insert_watchpoint interface.
1952 (x86_remove_point): Adjust to remove_point interface. Use
1953 remove_memory_breakpoint. Adjust to new
1954 i386_low_remove_watchpoint interface.
1955 (the_low_target): Install x86_supports_z_point_type.
1956 * lynx-low.c (lynx_target_ops): Install NULL as
1957 supports_z_point_type callback.
1958 * nto-low.c (nto_supports_z_point_type): New.
1959 (nto_insert_point, nto_remove_point): Adjust to new interface.
1960 (nto_target_ops): Install nto_supports_z_point_type.
1961 * mem-break.c: Adjust intro comment.
1962 (struct raw_breakpoint) <raw_type, size>: New fields.
1963 <inserted>: Update comment.
1964 <shlib_disabled>: Delete field.
1965 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1966 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1967 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1968 (raw_bkpt_type_to_target_hw_bp_type): New function.
1969 (find_enabled_raw_code_breakpoint_at): New function.
1970 (find_raw_breakpoint_at): New type and size parameters. Use them.
1971 (insert_memory_breakpoint): New function, based off
1972 set_raw_breakpoint_at.
1973 (remove_memory_breakpoint): New function.
1974 (set_raw_breakpoint_at): Reimplement.
1975 (set_breakpoint): New, based on set_breakpoint_at.
1976 (set_breakpoint_at): Reimplement.
1977 (delete_raw_breakpoint): Go through the_target->remove_point
1978 instead of assuming memory breakpoints.
1979 (find_gdb_breakpoint_at): Delete.
1980 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1981 (find_gdb_breakpoint): New function.
1982 (set_gdb_breakpoint_at): Delete.
1983 (z_type_supported): New function.
1984 (set_gdb_breakpoint_1): New function, loosely based off
1985 set_gdb_breakpoint_at.
1986 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1987 (delete_gdb_breakpoint_at): Delete.
1988 (delete_gdb_breakpoint_1): New function, loosely based off
1989 delete_gdb_breakpoint_at.
1990 (delete_gdb_breakpoint): New function.
1991 (clear_gdb_breakpoint_conditions): Rename to ...
1992 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1993 breakpoint.
1994 (add_condition_to_breakpoint): Make static.
1995 (add_breakpoint_condition): Take a struct breakpoint pointer
1996 instead of an address. Adjust.
1997 (gdb_condition_true_at_breakpoint): Rename to ...
1998 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1999 z_type parameter.
2000 (gdb_condition_true_at_breakpoint): Reimplement.
2001 (add_breakpoint_commands): Take a struct breakpoint pointer
2002 instead of an address. Adjust.
2003 (gdb_no_commands_at_breakpoint): Rename to ...
2004 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2005 parameter. Return true if no breakpoint was found. Change debug
2006 output.
2007 (gdb_no_commands_at_breakpoint): Reimplement.
2008 (run_breakpoint_commands): Rename to ...
2009 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2010 and change return type to boolean.
2011 (run_breakpoint_commands): New function.
2012 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2013 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2014 breakpoint. Go through the_target->remove_point instead of
2015 assuming memory breakpoint.
2016 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2017 software and hardware breakpoints.
2018 (reinsert_raw_breakpoint): Go through the_target->insert_point
2019 instead of assuming memory breakpoint.
2020 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2021 software and hardware breakpoints.
2022 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2023 Check both software and hardware breakpoints.
2024 (validate_inserted_breakpoint): Assert the breakpoint is a
2025 software breakpoint. Set the inserted flag to -1 instead of
2026 setting shlib_disabled.
2027 (delete_disabled_breakpoints): Adjust.
2028 (validate_breakpoints): Only validate software breakpoints.
2029 Adjust to inserted flag change.
2030 (check_mem_read, check_mem_write): Skip breakpoint types other
2031 than software breakpoints. Adjust to inserted flag change.
2032 * mem-break.h (enum raw_bkpt_type): New enum.
2033 (raw_breakpoint, struct process_info): Forward declare.
2034 (Z_packet_to_target_hw_bp_type): Delete declaration.
2035 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2036 (set_gdb_breakpoint, delete_gdb_breakpoint)
2037 (clear_breakpoint_conditions): New declarations.
2038 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2039 (breakpoint_inserted_here): Update comment.
2040 (add_breakpoint_condition, add_breakpoint_commands): Replace
2041 address parameter with a breakpoint pointer parameter.
2042 (gdb_breakpoint_here): Update comment.
2043 (delete_gdb_breakpoint_at): Delete.
2044 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2045 * server.c (process_point_options): Take a struct breakpoint
2046 pointer instead of an address. Adjust.
2047 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2048 delete_gdb_breakpoint.
2049 * spu-low.c (spu_target_ops): Install NULL as
2050 supports_z_point_type method.
2051 * target.h: Include mem-break.h.
2052 (struct target_ops) <prepare_to_access_memory>: Update comment.
2053 <supports_z_point_type>: New field.
2054 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2055 instead of a char. Also take a raw breakpoint pointer.
2056 * win32-arm-low.c (the_low_target): Install NULL as
2057 supports_z_point_type.
2058 * win32-i386-low.c (i386_supports_z_point_type): New function.
2059 (i386_insert_point, i386_remove_point): Adjust to new interface.
2060 (the_low_target): Install i386_supports_z_point_type.
2061 * win32-low.c (win32_supports_z_point_type): New function.
2062 (win32_insert_point, win32_remove_point): Adjust to new interface.
2063 (win32_target_ops): Install win32_supports_z_point_type.
2064 * win32-low.h (struct win32_target_ops):
2065 <supports_z_point_type>: New method.
2066 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2067 instead of a char. Also take a raw breakpoint pointer.
2068
932539e3
PA
20692014-05-20 Pedro Alves <palves@redhat.com>
2070
2071 * mem-break.h: Include break-common.h.
2072 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2073 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2074 (Z_packet_to_target_hw_bp_type): New declaration.
2075 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2076 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2077 (Z_PACKET_ACCESS_WP): Delete macros.
2078 (Z_packet_to_hw_type): Delete function.
2079 * i386-low.h: Don't include break-common.h here.
2080 (Z_packet_to_hw_type): Delete declaration.
2081 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2082 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2083 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2084 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2085 * linux-aarch64-low.c: Don't include break-common.h here.
2086 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2087 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2088 (Z_packet_to_target_hw_bp_type): Delete function.
2089 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2090 function.
2091 (mips_insert_point, mips_remove_point): Use
2092 Z_packet_to_target_hw_bp_type.
2093
4ff0d3d8
PA
20942014-05-20 Pedro Alves <palves@redhat.com>
2095
2096 * linux-aarch64-low.c: Include break-common.h.
2097 (enum target_point_type): Delete.
2098 (Z_packet_to_point_type): Rename to ...
2099 (Z_packet_to_target_hw_bp_type): ... this, and return a
2100 target_hw_bp_type instead.
2101 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2102 instead of an enum target_point_type.
2103 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2104 breakpoint type.
2105 (aarch64_dr_state_insert_one_point)
2106 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2107 (aarch64_handle_aligned_watchpoint)
2108 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2109 Take an enum target_hw_bp_type instead of an enum
2110 target_point_type.
2111 (aarch64_supports_z_point_type): New function.
2112 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2113 use Z_packet_to_target_hw_bp_type.
2114
786dc519
JB
21152014-05-20 Joel Brobecker <brobecker@adacore.com>
2116
2117 * configure.ac: Only use -Werror by default when DEVELOPMENT
2118 is true.
2119 * configure: Regenerate.
2120
9e0aa64f
JK
21212014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2122
2123 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2124 * linux-x86-low.c (X86_64_USER_REGS): New.
2125 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2126
2b577b92
YQ
21272014-04-28 Yao Qi <yao@codesourcery.com>
2128
2129 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2130 name.
2131
94611da2
PA
21322014-04-25 Pedro Alves <palves@redhat.com>
2133
2134 PR server/16255
2135 * linux-low.c (linux_attach_fail_reason_string): New function.
2136 (linux_attach_lwp): Delete.
2137 (linux_attach_lwp_1): Rename to ...
2138 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2139 argument. Remove "initial" parameter. Return int instead of
2140 void. Don't error or warn here.
2141 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2142 failure to attach to the tgid. Call warning when failing to
2143 attach to an lwp.
2144 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2145 argument. Remove "initial" parameter. Return int instead of
2146 void. Don't error or warn here.
2147 (linux_attach_fail_reason_string): New declaration.
2148 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2149 interface change. Use linux_attach_fail_reason_string.
2150
01f9f808
MS
21512014-04-24 Michael Sturm <michael.sturm@mintel.com>
2152 Walfred Tedeschi <walfred.tedeschi@intel.com>
2153
2154 * Makefile.in: Added rules to handle new files
2155 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2156 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2157 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2158 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2159 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2160 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2161 x32-avx512-linux.o.
2162 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2163 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2164 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2165 i386/x32-avx512.xml.
2166 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2167 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2168 i386/x32-avx512-linux.xml.
2169 * i387-fp.c (num_avx512_k_registers): New constant for number
2170 of K registers.
2171 (num_avx512_zmmh_low_registers): New constant for number of
2172 lower ZMM registers (0-15).
2173 (num_avx512_zmmh_high_registers): New constant for number of
2174 higher ZMM registers (16-31).
2175 (num_avx512_ymmh_registers): New contant for number of higher
2176 YMM registers (ymm16-31 added by avx521 on x86_64).
2177 (num_avx512_xmm_registers): New constant for number of higher
2178 XMM registers (xmm16-31 added by AVX512 on x86_64).
2179 (struct i387_xsave): Add space for AVX512 registers.
2180 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2181 Add code to handle AVX512 registers.
2182 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2183 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2184 prototypei from generated file.
2185 (tdesc_amd64_avx512_linux): Likewise.
2186 (init_registers_x32_avx512_linux): Likewise.
2187 (tdesc_x32_avx512_linux): Likewise.
2188 (init_registers_i386_avx512_linux): Likewise.
2189 (tdesc_i386_avx512_linux): Likewise.
2190 (x86_64_regmap): Add AVX512 registers.
2191 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2192 mask.
2193 (initialize_low_arch): Add code to initialize AVX512 registers.
2194
51aa91f9
PA
21952014-04-23 Pedro Alves <palves@redhat.com>
2196
2197 * mem-break.c (find_gdb_breakpoint_at): Make static.
2198 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2199
a4165e94
PA
22002014-04-23 Pedro Alves <palves@redhat.com>
2201
2202 * i386-low.c: Don't include break-common.h here.
2203 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2204 prototype to take target_hw_bp_type as argument instead of a Z
2205 packet char.
2206 * i386-low.h: Include break-common.h here.
2207 (Z_packet_to_hw_type): Declare.
2208 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2209 prototypes.
2210 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2211 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2212 (x86_remove_point): Convert the packet number to a
2213 target_hw_bp_type before calling i386_low_remove_watchpoint.
2214 * win32-i386-low.c (i386_insert_point): Convert the packet number
2215 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2216 (i386_remove_point): Convert the packet number to a
2217 target_hw_bp_type before calling i386_low_remove_watchpoint.
2218
b8acf843
PA
22192014-04-23 Pedro Alves <palves@redhat.com>
2220
2221 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2222
d708bcd1
PA
22232014-04-10 Pedro Alves <palves@redhat.com>
2224
2225 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2226 Check if the condition or command is NULL before checking if the
2227 breakpoint is known. On success, return true.
2228 * mem-break.h (add_breakpoint_condition): Document return.
2229 (add_breakpoint_commands): Add describing comment.
2230 * server.c (skip_to_semicolon): New function.
2231 (process_point_options): Use it.
2232
2eec7d5b
PA
22332014-04-09 Pedro Alves <palves@redhat.com>
2234
2235 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2236 to lwpid_of.
2237
fa96cb38
PA
22382014-02-27 Pedro Alves <palves@redhat.com>
2239
2240 PR 12702
2241 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2242 macros.
2243 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2244 output.
2245 (last_thread_of_process_p): Take a PID argument instead of a
2246 thread pointer.
2247 (linux_wait_for_lwp): Delete.
2248 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2249 functions.
2250 (linux_low_filter_event): New function, party factored out from
2251 linux_wait_for_event.
2252 (linux_wait_for_event): Rename to ...
2253 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2254 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2255 sigsuspend. Check for zombie leaders.
2256 (linux_wait_for_event): Reimplement as wrapper around
2257 linux_wait_for_event_filtered.
2258 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2259 a normal or signal exit is seen, it's the whole process exiting.
2260 (wait_for_sigstop): No longer a for_each_inferior callback.
2261 Rewrite on top of linux_wait_for_event_filtered.
2262 (stop_all_lwps): Call wait_for_sigstop directly.
2263 * server.c (resume, handle_target_event): Handle
2264 TARGET_WAITKIND_NO_RESUMED.
2265
d763de10
JB
22662014-02-26 Joel Brobecker <brobecker@adacore.com>
2267
2268 * win32-low.c (psapi_get_dll_name,
2269 * win32_CreateToolhelp32Snapshot): Delete.
2270 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2271 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2272 Delete.
2273 (handle_load_dll): Add function description.
2274 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2275
850a0f76
JB
22762014-02-26 Joel Brobecker <brobecker@adacore.com>
2277
2278 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2279 Add comment.
2280 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2281 base address when calling win32_add_one_solib.
2282 (handle_load_dll): Delete local variable load_addr.
2283 Remove 0x1000 offset applied to DLL base address when calling
2284 win32_add_one_solib.
2285 (handle_unload_dll): Add comment.
2286
f25b3fc3
JB
22872014-02-26 Joel Brobecker <brobecker@adacore.com>
2288
2289 * win32-low.c (win32_add_all_dlls): Renames
2290 win32_ensure_ntdll_loaded. Rewrite function documentation.
2291 Adjust implementation to always load all DLLs.
2292 Add 0x1000 offset to DLL base address when calling
2293 win32_add_one_solib.
2294 (child_initialization_done): New static global.
2295 (do_initial_child_stuff): Set child_initialization_done to
2296 zero during child initialization, and 1 after. Replace call
2297 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2298 Add comment.
2299 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2300 (handle_unload_dll): Add function documentation.
2301 (get_child_debug_event): Ignore load and unload DLL events
2302 during child initialization.
2303
d86d4aaf
DE
23042014-02-20 Doug Evans <dje@google.com>
2305
3bc32da3 2306 Remove global all_lwps.
d86d4aaf
DE
2307 * inferiors.h (ptid_of): Move here from linux-low.h.
2308 (pid_of, lwpid_of): Ditto.
2309 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2310 parameter is a struct thread_info * now.
2311 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2312 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2313 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2314 directly.
2315 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2316 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2317 * linux-arm-low.c (update_registers_callback): Update, "entry"
2318 parameter is a struct thread_info * now.
2319 Fetch lwpid from current_inferior directly.
2320 (arm_insert_point): Pass &all_threads to find_inferior instead of
2321 &all_lwps.
2322 (arm_remove_point): Ditto.
2323 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2324 (arm_prepare_to_resume): Fetch pid from thread.
2325 (arm_read_description): Fetch lwpid from current_inferior directly.
2326 * linux-low.c (all_lwps): Delete.
2327 (delete_lwp): Delete call to remove_inferior.
2328 (handle_extended_wait): Fetch lwpid from thread.
2329 (add_lwp): Don't set lwp->entry.id. Remove call to
2330 add_inferior_to_list.
2331 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2332 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2333 (kill_one_lwp_callback): Ditto.
2334 (linux_kill): Don't dereference NULL pointer.
2335 Fetch ptid,lwpid from thread.
2336 (get_detach_signal): Fetch ptid from thread.
2337 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2338 Simplify call to regcache_invalidate_thread.
2339 (delete_lwp_callback): Update, "entry" parameter is a
2340 struct thread_info * now. Fetch pid from thread.
2341 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2342 (status_pending_p_callback): Update, "entry" parameter is a
2343 struct thread_info * now. Fetch ptid from thread.
2344 (find_lwp_pid): Update, "entry" parameter is a
2345 struct thread_info * now.
2346 (linux_wait_for_lwp): Fetch pid from thread.
2347 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2348 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2349 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2350 (dequeue_one_deferred_signal): Ditto.
2351 (cancel_breakpoint): Fetch ptid from current_inferior.
2352 (linux_wait_for_event): Pass &all_threads to find_inferior,
2353 not &all_lwps. Fetch ptid, lwpid from thread.
2354 (count_events_callback): Update, "entry" parameter is a
2355 struct thread_info * now.
2356 (select_singlestep_lwp_callback): Ditto.
2357 (select_event_lwp_callback): Ditto.
2358 (cancel_breakpoints_callback): Ditto.
2359 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2360 not &all_lwps.
2361 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2362 (unsuspend_one_lwp): Update, "entry" parameter is a
2363 struct thread_info * now.
2364 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2365 not &all_lwps.
2366 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2367 Fetch lwpid from thread, not lwp.
2368 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2369 Pass &all_threads to find_inferior, not &all_lwps.
2370 (send_sigstop): Fetch lwpid from thread, not lwp.
2371 (send_sigstop_callback): Update, "entry" parameter is a
2372 struct thread_info * now.
2373 (suspend_and_send_sigstop_callback): Ditto.
2374 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2375 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2376 struct thread_info * now.
2377 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2378 from thread, lwp.
2379 (lwp_running): Update, "entry" parameter is a
2380 struct thread_info * now.
2381 (stop_all_lwps): Fetch ptid from thread.
2382 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2383 (linux_resume_one_lwp): Fetch lwpid from thread.
2384 (linux_set_resume_request): Update, "entry" parameter is a
2385 struct thread_info * now. Fetch pid, lwpid from thread.
2386 (resume_status_pending_p): Update, "entry" parameter is a
2387 struct thread_info * now.
2388 (need_step_over_p): Ditto. Fetch lwpid from thread.
2389 (start_step_over): Fetch lwpid from thread.
2390 (linux_resume_one_thread): Update, "entry" parameter is a
2391 struct thread_info * now. Fetch lwpid from thread.
2392 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2393 (proceed_one_lwp): Update, "entry" parameter is a
2394 struct thread_info * now. Fetch lwpid from thread.
2395 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2396 struct thread_info * now.
2397 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2398 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2399 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2400 directly.
2401 (regsets_store_inferior_registers): Ditto.
2402 (fetch_register, store_register): Ditto.
2403 (linux_read_memory, linux_write_memory): Ditto.
2404 (linux_request_interrupt): Ditto.
2405 (linux_read_auxv): Ditto.
2406 (linux_xfer_siginfo): Ditto.
2407 (linux_qxfer_spu): Ditto.
2408 (linux_qxfer_libraries_svr4): Ditto.
2409 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2410 moved to inferiors.h.
2411 (get_lwp): Delete.
2412 (get_thread_lwp): Update.
2413 (struct lwp_info): Delete member "entry". Simplify comment for
2414 member "thread".
2415 (all_lwps): Delete.
2416 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2417 current_inferior directly.
2418 (update_watch_registers_callback): Update, "entry" parameter is a
2419 struct thread_info * now. Fetch pid from thread.
2420 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2421 (mips_insert_point): Fetch lwpid from current_inferior.
2422 Pass &all_threads to find_inferior, not &all_lwps.
2423 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2424 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2425 directly.
2426 (mips_stopped_data_address): Ditto.
2427 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2428 directly.
2429 * linux-tile-low.c (tile_arch_setup): Ditto.
2430 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2431 (update_debug_registers_callback): Update, "entry" parameter is a
2432 struct thread_info * now. Fetch pid from thread.
2433 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2434 Pass &all_threads to find_inferior, not &all_lwps.
2435 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2436 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2437 Pass &all_threads to find_inferior, not &all_lwps.
2438 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2439 (i386_dr_low_get_status): Ditto.
2440 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2441 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2442 (x86_linux_read_description): Ditto.
2443 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2444
3b8361aa
DE
24452014-02-20 Doug Evans <dje@google.com>
2446
2447 * inferiors.c (get_first_inferior): Fix buglet.
2448
f7667f0d
DE
24492014-02-19 Doug Evans <dje@google.com>
2450
2451 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2452 * inferiors.c (add_thread): Change result type to struct thread_info *.
2453 All callers updated.
2454 (add_lwp): Call add_thread here instead of in callers.
2455 All callers updated.
2456 * linux-low.h (get_lwp_thread): Rewrite.
2457 (struct lwp_info): New member "thread".
2458
b3312d80
DE
24592014-02-19 Doug Evans <dje@google.com>
2460
2461 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2462 All callers updated.
2463
ecc6f45c
DE
24642014-02-19 Doug Evans <dje@google.com>
2465
2466 * inferiors.c (add_thread): Fix whitespace.
2467
649ebbca
DE
24682014-02-19 Doug Evans <dje@google.com>
2469
2470 * dll.c (clear_dlls): Replace accessing list implemention details
2471 with API function.
2472 * gdbthread.h (get_first_thread): Declare.
2473 * inferiors.c (for_each_inferior_with_data): New function.
2474 (get_first_thread): New function.
2475 (find_thread_ptid): Simplify.
2476 (get_first_inferior): New function.
2477 (clear_list): Delete.
2478 (one_inferior_p): New function.
2479 (clear_inferior_list): New function.
2480 (clear_inferiors): Update.
2481 * inferiors.h (for_each_inferior_with_data): Declare.
2482 (clear_inferior_list): Declare.
2483 (one_inferior_p): Declare.
2484 (get_first_inferior): Declare.
2485 * linux-low.c (linux_wait_for_event): Replace accessing list
2486 implemention details with API function.
2487 * server.c (target_running): Ditto.
2488 (accumulate_file_name_length): New function.
2489 (emit_dll_description): New function.
2490 (handle_qxfer_libraries): Replace accessing list implemention
2491 details with API function.
2492 (handle_qxfer_threads_worker): New function.
2493 (handle_qxfer_threads_proper): Replace accessing list implemention
2494 details with API function.
2495 (handle_query): Ditto.
2496 (visit_actioned_threads_callback_ftype): New typedef.
2497 (visit_actioned_threads_data): New struct.
2498 (visit_actioned_threads): Rewrite to be find_inferior callback.
2499 (resume): Call find_inferior.
2500 (handle_status): Replace accessing list implemention
2501 details with API function.
2502 (process_serial_event): Replace accessing list implemention details
2503 with API function.
2504 * target.c (set_desired_inferior): Replace accessing list implemention
2505 details with API function.
2506 * tracepoint.c (same_process_p): New function.
2507 (gdb_agent_about_to_close): Replace accessing list implemention
2508 details with API function.
2509 * win32-low.c (child_delete_thread): Replace accessing list
2510 implemention details with API function.
2511 (match_dll_by_basename): New function.
2512 (dll_is_loaded_by_basename): New function.
2513 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2514 details call to dll_is_loaded_by_basename.
2515
80894984
DE
25162014-02-19 Doug Evans <dje@google.com>
2517
2518 * dll.h (struct dll_info): Add comment.
2519 * gdbthread.h (struct thread_info): Add comment.
2520 (current_ptid): Simplify.
2521 * inferiors.c (add_process): Update.
2522 (remove_process): Update.
2523 * inferiors.h (struct process_info): Rename member "head" to "entry".
2524 * linux-low.c (delete_lwp): Update.
2525 (add_lwp): Update.
2526 (last_thread_of_process_p): Update.
2527 (kill_one_lwp_callback, linux_kill): Update.
2528 (status_pending_p_callback): Update.
2529 (wait_for_sigstop): Update. Simplify read of ptid.
2530 (start_step_over): Update.
2531 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2532 (get_lwp_thread): Update.
2533 (struct lwp_info): Rename member "head" to "entry".
2534 * regcache.h (inferior_list_entry): Delete.
2535 * server.c (kill_inferior_callback): Update.
2536 (detach_or_kill_inferior_callback): Update.
2537 (print_started_pid): Update.
2538 (print_attached_pid): Update.
2539 (process_serial_event): Simplify read of ptid.
2540 * thread-db.c (thread_db_create_event): Update.
2541 (thread_db_get_tls_address): Update.
2542 * win32-low.c (current_inferior_ptid): Simplify.
2543
46917d26
TT
25442014-02-19 Tom Tromey <tromey@redhat.com>
2545
2546 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2547 argument.
2548 (target_supports_btrace): Update.
2549
0759a81e
YQ
25502014-02-14 Yao Qi <yao@codesourcery.com>
2551
2552 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2553 (rsp-low-ipa.o): New target.
2554
a7191e8b
TT
25552014-02-12 Tom Tromey <tromey@redhat.com>
2556
2557 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2558 convert_ascii_to_int.
2559 * regcache.c (registers_to_string): Likewise.
2560 * remote-utils.c (decode_M_packet): Likewise.
2561 * server.c (process_serial_event): Likewise.
2562
ff0e980e
TT
25632014-02-12 Tom Tromey <tromey@redhat.com>
2564
2565 * server.c (handle_query, handle_v_run): Use hex2bin, not
2566 unhexify.
2567 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2568
e9371aff
TT
25692014-02-12 Tom Tromey <tromey@redhat.com>
2570
2571 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2572 convert_int_to_ascii.
2573 * regcache.c (registers_to_string, collect_register_as_string):
2574 Likewise.
2575 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2576 Likewise.
2577 * server.c (process_serial_event): Likewise.
2578 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2579 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2580
971dc0b8
TT
25812014-02-12 Tom Tromey <tromey@redhat.com>
2582
2583 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2584 bin2hex, not hexify.
2585 * tracepoint.c (cmd_qtstatus): Likewise.
2586
0a822afb
TT
25872014-02-12 Tom Tromey <tromey@redhat.com>
2588
2589 * remote-utils.c (monitor_output): Pass explicit length to
2590 hexify.
2591
9c3d6531
TT
25922014-02-12 Tom Tromey <tromey@redhat.com>
2593
2594 * tracepoint.c: Include rsp-low.h.
2595 * server.c: Include rsp-low.h.
2596 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2597 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2598 declare.
2599 * remote-utils.c: Include rsp-low.h.
2600 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2601 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2602 (convert_int_to_ascii, convert_ascii_to_int): Move to
2603 common/rsp-low.c.
2604 * regcache.c: Include rsp-low.h.
2605 * ax.c: Include rsp-low.h.
2606 * Makefile.in (SFILES): Add common/rsp-low.c.
2607 (OBS): Add rsp-low.o.
2608 (rsp-low.o): New target.
2609
01fd3ea5
TT
26102014-02-12 Tom Tromey <tromey@redhat.com>
2611
2612 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2613 Include print-utils.h.
2614 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2615 (plongest, thirty_two, phex_nz): Remove.
2616 * Makefile.in (SFILES): Add common/print-utils.c.
2617 (OBS): Add print-utils.o.
2618 (print-utils-ipa.o): New target.
2619 (print-utils.o): New target.
2620 (IPA_OBJS): Add print-utils-ipa.o.
2621
e99dc820
TT
26222014-02-06 Tom Tromey <tromey@redhat.com>
2623
2624 * Makefile.in (SFILES): Fix indentation.
2625
ee1e2d4f
DE
26262014-02-05 Doug Evans <dje@google.com>
2627
2628 * linux-low.c (linux_wait_for_event): Improve comment.
2629 (linux_wait_1): Keep current_inferior in sync with event_child.
2630
f5a02773
DE
26312014-01-22 Doug Evans <dje@google.com>
2632
2633 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2634
87ce2a04
DE
26352014-01-22 Doug Evans <dje@google.com>
2636
2637 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2638 * configure: Regenerate.
2639 * config.in: Regenerate.
2640 * Makefile.in (SFILES): Add debug.c.
2641 (OBS): Add debug.o.
2642 * debug.c: New file.
2643 * debug.h: New file.
2644 * linux-aarch64-low.c (*): Update all debugging printfs to use
2645 debug_printf instead of fprintf.
2646 * linux-arm-low.c (*): Ditto.
2647 * linux-cris-low.c (*): Ditto.
2648 * linux-crisv32-low.c (*): Ditto.
2649 * linux-m32r-low.c (*): Ditto.
2650 * linux-sparc-low.c (*): Ditto.
2651 * linux-x86.c (*): Ditto.
2652 * linux-low.c (*): Ditto.
2653 (linux_wait_1): Add calls to debug_enter, debug_exit.
2654 (linux_wait): Remove redundant debugging printf.
2655 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2656 (linux_resume, unstop_all_lwps): Ditto.
2657 * mem-break.c (*): Update all debugging printfs to use
2658 debug_printf instead of fprintf.
2659 * remote-utils.c (*): Ditto.
2660 * thread-db.c (*): Ditto.
2661 * server.c #include <ctype.h>, "gdb_vecs.h".
2662 (debug_threads): Moved to debug.c.
2663 (*): Update all debugging printfs to use debug_printf instead of
2664 fprintf.
2665 (start_inferior): Replace call to fflush with call to debug_flush.
2666 (monitor_show_help): Mention set debug-format.
2667 (parse_debug_format_options): New function.
2668 (handle_monitor_command): Handle "monitor set debug-format".
2669 (gdbserver_usage): Mention --debug-format.
2670 (main): Parse --debug-format.
2671 * server.h (debug_threads): Declaration moved to debug.h.
2672 #include "debug.h".
2673 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2674 trace_debug_1 that uses debug_printf.
2675 (tracepoint_look_up_symbols): Update all debugging printfs to use
2676 debug_printf instead of fprintf.
2677
e671835b
BS
26782014-01-20 Baruch Siach <baruch@tkos.co.il>
2679
2680 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2681 sys/ptrace.h.
2682
b5737fa9
PA
26832014-01-17 Pedro Alves <palves@redhat.com>
2684
ea38d2a9 2685 PR build/16445
c7faa97a
PA
2686 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2687 defined after including gdb_proc_service.h.
b5737fa9 2688
40ed484e
DE
26892014-01-16 Doug Evans <dje@google.com>
2690
2691 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2692 (match_dll): Use it.
2693
969c39fb
MM
26942014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2695
2696 * target.h (target_ops) <read_btrace>: Change parameters and
2697 return type to allow error reporting.
2698 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2699 trace reading errors on.
2700 * linux-low.c (linux_low_read_btrace): Pass trace reading
2701 errors on.
2702 (linux_low_disable_btrace): New.
2703
ab7f45ba
DE
27042014-01-15 Doug Evans <dje@google.com>
2705
2706 * inferiors.c (thread_id_to_gdb_id): Delete.
2707 * inferiors.h (thread_id_to_gdb_id): Delete.
2708
66af0f44
EZ
27092014-01-13 Eli Zaretskii <eliz@gnu.org>
2710
2711 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2712 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2713 versions.
2714
9939e131
PA
27152014-01-08 Pedro Alves <palves@redhat.com>
2716
2717 * server.c (handle_status): Don't discard previous queued stop
2718 replies or thread's pending status here.
2719 (main) <disconnection>: Do it here instead.
2720
b7ea362b
PA
27212014-01-08 Pedro Alves <palves@redhat.com>
2722
2723 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2724 * server.c (visit_actioned_threads, handle_pending_status): New
2725 function.
2726 (handle_v_cont): Factor out parts to ...
2727 (resume): ... this new function. If in all-stop, and a thread
2728 being resumed has a pending status, report it without actually
2729 resuming.
2730 (myresume): Adjust to use the new 'resume' function.
2731 (clear_pending_status_callback, set_pending_status_callback)
2732 (find_status_pending_thread_callback): New functions.
2733 (handle_status): Handle the case of multiple threads having
2734 interesting statuses to report. Report threads' real last signal
2735 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2736 with an interesting thread to report the status for, instead of
2737 always reporting the status of the first thread.
2738
28498c42
JB
27392014-01-01 Joel Brobecker <brobecker@adacore.com>
2740
2741 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2742 * gdbreplay.c (gdbreplay_version): Likewise.
2743
f45c82da
YZ
27442013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2745
2746 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2747 iov.iov_len with the real length in use.
2748
379a5e2d
JB
27492013-12-13 Joel Brobecker <brobecker@adacore.com>
2750
2751 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2752 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2753 for all targets that use win32-low.c.
2754 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2755 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2756
4210d83e
PA
27572013-12-13 Pedro Alves <palves@redhat.com>
2758
2759 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2760 if equal to TARGET_WAITKIND_LOADED.
2761 * win32-low.c (cached_status): New static global.
2762 (win32_wait): Add declaration.
2763 (do_initial_child_stuff): Flush all initial pending debug events
2764 up to the initial breakpoint.
2765 (win32_wait): If CACHED_STATUS was set, return that instead
2766 of doing a real wait. Remove the code resuming the execution
2767 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2768 during the initial phase. Also remove the code changing
2769 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2770 TARGET_WAITKIND_STOPPED.
2771
e7f0d979
YQ
27722013-12-11 Yao Qi <yao@codesourcery.com>
2773
2774 * notif.c (handle_notif_ack): Return 0 if no notification
2775 matches.
2776
ebcf782c
DE
27772013-11-20 Doug Evans <dje@google.com>
2778
2779 * linux-low.c (linux_set_resume_request): Fix comment.
2780
20ad9378
DE
27812013-11-20 Doug Evans <dje@google.com>
2782
2783 * linux-low.c (resume_status_pending_p): Tweak comment.
2784
a196ebeb
WT
27852013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2786
2787 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2788 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2789 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2790 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2791 (srv_amd64_regobj): Add amd64-mpx.o.
2792 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2793 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2794 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2795 * i387-fp.c (num_pl_bnd_register) Added constant.
2796 (num_pl_bnd_cfg_registers) Added constant.
2797 (struct i387_xsave) Added reserved area and MPX fields.
2798 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2799 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2800 function.
2801 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2802 (init_registers_amd64_mpx_linux): Declare new function.
2803 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2804 (x86_64_regmap): Add MPX registers.
2805 (x86_linux_read_description): Add MPX case.
2806 (initialize_low_arch): Initialize MPX targets.
2807
0080a2f6
TT
28082013-11-18 Tom Tromey <tromey@redhat.com>
2809
2810 * configure: Rebuild.
2811 * configure.ac: Don't check for stdlib.h.
2812 * gdbreplay.c: Unconditionally include stdlib.h.
2813
2978b111
TT
28142013-11-18 Tom Tromey <tromey@redhat.com>
2815
2816 * config.in: Rebuild.
2817 * configure: Rebuild.
2818 * configure.ac: Don't use AC_HEADER_DIRENT.
2819
a3d08894
TT
28202013-11-18 Tom Tromey <tromey@redhat.com>
2821
2822 * server.h: Don't check HAVE_STRING_H.
2823 * gdbreplay.c: Don't check HAVE_STRING_H.
2824 * configure: Rebuild.
2825
0a5dd17d
TT
28262013-11-18 Tom Tromey <tromey@redhat.com>
2827
2828 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2829 LIBGNU.
2830
1bd2f0ba
TT
28312013-11-08 Tom Tromey <tromey@redhat.com>
2832
2833 * configure, config.in: Rebuild.
2834 * configure.ac: Remove unused configury.
2835
3266f10b
TT
28362013-11-08 Tom Tromey <tromey@redhat.com>
2837
2838 * acinclude.m4: Include common.m4, codeset.m4.
2839 * configure, config.in: Rebuild.
2840 * configure.ac: Use GDB_AC_COMMON.
2841
6682d959
AA
28422013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2843
2844 * linux-s390-low.c (HWCAP_S390_TE): New define.
2845 (s390_arch_setup): Consider the TE field in the HWCAP for
2846 determining 'have_regset_tdb'.
2847
fd0a4d76
SDJ
28482013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2849
2850 PR gdb/16014
2851 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2852 call to sizeof.
2853
1a3d890b
PA
28542013-10-02 Pedro Alves <palves@redhat.com>
2855
2856 * server.c (process_serial_event): Don't output "GDBserver
2857 exiting" if GDB is connected through stdio.
2858 * target.c (mywait): Likewise, be silent if GDB is connected
2859 through stdio.
2860
97ad4581
JB
28612013-10-01 Joel Brobecker <brobecker@adacore.com>
2862
2863 * lynx-low.c (lynx_add_threads_after_attach): New function.
2864 (lynx_attach): Remove call to add_thread. Add call to
2865 lynx_add_threads_after_attach instead.
2866
5b4e221c
MF
28672013-09-28 Mike Frysinger <vapier@gentoo.org>
2868
2869 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2870 * config.in, configure: Regenerated.
2871
ee47b2f8
YQ
28722013-09-18 Yao Qi <yao@codesourcery.com>
2873
2874 PR server/15959
2875 * server.c (start_inferior): Clear 'resume_info'.
2876
d6707650 28772013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2878
d6707650
JW
2879 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2880 for each register.
2881
9243dd0e 28822013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2883
9243dd0e
JW
2884 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2885 linux-tile-low.o to srv_tgtobj.
2886
c623a6ef
WN
28872013-09-16 Will Newton <will.newton@linaro.org>
2888
2889 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2890 out regs.
2891
fb71d39e
PA
28922013-09-06 Pedro Alves <palves@redhat.com>
2893
2894 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2895 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2896 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2897 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2898 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2899 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2900
8e7e9910
PA
29012013-09-06 Pedro Alves <palves@redhat.com>
2902
2903 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2904 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2905
7c3a12ca
PA
29062013-09-06 Pedro Alves <palves@redhat.com>
2907
2908 * linux-amd64-ipa.c: Include tracepoint.h.
2909 * linux-i386-ipa.c: Include tracepoint.h.
2910
8eb3d7b6
RW
29112013-09-06 Ricard Wanderlof <ricardw@axis.com>
2912
2913 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2914 (ps_get_thread_area): New function.
2915
eddddb9d
RW
29162013-09-06 Ricard Wanderlof <ricardw@axis.com>
2917
2918 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2919 (initialize_low_arch): Call init_registers_crisv32 rather than
2920 init_register_crisv32.
2921
533b0600
PA
29222013-09-05 Pedro Alves <palves@redhat.com>
2923
2924 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2925 to ...
2926 * hostio.h: ... this new file.
2927 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2928 win32-low.c: Include hostio.h.
2929
0ce3d3b5
PA
29302013-09-05 Pedro Alves <palves@redhat.com>
2931
2932 * server.h (gdb_client_data, handler_func, callback_handler_func)
2933 (delete_file_handler, add_file_handler, append_callback_event)
2934 (delete_callback_event, start_event_loop, initialize_event_loop):
2935 Move to event-loop.h and include it.
2936 * event-loop.h: New file.
2937
799cdc37
PA
29382013-09-05 Pedro Alves <palves@redhat.com>
2939
2940 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2941 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2942 (loaded_dll, unloaded_dll): Move to ...
2943 * dll.h: ... this new file.
2944 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2945
6a6bbd9d
PA
29462013-09-05 Pedro Alves <palves@redhat.com>
2947
2948 * server.h (current_process, get_thread_process, all_processes)
2949 (add_inferior_to_list, for_each_inferior, current_inferior)
2950 (remove_inferior, add_process, remove_process, find_process_pid)
2951 (have_started_inferiors_p, have_attached_inferiors_p)
2952 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2953 (clear_inferiors, find_inferior, find_inferior_id)
2954 (inferior_target_data, set_inferior_target_data)
2955 (inferior_regcache_data, set_inferior_regcache_data): Move to
2956 inferiors.h, and include it.
2957 * inferiors.h: New file.
2958
f699aaba
PA
29592013-09-05 Pedro Alves <palves@redhat.com>
2960
2961 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2962 Move ...
72f4393d 2963 * ax.h: ... here.
f699aaba 2964
c144c7a0
PA
29652013-09-05 Pedro Alves <palves@redhat.com>
2966
2967 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2968 tracepoint.h.
2969 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2970 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2971 (handle_tracepoint_general_set, handle_tracepoint_query)
2972 (tracepoint_finished_step, tracepoint_was_hit)
2973 (release_while_stepping_state_list, current_traceframe)
2974 (in_readonly_region, traceframe_read_mem)
2975 (fetch_traceframe_registers, traceframe_read_sdata)
2976 (traceframe_read_info, struct fast_tpoint_collect_status)
2977 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2978 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2979 (supply_fast_tracepoint_registers)
2980 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2981 (ipa_tdesc, claim_trampoline_space)
2982 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2983 (agent_mem_read, agent_get_trace_state_variable_value)
2984 (agent_set_trace_state_variable_value, agent_tsv_read)
2985 (agent_mem_read_string, get_raw_reg_func_addr)
2986 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2987 * tracepoint.h: ... this new file.
2988
ff42e6ab
PA
29892013-09-05 Pedro Alves <palves@redhat.com>
2990
2991 * server.h (perror_with_name, error, fatal, warning, paddress)
2992 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2993 include it.
2994 * utils.h: New file.
2995
541af0f4
PA
29962013-09-05 Pedro Alves <palves@redhat.com>
2997
2998 * server.h (remote_debug, noack_mode, transport_is_reliable)
2999 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3000 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3001 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3002 (write_enn, initialize_async_io, enable_async_io)
3003 (disable_async_io, check_remote_input_interrupt_request)
3004 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3005 (dead_thread_notify, prepare_resume_reply)
3006 (decode_address_to_semicolon, decode_address, decode_m_packet)
3007 (decode_M_packet, decode_X_packet, decode_xfer_write)
3008 (decode_search_memory_packet, unhexify, hexify)
3009 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3010 (look_up_one_symbol, relocate_instruction)
3011 (monitor_output): Move to remote-utils.h, and include it.
3012 * remote-utils.h: New file.
3013
eebdf26b
PA
30142013-09-05 Pedro Alves <palves@redhat.com>
3015
3016 * server.h (_): Delete.
3017
3aafd2ff
PA
30182013-09-02 Pedro Alves <palves@redhat.com>
3019
3020 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3021 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3022 allocated.
3023 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3024
cee83bcb
PM
30252013-09-02 Pierre Muller <muller@sourceware.org>
3026
3027 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3028 or WriteProcessMemory complete successfully and handle
3029 ERROR_PARTIAL_COPY error.
3030
9a13b2fa
PA
30312013-09-02 Pedro Alves <palves@redhat.com>
3032
3033 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3034 error instead of EIO.
3035
602e3198
JK
30362013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3037
3038 PR server/15604
3039 * linux-low.c: Include filestuff.h.
3040 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3041 * lynx-low.c: Include filestuff.h.
3042 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3043 * server.c: Include filestuff.h.
3044 (main): Call notice_open_fds.
3045 * spu-low.c: Include filestuff.h.
3046 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3047
96d7229d
LM
30482013-08-22 Luis Machado <lgustavo@codesourcery.com>
3049
3050 * Makefile.in: Explain why ../target and ../nat are not
3051 listed as include file search paths.
3052 (linux-waitpid.o): New object file rule.
3053 * configure.srv (srv_native_linux_obj): New variable.
3054 Replace all occurrences of linux native object files with
3055 $srv_native_linux_obj.
3056 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3057 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3058 (linux_enable_event_reporting): Remove declaration.
3059 (my_waitpid): Moved to common/linux-waitpid.c.
3060 (linux_wait_for_event): Pass ptid when calling
3061 linux_enable_event_reporting.
3062 (linux_supports_tracefork_flag): Remove.
3063 (linux_enable_event_reporting): Likewise.
3064 (linux_tracefork_grandchild): Remove.
3065 (STACK_SIZE): Moved to common/linux-ptrace.c.
3066 (linux_tracefork_child): Remove.
3067 (linux_test_for_tracefork): Remove.
3068 (linux_look_up_symbols): Call linux_supports_traceclone.
3069 (initialize_low): Remove call to linux_test_for_tracefork.
3070 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3071 common/linux-ptrace.h.
3072 (PTRACE_TYPE_ARG4): Likewise.
3073 Include linux-ptrace.h.
3074
32940073
PA
30752013-08-21 Pedro Alves <palves@redhat.com>
3076
3077 * config.in: Renegerate.
3078
33b60d58 30792013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 3080
33b60d58
LM
3081 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3082 (SFILES): Remove $(srcdir)/common/target-common.c and
3083 add $(srcdir)/target/waitstatus.c.
3084 (OBS): Remove target-common.o and add waitstatus.o.
3085 (server_h): Remove $(srcdir)/../common/target-common.h and
3086 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3087 and $(srcdir)/../target/waitstatus.h.
3088 (target-common.o): Remove.
3089 (waitstatus.o): New target object file.
3090 * target.h: Do not include target-common.h and
3091 include target/resume.h, target/wait.h and
3092 target/waitstatus.h.
3093
b8e1b30e
LM
30942013-08-13 Luis Machado <lgustavo@codesourcery.com>
3095
3096 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3097 to PTRACE_TYPE_ARG3.
3098 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3099 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3100 PTRACE_TYPE_ARG4.
3101 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3102 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3103
7a60ad40
YQ
31042013-07-27 Jie Zhang <jie@codesourcery.com>
3105 Daniel Jacobowitz <dan@codesourcery.com>
3106 Yao Qi <yao@codesourcery.com>
3107
3108 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3109 (mips-linux-watch.o): New rule.
3110 (mips_linux_watch_h): New variable.
3111 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3112 srv_tgtobj.
3113 * linux-mips-low.c: Include mips-linux-watch.h.
3114 (struct arch_process_info, struct arch_lwp_info): New.
3115 (update_watch_registers_callback): New function.
3116 (mips_linux_new_process, mips_linux_new_thread) New functions.
3117 (mips_linux_prepare_to_resume, mips_insert_point): New
3118 functions.
3119 (mips_remove_point, mips_stopped_by_watchpoint): New
3120 functions.
3121 (rsp_bp_type_to_target_hw_bp_type): New function.
3122 (mips_stopped_data_address): New function.
3123 (the_low_target): Add watchpoint support functions.
3124
de6f69ad
YQ
31252013-07-27 Yao Qi <yao@codesourcery.com>
3126
3127 * i386-low.c: Include break-common.h.
3128 (enum target_hw_bp_type): Remove.
3129
3360c0bf
LM
31302013-07-24 Luis Machado <lgustavo@codesourcery.com>
3131
3132 * Makefile.in (SFILES): /common/target-common.c.
3133 (OBS): Add target-common.o.
3134 (server_h): Add $(srcdir)/../common/target-common.h.
3135 (target-common.o): New target.
3136 * server.c (queue_stop_reply_callback): Free
3137 status string after use.
3138 * target.c (target_waitstatus_to_string): Remove.
3139 * target.h: Include target-common.h.
3140 (resume_kind): Likewise.
3141 (target_waitkind): Likewise.
3142 (target_waitstatus): Likewise.
3143 (TARGET_WNOHANG): Likewise.
3144
bd885420
YQ
31452013-07-04 Yao Qi <yao@codesourcery.com>
3146
3147 * Makefile.in (host_alias): Use @host_noncanonical@.
3148 (target_alias): Use @target_noncanonical@.
3149 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3150 ACX_NONCANONICAL_HOST.
3151 * configure: Regenerated.
3152
3153 Revert:
3154 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3155
3156 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3157 * configure: Rebuild.
3158 * Makefile.in (version_host, version_target): Get from configure.
3159 (version.c): Use $(version_host) and $(version_target).
3160
17ef446e
PA
31612013-07-03 Pedro Alves <palves@redhat.com>
3162
3163 * Makefile.in (config.status): Depend on development.sh.
3164 * acinclude.m4: Include libmcheck.m4.
3165 * configure: Regenerate.
3166
7a9a7487
MG
31672013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3168
3169 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3170 attribute inside the parentheses.
3171 (winapi_DebugSetProcessKillOnExit): Ditto.
3172 (winapi_DebugBreakProcess): Ditto.
3173 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 3174
49b64de6
MG
31752013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3176
3177 * notif.h (notif_event): Add a dummy member to avoid compiler
3178 errors.
3179
d5749ee7
PA
31802013-07-01 Pedro Alves <palves@redhat.com>
3181
3182 * hostio.c (HOSTIO_PATH_MAX): Define.
3183 (require_filename, handle_open, handle_unlink, handle_readlink):
3184 Use it.
3185
d8d2a3ee
PA
31862013-07-01 Pedro Alves <palves@redhat.com>
3187
3188 * server.h: Include "pathmax.h".
3189 * linux-low.c: Don't include sys/param.h.
3190 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3191 MAXPATHLEN.
3192 * win32-low.c: Don't include sys/param.h.
3193 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3194
bc7dea8d
PA
31952013-07-01 Pedro Alves <palves@redhat.com>
3196
3197 * event-loop.c: Don't check HAVE_UNISTD_H before including
3198 <unistd.h>.
3199 * gdbreplay.c: Likewise.
3200 * remote-utils.c: Likewise.
3201 * server.c: Likewise.
3202 * configure.ac: Don't check for unistd.h.
3203 * configure: Regenerate.
3204
d6c2da54
TT
32052013-06-28 Tom Tromey <tromey@redhat.com>
3206
3207 * Makefile.in (version.c): Use version.in, not
3208 common/version.in.
3209
257b6bec
MG
32102013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3211
3212 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3213 * configure: Rebuild.
3214 * Makefile.in (version_host, version_target): Get from configure.
3215 (version.c): Use $(version_host) and $(version_target).
3216
86ebe149
DK
32172013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3218
3219 Fix trace-status to output user name without trailing colon.
3220 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3221
f30aa5af
DK
32222013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3223
3224 Fix trace-status to output proper start-time and stop-time.
3225 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3226 output start time and stop time in hex as gdb expects.
3227
28a93511
YQ
32282013-06-26 Pedro Alves <pedro@codesourcery.com>
3229
3230 * tracepoint.c (build_traceframe_info_xml): Output trace state
3231 variables present in the trace buffer.
3232
01208463
TT
32332013-06-24 Tom Tromey <tromey@redhat.com>
3234
3235 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3236 create-version.sh.
3237 (version.o): Remove.
3238 * gdbreplay.c: Include version.h.
3239 (version, host_name): Don't declare.
3240 * server.h: Include version.h.
3241 (version, host_name): Don't declare.
3242
760256f9
PA
32432013-06-12 Pedro Alves <palves@redhat.com>
3244
3245 * linux-x86-low.c (linux_is_elf64): Delete global.
3246 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3247 with local linux_pid_exe_is_elf_64_file use.
3248
030031ee
PA
32492013-06-11 Pedro Alves <palves@redhat.com>
3250
3251 * linux-low.c (regset_disabled, disable_regset): New functions.
3252 (regsets_fetch_inferior_registers)
3253 (regsets_store_inferior_registers): Use them.
3254 (initialize_regsets_info); Don't allocate the disabled_regsets
3255 array here.
3256 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3257 comment.
3258
5da6eb0a
PA
32592013-06-11 Pedro Alves <palves@redhat.com>
3260
3261 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3262 xmalloc.
3263
7e5aaa09
PA
32642013-06-11 Pedro Alves <palves@redhat.com>
3265
3266 * linux-x86-low.c (initialize_low_arch): Call
3267 init_registers_x32_avx_linux.
3268
d878444c
JK
32692013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3270
3271 Fix compatibility with Android Bionic.
3272 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3273 it is not empty.
3274
3aee8918
PA
32752013-06-07 Pedro Alves <palves@redhat.com>
3276
5f2b57b5 3277 PR server/14823
3aee8918
PA
3278 * Makefile.in (OBS): Add tdesc.o.
3279 (IPA_OBJS): Add tdesc-ipa.o.
3280 (tdesc-ipa.o): New rule.
3281 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3282 interface.
3283 * linux-low.c (new_inferior): Delete.
3284 (disabled_regsets, num_regsets): Delete.
3285 (linux_add_process): Adjust to set the new per-process
3286 new_inferior flag.
3287 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3288 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3289 was a stop. When calling arch_setup, switch the current inferior
3290 to the thread that got an event.
3291 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3292 (regsets_fetch_inferior_registers)
3293 (regsets_store_inferior_registers): New regsets_info parameter.
3294 Adjust to use it.
3295 (linux_register_in_regsets): New regs_info parameter. Adjust to
3296 use it.
3297 (register_addr, fetch_register, store_register): New usrregs_info
3298 parameter. Adjust to use it.
3299 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3300 parameter regs_info. Adjust to use it.
3301 (linux_fetch_registers): Get the current inferior's regs_info, and
3302 adjust to use it.
3303 (linux_store_registers): Ditto.
3304 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3305 (initialize_low): Don't initialize the target_regsets here. Call
3306 initialize_low_arch.
3307 * linux-low.h (target_regsets): Delete declaration.
3308 (struct regsets_info): New.
3309 (struct usrregs_info): New.
3310 (struct regs_info): New.
3311 (struct process_info_private) <new_inferior>: New field.
3312 (struct linux_target_ops): Delete the num_regs, regmap, and
3313 regset_bitmap fields. New field regs_info.
3314 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3315 * i387-fp.c (num_xmm_registers): Delete.
3316 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3317 calls to new interface.
3318 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3319 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3320 Infer the number of xmm registers from the regcache's target
3321 description.
3322 * i387-fp.h (num_xmm_registers): Delete.
3323 * inferiors.c (add_thread): Don't install the thread's regcache
3324 here.
3325 * proc-service.c (gregset_info): Fetch the current inferior's
3326 regs_info. Adjust to use it.
3327 * regcache.c: Include tdesc.h.
3328 (register_bytes, reg_defs, num_registers)
3329 (gdbserver_expedite_regs): Delete.
3330 (get_thread_regcache): If the thread doesn't have a regcache yet,
3331 create one, instead of aborting gdbserver.
3332 (regcache_invalidate_one): Rename to ...
3333 (regcache_invalidate_thread): ... this.
3334 (regcache_invalidate_one): New.
3335 (regcache_invalidate): Only invalidate registers of the current
3336 process.
3337 (init_register_cache): Add target_desc parameter, and use it.
3338 (new_register_cache): Ditto. Assert the target description has a
3339 non zero registers_size.
3340 (regcache_cpy): Add assertions. Adjust.
3341 (realloc_register_cache, set_register_cache): Delete.
3342 (registers_to_string, registers_from_string): Adjust.
3343 (find_register_by_name, find_regno, find_register_by_number)
3344 (register_cache_size): Add target_desc parameter, and use it.
3345 (free_register_cache_thread, free_register_cache_thread_one)
3346 (regcache_release, register_cache_size): New.
3347 (register_size): Add target_desc parameter, and use it.
3348 (register_data, supply_register, supply_register_zeroed)
3349 (supply_regblock, supply_register_by_name, collect_register)
3350 (collect_register_as_string, collect_register_by_name): Adjust.
3351 * regcache.h (struct target_desc): Forward declare.
3352 (struct regcache) <tdesc>: New field.
3353 (init_register_cache, new_register_cache): Add target_desc
3354 parameter.
3355 (regcache_invalidate_thread): Declare.
3356 (regcache_invalidate_one): Delete declaration.
3357 (regcache_release): Declare.
3358 (find_register_by_number, register_cache_size, register_size)
3359 (find_regno): Add target_desc parameter.
3360 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3361 declarations.
3362 * remote-utils.c: Include tdesc.h.
3363 (outreg, prepare_resume_reply): Adjust.
3364 * server.c: Include tdesc.h.
3365 (gdbserver_xmltarget): Delete declaration.
3366 (get_features_xml, process_serial_event): Adjust.
3367 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3368 declare.
3369 (struct process_info) <tdesc>: New field.
3370 (ipa_tdesc): Declare.
3371 * tdesc.c: New file.
3372 * tdesc.h: New file.
3373 * tracepoint.c: Include tdesc.h.
3374 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3375 (get_context_regcache): Adjust to pass ipa_tdesc down.
3376 (do_action_at_tracepoint): Adjust to get the register cache size
3377 from the context regcache's description.
3378 (traceframe_walk_blocks): Adjust to get the register cache size
3379 from the current trace frame's description.
3380 (traceframe_get_pc): Adjust to get current trace frame's
3381 description and pass it down.
3382 (gdb_collect): Adjust to get the register cache size from the
3383 IPA's description.
3384 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3385 (gdbserver_xmltarget): Delete.
3386 (initialize_low_tracepoint): Set the ipa's target description.
3387 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3388 (initialize_low_tracepoint): Set the ipa's target description.
3389 * linux-x86-low.c: Include tdesc.h.
3390 [__x86_64__] (is_64bit_tdesc): New.
3391 (ps_get_thread_area, x86_get_thread_area): Use it.
3392 (i386_cannot_store_register): Rename to ...
3393 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3394 (i386_cannot_fetch_register): Rename to ...
3395 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3396 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3397 to new interface.
3398 (target_regsets): Rename to ...
3399 (x86_regsets): ... this.
3400 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3401 interface.
3402 (x86_siginfo_fixup): Use is_64bit_tdesc.
3403 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3404 (tdesc_x32_avx_linux, tdesc_x32_linux)
3405 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3406 Declare.
3407 (x86_linux_update_xmltarget): Delete.
3408 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3409 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3410 (AMD64_LINUX_USER64_CS): New.
3411 (x86_linux_read_description): New, based on
3412 x86_linux_update_xmltarget.
3413 (same_process_callback): New.
3414 (x86_arch_setup_process_callback): New.
3415 (x86_linux_update_xmltarget): New.
3416 (x86_regsets_info): New.
3417 (amd64_linux_regs_info): New.
3418 (i386_linux_usrregs_info): New.
3419 (i386_linux_regs_info): New.
3420 (x86_linux_regs_info): New.
3421 (x86_arch_setup): Reimplement.
3422 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3423 (x86_emit_ops): Ditto.
3424 (the_low_target): Adjust. Install x86_linux_regs_info,
3425 x86_cannot_fetch_register, and x86_cannot_store_register.
3426 (initialize_low_arch): New.
3427 * linux-ia64-low.c (tdesc_ia64): Declare.
3428 (ia64_fetch_register): Adjust.
3429 (ia64_usrregs_info, regs_info): New globals.
3430 (ia64_regs_info): New function.
3431 (the_low_target): Adjust.
3432 (initialize_low_arch): New function.
3433 * linux-sparc-low.c (tdesc_sparc64): Declare.
3434 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3435 Adjust.
3436 (sparc_arch_setup): New function.
3437 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3438 (the_low_target): Adjust.
3439 (initialize_low_arch): New function.
3440 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3441 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3442 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3443 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3444 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3445 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3446 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3447 (tdesc_powerpc_isa205_vsx64l): Declare.
3448 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3449 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3450 (ppc_set_pc, ppc_get_hwcap): Adjust.
3451 (ppc_usrregs_info): Forward declare.
3452 (!__powerpc64__) ppc_regmap_adjusted: New global.
3453 (ppc_arch_setup): Adjust to the current process'es target
3454 description.
3455 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3456 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3457 (ppc_store_evrregset): Adjust.
3458 (target_regsets): Rename to ...
3459 (ppc_regsets): ... this, and make static.
3460 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3461 (ppc_regs_info): New function.
3462 (the_low_target): Adjust.
3463 (initialize_low_arch): New function.
3464 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3465 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3466 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3467 (tdesc_s390x_linux64v2): Declare.
3468 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3469 (s390_fill_gregset, s390_store_last_break): Adjust.
3470 (target_regsets): Rename to ...
3471 (s390_regsets): ... this, and make static.
3472 (s390_get_pc, s390_set_pc): Adjust.
3473 (s390_get_hwcap): New target_desc parameter, and use it.
3474 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3475 (s390_arch_setup): Adjust to set the current process'es target
3476 description. Don't adjust the regmap.
3477 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3478 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3479 (regs_info_3264): New globals.
3480 (s390_regs_info): New function.
3481 (the_low_target): Adjust.
3482 (initialize_low_arch): New function.
3483 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3484 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3485 [__mips64] (init_registers_mips_linux)
3486 (init_registers_mips_dsp_linux): Delete defines.
3487 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3488 (have_dsp): New global.
3489 (mips_read_description): New, based on mips_arch_setup.
3490 (mips_arch_setup): Reimplement.
3491 (get_usrregs_info): New function.
3492 (mips_cannot_fetch_register, mips_cannot_store_register)
3493 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3494 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3495 (target_regsets): Rename to ...
3496 (mips_regsets): ... this, and make static.
3497 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3498 (dsp_regs_info, regs_info): New globals.
3499 (mips_regs_info): New function.
3500 (the_low_target): Adjust.
3501 (initialize_low_arch): New function.
3502 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3503 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3504 Declare.
3505 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3506 (arm_read_description): New, with bits factored from
3507 arm_arch_setup.
3508 (arm_arch_setup): Reimplement.
3509 (target_regsets): Rename to ...
3510 (arm_regsets): ... this, and make static.
3511 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3512 (arm_regs_info): New function.
3513 (the_low_target): Adjust.
3514 (initialize_low_arch): New function.
3515 * linux-m68k-low.c (tdesc_m68k): Declare.
3516 (target_regsets): Rename to ...
3517 (m68k_regsets): ... this, and make static.
3518 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3519 (m68k_regs_info): New function.
3520 (m68k_arch_setup): New function.
3521 (the_low_target): Adjust.
3522 (initialize_low_arch): New function.
3523 * linux-sh-low.c (tdesc_sharch): Declare.
3524 (target_regsets): Rename to ...
3525 (sh_regsets): ... this, and make static.
3526 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3527 (sh_regs_info, sh_arch_setup): New functions.
3528 (the_low_target): Adjust.
3529 (initialize_low_arch): New function.
3530 * linux-bfin-low.c (tdesc_bfin): Declare.
3531 (bfin_arch_setup): New function.
3532 (bfin_usrregs_info, regs_info): New globals.
3533 (bfin_regs_info): New function.
3534 (the_low_target): Adjust.
3535 (initialize_low_arch): New function.
3536 * linux-cris-low.c (tdesc_cris): Declare.
3537 (cris_arch_setup): New function.
3538 (cris_usrregs_info, regs_info): New globals.
3539 (cris_regs_info): New function.
3540 (the_low_target): Adjust.
3541 (initialize_low_arch): New function.
3542 * linux-cris-low.c (tdesc_crisv32): Declare.
3543 (cris_arch_setup): New function.
3544 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3545 (cris_regs_info): New function.
3546 (the_low_target): Adjust.
3547 (initialize_low_arch): New function.
3548 * linux-m32r-low.c (tdesc_m32r): Declare.
3549 (m32r_arch_setup): New function.
3550 (m32r_usrregs_info, regs_info): New globals.
3551 (m32r_regs_info): Adjust.
3552 (initialize_low_arch): New function.
3553 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3554 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3555 (tic6x_usrregs_info): Forward declare.
3556 (tic6x_read_description): New function, based on ...
3557 (tic6x_arch_setup): ... this. Reimplement.
3558 (target_regsets): Rename to ...
3559 (tic6x_regsets): ... this, and make static.
3560 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3561 (tic6x_regs_info): New function.
3562 (the_low_target): Adjust.
3563 (initialize_low_arch): New function.
3564 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3565 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3566 (target_regsets): Rename to ...
3567 (xtensa_regsets): ... this, and make static.
3568 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3569 globals.
3570 (xtensa_arch_setup, xtensa_regs_info): New functions.
3571 (the_low_target): Adjust.
3572 (initialize_low_arch): New function.
3573 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3574 (nios2_arch_setup): Set the current process'es tdesc.
3575 (target_regsets): Rename to ...
3576 (nios2_regsets): ... this.
3577 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3578 (nios2_regs_info): New function.
3579 (the_low_target): Adjust.
3580 (initialize_low_arch): New function.
a261b8f5
PA
3581 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3582 (aarch64_arch_setup): Set the current process'es tdesc.
3583 (target_regsets): Rename to ...
3584 (aarch64_regsets): ... this.
3585 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3586 (aarch64_regs_info): New function.
3587 (the_low_target): Adjust.
3588 (initialize_low_arch): New function.
3aee8918
PA
3589 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3590 globals.
3591 (target_regsets): Rename to ...
3592 (tile_regsets): ... this.
3593 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3594 (tile_regs_info): New function.
3595 (tile_arch_setup): Set the current process'es tdesc.
3596 (the_low_target): Adjust.
3597 (initialize_low_arch): New function.
3598 * spu-low.c (tdesc_spu): Declare.
3599 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3600 * win32-arm-low.c (tdesc_arm): Declare.
3601 (arm_arch_setup): New function.
3602 (the_low_target): Install arm_arch_setup instead of
3603 init_registers_arm.
3604 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3605 (init_windows_x86): Rename to ...
3606 (i386_arch_setup): ... this. Set `win32_tdesc'.
3607 (the_low_target): Adjust.
3608 * win32-low.c (win32_tdesc): New global.
3609 (child_add_thread): Don't create the thread cache here.
3610 (do_initial_child_stuff): Set the new process'es tdesc.
3611 * win32-low.h (struct target_desc): Forward declare.
3612 (win32_tdesc): Declare.
3613 * lynx-i386-low.c (tdesc_i386): Declare global.
3614 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3615 * lynx-low.c (lynx_tdesc): New global.
3616 (lynx_add_process): Set the new process'es tdesc.
3617 * lynx-low.h (struct target_desc): Forward declare.
3618 (lynx_tdesc): Declare global.
3619 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3620 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3621 * nto-low.c (nto_tdesc): New global.
3622 (do_attach): Set the new process'es tdesc.
3623 * nto-low.h (struct target_desc): Forward declare.
3624 (nto_tdesc): Declare.
3625 * nto-x86-low.c (tdesc_i386): Declare.
3626 (nto_x86_arch_setup): Set `nto_tdesc'.
3627
b1fbec62
GB
36282013-06-04 Gary Benson <gbenson@redhat.com>
3629
3630 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3631 to qSupported response when appropriate.
3632 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3633 with nonzero-length annex.
3634 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3635 arguments supplied in annex.
3636
d1ec4ce7
DE
36372013-05-31 Doug Evans <dje@google.com>
3638
ac44adcb 3639 PR server/15594
d1ec4ce7
DE
3640 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3641 64 bits in 64-cross-32 environment.
3642
9b25f2d3
PA
36432013-05-28 Pedro Alves <palves@redhat.com>
3644
3645 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3646 (aarch64-without-fpu.c): Delete rule.
3647 * configure.srv (aarch64*-*-linux*): Remove references to
3648 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3649 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3650 declaration.
3651
6740dc9c
PA
36522013-05-24 Pedro Alves <palves@redhat.com>
3653
3654 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3655 instead of strchr/decode_address. Error if the range isn't split
3656 with a ','. Don't assume there's be a ':' in the action.
3657
c2d6af84
PA
36582013-05-23 Yao Qi <yao@codesourcery.com>
3659 Pedro Alves <palves@redhat.com>
3660
3661 * linux-low.c (lwp_in_step_range): New function.
3662 (linux_wait_1): If the thread was range stepping and stopped
3663 outside the stepping range, report the stop to GDB. Otherwise,
3664 continue stepping. Add range stepping debug output.
3665 (linux_set_resume_request): Copy the step range from the resume
3666 request to the lwp.
3667 (linux_supports_range_stepping): New.
3668 (linux_target_ops) <supports_range_stepping>: Set to
3669 linux_supports_range_stepping.
3670 * linux-low.h (struct linux_target_ops)
3671 <supports_range_stepping>: New field.
3672 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3673 * linux-x86-low.c (x86_supports_range_stepping): New.
3674 (the_low_target) <supports_range_stepping>: Set to
3675 x86_supports_range_stepping.
3676 * server.c (handle_v_cont): Handle 'r' action.
3677 (handle_v_requests): Append ";r" if the target supports range
3678 stepping.
3679 * target.h (struct thread_resume) <step_range_start,
3680 step_range_end>: New fields.
3681 (struct target_ops) <supports_range_stepping>:
3682 New field.
3683 (target_supports_range_stepping): New macro.
3684
58794e1a
JB
36852013-05-17 Joel Brobecker <brobecker@adacore.com>
3686
3687 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3688 confusion in comment.
3689
d631c5a7
JB
36902013-05-17 Joel Brobecker <brobecker@adacore.com>
3691
3692 * lynx-low.c (struct process_info_private): New type.
3693 (lynx_add_process): New function.
3694 (lynx_create_inferior, lynx_attach): Replace calls to
3695 add_process by calls to lynx_add_process.
3696 (lynx_resume): If PTID is null, then try using
3697 current_process()->private->last_wait_event_ptid.
3698 Add comments.
3699 (lynx_clear_inferiors): Delete. The contents of that function
3700 has been inlined in lynx_mourn;
3701 (lynx_wait_1): Save the ptid in the process's private data.
3702 (lynx_mourn): Free the process' private data. Replace call
3703 to lynx_clear_inferiors by call to clear_inferiors.
3704
96f7a20f
YQ
37052013-05-17 Yao Qi <yao@codesourcery.com>
3706
3707 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3708 the right place.
3709
db0dfaa0
LM
37102013-05-16 Luis Machado <lgustavo@codesourcery.com>
3711
3712 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3713 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3714 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3715 PT_TEXT_END_ADDR guards. Update comments.
3716 (linux_target_op) <read_offsets>: Conditionally define to
3717 linux_read_offsets if the target is UCLIBC and if it defines
3718 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3719
68f5f838
SL
37202013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3721 Andrew Jenner <andrew@codesourcery.com>
3722
3723 * Makefile.in (SFILES): Add linux-nios2-low.c.
3724 (clean): Add action to delete nios2-linux.c.
3725 (nios2-linux.c): New rule.
3726 * configure.srv: Add nios2*-*-linux*.
3727 * linux-nios2-low.c: New.
3728
1ebff1fd
HAQ
37292013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3730
3731 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3732
f6150862
HZ
37332013-04-25 Hui Zhu <hui@codesourcery.com>
3734
3735 PR gdb/15186
f6150862
HZ
3736 * ax.c (ax_printf): Add fflush.
3737
614c279d
TT
37382013-04-22 Tom Tromey <tromey@redhat.com>
3739
3740 * Makefile.in (SFILES): Add filestuff.c.
3741 (OBS): Add filestuff.o.
3742 (filestuff.o): New target.
3743 * config.in, configure: Rebuild.
3744 * configure.ac: Check for fdwalk, pipe2.
3745
7d4e5717
PA
37462013-04-17 Pedro Alves <palves@redhat.com>
3747
3748 * configure.ac (USE_THREAD_DB): Delete variable.
3749 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3750 Don't AC_SUBST USE_THREAD_DB.
3751 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3752 * config.in, configure: Regenerate.
3753
d5c93e41
PA
37542013-04-16 Pedro Alves <palves@redhat.com>
3755
3756 * linux-low.h (struct lwp_info) <thread_known>: Move under
3757 the USE_THREAD_DB #ifdef.
3758
04f5fe89
PA
37592013-04-16 Pedro Alves <palves@redhat.com>
3760
3761 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3762 (linux-low.o): Delete rule.
3763 * linux-low.h: Always include "gdb_thread_db.h" instead of
3764 conditionally including thread_db.h.
3765 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3766 HAVE_THREAD_DB_H.
3767
480b27bf
JK
37682013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3769
3770 * Makefile.in (install-only): Fix make install regression.
3771
43662968
JK
37722013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3773
3774 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3775 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3776 installation.
3777 * gdbserver.1: Remove.
3778
3e74e146
PA
37792013-03-22 Pedro Alves <palves@redhat.com>
3780
3781 * linux-low.c (handle_extended_wait): Don't call
3782 linux_enable_event_reporting.
3783
a8347a2a
TT
37842013-03-15 Tony Theodore <tonyt@logyst.com>
3785
3786 PR build/9098:
3787 * Makefile.in (SHELL): Use @SHELL@.
3788
eeb56fa7
SDJ
37892013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3790
3791 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3792 compiler warning.
3793
4fa7e2ff
JB
37942013-03-13 Joel Brobecker <brobecker@adacore.com>
3795
3796 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3797 Remove extraneous NULL element.
3798
8ddb1965
YQ
37992013-03-13 Yao Qi <yao@codesourcery.com>
3800
3801 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3802 'V' block in trace frame.
3803
9accd112
MM
38042013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3805
3806 * target.h (struct target_ops): Add btrace ops.
3807 (target_supports_btrace): New macro.
3808 (target_enable_btrace): New macro.
3809 (target_disable_btrace): New macro.
3810 (target_read_btrace): New macro.
3811 * gdbthread.h (struct thread_info): Add btrace field.
3812 * server.c: Include btrace-common.h.
3813 (handle_btrace_general_set): New function.
3814 (handle_btrace_enable): New function.
3815 (handle_btrace_disable): New function.
3816 (handle_general_set): Call handle_btrace_general_set.
3817 (handle_qxfer_btrace): New function.
3818 (struct qxfer qxfer_packets[]): Add btrace entry.
3819 * inferiors.c (remove_thread): Disable btrace.
3820 * linux-low: Include linux-btrace.h.
3821 (linux_low_enable_btrace): New function.
3822 (linux_low_read_btrace): New function.
3823 (linux_target_ops): Add btrace ops.
3824 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3825 Add srv_linux_btrace=yes.
3826 (x86_64-*-linux*): Add linux-btrace.o.
3827 Add srv_linux_btrace=yes.
3828 * configure.ac: Define HAVE_LINUX_BTRACE.
3829 * config.in: Regenerated.
3830 * configure: Regenerated.
3831
5cc22e4c
MM
38322013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3833
3834 * server.c (handle_qxfer): Preserve error message if -3 is
3835 returned.
3836 (qxfer): Document the -3 return value.
3837
7c97f91e
MM
38382013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3839
3840 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3841 (linux_btrace_h): New variable.
3842 (linux-btrace.o): New rule.
3843
be9a119c 38442013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3845 Hafiz Abid Qadeer <abidh@codesourcery.com>
3846
3847 * tracepoint.c (trace_buffer_size): New global.
3848 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3849 (init_trace_buffer): Change to one-argument function. Allocate
3850 trace buffer memory.
3851 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3852 handle QTBuffer:size packet.
3853 (cmd_bigqtbuffer_size): New function.
3854 (initialize_tracepoint): Call init_trace_buffer with
3855 DEFAULT_TRACE_BUFFER_SIZE.
3856 * server.c (handle_query): Add QTBuffer:size in the
3857 supported packets.
3858
e64f7499
YQ
38592013-03-07 Yao Qi <yao@codesourcery.com>
3860
3861 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3862 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3863 of -1.
3864 (cmd_qtsp): Adjust condition. Do post increment.
3865 Set cur_action and cur_step_action back to 0.
3866
f0ae6fc3
PA
38672013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3868
3869 PR server/15236
3870 * linux-low.c (linux_write_memory): Return early success if LEN is
3871 zero.
3872
b5b0b0af
CV
38732013-03-05 Corinna Vinschen <vinschen@redhat.de>
3874
334ad4a8 3875 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3876
589bc927
TT
38772013-02-28 Tom Tromey <tromey@redhat.com>
3878
3879 * configure.ac: Invoke AC_SYS_LARGEFILE.
3880 * configure, config.in: Rebuild.
3881
dfe07582
CV
38822013-02-28 Corinna Vinschen <vinschen@redhat.com>
3883
3884 * win32-low.c: Throughout, fix format strings and casts of
3885 printf-like functions to avoid type related warnings on all
3886 platforms.
3887 (get_child_debug_event): Print dwDebugEventCode as hex since
3888 that's how it's usually documented.
3889
736cd585
YQ
38902013-02-28 Yao Qi <yao@codesourcery.com>
3891
3892 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3893 pulongest.
3894
e1f58301
JW
38952013-02-27 Jiong Wang <jiwang@tilera.com>
3896
3897 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3898 (reg-tilegx32.c): New rule.
3899 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3900 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3901 different register info initializer according to elf class.
3902 (init_registers_tilgx32): New function. The tilegx32 register info
3903 initializer.
3904 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3905 (tile_store_gregset): Likewise.
3906
d171ca78
YQ
39072013-02-27 Yao Qi <yao@codesourcery.com>
3908
3909 * server.c (process_point_options): Print debug message when
3910 debug_threads is true.
3911
282bbdf3
YQ
39122013-02-26 Yao Qi <yao@codesourcery.com>
3913
3914 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3915
aca22551
PA
39162013-02-19 Pedro Alves <palves@redhat.com>
3917 Kai Tietz <ktietz@redhat.com>
3918
3919 PR gdb/15161
3920
3921 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3922 instead of strtoul to extract address from packet.
3923 (process_serial_event) <'z'>: Likewise.
3924
4f3cee1c
YQ
39252013-02-18 Yao Qi <yao@codesourcery.com>
3926
3927 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3928
8e1d55a3
PA
39292013-02-14 Pedro Alves <palves@redhat.com>
3930
3931 Plug memory leak.
3932
3933 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3934 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3935
458820da
PA
39362013-02-14 Pedro Alves <palves@redhat.com>
3937
3938 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3939
baea0dae
PA
39402013-02-14 Pedro Alves <palves@redhat.com>
3941
3942 * tracepoint.c (save_string): Delete.
3943 (add_tracepoint_action): Use savestring instead of save_string.
3944
0b1afbb3
PA
39452013-02-12 Pedro Alves <palves@redhat.com>
3946
3947 * linux-xtensa-low.c: Ditto.
3948 * xtensa-xtregs.c: Ditto.
3949
8a4ac37e
PA
39502013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3951
3952 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3953 thread_db.
3954
148de6bb
MS
39552013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3956
3957 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3958 aarch64_num_wp_regs and aarch64_num_bp_regs to
3959 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3960
55fac6e0
MS
39612013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3962
3963 * linux-aarch64-low.c (ps_get_thread_area): Replace
3964 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3965
176eb98c
MS
39662013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3967 Marcus Shawcroft <marcus.shawcroft@arm.com>
3968 Nigel Stephens <nigel.stephens@arm.com>
3969 Yufeng Zhang <yufeng.zhang@arm.com>
3970
3971 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3972 (aarch64.c, aarch64-without-fpu.c): New targets.
3973 * configure.srv (aarch64*-*-linux*): New.
3974 * linux-aarch64-low.c: New file.
3975
56f7af9c
MS
39762013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3977
43aaf8b6 3978 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3979 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3980 (dequeue_one_deferred_signal, linux_resume_one_thread)
3981 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3982 (linux_tracefork_grandchild, linux_test_for_tracefork)
3983 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3984 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3985 where the argument is 0.
3986
60f662b0
YQ
39872013-01-25 Yao Qi <yao@codesourcery.com>
3988
3989 * event-loop.c: Include "queue.h".
3990 (gdb_event_p): New typedef.
3991 (struct gdb_event) <next_event>: Remove.
3992 (event_queue): Change to QUEUE(gdb_event_p).
3993 (async_queue_event): Remove.
3994 (gdb_event_xfree): New.
3995 (initialize_event_loop): New.
3996 (process_event): Use API from QUEUE.
3997 (wait_for_event): Likewise.
3998 * server.c (main): Call initialize_event_loop.
3999 * server.h (initialize_event_loop): Declare.
4000
5ae4861a
YQ
40012013-01-18 Yao Qi <yao@codesourcery.com>
4002
4003 * ax.h (struct eval_agent_expr_context): New.
4004 (gdb_eval_agent_expr): Update declaration.
4005 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4006 TFRAME. Add new argument CTX.
4007 * server.h (struct eval_agent_expr_context): Declare.
4008 (agent_mem_read, agent_tsv_read): Update declaration.
4009 (agent_mem_read_string): Likewise.
4010 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4011 (add_traceframe_block): Add new argument TPOINT.
4012 Increase TPOINT->traceframe_usage.
4013 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4014 eval_tracepoint_agent_expr.
4015 (condition_true_at_tracepoint): Likewise.
4016 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4017 (agent_mem_read_string, agent_tsv_read): Likewise.
4018
85e00e85
YQ
40192013-01-16 Yao Qi <yao@codesourcery.com>
4020
4021 * linux-low.c (linux_resume_one_lwp): Don't check
4022 'lwp->bp_reinsert != 0'.
4023
4039cf45
JB
40242013-01-07 Joel Brobecker <brobecker@adacore.com>
4025 Pedro Alves <palves@redhat.com>
4026
4027 * lynx-low.c (ptrace_request_to_str): Define a temporary
4028 macro and use it to simplify this function's implementation.
4029
9044dee2
JB
40302013-01-07 Joel Brobecker <brobecker@adacore.com>
4031
4032 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4033 sets errno.
4034
e6352c8f
JB
40352013-01-07 Joel Brobecker <brobecker@adacore.com>
4036
4037 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4038
50681a27
JB
40392013-01-07 Joel Brobecker <brobecker@adacore.com>
4040
4041 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4042
3f6e77ef
JB
40432013-01-07 Joel Brobecker <brobecker@adacore.com>
4044
4045 * lynx-low.c (lynx_resume): Use the resume_info parameter
4046 to determine the ptid for the lynx_ptrace call, unless
4047 it is equal to minus_one_ptid, in which case we use the
4048 ptid of the current_inferior.
4049 (lynx_wait_1): After having received a thread create/exit
4050 event, resume the inferior's execution using the signaling
4051 thread's ptid, rather than the old ptid.
4052
7fda33ae
JB
40532013-01-07 Joel Brobecker <brobecker@adacore.com>
4054
4055 * lynx-low.c (lynx_resume): Delete variable ret.
4056
b9786c74
JB
40572013-01-01 Joel Brobecker <brobecker@adacore.com>
4058
4059 * gdbreplay.c (gdbreplay_version): Update copyright year.
4060 * server.c (gdbserver_version): Likewise.
4061
8b93d60f
JB
40622012-12-17 Joel Brobecker <brobecker@adacore.com>
4063
4064 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4065 new thread.
4066
037335a7
JB
40672012-12-17 Joel Brobecker <brobecker@adacore.com>
4068
4069 * lynx-low.c (ptrace_request_to_str): Add handling for
4070 PTRACE_GETTRACESIG.
4071
52d4cbd8
JB
40722012-12-17 Joel Brobecker <brobecker@adacore.com>
4073
4074 * lynx-low.c (lynx_attach): Delete variable new_process.
4075
ab8f6ca9
JB
40762012-12-17 Joel Brobecker <brobecker@adacore.com>
4077
4078 * lynx-low.c (lynx_create_inferior): Delete variable
4079 new_process.
4080
78cbc024
JB
40812012-12-17 Joel Brobecker <brobecker@adacore.com>
4082
4083 * lynx-low.c (ptrace_request_to_str): Do not handle
4084 PTRACE_GETTHREADLIST if this macro does not exist.
4085
14a00470
YQ
40862012-12-15 Yao Qi <yao@codesourcery.com>
4087
4088 * Makefile.in (OBS): Add notif.o.
4089 * notif.c, notif.h: New.
4090 * server.c: Include "notif.h".
4091 (struct vstop_notif) <next>: Remove.
4092 <base>: New field.
4093 (queue_stop_reply): Update.
4094 (push_event, send_next_stop_reply): Remove.
4095 (discard_queued_stop_replies): Update.
4096 (notif_stop): New variable.
4097 (handle_v_stopped): Remove.
4098 (handle_v_requests): Don't call handle_v_stopped. Call
4099 handle_ack_notif instead.
4100 (queue_stop_reply_callback): Call notif_event_enque instead
4101 of queue_stop_reply.
4102 (handle_status): Don't call send_next_stop_reply, call
4103 notif_write_event instead.
4104 (kill_inferior_callback): Likewise.
4105 (detach_or_kill_inferior_callback): Likewise.
4106 (main): Call initialize_notif.
4107 (process_serial_event): Call QUEUE_is_empty.
4108 (handle_target_event): Call notif_push instead of push event.
4109 * server.h (push_event): Remove declaration.
4110
61c125b9
TT
41112012-12-10 Tom Tromey <tromey@redhat.com>
4112
4113 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4114 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4115 macros.
4116 (.c.o): Rewrite.
4117 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4118 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4119 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4120 (amd64-linux-ipa.o, ax.o): Rewrite.
4121 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4122 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4123 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4124 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4125 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4126 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4127 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4128 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4129 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4130 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4131 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4132 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4133 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4134 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4135 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4136 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4137 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4138 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4139 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4140 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4141 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4142 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4143 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4144 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4145 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4146 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4147 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4148 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4149 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4150 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4151 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4152 (reg-tilegx.o): Remove.
4153 (all_object_files): New macro.
4154 Include .deps files.
4155 * aclocal.m4, configure: Rebuild.
4156 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4157 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4158 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4159
e90e9ad9
TT
41602012-12-05 Tom Tromey <tromey@redhat.com>
4161
4162 PR gdb/14917:
4163 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4164
02d403bf 41652012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
4166
4167 * configure.ac: Check for linux/perf_event.h.
4168 * config.in: Regenerated.
4169 * configure: Regenerated.
4170
0270a750
PA
41712012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4172
4173 * hostio.c (handle_readlink): Decrease buffer size
4174 parameter passed to readlink by one byte.
4175
8c29b58e
YQ
41762012-11-26 Yao Qi <yao@codesourcery.com>
4177
4178 * configure.ac (build_warnings): Append '-Wempty-body'.
4179 * configure: Regenerated.
4180 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4181 body.
4182
8bdce1ff
PM
41832012-11-15 Pierre Muller <muller@sourceware.org>
4184
4185 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4186 * config.in: Regenerate.
4187 * configure: Regenerate.
4188 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4189 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4190 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4191 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4192 header.
4193 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4194 instead of <sys/wait.h> header.
4195 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4196
02d403bf 41972012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
4198
4199 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4200 (various make rules): Remove -DGDBSERVER
4201
fbd5db48
YQ
42022012-11-09 Yao Qi <yao@codesourcery.com>
4203
4204 * spu-low.c (current_ptid): Move it to ..
4205 * gdbthread.h: ... here. New.
4206 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4207 * server.c (myresume, process_serial_event): Likewise.
4208 * thread-db.c (thread_db_find_new_threads): Likewise.
4209 * tracepoint.c (run_inferior_command): Likewise.
4210
b3dc46ff
AB
42112012-10-01 Andrew Burgess <aburgess@broadcom.com>
4212
4213 * server.c (handle_search_memory_1): Include access length in
4214 warning message.
4215
07c04788
HPN
42162012-09-05 Michael Brandt <michael.brandt@axis.com>
4217
4218 * linux-crisv32-low.c: Fix compile errors.
4219
918d227b
YQ
42202012-09-04 Yao Qi <yao@codesourcery.com>
4221
4222 * tracepoint.c (cmd_qtsv): Adjust debug message.
4223 Don't check CUR_TPOINT.
4224
18c1b81a
YQ
42252012-08-28 Yao Qi <yao@codesourcery.com>
4226
4227 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4228 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4229 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4230 Remove declarations of xmalloc, xreallloc, xstrdup and
4231 freeargv.
4232 * Makefile.in (libiberty_h): New.
4233 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4234 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4235
dc82f37b
YQ
42362012-08-23 Yao Qi <yao@codesourcery.com>
4237
4238 * server.h: Remove declaration of 'xsnprintf'.
4239
406b1477
KS
42402012-08-22 Keith Seitz <keiths@redhat.com>
4241
4242 * server.h: Include build-gnulib-gbserver/config.h.
4243 * gdbreplay.c: Likewise.
4244
e6712ff1
DE
42452012-08-08 Doug Evans <dje@google.com>
4246
4247 * Makefile.in (SFILES): Add gdb_vecs.c.
4248 (OBS): Add gdb_vecs.o.
4249 (gdb_vecs_h, host_defs_h): New variables.
4250 (thread-db.o): Add $(gdb_vecs_h) dependency.
4251 (gdb_vecs.o): New rule.
4252 * thread-db.c: #include "gdb_vecs.h".
4253 (thread_db_load_search): Use a vector to iterate over path elements.
4254 Handle text appearing after "$pdir".
4255
4256 * configure.ac: Add check for strstr.
4257 * config.in: Regenerate.
4258 * configure: Regenerate.
4259
7c3270ae
UW
42602012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4261
4262 * hostio.c (handle_pread): If pread fails, fall back to attempting
4263 lseek/read.
4264 (handle_pwrite): Likewise for pwrite.
4265
b62e2b27
UW
42662012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4267
4268 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4269 between unsupported TYPE and unimplementable ADDR/LEN combination.
4270 (arm_insert_point): Act on new return value.
4271
78a99e91
PA
42722012-07-31 Pedro Alves <palves@redhat.com>
4273
4274 * server.c (process_point_options): Only skip tokens if we find
4275 one that is unrecognized. Don't treat 'X' specially while
4276 skipping unrecognized tokens.
4277
fcf303ab
UW
42782012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4279
4280 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4281 to 4-byte-align HW breakpoint addresses for Thumb.
4282
7255706c
YQ
42832012-07-27 Yao Qi <yao@codesourcery.com>
4284
4285 PR remote/14161.
4286
4287 * server.h: Declare gdb_agent_about_to_close.
4288 * target.c (kill_inferior): Include "agent.h".
4289 New. Send command 'kill'.
4290 * target.h (kill_inferior): Removed macro.
4291 * tracepoint.c (gdb_agent_about_to_close): New.
4292 (gdb_agent_helper_thread): Handle command 'close'.
4293 Wait endlessly until the inferior stops.
4294 Install gdb_agent_remove_socket to atexit hook.
4295 (agent_socket_name): New static variable.
4296 (gdb_agent_socket_init): Replace local variable 'name' with
4297 'agent_socket_name'.
4298 (gdb_agent_remove_socket): New.
4299
5a3f286f
YQ
43002012-07-27 Yao Qi <yao@codesourcery.com>
4301
4302 * server.c (process_point_options): Stop at 'X' when parsing.
4303
961bd387
ME
43042012-07-19 Michael Eager <eager@eagercon.com>
4305
a261b8f5 4306 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
4307 to hw_execute.
4308 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4309 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4310 hardware breakpoint.
4311
aa7c7447
JK
43122012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4313
4314 * gdbserver/linux-low.c (initialize_low): Call
4315 linux_ptrace_init_warnings.
4316
7f216e7c
DE
43172012-07-02 Doug Evans <dje@google.com>
4318
4319 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4320 pointer to int.
4321
d3ce09f5
SS
43222012-07-02 Stan Shebs <stan@codesourcery.com>
4323
4324 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4325 (ax.o): Add it to build rule.
4326 (ax-ipa.o): Ditto.
4327 (OBS): Add format.o.
4328 (IPA_OBS): Add format.o.
4329 * server.c (handle_query): Claim support for breakpoint commands.
4330 (process_point_options): Add command case.
4331 (process_serial_event): Leave running if there are printfs in
4332 effect.
4333 * mem-break.h (any_persistent_commands): Declare.
4334 (add_breakpoint_commands): Declare.
4335 (gdb_no_commands_at_breakpoint): Declare.
4336 (run_breakpoint_commands): Declare.
4337 * mem-break.c (struct point_command_list): New struct.
4338 (struct breakpoint): New field command_list.
4339 (any_persistent_commands): New function.
4340 (add_commands_to_breakpoint): New function.
4341 (add_breakpoint_commands): New function.
4342 (gdb_no_commands_at_breakpoint): New function.
4343 (run_breakpoint_commands): New function.
4344 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4345 locally.
4346 * ax.c: Include format.h.
4347 (ax_printf): New function.
4348 (gdb_eval_agent_expr): Add printf opcode.
4349
2f8f6aed
YQ
43502012-06-13 Yao Qi <yao@codesourcery.com>
4351
4352 * server.c (start_inferior): Remove duplicated writes to fields
4353 'last_resume_kind' and 'last_status' of 'current_inferior'.
4354
0c9070b3
YQ
43552012-06-12 Yao Qi <yao@codesourcery.com>
4356 Pedro Alves <palves@redhat.com>
4357
4358 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4359 comment.
4360 * server.c (handle_v_cont): Extend comment.
4361
c52daf70
YQ
43622012-06-11 Yao Qi <yao@codesourcery.com>
4363
4364 * linux-low.c (linux_attach): Add 'static'.
4365
d38bbb0a
YQ
43662012-06-06 Yao Qi <yao@codesourcery.com>
4367
4368 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4369
89dc0afd
JK
43702012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4371
4372 Fix gcc -flto compilation warning.
4373 * server.c (main): Make variable multi_mode and attach volatile.
4374
75f62ce7
TJB
43752012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4376
4377 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4378 if the platform doesn't know about it.
4379
65f479b6
PA
43802012-05-30 Jeff Kenton <jkenton@tilera.com>
4381
4382 * Makefile.in (SFILES): Add linux-tile-low.c.
4383 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4384 * configure.srv: Handle tilegx-*-linux*.
4385 * linux-tile-low.c: New file.
4386
0c5bf5a9
JK
43872012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4388
4389 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4390
a493e3e2
PA
43912012-05-24 Pedro Alves <palves@redhat.com>
4392
4393 PR gdb/7205
4394
43aaf8b6 4395 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4396
2ea28649
PA
43972012-05-24 Pedro Alves <palves@redhat.com>
4398
4399 PR gdb/7205
4400
4401 Replace target_signal with gdb_signal throughout.
4402
8d409d16
MR
44032012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4404
4405 * linux-low.c (linux_store_registers): Avoid the copying sequence
4406 when no data has been retrieved by ptrace.
4407
23512c01
MGD
44082012-05-22 Will Deacon <will.deacon@arm.com>
4409
4410 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4411 Include asm/ptrace.h.
4412 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4413 already defined.
4414
4934b29e
MR
44152012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4416
4417 * linux-low.c (linux_store_registers): Don't re-retrieve data
4418 with ptrace that has already been obtained from /proc. Always
4419 copy any data retrieved with ptrace to the buffer supplied.
4420
bde24c0a
PA
44212012-05-11 Yao Qi <yao@codesourcery.com>
4422 Pedro Alves <palves@redhat.com>
4423
4424 * linux-low.c (enum stopping_threads_kind): New.
4425 (stopping_threads): Change type to `enum stopping_threads_kind'.
4426 (handle_extended_wait): If stopping and suspending threads, leave
4427 the new_lwp suspended too.
4428 (linux_wait_for_event): Adjust.
4429 (stop_all_lwps): Set `stopping_threads' to
4430 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4431 whether we're suspending threads or just stopping them. Assert no
4432 recursion happens.
4433
623b6bdf
YQ
44342012-04-29 Yao Qi <yao@codesourcery.com>
4435
4436 * server.h: Move some code to ...
4437 * gdbthread.h: ... here. New.
4438 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4439 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4440 (nto-low.o, win32-low.o): Likewise.
4441 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4442 * regcache.c, remote-utils.c, server.c: Likewise.
4443 * target.c, tracepoint.c, win32-low.c: Likewise.
4444
f15f9948
TJB
44452012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4446
4447 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4448 (PTRACE_ARG4_TYPE): Likewise.
4449 (PTRACE_XFER_TYPE): Likewise.
4450 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4451 ptrace to PTRACE_ARG3_TYPE.
4452 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4453 (PTRACE_ARG4_TYPE): Likewise.
4454 (PTRACE_XFER_TYPE): Likewise.
4455 (linux_detach_one_lwp): Cast fourth argument of
4456 ptrace to long then PTRACE_ARG4_TYPE.
4457 (regsets_fetch_inferior_registers): Cast third argument of
4458 ptrace to long then PTRACE_ARG3_TYPE.
4459 (regsets_store_inferior_registers): Likewise.
4460
38ea300a
PA
44612012-04-20 Pedro Alves <palves@redhat.com>
4462
4463 * configure: Regenerate.
4464
c971b7fa
PA
44652012-04-19 Pedro Alves <palves@redhat.com>
4466
43aaf8b6 4467 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4468 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4469 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4470 (all, install-only, uninstall, clean-info, all-lib, clean): No
4471 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4472 (maintainer-clean realclean distclean): Use subdir_do.
4473 (subdir_do): New.
4474 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4475 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4476 * acinclude.m4: Include acx_configure_dir.m4.
4477 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4478 calls. Call AC_PROG_RANLIB. Configure gnulib using
4479 ACX_CONFIGURE_DIR.
4480 (GNULIB): New.
4481 (GNULIB_STDINT_H): Adjust.
4482 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4483 * gdbreplay.c: Include build-gnulib/config.h.
4484 * server.h: Likewise.
4485 * aclocal.m4: Regenerate.
4486 * config.in: Regenerate.
4487 * configure: Regenerate.
c971b7fa 4488
809277f8
PA
44892012-04-19 Pedro Alves <palves@redhat.com>
4490
4491 * Makefile.in (LIBGNU, INCGNU): Adjust.
4492 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4493 (all, install-only, uninstall, clean-info, all-lib, clean)
4494 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4495 * configure.ac: Adjust AC_OUTPUT output.
4496 * aclocal.m4: Regenerate.
4497 * configure: Regenerate.
4498
fd9bb8b8
PA
44992012-04-19 Pedro Alves <palves@redhat.com>
4500
4501 * Makefile.in (generated_files): New.
4502 (server_h): Remove the explicit dependency on config.h, and depend
4503 on $generated_files.
4504
1c298c66
PA
45052012-04-19 Pedro Alves <palves@redhat.com>
4506
4507 * Makefile.in (INCGNU): Add -Ignulib.
4508
57c4b50b
PA
45092012-04-19 Pedro Alves <palves@redhat.com>
4510
4511 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4512 (INCGNU): ... this, and spell out -I here.
4513 (GNULIB_LIB): Rename to ...
4514 (LIBGNU): ... this.
4515 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4516
1030e047
PA
45172012-04-19 Pedro Alves <palves@redhat.com>
4518
4519 * config.in: Regenerate.
4520
447d4319
PA
45212012-04-19 Pedro Alves <palves@redhat.com>
4522
4523 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4524 * server.h (memmem): Remove declaration.
4525 * config.in: Regenerate.
4526 * configure: Regenerate.
4527
aad9eab9
YQ
45282012-04-19 Yao Qi <yao@codesourcery.com>
4529
4530 * Makefile.in (SFILES): Add common/vec.c.
4531 (OBS): Add vec.o.
4532 (vec.o): New rule.
4533
3e10640f
YQ
45342012-04-19 Yao Qi <yao@codesourcery.com>
4535
4536 * remote-utils.c (prepare_resume_reply): Replace with macro
4537 target_core_of_thread.
4538 * server.c (handle_qxfer_threads_proper): Likewise.
4539 * target.h (traget_core_of_thread): New macro.
4540
71622373
PA
45412012-04-18 Pedro Alves <palves@redhat.com>
4542
4543 * aclocal.m4: Regenerate.
4544 * configure: Regenerate.
4545
80d26939
YQ
45462012-04-16 Yao Qi <yao@codesourcery.com>
4547
4548 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4549 duplicated on address.
4550
42476b70
YQ
45512012-04-16 Yao Qi <yao@codesourcery.com>
4552
4553 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4554 (struct tracepoint_action_ops) <send>: New field.
4555 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4556 (agent_expr_send, x_tracepoint_action_send): New.
4557 (l_tracepoint_action_send): New.
4558 (cmd_qtdp): Download and install tracepoint
4559 according to `use_agent'.
4560 (run_inferior_command): Add one more parameter `len'.
4561 Update callers.
4562 (tracepoint_send_agent): New.
4563 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4564
7bc83639
YQ
45652012-04-16 Yao Qi <yao@codesourcery.com>
4566
4567 * tracepoint.c (download_tracepoints): Moved to ...
4568 (cmd_qtstart): ... here.
4569
5f18041e
YQ
45702012-04-14 Yao Qi <yao@codesourcery.com>
4571
4572 * tracepoint.c: Include inttypes.h.
4573 (struct collect_memory_action): Use sized types.
4574 (struct tracepoint): Likewise.
4575 (cmd_qtdp, stop_tracing): Update print specifiers.
4576 (cmd_qtp, response_tracepoint): Likewise.
4577 (collect_data_at_tracepoint): Likewise.
4578 (collect_data_at_step): Likewise.
4579
55a8c076
YQ
45802012-04-14 Yao Qi <yao@codesourcery.com>
4581
4582 Import gnulib module inttypes.
4583 * aclocal.m4, config.in, configure: Regenerated.
4584
dc750257
YQ
45852012-04-14 Yao Qi <yao@codesourcery.com>
4586
4587 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4588 Makefile and config.status at last.
4589
0ab5faf9
YQ
45902012-04-13 Yao Qi <yao@codesourcery.com>
4591
4592 * tracepoint.c: Include stdint.h unconditionally.
4593
18f5fd81
TJB
45942012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4595
4596 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4597 on BFD_HAVE_SYS_PROCFS_TYPE.
4598 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4599 * configure: Regenerate.
4600 * config.in: Likewise.
4601
4d47af5c
L
46022012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4603
4604 * Makefile.in (clean): Also remove x32.c x32-linux.c
4605 x32-avx.c x32-avx-linux.c.
4606 (x32.o): New target.
4607 (x32.c): Likewise.
4608 (x32-linux.o): Likewise.
4609 (x32-linux.c): Likewise.
4610 (x32-avx.o): Likewise.
4611 (x32-avx.c): Likewise.
4612 (x32-avx-linux.o): Likewise.
4613 (x32-avx-linux.c): Likewise.
4614
4615 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4616 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4617 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4618 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4619 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4620 i386/x32-avx-linux.xml.
4621
4622 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4623 (init_registers_x32_avx_linux): Likwise.
4624 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4625 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4626
ecedbe58
PA
46272012-04-13 Pedro Alves <palves@redhat.com>
4628
4629 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4630 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4631 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4632 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4633 the sub-make.
4634
c92b5177
L
46352012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4636
4637 * linux-x86-low.c (compat_x32_clock_t): New.
4638 (compat_x32_siginfo_t): Likewise.
4639 (compat_x32_siginfo_from_siginfo): Likewise.
4640 (siginfo_from_compat_x32_siginfo): Likewise.
4641 (linux_is_elf64): Likewise.
4642 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4643 and siginfo_from_compat_x32_siginfo for x32.
4644 (x86_arch_setup): Set linux_is_elf64.
4645
214d508e
L
46462012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4647
4648 PR gdb/13969
4649 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4650 e_machine field.
4651 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4652 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4653 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4654 compatible with process.
4655
c9a1864a
YQ
46562012-04-12 Yao Qi <yao@codesourcery.com>
4657
4658 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4659 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4660 (install-only, install-info, clean): Handle sub dir gnulib.
4661 (all-lib, am--refresh): New targets.
4662 (memmem.o): Remove target.
4663 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4664 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4665 (AC_REPLACE_FUNCS): Remove memmem.
4666 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4667 (AC_OUTPUT): Generate Makefile in gnulib/.
4668 * aclocal.m4, config.in, configure: Regenerated.
4669
367ba2c2
MR
46702012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4671
4672 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4673
9d236627
PA
46742012-04-05 Pedro Alves <palves@redhat.com>
4675
4676 -Werror=strict-aliasing
4677
4678 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4679 pointer.
4680
111217b3
PA
46812012-04-04 Pedro Alves <palves@redhat.com>
4682
4683 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4684 (sparc_store_gregset_from_stack, sparc_store_gregset)
4685 (sparc_breakpoint_at): Fix formatting.
4686
8365dcf5
TJB
46872012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4688
4689 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4690 are available.
4691 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4692 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4693 * config.in: Regenerate.
4694 * configure: Likewise.
4695
689cc2ae
PA
46962012-03-29 Pedro Alves <palves@redhat.com>
4697
4698 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4699 Correct ptrace arguments.
4700
c14dfd32
PA
47012012-03-28 Pedro Alves <palves@redhat.com>
4702
4703 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4704 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4705 (IA64_FR1_REGNUM): New defines.
4706 (ia64_fetch_register): New.
4707 (the_low_target): Install it.
4708 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4709 field.
4710 * linux-low.c (linux_fetch_registers): Try the
4711 the_low_target.fetch_register hook first.
4712
4713 * linux-arm-low.c (the_low_target): Adjust.
4714 * linux-bfin-low.c (the_low_target): Adjust.
4715 * linux-cris-low.c (the_low_target): Adjust.
4716 * linux-crisv32-low.c (the_low_target): Adjust.
4717 * linux-m32r-low.c (the_low_target): Adjust.
4718 * linux-m68k-low.c (the_low_target): Adjust.
4719 * linux-mips-low.c (the_low_target): Adjust.
4720 * linux-ppc-low.c (the_low_target): Adjust.
4721 * linux-s390-low.c (the_low_target): Adjust.
4722 * linux-sh-low.c (the_low_target): Adjust.
4723 * linux-sparc-low.c (the_low_target): Adjust.
4724 * linux-tic6x-low.c (the_low_target): Adjust.
4725 * linux-x86-low.c (the_low_target): Adjust.
4726 * linux-xtensa-low.c (the_low_target): Adjust.
4727
63c88e13
PA
47282012-03-26 Pedro Alves <palves@redhat.com>
4729
4730 * server.c (handle_qxfer_libraries): Don't bail early if
4731 the_target->qxfer_libraries_svr4 is not NULL.
4732
fb723180
PA
47332012-03-26 Pedro Alves <palves@redhat.com>
4734
4735 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4736
0afae3cf
PA
47372012-03-23 Pedro Alves <palves@redhat.com>
4738
4739 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4740 "library-list-svr4" element's start tag when the the DSO list is
4741 empty.
4742
485f1ee4
PA
47432012-03-23 Pedro Alves <palves@redhat.com>
4744
4745 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4746 a variable whose type size is the same as the inferior's pointer
4747 size.
4748
a5362b9a
TS
47492012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4750
4751 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4752 struct siginfo.
4753 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4754 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4755 * linux-low.h: Include <signal.h>.
4756 (struct siginfo): Remove forward declaration.
4757 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4758 struct siginfo.
4759
d226c142
MF
47602012-03-21 Mike Frysinger <vapier@gentoo.org>
4761
4762 * .gitignore: Ignore more files.
4763
122f36ef
PA
47642012-03-19 Pedro Alves <palves@redhat.com>
4765 Jan Kratochvil <jan.kratochvil@redhat.com>
4766
4767 * server.c (cont_thread, general_thread): Add describing comments.
4768 (start_inferior): Clear `cont_thread'.
4769 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4770 of a process.
4771
fc3e5175
YQ
47722012-03-15 Yao Qi <yao@codesourcery.com>
4773
4774 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4775 handling to ...
4776 (cmd_qtdp): ... here.
4777
8d0d92cd
YQ
47782012-03-15 Yao Qi <yao@codesourcery.com>
4779
4780 * tracepoint.c (struct tracepoint_action_ops): New.
4781 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4782 (m_tracepoint_action_download): New.
4783 (r_tracepoint_action_download): New.
4784 (x_tracepoint_action_download): New.
4785 (l_tracepoint_action_download): New.
4786 (add_tracepoint_action): Install `action->ops' according type.
4787 (download_tracepoint_1): Move code `download' function pointer
4788 of various tracepoint_action_ops.
4789
87b0bb13
JK
47902012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4791
4792 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4793 linux_ptrace_attach_warnings.
4794
5f572dec
JK
47952012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4796
4797 * Makefile.in (linux-ptrace.o): New.
4798 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4799 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4800 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4801 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4802 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4803 of these targets.
4804 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4805
f4647387
YQ
48062012-03-08 Yao Qi <yao@codesourcery.com>
4807 Pedro Alves <palves@redhat.com>
4808
4809 Fix PR server/13392.
4810 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4811 offset of JMP insn.
4812 * tracepoint.c (remove_tracepoint): New.
4813 (cmd_qtdp): Call remove_tracepoint when failed to install.
4814
9b224c5e
PA
48152012-03-07 Pedro Alves <palves@redhat.com>
4816
4817 * linux-low.c (get_detach_signal): New.
4818 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4819 Pass on pending signals to PTRACE_DETACH. Check the result of the
4820 ptrace call.
4821 * server.c (program_signals, program_signals_p): New.
4822 (handle_general_set): Handle QProgramSignals.
4823 * server.h (program_signals, program_signals_p): Declare.
4824
e237a7e2
JK
48252012-03-05 Pedro Alves <palves@redhat.com>
4826 Jan Kratochvil <jan.kratochvil@redhat.com>
4827
4828 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4829 New comment why.
4830
5808517f
YQ
48312012-03-03 Yao Qi <yao@codesourcery.com>
4832
4833 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4834 agent_look_up_symbols.
4835
58b4daa5
YQ
48362012-03-03 Yao Qi <yao@codesourcery.com>
4837
4838 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4839 (linux-x86-low.o): Likewise.
4840 * server.h: Remove in_process_agent_loaded.
4841 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4842 common/agent.c.
4843 Update callers.
4844
8ffcbaaf
YQ
48452012-03-03 Yao Qi <yao@codesourcery.com>
4846
4847 * tracepoint.c (gdb_agent_capability): New global.
4848 (in_process_agent_loaded_ust): Renamed to
4849 `in_process_agent_supports_ust'.
4850 Update callers.
4851 (in_process_agent_supports_ust): Call agent_capability_check.
4852 (clear_installed_tracepoints): Assert that agent supports
4853 agent.
4854
d1feda86
YQ
48552012-03-03 Yao Qi <yao@codesourcery.com>
4856
4857 * linux-low.c (linux_supports_agent): New.
4858 (linux_target_ops): Initialize field `supports_agent' with
4859 linux_supports_agent.
4860 * target.h (struct target_ops) <supports_agent>: New.
4861 (target_supports_agent): New macro.
4862 * server.c (handle_general_set): Handle packet 'QAgent'.
4863 (handle_query): Send `QAgent+'.
4864 * Makefile.in (server.o): Depends on agent.h.
4865
2fa291ac
YQ
48662012-03-03 Yao Qi <yao@codesourcery.com>
4867
4868 * Makefile.in (OBS): Add agent.o.
4869 Add new rule for agent.o.
4870 Track dependence of tracepoint.c on agent.h.
4871 * tracepoint.c (run_inferior_command_1):
4872 (run_inferior_command): Call agent_run_command.
4873 (gdb_ust_connect_sync_socket): Deleted. Move it to
4874 common/agent.c.
4875 (resume_thread, stop_thread): Likewise.
4876 (gdb_ust_socket_init): Renamed to ...
4877 (gdb_agent_socket_init): ... New.
4878 (gdb_ust_thread): Renamed to ...
4879 (gdb_agent_helper_thread): ... New.
4880 (gdb_ust_init): Move some code to ...
4881 (gdb_agent_init): ... here. New.
4882 [HAVE_UST]: Call gdb_ust_init.
4883 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4884 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4885 * config.in, configure: Regenerated.
4886
05044653
PA
48872012-03-02 Pedro Alves <palves@redhat.com>
4888
4889 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4890 * linux-low.c (struct simple_pid_list): New.
4891 (stopped_pids): New a struct simple_pid_list pointer.
4892 (add_to_pid_list, pull_pid_from_list): New.
4893 (handle_extended_wait): Don't assume the first signal new children
4894 report is SIGSTOP. Adjust call to pull_pid_from_list.
4895 (linux_wait_for_lwp): Adjust.
4896
8d00225b
YQ
48972012-03-02 Yao Qi <yao@codesourcery.com>
4898
4899 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4900 debug log.
4901
19560ba5
YQ
49022012-03-02 Yao Qi <yao@codesourcery.com>
4903
4904 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4905 `stop_pc' and `tpoint'. Update caller.
4906
1faeff08
MR
49072012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4908
4909 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4910 * linux-low.c (use_linux_regsets): New macro.
4911 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4912 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4913 (linux_register_in_regsets): New function.
4914 (usr_fetch_inferior_registers): Skip registers covered by
4915 regsets.
4916 (usr_store_inferior_registers): Likewise.
4917 (usr_fetch_inferior_registers): New macro.
4918 (usr_store_inferior_registers): Likewise.
4919 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4920 (linux_store_registers): Likewise.
4921 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4922 prototype.
4923 (init_registers_mips64_dsp_linux): Likewise.
4924 (init_registers_mips_linux): New macro.
4925 (init_registers_mips_dsp_linux): Likewise.
4926 (mips_dsp_num_regs): Likewise.
4927 (DSP_BASE, DSP_CONTROL): New fallback macros.
4928 (mips_base_regs): New macro.
4929 (mips_regmap): Use it. Fix the size.
4930 (mips_dsp_regmap): New variable.
4931 (mips_dsp_regset_bitmap): Likewise.
4932 (mips_arch_setup): New function.
4933 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4934 than mips_regmap.
4935 (mips_cannot_store_register): Likewise.
4936 (the_low_target): Update .arch_setup, .num_regs and .regmap
4937 initializers. Add .regset_bitmap initializer.
4938 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4939 initializer.
4940 * linux-bfin-low.c (the_low_target): Likewise.
4941 * linux-cris-low.c (the_low_target): Likewise.
4942 * linux-crisv32-low.c (the_low_target): Likewise.
4943 * linux-ia64-low.c (the_low_target): Likewise.
4944 * linux-m32r-low.c (the_low_target): Likewise.
4945 * linux-m68k-low.c (the_low_target): Likewise.
4946 * linux-ppc-low.c (the_low_target): Likewise.
4947 * linux-s390-low.c (the_low_target): Likewise.
4948 * linux-sh-low.c (the_low_target): Likewise.
4949 * linux-sparc-low.c (the_low_target): Likewise.
4950 * linux-tic6x-low.c (the_low_target): Likewise.
4951 * linux-x86-low.c (the_low_target): Likewise.
4952 * linux-xtensa-low.c (the_low_target): Likewise.
4953 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4954 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4955 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4956 srv_xmlfiles.
4957 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4958 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4959
c03e6ccc
YQ
49602012-02-29 Yao Qi <yao@codesourcery.com>
4961 Pedro Alves <palves@redhat.com>
4962
4963 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4964 `step_over_finished' is true.
4965
644cebc9
PA
49662012-02-27 Pedro Alves <palves@redhat.com>
4967
4968 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4969 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4970
c14d7ab2
PA
49712012-02-27 Pedro Alves <palves@redhat.com>
4972
4973 PR server/9684
4974 * linux-low.c (pid_is_stopped): New.
4975 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4976
412c89dd
LM
49772012-02-25 Luis Machado <lgustavo@codesourcery.com>
4978
4979 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4980 of conditions.
4981
b745defe
MR
49822012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4983
4984 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4985
9f3a5c85
LM
49862012-02-24 Luis Machado <lgustavo@codesourcery>
4987
4988 * server.c (handle_query): Advertise support for target-side
4989 breakpoint condition evaluation.
4990 (process_point_options): New function.
4991 (process_serial_event): When inserting a breakpoint, check for
4992 a target-side condition that should be evaluated.
4993
4994 * mem-break.c: Include regcache.h and ax.h.
4995 (point_cond_list_t): New data structure.
4996 (breakpoint) <cond_list>: New field.
4997 (find_gdb_breakpoint_at): Make non-static.
4998 (delete_gdb_breakpoint_at): Clear any target-side
4999 conditions.
5000 (clear_gdb_breakpoint_conditions): New function.
5001 (add_condition_to_breakpoint): Likewise.
5002 (add_breakpoint_condition): Likewise.
5003 (gdb_condition_true_at_breakpoint): Likewise.
5004 (gdb_breakpoint_here): Return result directly instead
5005 of going through a local variable.
5006
5007 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5008 (clear_gdb_breakpoint_conditions): Likewise.
5009 (add_breakpoint_condition): Likewise.
5010 (gdb_condition_true_at_breakpoint): Likewise.
5011
5012 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5013 (need_step_over_p): Take target-side breakpoint condition into
5014 consideration.
5015
5e1dc496
LM
50162012-02-24 Luis Machado <lgustavo@codesourcery>
5017
5018 * server.h: Include tracepoint.h.
5019 (agent_mem_read, agent_get_trace_state_variable_value,
5020 agent_set_trace_state_variable_value,
5021 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5022 get_set_tsv_func_addr): New prototypes.
5023
5024 * ax.h: New include file.
5025 * ax.c: New source file.
5026
5027 * tracepoint.c: Include ax.h.
5028 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5029 agent_expr, eval_result_type): Move to ax.h.
5030 (parse_agent_expr): Rename to ...
5031 (gdb_parse_agent_expr): ... this, make it non-static and move
5032 to ax.h.
5033 (unparse_agent_expr) Rename to ...
5034 (gdb_unparse_agent_expr): ... this, make it non-static and move
5035 to ax.h.
5036 (eval_agent_expr): Rename to ...
5037 (eval_tracepoint_agent_expr): ... this.
5038 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5039 forward declarations.
5040 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5041 (agent_get_trace_state_variable_value): New function.
5042 (agent_set_trace_state_variable_value): New function.
5043 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5044 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5045 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5046 (condition_true_at_tracepoint): Likewise.
5047 (parse_agent_expr): Rename to ...
5048 (gdb_parse_agent_expr): ... this and move to ax.c.
5049 (unparse_agent_expr): Rename to ...
5050 (gdb_unparse_agent_expr): ... this and move to ax.c.
5051 (gdb_agent_op_name): Move to ax.c.
5052 (eval_agent_expr): Rename to ...
5053 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5054 and move to ax.c.
5055 (eval_tracepoint_agent_expr): New function.
5056 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 5057 non-static.
5e1dc496
LM
5058 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5059 ax.c.
5060 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5061 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5062 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5063 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5064 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5065 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5066 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5067 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5068 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5069 (compile_bytecodes): Remove forward declaration.
5070 (is_goto_target): Move to ax.c.
5071 (compile_bytecodes): Move to ax.c and call
5072 agent_get_trace_state_variable_value (...) and
5073 agent_set_trace_state_variable_value (...).
5074
5075 * Makefile.in: Update ax.c and IPA dependencies.
5076
277e4e52
PA
50772012-02-24 Pedro Alves <palves@redhat.com>
5078
5079 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5080 (cmd_bigqtbuffer_circular): ... this. Only handle
5081 'QTBuffer:circular:'.
5082 (handle_tracepoint_general_set): Adjust.
5083
bf4c19f7
YQ
50842012-02-16 Yao Qi <yao@codesourcery.com>
5085
5086 * inferiors.c: Move code to ...
5087 * dll.c: .... here. New.
5088 * server.h: Declare clear_dlls.
5089 * Makefile.in (SFILES): Add dll.c.
5090 (OBS): Add dll.o
5091 (dll.o): New rule.
5092
d73f2619
YQ
50932012-02-11 Yao Qi <yao@codesourcery.com>
5094
5095 * server.c: (handle_monitor_command): Add a new parameter
5096 `own_buf'.
5097 (handle_query): Update caller.
5098
f8255c2a
JB
50992012-02-09 Joel Brobecker <brobecker@adacore.com>
5100
5101 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5102 * configure, config.in: Regenerate.
5103 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5104 is not defined.
5105
da84f473
PA
51062012-02-02 Pedro Alves <palves@redhat.com>
5107
5108 Try SIGKILL first, then PTRACE_KILL.
5109 * linux-low.c (linux_kill_one_lwp): New.
5110 (linux_kill_one_lwp): Rename to ...
5111 (kill_one_lwp_callback): ... this. Use the new
5112 linux_kill_one_lwp.
5113
e886a173
PA
51142012-02-02 Pedro Alves <palves@redhat.com>
5115
5116 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5117 inferior.
5118
be07f1a2
PA
51192012-01-27 Pedro Alves <palves@redhat.com>
5120
5121 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5122 (elf_64_file_p): Make static.
5123 (linux_pid_exe_is_elf_64_file): New.
5124 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5125 Delete declarations.
5126 (linux_pid_exe_is_elf_64_file): Declare.
5127 * linux-x86-low.c (x86_arch_setup): Use
5128 linux_pid_exe_is_elf_64_file.
5129
d8301ad1
JK
51302012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5131
5132 * linux-low.c (linux_wait_for_event_1): Rename to ...
5133 (linux_wait_for_event): ... here and merge it with former
5134 linux_wait_for_event - new variable wait_ptid, use it.
5135 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5136
01b17894
PA
51372012-01-23 Pedro Alves <palves@redhat.com>
5138
5139 * server.c (main): Avoid yet another case of infinite loop while
5140 detaching/killing after a longjmp.
5141
e825046f
JK
51422012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5143
5144 Code cleanup.
5145 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5146
b9e7b9c3
UW
51472012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5148
5149 * hostio.c (handle_readlink): New function.
5150 (handle_vFile): Call it to handle "vFile:readlink" packets.
5151
901f9912
UW
51522012-01-20 Pedro Alves <palves@redhat.com>
5153 Ulrich Weigand <ulrich.weigand@linaro.org>
5154
5155 * server.c (handle_v_requests): Only support vAttach and vRun to
5156 start multiple processes when in extended protocol mode.
5157
fc1ab1a0
PA
51582012-01-17 Pedro Alves <palves@redhat.com>
5159
5160 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5161 memalign plus mprotect to allocate the scratch buffer.
5162
7d5d4e98
PA
51632012-01-13 Pedro Alves <palves@redhat.com>
5164
5165 * server.c (attach_inferior): Clear `cont_thread'.
5166
f128d5e9
PA
51672012-01-13 Pedro Alves <palves@redhat.com>
5168
5169 * server.c (main): Avoid infinite loop while detaching/killing
5170 after a longjmp.
5171
06db92f0
DE
51722012-01-09 Doug Evans <dje@google.com>
5173
5174 * server.c (start_inferior): Set last_ptid in --wrapper case.
5175
32d92999
YQ
51762012-01-06 Yao Qi <yao@codesourcery.com>
5177
5178 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5179 defined.
5180 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5181
5e0a92a9
YQ
51822012-01-04 Yao Qi <yao@codesourcery.com>
5183
5184 * tracepoint.c (cmd_qtdp): Print debug message
5185 for static tracepoint.
5186
ae639e8c
YQ
51872012-01-04 Yao Qi <yao@codesourcery.com>
5188
5189 * tracepoint.c (trace_vdebug): Differentiate debug message
5190 between gdbserver and IPA.
5191
f72429c5
YQ
51922012-01-03 Yao Qi <yao@codesourcery.com>
5193
5194 * tracepoint.c (tracepoint_was_hit): Don't collect for
5195 static tracepoint.
5196
12c3e59c
JB
51972012-01-02 Joel Brobecker <brobecker@adacore.com>
5198
5199 * terminal.h: Reformat copyright header.
5200
67827812
JB
52012012-01-02 Joel Brobecker <brobecker@adacore.com>
5202
5203 * server.c (gdbserver_version): Update copyright year.
5204 * gdbreplay.c (gdbreplay_version): Likewise.
5205
3e52c33d
JK
52062011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5207
5208 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5209
5210 Revert:
5211 2011-12-18 Hui Zhu <teawater@gmail.com>
5212 * linux-low.c (linux_create_inferior): Save return value to ret.
5213
66f1260e
HZ
52142011-12-18 Hui Zhu <teawater@gmail.com>
5215
5216 * linux-low.c (linux_create_inferior): Save return value to ret.
5217
e77616d7
DE
52182011-12-16 Doug Evans <dje@google.com>
5219
e7b06c57
DE
5220 * linux-low.c (linux_create_inferior): If stdio connection,
5221 redirect stdin from /dev/null, stdout to stderr.
5222 * remote-utils.c (remote_is_stdio): New static global.
5223 (remote_connection_is_stdio): New function.
5224 (remote_prepare): Handle stdio connection.
5225 (remote_open): Ditto.
5226 (remote_close): Don't close stdin for stdio connections.
5227 (read_prim,write_prim): New functions. Replace all calls to
5228 read/write to these.
5229 * server.c (main): Watch for "-" argument. Move call to
5230 remote_prepare before start_inferior.
5231 * server.h (STDIO_CONNECTION_NAME): New macro.
5232 (remote_connection_is_stdio): Declare.
5233
e77616d7
DE
5234 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5235 in debugging output.
5236
82067193
YQ
52372011-12-15 Yao Qi <yao@codesourcery.com>
5238
5239 * tracepoint.c: Include sys/syscall.h.
5240 (gdb_ust_thread): Remove preprocessor conditional.
5241
82bfbe7e
PA
52422011-12-14 Pedro Alves <pedro@codesourcery.com>
5243
5244 * linux-low.c (linux_detach_one_lwp): Call
5245 the_low_target.prepare_to_resume before detaching.
5246
712c6575
YQ
52472011-12-14 Yao Qi <yao@codesourcery.com>
5248
5249 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5250 of write.
5251
d54d1edf
YQ
52522011-12-14 Yao Qi <yao@codesourcery.com>
5253
5254 * i386-low.c (i386_low_stopped_data_address): Initialize local
5255 variable `control'.
5256
6210a125
PA
52572011-12-13 Pedro Alves <pedro@codesourcery.com>
5258
5259 PR remote/13492
5260
5261 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5262 DR_CONTROL unless necessary. Extend comments.
5263 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5264 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5265
2ece8244
YQ
52662011-12-13 Yao Qi <yao@codesourcery.com>
5267
5268 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5269 macros.
5270 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5271
784867a5
JK
52722011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5273
5274 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5275 Print new debug message for such case.
5276
6bf36717
JK
52772011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5278
5279 Fix overlapping memcpy.
5280 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5281 the read_inferior_memory transfer.
5282 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5283 write_inferior_memory transfer.
5284 (set_fast_tracepoint_jump): New variable buf. Use it for the
5285 read_inferior_memory and write_inferior_memory transfers.
5286 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5287 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5288 Use it for the write_inferior_memory transfer.
5289 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5290 buffers.
5291
50275556
MR
52922011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5293
5294 * linux-low.c (fetch_register, store_register): Make code
5295 consistent, fix formatting.
5296
7325beb4
MR
52972011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5298
5299 * linux-low.c (usr_store_inferior_registers): Factor out code
5300 to handle individual registers into...
5301 (store_register): ... this new function.
5302
c642a434
UW
53032011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5304
5305 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5306 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5307 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5308 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5309 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5310 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5311 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5312 (srv_xmlfiles): Add new XML files.
5313
5314 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5315 and <sys/uio.h>.
5316 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5317 (init_registers_s390_linux32v1): Add prototype.
5318 (init_registers_s390_linux32v2): Likewise.
5319 (init_registers_s390_linux64v1): Likewise.
5320 (init_registers_s390_linux64v2): Likewise.
5321 (init_registers_s390x_linux64v1): Likewise.
5322 (init_registers_s390x_linux64v2): Likewise.
5323 (s390_num_regs): Increment to 52.
5324 (s390_regmap): Add orig_r2 register.
5325 (s390_num_regs_3264): Increment to 68.
5326 (s390_regmap_3264): Add orig_r2 register.
5327 (s390_collect_ptrace_register): Handle orig_r2 register.
5328 (s390_supply_ptrace_register): Likewise.
5329 (s390_fill_last_break): New function.
5330 (s390_store_last_break): Likewise.
5331 (s390_fill_system_call): New function.
5332 (s390_store_system_call): Likewise.
5333 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5334 register sets.
5335 (s390_check_regset): New function.
5336 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5337 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5338 Update target_regsets for available register sets.
5339
2268b414
JK
53402011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5341 Jan Kratochvil <jan.kratochvil@redhat.com>
5342
5343 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5344 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5345 New.
5346 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5347 * linux-low.h (struct process_info_private): New member r_debug.
5348 * server.c (handle_qxfer_libraries): Call
5349 the_target->qxfer_libraries_svr4.
5350 (handle_qxfer_libraries_svr4): New function.
5351 (qxfer_packets): New entry "libraries-svr4".
5352 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5353 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5354 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5355 PACKET_qXfer_libraries_svr4.
5356
d6db1fab
UW
53572011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5358
5359 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5360 PSW address/mask between 8-byte and 16-byte formats.
5361 (s390_supply_ptrace_register): Likewise.
5362 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5363 basic addressing mode bit.
5364
242f5f1c
SS
53652011-11-24 Stan Shebs <stan@codesourcery.com>
5366
5367 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5368
f196051f
SS
53692011-11-17 Stan Shebs <stan@codesourcery.com>
5370
5371 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5372 (tracing_start_time): New global.
5373 (tracing_stop_time): New global.
5374 (tracing_user_name): New global.
5375 (tracing_notes): New global.
5376 (tracing_stop_note): New global.
5377 (cmd_qtstart): Set traceframe_usage, start_time.
5378 (stop_tracing): Set stop_time.
5379 (cmd_qtstatus): Report additional status.
5380 (cmd_qtp): New function.
5381 (handle_tracepoint_query): Call it.
5382 (cmd_qtnotes): New function.
5383 (handle_tracepoint_general_set): Call it.
5384 (get_timestamp): Rename from tsv_get_timestamp.
5385
405f8e94
SS
53862011-11-14 Stan Shebs <stan@codesourcery.com>
5387 Kwok Cheung Yeung <kcy@codesourcery.com>
5388
5389 * linux-x86-low.c (small_jump_insn): New.
5390 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5391 trampoline and error message, build a trampoline and issue a small
5392 jump instruction to it.
5393 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5394 trampoline and error message.
5395 (x86_get_min_fast_tracepoint_insn_len): New.
5396 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5397 * linux-low.h (struct linux_target_ops): Add arguments to
5398 install_fast_tracepoint_jump_pad operation, add new operation.
5399 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5400 arguments.
5401 (linux_get_min_fast_tracepoint_insn_len): New function.
5402 (linux_target_op): Add new operation.
5403 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5404 (gdb_trampoline_buffer_end): Ditto.
5405 (gdb_trampoline_buffer_error): Ditto.
5406 (struct ipa_sym_addresses): Add fields for new IPA variables.
5407 (symbol_list): Add entries for new IPA variables.
5408 (struct tracepoint): Add fields to hold the address range of the
5409 trampoline used by the tracepoint.
5410 (trampoline_buffer_head): New static variable.
5411 (trampoline_buffer_tail): Ditto.
5412 (claim_trampoline_space): New function.
5413 (have_fast_tracepoint_trampoline_buffer): New function.
5414 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5415 structure.
5416 (install_fast_tracepoint): Ditto, also add error buffer argument.
5417 (cmd_qtminftpilen): New function.
5418 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5419 (fast_tracepoint_from_trampoline_address): New function.
5420 (fast_tracepoint_collecting): Handle trampoline as part of jump
5421 pad space.
5422 (set_trampoline_buffer_space): New function.
5423 (initialize_tracepoint): Initialize new IPA variables.
5424 * target.h (struct target_ops): Add arguments to
5425 install_fast_tracepoint_jump_pad operation, add new
5426 get_min_fast_tracepoint_insn_len operation.
5427 (target_get_min_fast_tracepoint_insn_len): New.
5428 (install_fast_tracepoint_jump_pad): Add arguments.
5429 * server.h (IPA_BUFSIZ): Define.
5430 * linux-i386-ipa.c: Include extra header files.
5431 (initialize_fast_tracepoint_trampoline_buffer): New function.
5432 (initialize_low_tracepoint): Call it.
5433 * server.h (set_trampoline_buffer_space): Declare.
5434 (claim_trampoline_space): Ditto.
5435 (have_fast_tracepoint_trampoline_buffer): Ditto.
5436
1e4d1764
YQ
54372011-11-14 Yao Qi <yao@codesourcery.com>
5438
5439 * server.c (handle_query): Handle InstallInTrace for qSupported.
5440 * tracepoint.c (add_tracepoint): Sort list.
5441 (install_tracepoint, download_tracepoint): New.
5442 (cmd_qtdp): Call them to install and download tracepoints.
5443 (sort_tracepoints): Removed.
5444 (cmd_qtstart): Update.
5445
5c73ff4e
YQ
54462011-11-14 Yao Qi <yao@codesourcery.com>
5447
5448 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5449 * mem-break.h: Declare.
5450 * tracepoint.c (cmd_qtstart): Move some code to ...
5451 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5452 New.
5453 (download_tracepoints): Move some code to ...
5454 (download_tracepoint_1): ... here. New.
5455
86a30030
YQ
54562011-11-08 Yao Qi <yao@codesourcery.com>
5457
5458 * remote-utils.c (relocate_instruction): A comment fix.
5459
8d26e50c
JB
54602011-11-07 Joel Brobecker <brobecker@adacore.com>
5461
5462 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5463 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5464 dr_status_mirror and dr_control_mirror from debug_reg_state.
5465 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5466 (i386_initial_stuff): Remove use of deleted globals.
5467 (i386_get_thread_context, i386_set_thread_context,
5468 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5469 from debug_reg_state.
5470
a59306a3
YQ
54712011-11-05 Yao Qi <yao@codesourcery.com>
5472
5473 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5474 address as TPOINT's.
5475
3065dfb6
SS
54762011-11-02 Stan Shebs <stan@codesourcery.com>
5477
5478 * tracepoint.c (agent_mem_read_string): New function.
5479 (eval_agent_expr): Call it for tracenz.
5480 * server.c (handle_query): Report support for tracenz.
5481
fd0d8c7c
YQ
54822011-11-02 Yao Qi <yao@codesourcery.com>
5483
5484 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5485
609086b1
YQ
54862011-11-02 Yao Qi <yao@codesourcery.com>
5487
5488 * target.h: Fix a typo in comment.
5489
b9fd1791
PA
54902011-10-31 Pedro Alves <pedro@codesourcery.com>
5491
5492 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5493 clobber the breakpoints' shadows with fast tracepoint jumps.
5494 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5495 * target.c (write_inferior_memory): Also pass MYADDR down to
5496 check_mem_write.
5497
03583c20
UW
54982011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5499
5500 * configure.ac: Check support for personality routine.
5501 * configure: Regenerate.
5502 * config.in: Likewise.
5503 * linux-low.c: Include <sys/personality.h>.
5504 Define ADDR_NO_RANDOMIZE if necessary.
5505 (linux_create_inferior): Disable address space randomization when
5506 forking inferior, if requested.
5507 (linux_supports_disable_randomization): New function.
5508 (linux_target_ops): Install it.
5509 * server.h (disable_randomization): Declare.
5510 * server.c (disable_randomization): New global variable.
5511 (handle_general_set): Handle QDisableRandomization.
5512 (handle_query): Likewise for qSupported.
5513 (main): Support --disable-randomization and --no-disable-randomization
5514 command line arguments.
5515 * target.h (struct target_ops): Add supports_disable_randomization.
5516 (target_supports_disable_randomization): New macro.
5517
723b724b
MF
55182011-09-29 Mike Frysinger <vapier@gentoo.org>
5519
5520 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5521 ifdef check.
5522 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5523 [!PT_GETDSBT] (target_loadmap): New definition.
5524 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5525 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5526 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5527 and PT_GETDSBT to LINUX_LOADMAP.
5528 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5529 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5530
55329a5c 55312011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5532
5533 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5534 (arm_linux_hwbp_cap): New static variable.
5535 (arm_linux_get_hwbp_cap): Replace by ...
5536 (arm_linux_init_hwbp_cap): ... this new function.
5537 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5538 (arm_linux_get_hw_watchpoint_count): Likewise.
5539 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5540 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5541 (arm_prepare_to_resume): Use perror_with_name instead of error.
5542
55329a5c 55432011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5544
5545 * linux-arm-low.c: Include <signal.h>.
5546 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5547 (struct arm_linux_hwbp_cap): New data type.
5548 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5549 (struct arm_linux_hw_breakpoint): New data type.
5550 (MAX_BPTS, MAX_WPTS): Define.
5551 (struct arch_process_info, struct arch_lwp_info): New data types.
5552 (arm_linux_get_hwbp_cap): New function.
5553 (arm_linux_get_hw_breakpoint_count): Likewise.
5554 (arm_linux_get_hw_watchpoint_count): Likewise.
5555 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5556 (arm_hwbp_control_initialize): Likewise.
5557 (arm_hwbp_control_is_enabled): Likewise.
5558 (arm_hwbp_control_is_initialized): Likewise.
5559 (arm_hwbp_control_disable): Likewise.
5560 (arm_linux_hw_breakpoint_equal): Likewise.
5561 (arm_linux_hw_point_initialize): Likewise.
5562 (struct update_registers_data): New data structure.
5563 (update_registers_callback: New function.
5564 (arm_insert_point): Likewise.
5565 (arm_remove_point): Likewise.
5566 (arm_stopped_by_watchpoint): Likewise.
5567 (arm_stopped_data_address): Likewise.
5568 (arm_new_process): Likewise.
5569 (arm_new_thread): Likewise.
5570 (arm_prepare_to_resume): Likewise.
5571 (the_low_target): Register arm_insert_point, arm_remove_point,
5572 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5573 arm_new_thread, and arm_prepare_to_resume.
5574
6b9801d4
SS
55752011-09-15 Stan Shebs <stan@codesourcery.com>
5576
5577 * server.h (struct emit_ops): Add compare-goto fields.
5578 * tracepoint.c (gdb_agent_op_sizes): New table.
5579 (emit_eq_goto): New function.
5580 (emit_ne_goto): New function.
5581 (emit_lt_goto): New function.
5582 (emit_le_goto): New function.
5583 (emit_gt_goto): New function.
5584 (emit_ge_goto): New function.
5585 (is_goto_target): New function.
5586 (compile_bytecodes): Recognize special cases of compare-goto
5587 combinations and call specialized emitters for them.
5588 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5589 (amd64_emit_ne_goto): New function.
5590 (amd64_emit_lt_goto): New function.
5591 (amd64_emit_le_goto): New function.
5592 (amd64_emit_gt_goto): New function.
5593 (amd64_emit_ge_goto): New function.
5594 (amd64_emit_ops): Add the new functions.
5595 (i386_emit_eq_goto): New function.
5596 (i386_emit_ne_goto): New function.
5597 (i386_emit_lt_goto): New function.
5598 (i386_emit_le_goto): New function.
5599 (i386_emit_gt_goto): New function.
5600 (i386_emit_ge_goto): New function.
5601 (i386_emit_ops): Add the new functions.
5602
bf15cbda
SS
56032011-09-08 Stan Shebs <stan@codesourcery.com>
5604
5605 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5606 (i386_emit_epilogue): Restore %ebx.
5607
943ca1dd
JZ
56082011-08-31 Jie Zhang <jzhang918@gmail.com>
5609
5610 * server.c (step_thread): Remove definition.
5611 (process_serial_event): Don't handle Hs.
5612 * server.h (step_thread): Remove declaration.
5613 * target.c (set_desired_inferior): Remove use of step_thread.
5614
e3deef73
LM
56152011-08-24 Luis Machado <lgustavo@codesourcery.com>
5616
5617 * linux-low.c: Include linux-procfs.h.
5618 (linux_attach_lwp_1): Update comments.
5619 (linux_attach): Scan for existing threads when attaching to a
5620 process that is the tgid.
5621 * Makefile.in: Update dependencies.
5622
13da1c97
LM
56232011-08-24 Luis Machado <lgustavo@codesourcery.com>
5624
5625 * configure.srv: Add linux-procfs.o dependencies.
5626
881127c9
YQ
56272011-08-14 Yao Qi <yao@codesourcery.com>
5628
5629 * target.h (struct target_ops): Fix indent.
5630 * win32-low.c (win32_target_ops): Fix comment.
5631
58dbd541
YQ
56322011-08-14 Andrew Jenner <andrew@codesourcery.com>
5633 Yao Qi <yao@codesourcery.com>
5634
5635 * Makefile.in (clean): Remove tic6x-*.c files.
5636 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5637 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5638 (tic6x-c64xp-linux.c): Likewise.
5639 * configure.srv: Add support for tic6x-*-uclinux.
5640 * linux-tic6x-low.c: New.
5641 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5642
78d85199
YQ
56432011-08-14 Andrew Stubbs <ams@codesourcery.com>
5644 Yao Qi <yao@codesourcery.com>
5645
5646 * target.h (struct target_ops): Add read_loadmap.
5647 * linux-low.c (struct target_loadseg): New type.
5648 (struct target_loadmap): New type.
5649 (linux_read_loadmap): New function.
5650 (linux_target_ops): Add linux_read_loadmap.
5651 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5652 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5653 to NULL.
78d85199 5654
a959a88d
EZ
56552011-08-05 Eli Zaretskii <eliz@gnu.org>
5656
5657 * win32-low.c: Include <stdint.h>.
5658
1ced966e
PA
56592011-07-22 Pedro Alves <pedro@codesourcery.com>
5660
5661 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5662 to the inferior here.
5663 (i386_remove_aligned_watchpoint): Ditto.
5664 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5665 fit part of the watchpoint in the debug registers.
5666 (i386_update_inferior_debug_regs): New.
5667 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5668 registers, and only update the inferior on success.
5669 (i386_low_remove_watchpoint): Ditto.
5670
d26e3629
KY
56712011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5672
5673 * linux-low.c (compare_ints, unique, list_threads, show_process,
5674 linux_core_of_thread): Delete.
5675 (linux_target_ops): Change linux_core_of_thread to
5676 linux_common_core_of_thread.
5677 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5678 * utils.c (malloc_failure): Change type of argument.
5679 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5680 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5681 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5682 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5683 (IPA_OBJS): Add common-utils-ipa.o.
5684 (ptid_h, linux_osdata_h): New macros.
5685 (server_h): Add common/common-utils.h, common/xml-utils.h,
5686 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5687 common/ptid.h.
5688 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5689 ptid.o, buffer.o): New rules.
5690 (linux-low.o): Add common/linux-osdata.h as a dependency.
5691 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5692 * configure.ac: Add AC_HEADER_DIRENT check.
5693 * config.in: Regenerate.
5694 * configure: Regenerate.
5695 * remote-utils.c (xml_escape_text): Delete.
5696 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5697 buffer_xml_printf): Move to common/buffer.c.
5698 * server.c (main): Remove call to initialize_inferiors.
5699 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5700 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5701 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5702 internal_error, gdb_assert, gdb_assert_fail): Delete.
5703 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5704 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5705 common/buffer.h.
5706 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5707 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5708 initialize_inferiors): Delete.
5709
2275a1a7
PA
57102011-07-20 Pedro Alves <pedro@codesourcery.com>
5711
5712 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5713 symbol error.
5714
0a5b1e09
PA
57152011-05-31 Pedro Alves <pedro@codesourcery.com>
5716
5717 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5718 assertion.
5719 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5720
6938fd34
YQ
57212011-05-26 Yao Qi <yao@codesourcery.com>
5722
5723 * Makefile.in (thread-db.o): Track dependence to
5724 common/gdb_thread_db.h.
5725 * thread-db.c: include gdb_thread_db.h from right place.
5726
b481f9e0
TT
57272011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5728
5729 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5730 __FILE__ and __LINE__ to internal_error.
5731
98a5dd13
DE
57322011-05-13 Doug Evans <dje@google.com>
5733
5734 * thread-db.c (try_thread_db_load_from_sdir): New function.
5735 (try_thread_db_load_from_dir): New function.
5736 (thread_db_load_search): Handle $sdir, ignore $pdir.
5737 Remove trying of system directories if search of
5738 libthread-db-search-path fails, that is now done via $sdir.
5739
d248b706
KY
57402011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5741
5742 * server.c (handle_query): Add EnableDisableTracepoints to the list
5743 of supported features.
43aaf8b6 5744 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5745 tracepoints.
43aaf8b6
PA
5746 (cmd_qtenable_disable): New.
5747 (cmd_qtstart): Install tracepoints even if disabled.
5748 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5749 receiving a QTEnable or QTDisable packet.
5750 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5751 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5752 tracepoints.
5753 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5754
84e578fb
DE
57552011-05-10 Doug Evans <dje@google.com>
5756
5757 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5758
71f55dd8
DE
57592011-05-04 Doug Evans <dje@google.com>
5760
5761 * linux-low.c (linux_join): Skip process lookup.
5762 * spu-low.c (spu_join): Ditto.
5763 * server.c (join_inferiors_callback): Delete.
5764 (process_serial_event): For 'D' packet (detach) call join_inferior
5765 directly.
5766
4d393d60
JM
57672011-05-04 Joseph Myers <joseph@codesourcery.com>
5768
5769 * README: Don't mention xscale*-*-linux*.
5770 * configure.srv (xscale*-*-linux*): Don't handle target.
5771
b00ad6ff
NF
57722011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5773
5774 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5775 casting pointers.
5776 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5777 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5778 (i386_emit_void_call_2): Likewise.
5779
af96c192
YQ
57802011-04-26 Yao Qi <yao@codesourcery.com>
5781
43aaf8b6
PA
5782 * linux-low.c: Move common macros to linux-ptrace.h.
5783 Include linux-ptrace.h.
af96c192
YQ
5784 * Makefile.in (linux_ptrace_h): New.
5785 (linux-low.o): Depends on linux-ptrace.h.
5786
03f2bd59
JK
57872011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5788
5789 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5790 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5791 (remote_prepare): New function with most of the TCP code from ...
5792 (remote_open): ... here. Detect PORT here unconditionally. Move also
5793 setting transport_is_reliable.
5794 * server.c (run_once): New variable.
5795 (gdbserver_usage): Document it.
5796 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5797 the first run if RUN_ONCE.
5798 * server.h (run_once, remote_prepare): New declarations.
5799
7a9dd1b2
TT
58002011-04-19 Tom Tromey <tromey@redhat.com>
5801
5802 * win32-low.c (handle_load_dll): Remove duplicate "the".
5803
81239425
PM
58042011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5805
5806 Remove support for old Cygwin 1.5 versions.
5807 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5808 function to avoid warning.
5809 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5810 warning.
5811
9e0627f1
PM
58122011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5813
5814 * gdbserver/server.h (Macro _): Define it if not available.
5815
588eebee
MS
58162011-03-14 Michael Snyder <msnyder@vmware.com>
5817
348af9f7 5818 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5819
43f70d4c
JB
58202011-03-10 Joel Brobecker <brobecker@adacore.com>
5821
5822 * Makefile.in (maintainer-clean realclean distclean): Remove
5823 "make ... subdir_do" command.
5824
348af9f7
MS
58252011-03-10 Michael Snyder <msnyder@vmware.com>
5826
5827 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5828
5829 * server.c (handle_v_run): Free alloced buffer on early return.
5830
e637a4f5
YQ
58312011-03-09 Yao Qi <yao@codesourcery.com>
5832
5833 Revert:
5834 2011-03-04 Yao Qi <yao@codesourcery.com>
5835
5836 * Makefile.in: Remove GNU make feature --directory.
5837
5838 2011-03-05 Yao Qi <yao@codesourcery.com>
5839
5840 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5841 (subdir_do): New make target. Copied from gdb/Makefile.
5842 (maintainer-clean, realclean, distclean, clean): Call corresponding
5843 make targets in common/Makefile.
5844
5845 2011-02-11 Yao Qi <yao@codesourcery.com>
5846
5847 * configure.ac: Call AC_PROG_RANLIB.
5848 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5849 * configure: Regenerate.
5850
e6edda56
JK
58512011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5852
5853 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5854
e5141119
JB
58552011-03-06 Yao Qi <yao@codesourcery.com>
5856
5857 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5858
64794aa4
JB
58592011-03-05 Yao Qi <yao@codesourcery.com>
5860
5861 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5862 (subdir_do): New make target. Copied from gdb/Makefile.
5863 (maintainer-clean, realclean, distclean, clean): Call corresponding
5864 make targets in common/Makefile.
5865
7a762829
YQ
58662011-03-04 Yao Qi <yao@codesourcery.com>
5867
5868 * Makefile.in: Remove GNU make feature --directory.
5869
348af9f7
MS
58702011-03-04 Michael Snyder <msnyder@vmware.com>
5871
5872 * server.c (queue_stop_reply): Call xmalloc not malloc.
5873
58742011-03-02 Michael Snyder <msnyder@vmware.com>
5875
5876 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5877
9f72fee2
MS
58782011-02-28 Michael Snyder <msnyder@vmware.com>
5879
588eebee
MS
5880 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5881 (cmd_qtframe): Ditto.
5882 (cmd_qtbuffer): Ditto.
5883 (cmd_bigqtbuffer): Ditto.
5884
9f72fee2
MS
5885 * utils.c (decimal2str): Initialize 'width' to nine, then
5886 don't mess with it.
5887
8040bd49
UW
58882011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5889
5890 * hostio.c (require_data): Free *data, not data.
5891
7e52cbd0
JK
58922011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5893
5894 * hostio.c (require_data): Use free, not xfree.
5895
9130f83e
MS
58962011-02-27 Michael Snyder <msnyder@vmware.com>
5897
4b812f4e
MS
5898 * server.c (handle_query): Discard unused value.
5899
9130f83e
MS
5900 * hostio.c (require_data): Free malloc memory before returning
5901 error.
5902
69d37113
MS
59032011-02-26 Michael Snyder <msnyder@vmware.com>
5904
5905 * linux-low.c (list_threads): Call closedir for dirent.
5906
35f5825a
MS
59072011-02-27 Michael Snyder <msnyder@vmware.com>
5908
2a589cef
MS
5909 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5910 a case statement falls through.
5911
0adea5f7
MS
5912 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5913
35f5825a
MS
5914 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5915 in comparison.
5916
238f1c74
MS
59172011-02-26 Michael Snyder <msnyder@vmware.com>
5918
5919 * utils.c (decimal2str): Eliminate dead code and dead param.
5920 (pulongest): Drop dead param from call to decimal2str.
5921 (plongest): Ditto.
5922
633ff500
JB
59232011-02-24 Joel Brobecker <brobecker@adacore.com>
5924
5925 Revert the following patch (not approved yet):
5926 2011-02-21 Hui Zhu <teawater@gmail.com>
5927 * tracepoint.c (tp_printf): New function.
5928 (eval_agent_expr): Handle gdb_agent_op_printf.
5929
f9c6ff72
HZ
59302011-02-21 Hui Zhu <teawater@gmail.com>
5931
5932 * tracepoint.c (tp_printf): New function.
5933 (eval_agent_expr): Handle gdb_agent_op_printf.
5934
94d5e490
TT
59352011-02-18 Tom Tromey <tromey@redhat.com>
5936
5937 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5938 (tracepoint.o): Likewise.
5939 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5940 (gdb_agent_op_names): Likewise.
5941
c7f96d2b
TT
59422011-02-18 Tom Tromey <tromey@redhat.com>
5943
5944 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5945 gdb_agent_op_rot>: New constants.
5946 (gdb_agent_op_names): Add pick and roll.
5947 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5948 cases.
5949
0feedb2c
JK
59502011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5951
5952 * aclocal.m4: Regenerated with aclocal-1.11.1.
5953
b3b9301e
PA
59542011-02-14 Pedro Alves <pedro@codesourcery.com>
5955
5956 * server.c (handle_qxfer_traceframe_info): New.
5957 (qxfer_packets): Register "traceframe-info".
5958 (handle_query): Report support for qXfer:traceframe-info:read+.
5959 * tracepoint.c (match_blocktype): New.
5960 (traceframe_find_block_type): Rename to ...
5961 (traceframe_walk_blocks): ... this. Add callback filter argument,
5962 and use it.
5963 (traceframe_find_block_type): New, reimplemented on top of
5964 traceframe_walk_blocks.
5965 (build_traceframe_info_xml): New.
5966 (traceframe_read_info): New.
5967 * server.h (traceframe_read_info): Declare.
5968
4f3e6fb7
YQ
59692011-02-11 Yao Qi <yao@codesourcery.com>
5970
5971 * configure.ac: Call AC_PROG_RANLIB.
5972 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5973 * configure: Regenerate.
5974
764880b7
PA
59752011-02-07 Pedro Alves <pedro@codesourcery.com>
5976
5977 * server.c (gdb_read_memory): Change return semantics to allow
5978 partial transfers.
5979 (handle_search_memory_1): Adjust.
5980 (process_serial_event) <'m' packet>: Handle partial transfers.
5981 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5982
1c79eb8a
PA
59832011-01-28 Pedro Alves <pedro@codesourcery.com>
5984
5985 * regcache.c (init_register_cache): Initialize
5986 regcache->register_status.
5987 (free_register_cache): Release regcache->register_status.
5988 (regcache_cpy): Copy register_status.
5989 (registers_to_string): Print 'x's for unavailable registers.
5990 (supply_register): Mark the register's status valid or
5991 unavailable, depending on whether a buffer was passed in or not.
5992 (supply_register_zeroed): New.
5993 (supply_regblock): Mark the registers' status valid or
5994 unavailable, depending on whether a buffer was passed in or not.
5995 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5996 (struct regcache): New `register_status' field.
5997 (supply_register_zeroed): Declare.
5998 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5999 supply_register_zeroed, rather than passing a NULL buffer to
6000 supply_register.
6001 * tracepoint.c (fetch_traceframe_registers): Update comment.
6002
85724a0e
PA
60032011-01-28 Pedro Alves <pedro@codesourcery.com>
6004
6005 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6006 buffer explicit.
6007
d08aafef
PA
60082011-01-25 Pedro Alves <pedro@codesourcery.com>
6009
6010 * server.h (decode_xfer_write): Change prototype.
6011 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6012 and don't extract the annex here.
6013 * server.c (decode_xfer_read): Remove `annex' parameter,
6014 and don't extract the annex here.
6015 (decode_xfer): New.
6016 (struct qxfer): New.
6017 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6018 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6019 (handle_qxfer_statictrace): New functions, abstracted out from
6020 handle_query, and made to use the struct qxfer interface.
6021 (handle_threads_qxfer_proper): Rename to ...
6022 (handle_qxfer_threads_proper): ... this.
6023 (handle_threads_qxfer): Rename to ...
6024 (handle_qxfer_threads): ... this. Adjust.
6025 (qxfer_packets): New array.
6026 (handle_qxfer): New function.
6027 (handle_query): Use handle_qxfer.
6028
493e2a69
MS
60292011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6030
6031 * gdbreplay.c: Shorten lines of >= 80 columns.
6032 * linux-low.c: Ditto.
6033 * linux-ppc-low.c: Ditto.
6034 * linux-s390-low.c: Ditto.
6035 * linux-sparc-low.c: Ditto.
6036 * linux-x86-low.c: Ditto.
6037 * linux-xtensa-low.c: Ditto.
6038 * mem-break.c: Ditto.
6039 * nto-low.c: Ditto.
6040 * regcache.h: Ditto.
6041 * remote-utils.c: Ditto.
6042 * server.c: Ditto.
6043 * server.h: Ditto.
6044 * thread-db.c: Ditto.
6045 * tracepoint.c: Ditto.
6046 * utils.c: Ditto.
6047 * win32-low.h: Ditto.
6048
44944448
JB
60492011-01-05 Joel Brobecker <brobecker@adacore.com>
6050
6051 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6052 update.
6053
71ce852c
JB
60542011-01-01 Joel Brobecker <brobecker@adacore.com>
6055
6056 * server.c (gdbserver_version): Update copyright year in version
6057 output.
6058 * gdbreplay.c (gdbreplay_version): Ditto.
6059
eb826dc6
MF
60602010-12-29 Jie Zhang <jie.zhang@analog.com>
6061
6062 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6063 * linux-bfin-low.c: New file.
6064 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6065 PT_DATA_ADDR for BFIN targets.
6066 * Makefile.in (SFILES): Add linux-bfin-low.c.
6067 (clean): Remove reg-bfin.c.
6068 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6069 * README: Mention supported Blackfin targets.
6070
39ab222a
MF
60712010-12-23 Mike Frysinger <vapier@gentoo.org>
6072
6073 * .gitignore: New file.
6074
a1f2ce7d
MF
60752010-11-16 Mike Frysinger <vapier@gentoo.org>
6076
6077 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6078
f474844c
JZ
60792010-10-22 Jie Zhang <jie@codesourcery.com>
6080
6081 * Makefile.in: Add FLAGS_TO_PASS variable.
6082 (install): Remove dependency of install-only and recursively
6083 invoke make for install-only.
6084
f1048712
DE
60852010-10-04 Doug Evans <dje@google.com>
6086
6087 * Makefile.in (uninstall): Use $(DESTDIR).
6088
b53a1623
PA
60892010-09-24 Pedro Alves <pedro@codesourcery.com>
6090
e6ee044d
PA
6091 PR gdb/11842
6092
b53a1623
PA
6093 * linux-x86-low.c (compat_siginfo_from_siginfo)
6094 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6095 si_code is < 0. Check for si_code == SI_TIMER before checking for
6096 si_code < 0.
6097
fa1bd1e4
JB
60982010-09-13 Joel Brobecker <brobecker@adacore.com>
6099
6100 * lynx-i386-low.c: New file.
6101 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6102
47fac8f8
JB
61032010-09-13 Joel Brobecker <brobecker@adacore.com>
6104
6105 * lynx-low.c (ptrace_request_to_str): Remove handling for
6106 request values that have been removed in LynxOS 5.x.
6107
1adfc54d
JB
61082010-09-13 Joel Brobecker <brobecker@adacore.com>
6109
6110 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6111 <ptrace.h>
6112
c2a66c29
NS
61132010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6114
6115 * configure.ac: Add --enable-inprocess-agent option.
6116 * configure: Rebuilt.
6117
32fcada3
YQ
61182010-09-06 Yao Qi <yao@codesourcery.com>
6119
6120 * linux-low.c (linux_kill): Remove unused variable.
6121 (linux_stabilize_threads): Likewise.
6122 * server.c (start_inferior): Likewise.
6123 (queue_stop_reply_callback): Likewise.
6124 * tracepoint.c (do_action_at_tracepoint): Likewise.
6125
0cccb683
YQ
61262010-09-06 Yao Qi <yao@codesourcery.com>
6127
6128 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6129 on return.
6130
423ec54c
JK
61312010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6132
6133 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6134
12ac6819
PA
61352010-09-06 Pedro Alves <pedro@codesourcery.com>
6136
6137 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6138 "$(IPA_DEPFILES)".
6139
8ed54b31
JB
61402010-09-01 Joel Brobecker <brobecker@adacore.com>
6141
6142 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6143 gdbserver/lynx-ppc-low.c: New files.
6144 * Makefile.in (lynx_low_h): New variable.
6145 (lynx-low.o, lynx-ppc-low.o): New rules.
6146 * configure.ac: On LynxOS, link with -lnetinet.
6147 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6148 * configure: regenerate.
6149
bb0116a4
JB
61502010-09-01 Joel Brobecker <brobecker@adacore.com>
6151
6152 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6153 * configure.ac: Add check for vasprintf and vsnprintf.
6154 * configure, config.in: Regenerate.
6155 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6156
a778ab81 61572010-09-01 Joel Brobecker <brobecker@adacore.com>
6158
6159 * gdbreplay.c: Move include of alloca.h up, next to include of
6160 malloc.h.
6161 * server.h: Add include of malloc.h.
6162 * mem-break.c: Remove include of malloc.h.
6163 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6164
8b034a19 61652010-09-01 Joel Brobecker <brobecker@adacore.com>
6166
6167 * Makefile.in (memmem.o): Build with -Wno-error.
6168
61692010-09-01 Joel Brobecker <brobecker@adacore.com>
6170
6171 * utils.c (xsnprintf): Make non-static.
6172 * server.h: Add xsnprintf declaration.
6173 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6174 replace calls to snprintf by calls to xsnprintf throughout.
6175
61762010-09-01 Joel Brobecker <brobecker@adacore.com>
6177
6178 * configure.ac: Add configure check for alloca.
6179 * configure, config.in: Regenerate.
6180 * server.h: Include alloca.h if it exists.
6181 * gdbreplay.c: Include alloca.h if it exists.
6182
1a981360
PA
61832010-08-28 Pedro Alves <pedro@codesourcery.com>
6184
6185 * linux-low.c (__SIGRTMIN): Define if not already defined.
6186 (linux_create_inferior): Check for __ANDROID__ rather than
6187 __SIGRTMIN.
6188 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6189 are already deferred.
6190 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6191 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6192 stopped and already has a pending signal to report.
6193 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6194 a pending signal to report or is moving out of a jump pad.
6195 (linux_init_signals): Check for __ANDROID__ rather than
6196 __SIGRTMIN.
6197
b4d51a55
PA
61982010-08-28 Pedro Alves <pedro@codesourcery.com>
6199
6200 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6201 debug_threads check. Avoid a linear search when not doing debug
6202 output.
6203
ec48365d
PA
62042010-08-27 Pedro Alves <pedro@codesourcery.com>
6205
6206 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6207 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6208 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6209 (process_event): Change local fd's type to gdb_fildes_t.
6210 (create_file_handler): Adjust prototype.
6211 (delete_file_handler): Adjust prototype.
6212 (handle_file_event): Adjust prototype. Use pfildes.
6213 (create_file_event): Adjsut prototype.
6214 * remote-utils.c (remote_desc, listen_desc): Change type to
6215 gdb_fildes_t.
6216 * server.h: New gdb_fildes_t typedef.
6217 [USE_WIN32API]: Include winsock2.h.
6218 (delete_file_handler, add_file_handler): Adjust prototypes.
6219 (pfildes): Declare.
6220 * utils.c (pfildes): New.
6221
854d88f0
PA
62222010-08-27 Pedro Alves <pedro@codesourcery.com>
6223
6224 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6225 * configure: Regenerate.
6226
0146f85b
PA
62272010-08-27 Pedro Alves <pedro@codesourcery.com>
6228
6229 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6230 (linux_done_accessing_memory): ... this.
6231 (linux_target_ops): Adjust.
6232 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6233 * nto-low.c (nto_target_ops): Adjust comment.
6234 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6235 * spu-low.c (spu_target_ops): Adjust comment.
6236 * target.h (target_ops): Rename unprepare_to_access_memory field
6237 to done_accessing_memory.
6238 (unprepare_to_access_memory): Rename to ...
6239 (done_accessing_memory): ... this.
6240
90d74c30
PA
62412010-08-26 Pedro Alves <pedro@codesourcery.com>
6242
6243 * linux-low.c (linux_prepare_to_access_memory): New.
6244 (linux_unprepare_to_access_memory): New.
6245 (linux_target_ops): Install them.
6246 * server.c (read_memory): Rename to ...
6247 (gdb_read_memory): ... this. Use
6248 prepare_to_access_memory/prepare_to_access_memory.
6249 (write_memory): Rename to ...
6250 (gdb_write_memory): ... this. Use
6251 prepare_to_access_memory/prepare_to_access_memory.
6252 (handle_search_memory_1): Adjust.
6253 (process_serial_event): Adjust.
6254 * target.h (struct target_ops): New fields
6255 prepare_to_access_memory and unprepare_to_access_memory.
6256 (prepare_to_access_memory, unprepare_to_access_memory): New.
6257 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6258 prepare_to_access_memory/prepare_to_access_memory.
6259 * nto-low.c (nto_target_ops): Adjust.
6260 * spu-low.c (spu_target_ops): Adjust.
6261 * win32-low.c (win32_target_ops): Adjust.
6262
fd467969
PA
62632010-08-26 Pedro Alves <pedro@codesourcery.com>
6264
6265 * Makefile.in (WARN_CFLAGS): Get it from configure.
6266 (WERROR_CFLAGS): New.
6267 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6268 * configure.ac: Introduce --enable-werror, which adds -Werror to
6269 the compiler command line. Enabled by default. Disable with
6270 --disable-werror. Add -Wdeclaration-after-statement
6271 Wpointer-arith and -Wformat-nonliteral to warning flags.
6272 * configure: Regenerate.
6273
331e2f5f
PA
62742010-08-26 Pedro Alves <pedro@codesourcery.com>
6275
6276 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6277
e581f2b4
PA
62782010-08-26 Pedro Alves <pedro@codesourcery.com>
6279
6280 * gdbreplay.c (remote_error): New.
6281 (gdbchar): New.
6282 (expect): Use gdbchar. Check for error reading from GDB.
6283 Clarify sync error output.
6284 (play): Check for errors writing to GDB.
6285 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6286 * remote-utils.c (getpkt): Check for errors writing to the remote
6287 descriptor.
6288
3c11dd79
PA
62892010-08-25 Pedro Alves <pedro@codesourcery.com>
6290
6291 * linux-low.c (linux_wait_1): Move non-debugging code out of
6292 `debug_threads' control.
6293
d20a8ad9
PA
62942010-08-25 Pedro Alves <pedro@codesourcery.com>
6295
6296 * linux-low.c (linux_wait_1): Don't set last_status here.
6297 * server.c (push_event, queue_stop_reply_callback): Assert we're
6298 not pushing a TARGET_WAITKIND_IGNORE event.
6299 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6300 (myresume, handle_target_event): Set the thread's last_resume_kind
6301 and last_status from the target returned status.
6302
964e4306
PA
63032010-08-25 Pedro Alves <pedro@codesourcery.com>
6304
6305 PR threads/10729
6306
6307 * linux-x86-low.c (update_debug_registers_callback): New.
6308 (i386_dr_low_set_addr): Use it.
6309 (i386_dr_low_get_addr): New.
6310 (i386_dr_low_set_control): Use update_debug_registers_callback.
6311 (i386_dr_low_get_control): New.
6312 (i386_dr_low_get_status): Adjust.
6313 * linux-low.c (linux_stop_lwp): New.
6314 * linux-low.h (linux_stop_lwp): Declare.
6315
6316 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6317 argument instead of a i386_debug_reg_state.
6318 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6319 a i386_debug_reg_state.
6320 (i386_insert_aligned_watchpoint): Adjust.
6321 (i386_remove_aligned_watchpoint): Adjust.
6322 (i386_low_stopped_data_address): Read the debug registers from the
6323 inferior instead of from the mirrors.
6324 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6325 (i386_dr_low_get_addr): Declare.
6326 (i386_dr_low_get_control): Declare.
6327 (i386_dr_low_get_status): Change prototype.
6328
6329 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6330 (i386_dr_low_get_addr): New.
6331 (i386_dr_low_get_control): New.
6332 (i386_dr_low_get_status): Adjust prototype. Return
6333 dr_status_mirror.
6334 (i386_initial_stuff): Clear dr_status_mirror and
6335 dr_control_mirror.
6336 (i386_get_thread_context): Adjust.
6337 (i386_set_thread_context): Adjust.
6338 (i386_thread_added): Adjust.
6339
5f21a75b
PA
63402010-08-24 Pedro Alves <pedro@codesourcery.com>
6341
6342 * linux-low.h (linux_thread_area): Delete declaration.
6343
3e4c1235
TS
63442010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6345
6346 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6347 after its termination.
6348
1971b033
PA
63492010-08-09 Pedro Alves <pedro@codesourcery.com>
6350
6351 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6352 (gdb_wants_all_stopped): Delete.
6353 (linux_wait_1): Don't call them.
6354 * server.c (handle_v_cont): Tag all threads as want-stopped.
6355 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6356 stopped as "client-wants-stopped".
6357
310444ac
PA
63582010-07-31 Pedro Alves <pedro@codesourcery.com>
6359
6360 * Makefile.in (signals_h): New.
6361 (server_h): Depend on it.
6362 (server.o): Don't depend on $(signals_def).
6363 (signals.o): Depend on $(signals_def).
6364
a19cae16
JK
63652010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6366
6367 * Makefile.in (signals_def): New.
6368 (server_h): Append include/gdb/signals.h and signals_def.
6369 (server.o): Append signals_def.
6370
30d50328
JK
63712010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6372
6373 * server.c (handle_target_event): Use target_signal_to_host for
6374 resume_info.sig initialization.
6375 * target.h (struct thread_resume) <sig>: New comment.
6376
5c3216e2
OS
63772010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6378
c6f46ca0
OS
6379 * server.c (handle_query): strcpy() the returned string from paddress()
6380 instead of sprintf().
5c3216e2
OS
6381 * utils.c (paddress): Return phex_nz().
6382
6bd31874
JB
63832010-07-07 Joel Brobecker <brobecker@adacore.com>
6384
6385 * server.c (handle_v_cont): Call mourn_inferior if process
6386 just exited.
6387 (myresume): Likewise.
6388
0fb4aa4b
PA
63892010-07-01 Pedro Alves <pedro@codesourcery.com>
6390
6391 Static tracepoints, and integration with UST.
6392
6393 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6394 * mem-break.c (uninsert_all_breakpoints)
6395 (reinsert_all_breakpoints): New.
6396 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6397 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6398 (gdb_agent_ust_loaded, helper_thread_id)
6399 (gdb_agent_helper_thread_id): New macros.
6400 (struct ipa_sym_addresses): Add addr_ust_loaded,
6401 addr_helper_thread_id, addr_cmd_buf.
6402 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6403 (in_process_agent_loaded_ust): New.
6404 (write_e_ust_not_loaded): New.
6405 (maybe_write_ipa_ust_not_loaded): New.
6406 (struct collect_static_trace_data_action): New.
6407 (enum tracepoint_type) <static_tracepoint>: New.
6408 (struct tracepoint) <handle>: Mention static tracepoints.
6409 (struct static_tracepoint_ctx): New.
6410 (CMD_BUF_SIZE): New.
6411 (add_tracepoint_action): Handle static tracepoint actions.
6412 (unprobe_marker_at): New.
6413 (clear_installed_tracepoints): Handle static tracepoints.
6414 (cmd_qtdp): Handle static tracepoints.
6415 (probe_marker_at): New.
6416 (cmd_qtstart): Handle static tracepoints.
6417 (response_tracepoint): Handle static tracepoints.
6418 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6419 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6420 (get_context_regcache): Handle static tracepoints.
6421 (do_action_at_tracepoint): Handle static tracepoint actions.
6422 (traceframe_find_block_type): Handle static trace data blocks.
6423 (traceframe_read_sdata): New.
6424 (download_tracepoints): Download static tracepoint actions.
6425 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6426 (GDB_PROBE_NAME): New.
6427 (ust_ops): New.
6428 (GET_UST_SYM): New.
6429 (USTF): New.
6430 (dlsym_ust): New.
6431 (ust_marker_to_static_tracepoint): New.
6432 (gdb_probe): New.
6433 (collect_ust_data_at_tracepoint): New.
6434 (gdb_ust_probe): New.
6435 (UNIX_PATH_MAX, SOCK_DIR): New.
6436 (gdb_ust_connect_sync_socket): New.
6437 (resume_thread, stop_thread): New.
6438 (run_inferior_command): New.
6439 (init_named_socket): New.
6440 (gdb_ust_socket_init): New.
6441 (cstr_to_hexstr): New.
6442 (next_st): New.
6443 (first_marker, next_marker): New.
6444 (response_ust_marker): New.
6445 (cmd_qtfstm, cmd_qtsstm): New.
6446 (unprobe_marker_at, probe_marker_at): New.
6447 (cmd_qtstmat, gdb_ust_thread): New.
6448 (gdb_ust_init): New.
6449 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6450 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6451 (ST_REGENTRY): New.
6452 (x86_64_st_collect_regmap): New.
6453 (X86_64_NUM_ST_COLLECT_GREGS): New.
6454 (AMD64_RIP_REGNUM): New.
6455 (supply_static_tracepoint_registers): New.
6456 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6457 (ST_REGENTRY): New.
6458 (i386_st_collect_regmap): New.
6459 (i386_NUM_ST_COLLECT_GREGS): New.
6460 (supply_static_tracepoint_registers): New.
6461 * server.c (handle_query): Handle qXfer:statictrace:read.
6462 <qSupported>: Report support for StaticTracepoints, and
6463 qXfer:statictrace:read features.
6464 * server.h (traceframe_read_sdata)
6465 (supply_static_tracepoint_registers): Declare.
6466 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6467 (unpack_varlen_hex): Include in IPA build.
6468 * Makefile.in (ustlibs, ustinc): New.
6469 (IPA_OBJS): Add remote-utils-ipa.o.
6470 ($(IPA_LIB)): Link -ldl and -lpthread.
6471 (UST_CFLAGS): New.
6472 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6473 * config.in, configure: Regenerate.
6474
9e4344e5
PA
64752010-06-20 Ian Lance Taylor <iant@google.com>
6476 Pedro Alves <pedro@codesourcery.com>
6477
6478 * linux-x86-low.c (always_true): Delete.
6479 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6480 trying to fool the compiler with always_true.
6481
c6beb2cb
PA
64822010-06-20 Pedro Alves <pedro@codesourcery.com>
6483
6484 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6485 conditions in gdbserver.
6486
d2ed6730
UW
64872010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6488
6489 * spu-low.c (spu_read_memory): Wrap around local store limit.
6490 (spu_write_memory): Likewise.
6491
4e29fb54
PA
64922010-06-15 Pedro Alves <pedro@codesourcery.com>
6493
6494 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6495 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6496 LONGEST uses.
6497 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6498 uses.
6499 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6500 uses with LONGEST uses.
6501
6a271cae
PA
65022010-06-14 Stan Shebs <stan@codesourcery.com>
6503 Pedro Alves <pedro@codesourcery.com>
6504
6505 Bytecode compiler.
6506
6507 * linux-x86-low.c: Include limits.h.
6508 (add_insns): New.
6509 (always_true): New.
6510 (EMIT_ASM): New.
6511 (EMIT_ASM32): New.
6512 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6513 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6514 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6515 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6516 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6517 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6518 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6519 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6520 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6521 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6522 (amd64_emit_void_call_2): New.
6523 (amd64_emit_ops): New.
6524 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6525 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6526 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6527 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6528 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6529 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6530 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6531 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6532 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6533 (i386_emit_stack_adjust, i386_emit_int_call_1)
6534 (i386_emit_void_call_2): New.
6535 (i386_emit_ops): New.
6536 (x86_emit_ops): New.
6537 (the_low_target): Install x86_emit_ops.
6538 * server.h (struct emit_ops): New.
6539 (get_raw_reg_func_addr): Declare.
6540 (current_insn_ptr, emit_error): Declare.
6541 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6542 (set_trace_state_variable_value): New defines.
6543 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6544 addr_get_trace_state_variable_value and
6545 addr_set_trace_state_variable_value.
6546 (symbol_list): New fields for get_raw_reg,
6547 get_trace_state_variable_value and set_trace_state_variable_value.
6548 (condfn): New typedef.
6549 (struct tracepoint): New field `compiled_cond'.
6550 (do_action_at_tracepoint): Clear compiled_cond.
6551 (get_trace_state_variable_value, set_trace_state_variable_value):
6552 Export in the IPA.
6553 (condition_true_at_tracepoint): If there's a compiled condition,
6554 run that.
6555 (current_insn_ptr, emit_error): New globals.
6556 (struct bytecode_address): New.
6557 (get_raw_reg_func_addr): New.
6558 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6559 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6560 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6561 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6562 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6563 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6564 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6565 (compile_tracepoint_condition, compile_bytecodes): New.
6566 * target.h (emit_ops): Forward declare.
6567 (struct target_ops): New field emit_ops.
6568 (target_emit_ops): New.
6569 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6570 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6571 * linux-low.c (linux_emit_ops): New.
6572 (linux_target_ops): Install it.
6573 * linux-low.h (struct linux_target_ops): New field emit_ops.
6574
92b72907
UW
65752010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6576
6577 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6578 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6579
fa593d66
PA
65802010-06-01 Pedro Alves <pedro@codesourcery.com>
6581 Stan Shebs <stan@codesourcery.com>
6582
6583 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6584 (all): Depend on $(extra_libraries).
6585 (install-only): Install the IPA.
6586 (IPA_OBJS, IPA_LIB): New.
6587 (clean): Remove the IPA lib.
6588 (IPAGENT_CFLAGS): New.
6589 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6590 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6591 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6592 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6593 * configure.ac: Check for atomic builtins support in the compiler.
6594 (IPA_DEPFILES, extra_libraries): Define.
6595 * configure.srv (ipa_obj): Add description.
6596 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6597 (i[34567]86-*-linux*): Set ipa_obj.
6598 (x86_64-*-linux*): Set ipa_obj.
6599 * linux-low.c (stabilizing_threads): New.
6600 (supports_fast_tracepoints): New.
6601 (linux_detach): Stabilize threads before detaching.
6602 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6603 the lwp is either not stabilizing, or is moving out of a jump pad.
6604 (linux_fast_tracepoint_collecting): New.
6605 (maybe_move_out_of_jump_pad): New.
6606 (enqueue_one_deferred_signal): New.
6607 (dequeue_one_deferred_signal): New.
6608 (linux_wait_for_event_1): If moving out of a jump pad, defer
6609 pending signals to later.
6610 (linux_stabilize_threads): New.
6611 (linux_wait_1): Check if threads need moving out of jump pads, and
6612 do it if so.
6613 (stuck_in_jump_pad_callback): New.
6614 (move_out_of_jump_pad_callback): New.
6615 (lwp_running): New.
6616 (linux_resume_one_lwp): Handle moving out of jump pads.
6617 (linux_set_resume_request): Dequeue deferred signals.
6618 (need_step_over_p): Also step over fast tracepoint jumps.
6619 (start_step_over): Also uninsert fast tracepoint jumps.
6620 (finish_step_over): Also reinsert fast tracepoint jumps.
6621 (linux_install_fast_tracepoint_jump): New.
6622 (linux_target_ops): Install linux_stabilize_threads and
6623 linux_install_fast_tracepoint_jump_pad.
6624 * linux-low.h (linux_target_ops) <get_thread_area,
6625 install_fast_tracepoint_jump_pad>: New fields.
6626 (struct lwp_info) <collecting_fast_tracepoint,
6627 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6628 (linux_get_thread_area): Declare.
6629 * linux-x86-low.c (jump_insn): New.
6630 (x86_get_thread_area): New.
6631 (append_insns): New.
6632 (push_opcode): New.
6633 (amd64_install_fast_tracepoint_jump_pad): New.
6634 (i386_install_fast_tracepoint_jump_pad): New.
6635 (x86_install_fast_tracepoint_jump_pad): New.
6636 (the_low_target): Install x86_get_thread_area and
6637 x86_install_fast_tracepoint_jump_pad.
6638 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6639 (struct fast_tracepoint_jump): New.
6640 (fast_tracepoint_jump_insn): New.
6641 (fast_tracepoint_jump_shadow): New.
6642 (find_fast_tracepoint_jump_at): New.
6643 (fast_tracepoint_jump_here): New.
6644 (delete_fast_tracepoint_jump): New.
6645 (set_fast_tracepoint_jump): New.
6646 (uninsert_fast_tracepoint_jumps_at): New.
6647 (reinsert_fast_tracepoint_jumps_at): New.
6648 (set_breakpoint_at): Use write_inferior_memory.
6649 (uninsert_raw_breakpoint): Use write_inferior_memory.
6650 (check_mem_read): Mask out fast tracepoint jumps.
6651 (check_mem_write): Mask out fast tracepoint jumps.
6652 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6653 (set_fast_tracepoint_jump): Declare.
6654 (delete_fast_tracepoint_jump)
6655 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6656 (reinsert_fast_tracepoint_jumps_at): Declare.
6657 * regcache.c: Don't compile many functions when building the
6658 in-process agent library.
6659 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6660 the register buffer in the heap.
6661 (free_register_cache): If the register buffer isn't owned by the
6662 regcache, don't free it.
6663 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6664 pre-existing register caches.
6665 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6666 type.
6667 (convert_ascii_to_int): : Constify `from' parameter type.
6668 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6669 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6670 the needed buffer in-place.
6671 (relocate_instruction): New.
6672 * server.c (handle_query) <qSymbols>: If the target supports
6673 tracepoints, give it a chance of looking up symbols. Report
6674 support for fast tracepoints.
6675 (handle_status): Stabilize threads.
6676 (process_serial_event): Adjust.
6677 * server.h (struct fast_tracepoint_jump): Forward declare.
6678 (struct process_info) <fast_tracepoint_jumps>: New field.
6679 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6680 (decode_X_packet, decode_M_packet): Adjust.
6681 (relocate_instruction): Declare.
6682 (in_process_agent_loaded): Declare.
6683 (tracepoint_look_up_symbols): Declare.
6684 (struct fast_tpoint_collect_status): Declare.
6685 (fast_tracepoint_collecting): Declare.
6686 (force_unlock_trace_buffer): Declare.
6687 (handle_tracepoint_bkpts): Declare.
6688 (initialize_low_tracepoint)
6689 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6690 * target.h (struct target_ops) <stabilize_threads,
6691 install_fast_tracepoint_jump_pad>: New fields.
6692 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6693 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6694 [HAVE_STDINT_H]: Include stdint.h.
6695 (trace_debug_1): Rename to ...
6696 (trace_vdebug): ... this.
6697 (trace_debug): Rename to ...
6698 (trace_debug_1): ... this. Add `level' parameter.
6699 (trace_debug): New.
6700 (ATTR_USED, ATTR_NOINLINE): New.
6701 (IP_AGENT_EXPORT): New.
6702 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6703 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6704 (about_to_request_buffer_space, trace_buffer_is_full)
6705 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6706 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6707 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6708 (traceframe_write_count, traceframes_created)
6709 (trace_state_variables)
6710 New renaming defines.
6711 (struct ipa_sym_addresses): New.
6712 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6713 (symbol_list): New.
6714 (ipa_sym_addrs): New.
6715 (all_tracepoint_symbols_looked_up): New.
6716 (in_process_agent_loaded): New.
6717 (write_e_ipa_not_loaded): New.
6718 (maybe_write_ipa_not_loaded): New.
6719 (tracepoint_look_up_symbols): New.
6720 (debug_threads) [IN_PROCESS_AGENT]: New.
6721 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6722 (UNKNOWN_SIDE_EFFECTS): New.
6723 (stop_tracing): New.
6724 (flush_trace_buffer): New.
6725 (stop_tracing_bkpt): New.
6726 (flush_trace_buffer_bkpt): New.
6727 (read_inferior_integer): New.
6728 (read_inferior_uinteger): New.
6729 (read_inferior_data_pointer): New.
6730 (write_inferior_data_pointer): New.
6731 (write_inferior_integer): New.
6732 (write_inferior_uinteger): New.
6733 (struct collect_static_trace_data_action): Delete.
6734 (enum tracepoint_type): New.
6735 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6736 <actions_str, step_actions, step_actions_str>: Only include in
6737 GDBserver.
fa593d66
PA
6738 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6739 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6740 (tracepoints): Use IP_AGENT_EXPORT.
6741 (last_tracepoint): Don't include in the IPA.
6742 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6743 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6744 (alloced_trace_state_variables): New.
6745 (trace_state_variables): Use IP_AGENT_EXPORT.
6746 (traceframe_t): Delete unused variable.
6747 (circular_trace_buffer): Don't include in the IPA.
6748 (trace_buffer_start): Delete.
6749 (struct trace_buffer_control): New.
6750 (trace_buffer_free): Delete.
6751 (struct ipa_trace_buffer_control): New.
6752 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6753 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6754 New.
6755 (trace_buffer_ctrl): New.
6756 (TRACE_BUFFER_CTRL_CURR): New.
6757 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6758 Reimplement as macros.
6759 (trace_buffer_wrap): Delete.
6760 (traceframe_write_count, traceframe_read_count)
6761 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6762 (struct tracepoint_hit_ctx) <type>: New field.
6763 (struct fast_tracepoint_ctx): New.
6764 (memory_barrier): New.
6765 (cmpxchg): New.
6766 (record_tracepoint_error): Update atomically in the IPA.
6767 (clear_inferior_trace_buffer): New.
6768 (about_to_request_buffer_space): New.
6769 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6770 updating the same buffer.
6771 (add_tracepoint): Default the tracepoint's type to trap
6772 tracepoint, and orig_size to -1.
6773 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6774 internal variables.
6775 (create_trace_state_variable): New parameter `gdb'. Handle it.
6776 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6777 (cmd_qtdp): Handle fast tracepoints.
6778 (cmd_qtdv): Adjust.
6779 (max_jump_pad_size): New.
6780 (gdb_jump_pad_head): New.
6781 (get_jump_space_head): New.
6782 (claim_jump_space): New.
6783 (sort_tracepoints): New.
6784 (MAX_JUMP_SIZE): New.
6785 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6786 IPA.
6787 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6788 support. Upload fast traceframes, and delete internal IPA
6789 breakpoints.
6790 (stop_tracing_handler): New.
6791 (flush_trace_buffer_handler): New.
6792 (cmd_qtstop): Upload fast tracepoints.
6793 (response_tracepoint): Handle fast tracepoints.
6794 (tracepoint_finished_step): Upload fast traceframes. Set the
6795 tracepoint hit context's tracepoint type.
6796 (handle_tracepoint_bkpts): New.
6797 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6798 type. Add comment about fast tracepoints.
6799 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6800 non-existing action_str field.
6801 (get_context_regcache): Handle fast tracepoints.
6802 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6803 to the regcache.
6804 (fast_tracepoint_from_jump_pad_address): New.
6805 (fast_tracepoint_from_ipa_tpoint_address): New.
6806 (collecting_t): New.
6807 (force_unlock_trace_buffer): New.
6808 (fast_tracepoint_collecting): New.
6809 (collecting): New.
6810 (gdb_collect): New.
6811 (write_inferior_data_ptr): New.
6812 (target_tp_heap): New.
6813 (target_malloc): New.
6814 (download_agent_expr): New.
6815 (UALIGN): New.
6816 (download_tracepoints): New.
6817 (download_trace_state_variables): New.
6818 (upload_fast_traceframes): New.
6819 (IPA_FIRST_TRACEFRAME): New.
6820 (IPA_NEXT_TRACEFRAME_1): New.
6821 (IPA_NEXT_TRACEFRAME): New.
6822 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6823 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6824 (gdb_jump_pad_buffer_end): New.
6825 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6826 (initialize_tracepoint): Adjust.
6827 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6828 buffer. Initialize the low module.
6829 * utils.c (PREFIX, TOOLNAME): New.
6830 (malloc_failure): Use PREFIX.
6831 (error): In the IPA, an error causes an exit.
6832 (fatal, warning): Use PREFIX.
6833 (internal_error): Use TOOLNAME.
6834 (NUMCELLS): Increase to 10.
6835 * configure, config.in: Regenerate.
6836
d149dd1d
PA
68372010-06-01 Pedro Alves <pedro@codesourcery.com>
6838
6839 * server.c (handle_query) <qSupported>: Do two passes over the
6840 qSupported string to avoid nesting strtok.
6841
f6528abd
JK
68422010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6843
6844 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6845 (CDEPS): New.
6846 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6847 -Wl,--dynamic-list.
6848 * configure: Regenerate.
6849 * proc-service.list: New.
6850
ca2a87a0
JK
68512010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6852
6853 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6854 New comment.
6855
363a6e9f
OS
68562010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6857
6858 * gdbreplay.c (remote_open): Check error return from socket() call by
6859 its equality to -1 not by it being negative.
6860 * remote-utils.c (remote_open): Likewise.
6861
d23b6cb1
PA
68622010-05-23 Pedro Alves <pedro@codesourcery.com>
6863
6864 * config.h: Regenerate.
6865
28d3cf85
MK
68662010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6867
6868 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6869 doesn't provide PTRACE_GET_THREAD_AREA.
6870
fea36a59
MK
68712010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6872
6873 * linux-m68k-low.c: Include <asm/ptrace.h>
6874 (ps_get_thread_area): Implement.
6875
24b066ba
DE
68762010-05-03 Doug Evans <dje@google.com>
6877
6878 * event-loop.c (struct callback_event): New struct.
6879 (callback_list): New global.
6880 (append_callback_event, delete_callback_event): New functions.
6881 (process_callback): New function.
6882 (start_event_loop): Call it.
6883 * remote-utils.c (NOT_SCHEDULED): Define.
6884 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6885 moved out of readchar.
6886 (readchar): Rewrite. Call reschedule before returning.
6887 (reset_readchar): New function.
6888 (remote_close): Call it.
6889 (process_remaining, reschedule): New functions.
6890 * server.h (callback_handler_func): New typedef.
6891 (append_callback_event, delete_callback_event): Declare.
6892
9836d6ea
PA
68932010-05-03 Pedro Alves <pedro@codesourcery.com>
6894
6895 * proc-service.c (ps_pglobal_lookup): Use
6896 thread_db_look_up_one_symbol.
6897 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6898 parameter. Use it instead of all_symbols_looked_up.
6899 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6900 field.
6901 (all_symbols_looked_up): Don't declare.
6902 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6903 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6904 field.
6905 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6906 Set all_symbols_looked_up here.
6907 (thread_db_look_up_one_symbol): New.
6908 (thread_db_get_tls_address): Adjust.
6909 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6910 thread_db object on the heap, and tentatively set it in the
6911 process structure.
6912 (thread_db_init): Don't set all_symbols_looked_up here.
6913 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6914
7984d532
PA
69152010-05-03 Pedro Alves <pedro@codesourcery.com>
6916
6917 * linux-low.c (linux_kill, linux_detach): Adjust.
6918 (status_pending_p_callback): Remove redundant statement. Check
6919 for !TARGET_WAITIKIND_IGNORE, instead of
6920 TARGET_WAITKIND_STOPPED.
6921 (handle_tracepoints): Make sure LWP is locked. Adjust.
6922 (linux_wait_for_event_1): Adjust.
6923 (linux_cancel_breakpoints): New.
6924 (unsuspend_one_lwp): New.
6925 (unsuspend_all_lwps): New.
6926 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6927 (send_sigstop_callback): Change return type to int, add new
6928 `except' parameter and handle it.
6929 (suspend_and_send_sigstop_callback): New.
6930 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6931 pass them down. If SUSPEND, also increment the lwp's suspend
6932 count.
6933 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6934 (need_step_over_p): Don't consider suspended LWPs.
6935 (start_step_over): Adjust.
6936 (proceed_one_lwp): Change return type to int, add new `except'
6937 parameter and handle it.
6938 (unsuspend_and_proceed_one_lwp): New.
6939 (proceed_all_lwps): Use find_inferior instead of
6940 for_each_inferior.
6941 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6942 also decrement the suspend count of LWPs. Pass `except' down,
6943 instead of hacking its suspend count.
6944 (linux_pause_all): Add `freeze' parameter. Adjust.
6945 (linux_unpause_all): New.
6946 (linux_target_ops): Install linux_unpause_all.
6947 * server.c (handle_status): Adjust.
6948 * target.h (struct target_ops): New fields `unpause_all' and
6949 `cancel_breakpoints'. Add new parameter to `pause_all'.
6950 (pause_all): Add new `freeze' parameter.
6951 (unpause_all): New.
6952 (cancel_breakpoints): New.
6953 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6954 cancel breakpoints.
6955 (cmd_qtstart): Pause threads.
6956 (stop_tracing): Pause threads, and cancel breakpoints.
6957 * win32-low.c (win32_target_ops): Adjust.
6958
e471f25b
PA
69592010-05-03 Pedro Alves <pedro@codesourcery.com>
6960
6961 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6962 the inferior right away from here...
6963 (linux_wait_1): ... to here, and adjust to check the thread's
6964 last_resume_kind instead of the lwp's step or stop_expected flags.
6965
1915ef4f
PA
69662010-05-02 Pedro Alves <pedro@codesourcery.com>
6967
6968 * README: Use consistent `GDB' and `GDBserver' spellings.
6969
f9e39928
PA
69702010-05-02 Pedro Alves <pedro@codesourcery.com>
6971
6972 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6973 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6974 (linux_detach_one_lwp): Assume the lwp is stopped.
6975 (any_thread_of): Delete.
6976 (linux_detach): Stop all lwps here. Don't blindly delete all
6977 breakpoints.
6978 (delete_lwp_callback): New.
6979 (linux_mourn): Delete all lwps of the process that is gone.
6980 (linux_wait_1): Don't delete the last lwp of the process here.
6981 * mem-break.h (mark_breakpoints_out): Declare.
6982 * mem-break.c (mark_breakpoints_out): New.
6983 (free_all_breakpoints): Use it.
6984 * server.c (handle_target_event): If the process is gone, mark
6985 breakpoints out.
6986 * thread-db.c (struct thread_db) <create_bp>: New field.
6987 (thread_db_enable_reporting): Fix prototype. Store a thread event
6988 breakpoint reference in the thread_db struct.
6989 (thread_db_load_search): Clear the thread_db object.
6990 (try_thread_db_load_1): Ditto.
6991 (switch_to_process): New.
6992 (disable_thread_event_reporting): Use it.
6993 (remove_thread_event_breakpoints): New.
6994 (thread_db_detach, thread_db_mourn): Use it.
6995
1e7fc18c
PA
69962010-05-01 Pedro Alves <pedro@codesourcery.com>
6997
6998 * linux-low.c (linux_enable_event_reporting): New.
6999 (linux_wait_for_event_1, handle_extended_wait): Use it.
7000
02fc4de7
PA
70012010-04-30 Pedro Alves <pedro@codesourcery.com>
7002
7003 * linux-low.c (linux_kill_one_lwp, linux_kill)
7004 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7005 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7006 SIGSTOP even if the LWP is stopped.
7007 (send_sigstop_callback): New.
7008 (stop_all_lwps): Use send_sigstop_callback instead.
7009 (linux_resume_one_thread): Adjust.
7010 (proceed_one_lwp): Still proceed an LWP that the client has
7011 requested to stop, if we haven't reported it as stopped yet. Make
7012 sure that LWPs the client want stopped, have a pending SIGSTOP.
7013
bc3b5632
DE
70142010-04-26 Doug Evans <dje@google.com>
7015
ae1ada35
DE
7016 * server.c (handle_general_set): Make static.
7017
bc3b5632
DE
7018 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7019 Print received char after testing for error/eof instead of before.
7020 (input_interrupt): Tweak comment.
7021
65730243
DE
70222010-04-23 Doug Evans <dje@google.com>
7023
7024 * server.c (start_inferior): Print inferior argv if --debug.
7025
a8ae7dc0
AR
70262010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7027
7028 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7029 * nto-x86-low.c: Include server.h
7030
1c07cc19
PM
70312010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7032
7033 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7034 be consistent with other sources of this directory.
7035 (init_registers_amd64): Correct name of source file of this function
7036 in the comment.
7037
e0a61e09
PM
70382010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7039
7040 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7041 64-bit executables.
7042
54709339
PM
70432010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7044
7045 * win32-i386-low.c: Add 64-bit support.
7046 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7047 (init_registers_amd64): Declare.
7048 (mappings): Add 64-bit version of array.
7049 (init_windows_x86): New function.
7050 (the_low_target): Change init_arch field to init_windows_x86.
7051
e8f0053d
PM
70522010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7053
7054 * win32-low.c: Adapt to support also 64-bit architecture.
7055 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7056 (get_image_name): Use SIZE_T type for local variable `done'.
7057 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7058 (toolhelp_get_dll_name): Idem.
7059 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7060 Use uintptr_t typecast to avoid warning.
7061 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7062 (handle_exception): Use phex_nz to avoid warning.
7063 (win32_wait): Remove unused local variable `process'.
7064
c481e77e
PM
70652010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7066
7067 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7068 `amd64-avx.o'.
7069
12ea4b69
PM
70702010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7071
7072 * configure.ac: Use `ws2_32' library for srv_mingw.
7073 * configure: Regenerate.
7074 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7075 * remote-utils.c: Likewise.
7076
f6d1620c
L
70772010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7078
7079 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7080 if __x86_64__ is defined.
7081
8e642873
PM
70822010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7083
7084 * configure: Regenerate.
7085
711e434b
PM
70862010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7087
7088 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7089 * target.h (target_ops): New get_tib_address field.
7090 * win32-low.h (win32_thread_info): Add thread_local_base field.
7091 * win32-low.c (child_add_thread): Add tlb argument.
7092 Set thread_local_base field to TLB.
7093 (get_child_debug_event): Adapt to child_add_thread change.
7094 (win32_get_tib_address): New function.
7095 (win32_target_ops): Set get_tib_address field to
7096 win32_get_tib_address.
7097 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7098
505106cd
PA
70992010-04-12 Pedro Alves <pedro@codesourcery.com>
7100
505106cd
PA
7101 * linux-low.c (linux_mourn): Also remove the process.
7102 * server.c (handle_target_event): Don't remove the process here.
7103 * nto-low.c (nto_mourn): New.
7104 (nto_target_ops): Install it.
7105 * spu-low.c (spu_mourn): New.
7106 (spu_target_ops): Install it.
7107 * win32-low.c (win32_mourn): New.
7108 (win32_target_ops): Install it.
7109
e8470a06
PA
71102010-04-12 Pedro Alves <pedro@codesourcery.com>
7111
7112 * server.h (buffer_xml_printf): Remove redundant `;'.
7113
45ba0d02
PA
71142010-04-12 Pedro Alves <pedro@codesourcery.com>
7115
7116 * regcache.c (set_register_cache): Invalidate regcaches before
7117 changing the register cache layout.
7118 (regcache_invalidate_one): Allow a NULL regcache.
7119 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7120 regcaches before changing the register cache layout or the target
7121 regsets.
7122
59e04013
L
71232010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7124
7125 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7126 variable warning on Linux/x86-64.
7127
8336d594
PA
71282010-04-11 Pedro Alves <pedro@codesourcery.com>
7129
7130 GDBserver disconnected tracing support.
7131
7132 * linux-low.c (linux_remove_process): Delete.
7133 (add_lwp): Don't set last_resume_kind here.
7134 (linux_kill): Use `mourn'.
7135 (linux_detach): Use `thread_db_detach', and `mourn'.
7136 (linux_mourn): New.
7137 (linux_attach_lwp_1): Adjust comment.
7138 (linux_attach): last_resume_kind moved the thread_info; adjust.
7139 (status_pending_p_callback): Adjust.
7140 (linux_wait_for_event_1): Adjust.
7141 (count_events_callback, select_singlestep_lwp_callback)
7142 (select_event_lwp_callback, cancel_breakpoints_callback)
7143 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7144 (proceed_one_lwp): Adjust.
7145 (linux_async): Add debug output.
7146 (linux_thread_stopped): New.
7147 (linux_pause_all): New.
7148 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7149 linux_pause_all.
7150 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7151 (thread_db_free): Delete declaration.
7152 (thread_db_detach, thread_db_mourn): Declare.
7153 * thread-db.c (thread_db_init): Use thread_db_mourn.
7154 (thread_db_free): Delete, split in two.
7155 (disable_thread_event_reporting): New.
7156 (thread_db_detach): New.
7157 (thread_db_mourn): New.
7158
7159 * server.h (struct thread_info) <last_resume_kind>: New field.
7160 <attached>: Add comment.
7161 <gdb_detached>: New field.
7162 (handler_func): Change return type to int.
7163 (handle_serial_event, handle_target_event): Ditto.
7164 (gdb_connected): Declare.
7165 (tracing): Delete.
7166 (disconnected_tracing): Declare.
7167 (stop_tracing): Declare.
7168
7169 * server.c (handle_query) <qSupported>: Report support for
7170 disconnected tracing.
7171 (queue_stop_reply_callback): Account for running threads.
7172 (gdb_wants_thread_stopped): New.
7173 (gdb_wants_all_threads_stopped): New.
7174 (gdb_reattached_process): New.
7175 (handle_status): Clear the `gdb_detached' flag of all processes.
7176 In all-stop, stop all threads.
7177 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7178 (process_serial_event): If the remote connection breaks, or if an
7179 exit was forced with "monitor exit", force an event loop exit.
7180 Handle disconnected tracing on detach.
7181 (handle_serial_event): Adjust.
7182 (handle_target_event): If GDB isn't connected, forward events back
7183 to the inferior, unless the last process exited, in which case,
7184 exit gdbserver. Adjust interface.
7185
7186 * remote-utils.c (remote_open): Don't block in accept. Instead
7187 register an event loop source on the listen socket file
7188 descriptor. Refactor bits into ...
7189 (listen_desc): ... this new global.
7190 (gdb_connected): ... this new function.
7191 (enable_async_notification): ... this new function.
7192 (handle_accept_event): ... this new function.
7193 (remote_close): Clear remote_desc.
7194
7195 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7196
7197 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7198 New fields.
7199 (mourn_inferior): Define.
7200 (target_process_qsupported): Avoid the dangling else problem.
7201 (thread_stopped): Define.
7202 (pause_all): Define.
7203 (target_waitstatus_to_string): Declare.
7204 * target.c (target_waitstatus_to_string): New.
7205
7206 * tracepoint.c (tracing): Make extern.
7207 (disconnected_tracing): New.
7208 (stop_tracing): Make extern. Handle tracing stops due to GDB
7209 disconnecting.
7210 (cmd_qtdisconnected): New.
7211 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7212 (handle_tracepoint_general_set): Handle QTDisconnected.
7213
7214 * event-loop.c (event_handler_func): Change return type to int.
7215 (process_event): Bail out if the event handler wants the event
7216 loop to stop.
7217 (handle_file_event): Ditto.
7218 (start_event_loop): Bail out if the event handler wants the event
7219 loop to stop.
7220
7221 * nto-low.c (nto_target_ops): Adjust.
7222 * spu-low.c (spu_wait): Don't remove the process here.
7223 (spu_target_ops): Adjust.
7224 * win32-low.c (win32_wait): Don't remove the process here.
7225 (win32_target_ops): Adjust.
7226
5d267c4c
PA
72272010-04-11 Pedro Alves <pedro@codesourcery.com>
7228
7229 * regcache.c (realloc_register_cache): Invalidate inferior's
7230 regcache before recreating it.
7231
623ccd72
PA
72322010-04-09 Pedro Alves <pedro@codesourcery.com>
7233
7234 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7235
219f2f23
PA
72362010-04-09 Stan Shebs <stan@codesourcery.com>
7237 Pedro Alves <pedro@codesourcery.com>
7238
7239 * server.h (LONGEST): New.
7240 (struct thread_info) <while_stepping>: New field.
7241 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7242 Declare.
7243 (initialize_tracepoint, handle_tracepoint_general_set)
7244 (handle_tracepoint_query, tracepoint_finished_step)
7245 (tracepoint_was_hit, release_while_stepping_state_list):
7246 (current_traceframe): Declare.
7247 * server.c (handle_general_set): Handle tracepoint packets.
7248 (read_memory): New.
7249 (write_memory): New.
7250 (handle_search_memory_1): Use read_memory.
7251 (handle_query): Report support for conditional tracepoints, trace
7252 state variables, and tracepoint sources. Handle tracepoint
7253 queries.
7254 (main): Initialize the tracepoints module.
7255 (process_serial_event): Handle traceframe reads/writes.
7256
7257 * linux-low.c (handle_tracepoints): New.
7258 (linux_wait_1): Call it.
7259 (linux_resume_one_lwp): Handle while-stepping.
7260 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7261 (linux_target_ops): Install them.
7262 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7263 New field.
7264 * linux-x86-low.c (x86_supports_tracepoints): New.
7265 (the_low_target). Install it.
7266
7267 * mem-break.h (delete_breakpoint): Declare.
7268 * mem-break.c (delete_breakpoint): Make external.
7269
7270 * target.h (struct target_ops): Add `supports_tracepoints',
7271 `read_pc', and `write_pc' fields.
7272 (target_supports_tracepoints): Define.
7273 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7274 (phex_nz): New.
7275
7276 * regcache.h (struct regcache) <registers_owned>: New field.
7277 (init_register_cache, regcache_cpy): Declare.
7278 (regcache_read_pc, regcache_write_pc): Declare.
7279 (register_cache_size): Declare.
7280 (supply_regblock): Declare.
7281 * regcache.c (init_register_cache): New.
7282 (new_register_cache): Use it.
7283 (regcache_cpy): New.
7284 (register_cache_size): New.
7285 (supply_regblock): New.
7286 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 7287
219f2f23
PA
7288 * tracepoint.c: New.
7289
7290 * Makefile.in (OBS): Add tracepoint.o.
7291 (tracepoint.o): New rule.
7292
3a13a53b
L
72932010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7294
7295 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7296 (i386-mmx.o): New.
7297 (i386-mmx.c): Likewise.
7298 (i386-mmx-linux.o): Likewise.
7299 (i386-mmx-linux.c): Likewise.
7300
7301 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7302 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7303 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7304 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7305
7306 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7307 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7308 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7309
1570b33e
L
73102010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7311
7312 * Makefile.in (clean): Updated.
7313 (i386-avx.o): New.
7314 (i386-avx.c): Likewise.
7315 (i386-avx-linux.o): Likewise.
7316 (i386-avx-linux.c): Likewise.
7317 (amd64-avx.o): Likewise.
7318 (amd64-avx.c): Likewise.
7319 (amd64-avx-linux.o): Likewise.
7320 (amd64-avx-linux.c): Likewise.
7321
7322 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7323 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7324 (srv_amd64_regobj): Add amd64-avx.o.
7325 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7326 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7327 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7328 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7329 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7330 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7331 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7332
7333 * i387-fp.c: Include "i386-xstate.h".
7334 (i387_xsave): New.
7335 (i387_cache_to_xsave): Likewise.
7336 (i387_xsave_to_cache): Likewise.
7337 (x86_xcr0): Likewise.
7338
7339 * i387-fp.h (i387_cache_to_xsave): Likewise.
7340 (i387_xsave_to_cache): Likewise.
7341 (x86_xcr0): Likewise.
7342
7343 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7344 * linux-crisv32-low.c (target_regsets): Likewise.
7345 * linux-m68k-low.c (target_regsets): Likewise.
7346 * linux-mips-low.c (target_regsets): Likewise.
7347 * linux-ppc-low.c (target_regsets): Likewise.
7348 * linux-s390-low.c (target_regsets): Likewise.
7349 * linux-sh-low.c (target_regsets): Likewise.
7350 * linux-sparc-low.c (target_regsets): Likewise.
7351 * linux-xtensa-low.c (target_regsets): Likewise.
7352
7353 * linux-low.c: Include <sys/uio.h>.
7354 (regsets_fetch_inferior_registers): Support nt_type.
7355 (regsets_store_inferior_registers): Likewise.
7356 (linux_process_qsupported): New.
7357 (linux_target_ops): Add linux_process_qsupported.
7358
7359 * linux-low.h (regset_info): Add nt_type.
7360 (linux_target_ops): Add process_qsupported.
7361
7362 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7363 and <sys/uio.h>.
7364 (init_registers_i386_avx_linux): New.
7365 (init_registers_amd64_avx_linux): Likewise.
7366 (xmltarget_i386_linux_no_xml): Likewise.
7367 (xmltarget_amd64_linux_no_xml): Likewise.
7368 (PTRACE_GETREGSET): Likewise.
7369 (PTRACE_SETREGSET): Likewise.
7370 (x86_fill_xstateregset): Likewise.
7371 (x86_store_xstateregset): Likewise.
7372 (use_xml): Likewise.
7373 (x86_linux_update_xmltarget): Likewise.
7374 (x86_linux_process_qsupported): Likewise.
7375 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7376 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7377 init_registers_i386_linux here. Call
7378 x86_linux_update_xmltarget.
7379 (the_low_target): Add x86_linux_process_qsupported.
7380
7381 * server.c (handle_query): Call target_process_qsupported.
7382
7383 * target.h (target_ops): Add process_qsupported.
7384 (target_process_qsupported): New.
7385
fc7238bb
PA
73862010-04-03 Pedro Alves <pedro@codesourcery.com>
7387
7388 * inferiors.c (add_thread): Set last_status kind to
7389 TARGET_WAITKIND_IGNORE.
7390 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7391 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7392 (linux_wait_1): Move `thread' local definition to block that uses
7393 it. Don't NULL initialize `event_child'.
7394 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7395 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7396 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7397
bdabb078
PA
73982010-04-01 Pedro Alves <pedro@codesourcery.com>
7399
7400 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7401 an extended waitstatus, or by a watchpoint.
7402 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7403 thread was stepping or has been stopped by a watchpoint.
7404
d3bbe7a0
PA
74052010-04-01 Pedro Alves <pedro@codesourcery.com>
7406
7407 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7408 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7409 of another, then delete the previous, and validate all
7410 breakpoints.
7411 (validate_inserted_breakpoint): New.
7412 (delete_disabled_breakpoints): New.
7413 (validate_breakpoints): New.
7414 (check_mem_read): Validate breakpoints before trusting their
7415 shadow. Delete disabled breakpoints.
7416 (check_mem_write): Validate breakpoints before trusting they
7417 should be inserted. Delete disabled breakpoints.
7418 * mem-break.h (validate_breakpoints):
7419 * server.c (handle_query): Validate breakpoints when we see a
7420 qSymbol query.
7421
8b07ae33
PA
74222010-04-01 Pedro Alves <pedro@codesourcery.com>
7423
7424 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7425 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7426 if we could tell there's a GDB breakpoint at stop_pc.
7427 (need_step_over_p): Don't do a step over if we find a GDB
7428 breakpoint at the resume PC.
7429
7430 * mem-break.c (struct raw_breakpoint): New.
7431 (enum bkpt_type): New type `gdb_breakpoint'.
7432 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7433 fields. New field `raw'.
7434 (find_raw_breakpoint_at): New.
7435 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7436 breakpoint instead.
7437 (set_breakpoint_at): Adjust.
7438 (delete_raw_breakpoint): New.
7439 (release_breakpoint): New.
7440 (delete_breakpoint): Rename to...
7441 (delete_breakpoint_1): ... this. Add proc parameter. Use
7442 release_breakpoint. Return ENOENT.
7443 (delete_breakpoint): Reimplement.
7444 (find_breakpoint_at): Delete.
7445 (find_gdb_breakpoint_at): New.
7446 (delete_breakpoint_at): Delete.
7447 (set_gdb_breakpoint_at): New.
7448 (delete_gdb_breakpoint_at): New.
7449 (gdb_breakpoint_here): New.
7450 (set_reinsert_breakpoint): Use release_breakpoint.
7451 (uninsert_breakpoint): Rename to ...
7452 (uninsert_raw_breakpoint): ... this.
7453 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7454 (reinsert_raw_breakpoint): Change parameter type to
7455 raw_breakpoint.
7456 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7457 instead.
7458 (check_breakpoints): Adjust. Use release_breakpoint.
7459 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7460 (breakpoint_inserted_here): Ditto.
7461 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7462 Don't trust the breakpoint's shadow if it is not inserted.
7463 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7464 (delete_all_breakpoints): Adjust.
7465 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7466 use delete_breakpoint_1.
7467
7468 * mem-break.h (breakpoints_supported): Delete declaration.
7469 (set_gdb_breakpoint_at): Declare.
7470 (gdb_breakpoint_here): Declare.
7471 (delete_breakpoint_at): Delete.
7472 (delete_gdb_breakpoint_at): Declare.
7473
7474 * server.h (struct raw_breakpoint): Forward declare.
7475 (struct process_info): New field `raw_breakpoints'.
7476
7477 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7478 breakpoints.
7479
6bf5e0ba
PA
74802010-03-24 Pedro Alves <pedro@codesourcery.com>
7481
7482 * linux-low.c (status_pending_p_callback): Fix comment.
7483 (linux_wait_for_event_1): Move most of the internal breakpoint
7484 handling from here...
7485 (linux_wait_1): ... to here.
7486 (count_events_callback): New.
7487 (select_singlestep_lwp_callback): New.
7488 (select_event_lwp_callback): New.
7489 (cancel_breakpoints_callback): New.
7490 (select_event_lwp): New.
7491 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7492 priority to all LWPs that have had events that should be reported
7493 to the client. Cancel breakpoints when about to reporting the
7494 event to the client, not while stopping lwps. No longer cancel
7495 finished single-steps here.
7496 (cancel_finished_single_step): Delete.
7497 (cancel_finished_single_steps): Delete.
7498
414a389f
PA
74992010-03-24 Pedro Alves <pedro@codesourcery.com>
7500
7501 * mem-break.c (enum bkpt_type): New.
7502 (struct breakpoint): New field `type'.
7503 (set_breakpoint_at): Change return type to struct breakpoint
7504 pointer. Set type to `other_breakpoint' by default.
7505 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7506 in the breakpoint list.
7507 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7508 (reinsert_breakpoint): Rename to ...
7509 (reinsert_raw_breakpoint): ... this.
7510 (reinsert_breakpoints_at): Adjust.
7511 * mem-break.h (struct breakpoint): Declare.
7512 (set_breakpoint_at): Change return type to struct breakpoint
7513 pointer.
7514
2280c721
PA
75152010-03-24 Pedro Alves <pedro@codesourcery.com>
7516
7517 * server.c (handle_query): Assign, not compare.
7518
d50171e4
PA
75192010-03-24 Pedro Alves <pedro@codesourcery.com>
7520
7521 Teach linux gdbserver to step-over-breakpoints.
7522
7523 * linux-low.c (can_hardware_single_step): New.
7524 (supports_breakpoints): New.
7525 (handle_extended_wait): If stopping threads, read the stop pc of
7526 the new cloned LWP.
7527 (get_pc): New.
7528 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7529 low target doesn't support retrieving the PC.
7530 (add_lwp): Set last_resume_kind to resume_continue.
7531 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7532 (linux_attach): Don't clear stop_expected. Set the lwp's
7533 last_resume_kind to resume_stop.
7534 (linux_detach_one_lwp): Don't check for removed breakpoints.
7535 (check_removed_breakpoint): Delete.
7536 (status_pending_p): Rename to ...
7537 (status_pending_p_callback): ... this. Don't check for removed
7538 breakpoints. Don't consider threads that are stopped from GDB's
7539 perspective.
7540 (linux_wait_for_lwp): Always read the stop_pc here.
7541 (cancel_breakpoint): New.
7542 (step_over_bkpt): New global.
7543 (linux_wait_for_event_1): Implement stepping over breakpoints.
7544 (gdb_wants_lwp_stopped): New.
7545 (gdb_wants_all_stopped): New.
7546 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7547 single-step traps here. Store the thread's last reported target
7548 wait status.
7549 (send_sigstop): Don't clear stop_expected. Always set it,
7550 instead.
7551 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7552 (cancel_finished_single_step): New.
7553 (cancel_finished_single_steps): New.
7554 (wait_for_sigstop): Don't cancel finished single-step traps here.
7555 (linux_resume_one_lwp): Don't check for removed breakpoints.
7556 Don't set `step' on non-hardware step archs.
7557 (linux_set_resume_request): Ignore resume_stop requests if already
7558 stopping or stopped. Set the lwp's last_resume_kind.
7559 (resume_status_pending_p): Don't check for removed breakpoints.
7560 (need_step_over_p): New.
7561 (start_step_over): New.
7562 (finish_step_over): New.
7563 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7564 requests. Clear the thread's last reported target waitstatus.
7565 Don't use the `suspended' flag. Don't consider pending breakpoints.
7566 (linux_resume): Start a step-over if necessary.
7567 (proceed_one_lwp): New.
7568 (proceed_all_lwps): New.
7569 (unstop_all_lwps): New.
7570 * linux-low.h (struct lwp_info): Rewrite comment for the
7571 `suspended' flag. Add the `stop_pc' field. Delete the
7572 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7573 Add `'last_resume_kind' and `need_step_over' fields.
7574 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7575 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7576 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7577 (set_raw_breakpoint_at): New.
7578 (set_breakpoint_at): Rewrite to use it.
7579 (reinsert_breakpoint_handler): Delete.
7580 (set_reinsert_breakpoint): New.
7581 (reinsert_breakpoint_by_bp): Delete.
7582 (delete_reinsert_breakpoints): New.
7583 (uninsert_breakpoint): Rewrite.
7584 (uninsert_breakpoints_at): New.
7585 (reinsert_breakpoint): Rewrite.
7586 (reinsert_breakpoints_at): New.
7587 (check_breakpoints): Rewrite.
7588 (breakpoint_here): New.
7589 (breakpoint_inserted_here): New.
7590 (check_mem_read): Adjust.
7591 * mem-break.h (breakpoints_supported, breakpoint_here)
7592 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7593 (reinsert_breakpoint_by_bp): Delete declaration.
7594 (delete_reinsert_breakpoints): Declare.
7595 (reinsert_breakpoint): Delete declaration.
7596 (reinsert_breakpoints_at): Declare.
7597 (uninsert_breakpoint): Delete declaration.
7598 (uninsert_breakpoints_at): Declare.
7599 (check_breakpoints): Adjust prototype.
7600 * server.h: Adjust include order.
7601 (struct thread_info): Declare here. Add a `last_status' field.
7602
30ba68cb
MS
76032010-03-23 Michael Snyder <msnyder@vmware.com>
7604
7605 * server.c (crc32): New function.
7606 (handle_query): Add handling for 'qCRC:' request.
7607
b9a881c2
PA
76082010-03-23 Pedro Alves <pedro@codesourcery.com>
7609
7610 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7611 lwp had been stopped by a watchpoint.
7612
e92d13d5
PA
76132010-03-16 Pedro Alves <pedro@codesourcery.com>
7614
7615 * server.h (internal_error): Declare.
7616 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7617 * utils.c (internal_error): New function.
7618
64daa791
AS
76192010-03-15 Andreas Schwab <schwab@redhat.com>
7620
7621 * configure.srv: Fix typo setting srv_regobj.
7622
f52cd8cd
PA
76232010-03-15 Pedro Alves <pedro@codesourcery.com>
7624
7625 * linux-low.c (fetch_register): Avoid passing a non string literal
7626 format to `error'.
7627 (usr_store_inferior_registers): Ditto.
7628
93ae6fdc
PA
76292010-03-14 Pedro Alves <pedro@codesourcery.com>
7630
7631 * linux-low.c (linux_write_memory): Bail out early if peeking
7632 memory failed.
7633
c3adc08c
PA
76342010-03-14 Pedro Alves <pedro@codesourcery.com>
7635
7636 * linux-low.h (struct lwp_info): New fields
7637 `stopped_by_watchpoint' and `stopped_data_address'.
7638 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7639 here, and cache them in the lwp object.
7640 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7641 directly.
7642 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7643 field.
7644 (linux_stopped_by_watchpoint): Rewrite.
7645 (linux_stopped_data_address): Rewrite.
7646
bce522a2
PA
76472010-03-06 Simo Melenius <simo.melenius@iki.fi>
7648
7649 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7650 switching the current inferior, not before.
7651
90884b2b
L
76522010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7653
7654 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7655 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7656 i386-linux.c and amd64-linux.c.
7657 (reg-i386.o): Removed.
7658 (reg-i386.c): Likewise.
7659 (reg-i386-linux.o): Likewise.
7660 (reg-i386-linux.c): Likewise.
7661 (reg-x86-64.o): Likewise.
7662 (reg-x86-64.c): Likewise.
7663 (reg-x86-64-linux.o): Likewise.
7664 (reg-x86-64-linux.c): Likewise.
7665 (i386.o): New.
7666 (i386.c): Likewise.
7667 (i386-linux.o): Likewise.
7668 (i386-linux.c): Likewise.
7669 (amd64.o): Likewise.
7670 (amd64.c): Likewise.
7671 (amd64-linux.o): Likewise.
7672 (amd64-linux.c): Likewise.
7673
7674 * configure.srv (srv_i386_regobj): New.
7675 (srv_i386_linux_regobj): Likewise.
7676 (srv_amd64_regobj): Likewise.
7677 (srv_amd64_linux_regobj): Likewise.
7678 (srv_i386_32bit_xmlfiles): Likewise.
7679 (srv_i386_64bit_xmlfiles): Likewise.
7680 (srv_i386_xmlfiles): Likewise.
7681 (srv_amd64_xmlfiles): Likewise.
7682 (srv_i386_linux_xmlfiles): Likewise.
7683 (srv_amd64_linux_xmlfiles): Likewise.
7684 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7685 srv_xmlfiles to $srv_i386_xmlfiles.
7686 (i[34567]86-*-mingw32ce*): Likewise.
7687 (i[34567]86-*-mingw*): Likewise.
7688 (i[34567]86-*-nto*): Likewise.
7689 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7690 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7691 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7692 (x86_64-*-linux*): Likewise.
7693
7694 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7695 (init_registers_amd64_linux): New.
7696 (x86_arch_setup): Replace init_registers_x86_64_linux with
7697 init_registers_amd64_linux.
7698
193f13e6
MK
76992010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7700
7701 * configure.ac: Check for libdl. If it is not available link against
7702 static libthread_db.
7703 * configure: Regenerate.
7704
85d721b8
PA
77052010-02-22 Pedro Alves <pedro@codesourcery.com>
7706
7707 PR9605
7708
7709 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7710 handing a read watchpoint.
7711 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7712
6076632b
DE
77132010-02-12 Doug Evans <dje@google.com>
7714
7715 * linux-low.c (linux_supports_tracefork_flag): Document.
7716 (linux_look_up_symbols): Add comment.
7717
3327ccf7
L
77182010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7719
7720 * regcache.c (supply_register): Clear regcache if buf is NULL.
7721
0718675c 77222010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7723 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7724
7725 * inferiors.c (find_inferior): Add function documentation.
7726 (unloaded_dll): Handle the case where the unloaded dll has not
7727 been previously registered in the dll list.
7728
177321bd
DJ
77292010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7730
7731 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7732 (thumb2_breakpoint): New.
7733 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7734
2b009048
DJ
77352010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7736
7737 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7738 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7739 breakpoints.
7740
3be029c7
PA
77412010-01-21 Pedro Alves <pedro@codesourcery.com>
7742
7743 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7744
18f5de3b
JK
77452010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7746
7747 * linux-s390-low.c (s390_collect_ptrace_register)
7748 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7749
3743bb4f
DE
77502010-01-21 Doug Evans <dje@google.com>
7751
14ce3065
DE
7752 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7753 (PTRACE_ARG4_TYPE): New macro.
7754 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7755 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7756 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7757 (usr_store_inferior_registers): Ditto.
7758 (linux_read_memory, linux_write_memory): Ditto.
7759 (linux_test_for_tracefork): Ditto.
7760
3743bb4f
DE
7761 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7762 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7763
8b315be5
PA
77642010-01-21 Pedro Alves <pedro@codesourcery.com>
7765
7766 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7767 target.
7768
85492558
PA
77692010-01-21 Pedro Alves <pedro@codesourcery.com>
7770
7771 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7772 prototype to take a regcache. Adjust.
7773
442ea881
PA
77742010-01-20 Pedro Alves <pedro@codesourcery.com>
7775
7776 * regcache.h (struct thread_info): Forward declare.
7777 (struct regcache): New.
7778 (new_register_cache): Adjust prototype.
7779 (get_thread_regcache): Declare.
7780 (free_register_cache): Adjust prototype.
7781 (registers_to_string, registers_from_string): Ditto.
7782 (supply_register, supply_register_by_name, collect_register)
7783 (collect_register_as_string, collect_register_by_name): Ditto.
7784 * regcache.c (struct inferior_regcache_data): Delete.
7785 (get_regcache): Rename to ...
7786 (get_thread_regcache): ... this. Adjust. Switch inferior before
7787 fetching registers.
7788 (regcache_invalidate_one): Adjust.
7789 (regcache_invalidate): Fix prototype.
7790 (new_register_cache): Return the new register cache.
7791 (free_register_cache): Change prototype.
7792 (realloc_register_cache): Adjust.
7793 (registers_to_string): Change prototype to take a regcache. Adjust.
7794 (registers_from_string): Ditto.
7795 (register_data): Ditto.
7796 (supply_register): Ditto.
7797 (supply_register_by_name): Ditto.
7798 (collect_register): Ditto.
7799 (collect_register_as_string): Ditto.
7800 (collect_register_by_name): Ditto.
7801 * server.c (process_serial_event): Adjust.
7802 * linux-low.h (regset_fill_func, regset_store_func): Change
7803 prototype.
7804 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7805 Change prototype.
7806 * linux-low.c (get_stop_pc): Adjust.
7807 (check_removed_breakpoint): Adjust.
7808 (linux_wait_for_event): Adjust.
7809 (linux_resume_one_lwp): Adjust.
7810 (fetch_register): Add regcache parameter. Adjust.
7811 (usr_store_inferior_registers): Ditto.
7812 (regsets_fetch_inferior_registers): Ditto.
7813 (regsets_store_inferior_registers): Ditto.
7814 (linux_fetch_registers, linux_store_registers): Ditto.
7815 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7816 regcache. Adjust.
43aaf8b6
PA
7817 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7818 Ditto.
442ea881
PA
7819 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7820 prototype to take a regcache.
7821 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7822 * remote-utils.c (convert_ascii_to_int, outreg)
7823 (prepare_resume_reply): Change prototype to take a regcache.
7824 Adjust.
7825 * target.h (struct target_ops) <fetch_registers, store_registers>:
7826 Change prototype to take a regcache.
7827 (fetch_inferior_registers, store_inferior_registers): Change
7828 prototype to take a regcache. Adjust.
7829 * proc-service.c (ps_lgetregs): Adjust.
7830 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7831 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7832 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7833 take a regcache. Adjust.
7834 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7835 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7836 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7837 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7838 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7839 (cris_cannot_fetch_register):
7840 (cris_breakpoint_at): Change prototype to take a regcache.
7841 Adjust.
7842 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7843 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7844 to take a regcache. Adjust.
7845 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7846 Adjust.
7847 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7848 take a regcache. Adjust.
7849 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7850 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7851 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7852 * linux-mips-low.c (mips_get_pc):
7853 (mips_set_pc): Change prototype to take a regcache. Adjust.
7854 (mips_reinsert_addr): Adjust.
7855 (mips_collect_register): Change prototype to take a regcache.
7856 Adjust.
7857 (mips_supply_register):
7858 (mips_collect_register_32bit, mips_supply_register_32bit)
7859 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7860 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7861 * linux-ppc-low.c (ppc_supply_ptrace_register)
7862 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7863 (parse_spufs_run): Adjust.
7864 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7865 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7866 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7867 take a regcache. Adjust.
7868 * linux-s390-low.c (s390_collect_ptrace_register)
7869 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7870 (s390_set_pc): Change prototype to take a regcache. Adjust.
7871 (s390_arch_setup): Adjust.
7872 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7873 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7874 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7875 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7876 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7877 regcache. Adjust.
7878 (sparc_breakpoint_at): Adjust.
7879 * linux-xtensa-low.c (xtensa_fill_gregset):
7880 (xtensa_store_gregset):
7881 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7882 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7883 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7884 prototype to take a regcache. Adjust.
7885 * win32-arm-low.c (arm_fetch_inferior_register)
7886 (arm_store_inferior_register): Change prototype to take a
7887 regcache. Adjust.
7888 * win32-i386-low.c (i386_fetch_inferior_register)
7889 (i386_store_inferior_register): Change prototype to take a
7890 regcache. Adjust.
7891 * win32-low.c (child_fetch_inferior_registers)
7892 (child_store_inferior_registers): Change prototype to take a
7893 regcache. Adjust.
7894 (win32_wait): Adjust.
7895 (win32_fetch_inferior_registers): Change prototype to take a
7896 regcache. Adjust.
7897 (win32_store_inferior_registers): Adjust.
7898 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7899 store_inferior_register>: Change prototype to take a regcache.
7900
60c3d7b0
DE
79012010-01-20 Doug Evans <dje@google.com>
7902
7903 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7904 #ifdef.
7905 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7906 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7907
dc146f7c
VP
79082010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7909
7910 * linux-low.c (linux_core_of_thread): New.
7911 (compare_ints, show_process, list_threads): New.
7912 (linux_qxfer_osdata): Report threads and cores.
7913 (linux_target_op): Register linux_core_of_thread.
7914 * remote-utils.c (prepare_resume_reply): Report the core.
7915 (buffer_xml_printf): Support %d specifier.
7916 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7917 New.
7918 (handle_query): Handle qXfer:threads. Announce availability
7919 thereof.
7920 * target.h (struct target_ops): New field core_of_thread.
7921
7803799a
UW
79222010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7923
7924 * Makefile.in (clean): Remove new generated files.
7925 (reg-s390.o, reg-s390.c): Remove rules.
7926 (reg-s390x.o, reg-s390x.c): Likewise.
7927 (s390-linux32.o, s390-linux32.c): Add rules.
7928 (s390-linux64.o, s390-linux64.c): Likewise.
7929 (s390x-linux64.o, s390x-linux64.c): Likewise.
7930 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7931 * linux-s390-low.c: Include <elf.h>.
7932 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7933 (init_registers_s390): Remove prototype.
7934 (init_registers_s390x): Likewise.
7935 (init_registers_s390_linux32): Add prototype.
7936 (init_registers_s390_linux64): Likewise.
7937 (init_registers_s390x_linux64): Likewise.
7938 (s390_num_regs_3264): New define.
7939 (s390_regmap_3264): New global variable.
7940 (s390_cannot_fetch_register): Remove obsolete check.
7941 (s390_cannot_store_register): Likewise.
7942 (s390_collect_ptrace_register): Handle upper/lower register halves.
7943 (s390_supply_ptrace_register): Likewise.
7944 (s390_fill_gregset): Update to register number changes.
7945 (s390_get_hwcap): New routine.
7946 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7947 Install appropriate regmap and register set.
7948
6e7ffa39
JB
79492010-01-01 Joel Brobecker <brobecker@adacore.com>
7950
7951 * server.c (gdbserver_version): Update copyright year to 2010.
7952 * gdbreplay.c (gdbreplay_version): Likewise.
7953
957f3f49
DE
79542009-12-28 Doug Evans <dje@google.com>
7955
7956 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7957 elf/external.h. Include <elf.h> instead but only if necessary.
7958
ca5c370d
PA
79592009-12-28 Pedro Alves <pedro@codesourcery.com>
7960
7961 * linux-low.c (linux_remove_process): Remove `detaching'
7962 parameter. Don't release/detach from thread_db here.
7963 (linux_kill): Release/detach from thread_db here, ...
7964 (linux_detach): ... and here, before actually detaching.
7965 (linux_wait_1): ... and here, when a process exits.
7966 * thread-db.c (any_thread_of): New.
7967 (thread_db_free): Switch the current inferior to a thread of the
7968 passed in process.
7969
4ee62156
DE
79702009-12-21 Doug Evans <dje@google.com>
7971
d90e6a88
DE
7972 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7973
c5f62d5f
DE
7974 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7975 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7976 warning ifndef __NR_tkill. Move setting of errno there too.
7977 Delete unnecessary resetting of errno after syscall.
7978 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7979
10e86dd7
DE
7980 * configure.ac: Check for dladdr.
7981 * config.in: Regenerate.
7982 * configure: Regenerate.
7983 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7984 (try_thread_db_load): Update.
7985
4ee62156
DE
7986 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7987
00f515da
DE
79882009-12-18 Doug Evans <dje@google.com>
7989
e9464885
DE
7990 * event-loop.c: Include unistd.h if it exists.
7991
07d4f67e
DE
7992 * linux-low.c (my_waitpid): Move definition away from being in
7993 between linux_tracefork_child/linux_test_for_tracefork.
7994
00f515da
DE
7995 * gdb_proc_service.h (psaddr_t): Fix type.
7996 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7997 signature to match glibc.
7998
1de1badb
DE
79992009-12-16 Doug Evans <dje@google.com>
8000
8001 * linux-low.c (linux_read_memory): Fix argument to read.
8002
aeeb81d1
PA
80032009-11-26 Pedro Alves <pedro@codesourcery.com>
8004
8005 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8006 events, don't leave current_inferior pointing at null.
8007
10357975
PA
80082009-11-26 Pedro Alves <pedro@codesourcery.com>
8009
8010 * win32-low.c (LOG): Delete.
8011 (OUTMSG): Output to stderr.
8012 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8013 on compile time LOG macro.
8014 (win32_wait): Fix debug output.
8015
cf6e3471
PA
80162009-11-26 Pedro Alves <pedro@codesourcery.com>
8017
8018 * win32-low.c (win32_add_one_solib): If the dll name is
8019 "ntdll.dll", prepend the system directory to the dll path.
8020
0c85e18e
MK
80212009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8022
8023 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8024
9ac544ce 80252009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 8026 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
8027
8028 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8029 * configure.ac: Check for __mcoldfire__ and set
8030 gdb_cv_m68k_is_coldfire.
8031 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8032 reg-cf.o and reg-m68k.o.
8033 * configure: Regenerated.
8034
fd7dd3e6
PA
80352009-11-16 Pedro Alves <pedro@codesourcery.com>
8036
8037 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8038 Pass it to thread_db_free.
8039 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8040 proper `detaching' argument to linux_remove_process.
8041 * linux-low.h (thread_db_free): Add `detaching' parameter.
8042 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8043 to thread_db_free.
8044 (thread_db_free): Add `detaching' parameter. Only
8045 call td_ta_clear_event if detaching from process.
8046
75aa492e
MK
80472009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8048
8049 * thread-db.c (thread_db_free): Fix typo.
8050
21e1bee4
PP
80512009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8052
8053 PR gdb/10838
8054 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8055
8838b45e
NS
80562009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8057
8058 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8059 with an i686 compiler.
8060 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8061 needed.
8062 * configure: Rebuilt.
8063
8a35fb51
SL
80642009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8065
8066 PR gdb/10783
8067
8068 * server.c (handle_search_memory_1): Correct read_addr initialization
8069 in loop for searching subsequent chunks.
8070
96f15937
PP
80712009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8072
8073 * configure.ac: New --with-libthread-db option.
8074 * thread-db.c: Allow direct dependence on libthread_db.
8075 (thread_db_free): Adjust.
8076 * config.in: Regenerate.
8077 * configure: Likewise.
889bf7c5 8078
5f7d1694
PP
80792009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8080
8081 PR gdb/10757
8082 * thread-db.c (attach_thread): New function.
8083 (maybe_attach_thread): Return success/failure.
8084 (find_new_threads_callback): Adjust.
889bf7c5
PA
8085 (thread_db_find_new_threads): Loop until no new threads.
8086
88e3b899
PA
80872009-10-13 Pedro Alves <pedro@codesourcery.com>
8088
8089 * proc-service.c (ps_lgetregs): Formatting.
8090
cdbfd419
PP
80912009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8092
8093 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8094 * configure.ac: Adjust.
8095 * linux-low.h (struct process_info_private): Move members to struct
8096 thread_db.
8097 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8098 * linux-low.c (linux_remove_process): Adjust.
8099 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8100 * server.c (handle_query): Move code ...
8101 (handle_monitor_command): ... here. New function.
8102 * target.h (struct target_ops): New member.
8103 * thread-db.c (struct thread_db): New.
8104 (libthread_db_search_path): New variable.
8105 (thread_db_create_event, thread_db_enable_reporting)
8106 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8107 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8108 (try_thread_db_load_1, dladdr_to_soname): New functions.
8109 (try_thread_db_load, thread_db_load_search): New functions.
8110 (thread_db_init): Search for libthread_db.
8111 (thread_db_free): New function.
8112 (thread_db_handle_monitor_command): Likewise.
8113 * config.in: Regenerate.
8114 * configure: Regenerate.
889bf7c5 8115
4168d2d6
UW
81162009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8117
8118 * spu-low.c (spu_kill): Wait for inferior to terminate.
8119 Call clear_inferiors.
8120 (spu_detach): Call clear_inferiors.
8121
81ecdfbb
RW
81222009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8123
8124 * aclocal.m4: Regenerate.
8125 * config.in: Likewise.
8126 * configure: Likewise.
8127
0b9ff2c0
UW
81282009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8129
8130 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8131 (parse_spufs_run): New function.
8132 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8133 (ppc_breakpoint_at): Handle SPU breakpoints.
8134
efcbbd14
UW
81352009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8136
8137 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8138 (SPUFS_MAGIC): Define.
8139 (spu_enumerate_spu_ids): New function.
8140 (linux_qxfer_spu): New function.
8141 (linux_target_ops): Install linux_qxfer_spu.
8142
f4d9bade
UW
81432009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8144
8145 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8146 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8147 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8148 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8149 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8150 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8151 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8152 (init_registers_powerpc_cell32l): Add prototype.
8153 (init_registers_powerpc_cell64l): Likewise.
8154 (ppc_arch_setup): Detect Cell/B.E. architecture.
8155
96e946ca
RW
81562009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8157
8158 * Makefile.in (datarootdir): New variable.
8159
58d6951d
DJ
81602009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8161
8162 * linux-low.c (linux_write_memory): Update debugging output.
8163 * Makefile.in (clean): Add new descriptions.
8164 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8165 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8166 * configure.srv: Add new files for arm*-*-linux*.
8167 * linux-arm-low.c: Add new declarations.
8168 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8169 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8170 (HWCAP_VFPv3D16): New.
8171 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8172 instead of __IWMMXT__.
8173 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8174 (arm_arch_setup): New.
8175 (target_regsets): Remove #ifdef. Add VFP regset.
8176 (the_low_target): Use arm_arch_setup.
8177
12b42a12
DJ
81782009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8179
8180 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8181 the main thread again.
8182
ac8c974e
AR
81832009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8184
8185 Adding Neutrino gdbserver.
8186 * configure: Regenerated.
8187 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8188 * configure.srv (i[34567]86-*-nto*): New target.
8189 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8190 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8191 (nto_comctrl) [__QNX__]: New function.
8192 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8193
4424e0c3 81942009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
8195
8196 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8197 srv_tgtobj.
8198
912cf4ba
PA
81992009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8200 Pedro Alves <pedro@codesourcery.com>
8201
8202 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8203 don't support CONTEXT_EXTENDED_REGISTERS.
8204 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8205 (the_low_target): Install them.
8206 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8207 failing with ERROR_PIPE_NOT_CONNECTED.
8208
aa5ca48f
DE
82092009-06-30 Doug Evans <dje@google.com>
8210 Pierre Muller <muller@ics.u-strasbg.fr>
8211
8212 Add h/w watchpoint support to x86-linux, win32-i386.
8213 * Makefile.in (SFILES): Add i386-low.c
8214 (i386_low_h): Define.
8215 (i386-low.o): Add dependencies.
8216 (linux-x86-low.o): Add i386-low.h dependency.
8217 (win32-i386-low.o): Ditto.
8218 * i386-low.c: New file.
8219 * i386-low.h: New file.
8220 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8221 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8222 * linux-low.c (linux_add_process): Initialize arch_private.
8223 (linux_remove_process): Free arch_private.
8224 (add_lwp): Initialize arch_private.
8225 (delete_lwp): Free arch_private.
8226 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8227 provided.
8228 * linux-low.h (process_info_private): New member arch_private.
8229 (lwp_info): New member arch_private.
8230 (linux_target_ops): New members new_process, new_thread,
8231 prepare_to_resume.
8232 (ptid_of): New macro.
8233 * linux-x86-low.c: Include stddef.h, i386-low.h.
8234 (arch_process_info): New struct.
8235 (arch_lwp_info): New struct.
8236 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8237 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8238 (i386_dr_low_get_status): New function.
8239 (x86_insert_point, x86_remove_point): New functions.
8240 (x86_stopped_by_watchpoint): New function.
8241 (x86_stopped_data_address): New function.
8242 (x86_linux_new_process, x86_linux_new_thread): New functions.
8243 (x86_linux_prepare_to_resume): New function.
8244 (the_low_target): Add entries for insert_point, remove_point,
8245 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8246 prepare_to_resume.
8247 * server.c (debug_hw_points): New global.
8248 (monitor_show_help): Document set debug-hw-points.
8249 (handle_query): Process "set debug-hw-points".
8250 * server.h (debug_hw_points): Declare.
8251 (paddress): Declare.
8252 * utils.c (NUMCELLS, CELLSIZE): New macros.
8253 (get_sell, xsnprintf, paddress): New functions.
8254 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8255 remove_point, stopped_by_watchpoint, stopped_data_address.
8256 * win32-i386-low.c: Include i386-low.h.
8257 (debug_reg_state): Replaces dr.
8258 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8259 (i386_dr_low_get_status): New function.
8260 (i386_insert_point, i386_remove_point): New functions.
8261 (i386_stopped_by_watchpoint): New function.
8262 (i386_stopped_data_address): New function.
8263 (i386_initial_stuff): Update.
8264 (get_thread_context,set_thread_context,i386_thread_added): Update.
8265 (the_low_target): Add entries for insert_point,
8266 remove_point, stopped_by_watchpoint, stopped_data_address.
8267 * win32-low.c (win32_insert_watchpoint): New function.
8268 (win32_remove_watchpoint): New function.
8269 (win32_stopped_by_watchpoint): New function.
8270 (win32_stopped_data_address): New function.
8271 (win32_target_ops): Add entries for insert_watchpoint,
8272 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8273 * win32-low.h (win32_target_ops): New members insert_point,
8274 remove_point, stopped_by_watchpoint, stopped_data_address.
8275
d993e290
PA
82762009-06-25 Pedro Alves <pedro@codesourcery.com>
8277
8278 * server.c (process_serial_event): Re-return unsupported, not
8279 error, if the type isn't recognized. Re-allow supporting only
8280 insert or remove packets. Also call require_running for
8281 breakpoints. Add missing break statement to default case. Tidy.
8282 * target.h (struct target_ops): Rename insert_watchpoint to
8283 insert_point, and remove_watchpoint to remove_point.
8284
8285 * linux-low.h (struct linux_target_ops): Likewise.
8286 * linux-low.c (linux_insert_watchpoint): Rename to ...
8287 (linux_insert_point): ... this. Adjust.
8288 (linux_remove_watchpoint): Rename to ...
8289 (linux_remove_point): ... this. Adjust.
8290 (linux_target_ops): Adjust.
8291 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8292 (cris_insert_point): ... this.
8293 (cris_remove_watchpoint): Rename to ...
8294 (cris_remove_point): ... this.
8295 (the_low_target): Adjust.
8296
0f54c268
PM
82972009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8298
8299 * server.c (handle_v_kill): Pass signal_pid to
8300 kill_inferior if multi_process is zero.
8301
c6314022
AR
83022009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8303
8304 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8305 * target.h (target_ops): Comment for *_watchpoint to make it clear
8306 the functions can get types '0' and '1'.
8307
4463ce24
AR
83082009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8309
8310 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8311 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8312 * regcache.c (get_regcache): Likewise.
8313 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8314 * win32-low.c (child_fetch_inferior_registers): Remove check for
8315 regno 0.
8316
cf8fd78b
PA
83172009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8318 Pedro Alves <pedro@codesourcery.com>
8319
8320 * target.h (struct target_ops) <supports_multi_process>: New
8321 callback.
8322 (target_supports_multi_process): New.
8323 * server.c (handle_query): Even if GDB reports support, only
8324 enable multi-process if the target also supports it. Report
8325 multi-process support only if the target backend supports it.
8326 * linux-low.c (linux_supports_multi_process): New function.
8327 (linux_target_ops): Install it as target_supports_multi_process
8328 callback.
8329
47c0c975
DE
83302009-05-24 Doug Evans <dje@google.com>
8331
e09875d4
DE
8332 Global renaming of find_thread_pid to find_thread_ptid.
8333 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8334 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8335 All callers updated.
8336
e27d73f6
DE
8337 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8338 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8339 directly.
8340
47c0c975
DE
8341 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8342 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8343 (linux_resume_one_lwp): Ditto.
8344
2acc282a
DE
83452009-05-23 Doug Evans <dje@google.com>
8346
8347 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8348 from struct inferior_list_entry * to struct lwp_info *.
8349 All callers updated.
8350
9f1036c1
DE
83512009-05-13 Doug Evans <dje@google.com>
8352
8353 * linux-x86-low.c: Don't include assert.h.
8354 (x86_siginfo_fixup): Use fatal, not assert.
8355 (x86_arch_setup): Fix comment.
8356
d0722149
DE
83572009-05-12 Doug Evans <dje@google.com>
8358
8359 Biarch support for i386/amd64 gdbserver.
8360 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8361 Add linux-x86-low.c.
8362 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8363 (linux-x86-low.o): Add.
8364 * linux-x86-64-low.c: Delete.
8365 * linux-i386-low.c: Delete.
8366 * linux-x86-low.c: New file.
8367 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8368 linux-x86-low.o.
8369 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8370 linux-x86-low.o.
8371 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8372 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8373 (linux_child_pid_to_exec_file): New function.
8374 (elf_64_header_p, elf_64_file_p): New functions.
8375 (siginfo_fixup): New function.
8376 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8377 give target a chance to convert layout.
8378 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8379 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8380
fdeb2a12
DE
83812009-05-07 Doug Evans <dje@google.com>
8382
8383 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8384 (regsets_store_inferior_registers): Ditto.
8385
a6dbe5df
PA
83862009-05-06 Pedro Alves <pedro@codesourcery.com>
8387
8388 PR server/10048
8389
8390 * linux-low.c (must_set_ptrace_flags): Delete.
8391 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8392 of the global.
8393 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8394 `lwp->must_set_ptrace_flags' instead.
ba42693b 8395 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8396 (linux_wait_1): ... not here.
8397
5091eb23
DE
83982009-04-30 Doug Evans <dje@google.com>
8399
9f767825
DE
8400 * inferiors.c (started_inferior_callback): New function.
8401 (attached_inferior_callback): New function.
8402 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8403 * server.c (print_started_pid, print_attached_pid): New functions.
8404 (detach_or_kill_for_exit): New function.
8405 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8406 * server.h (have_started_inferiors_p): Declare.
8407 (have_attached_inferiors_p): Declare.
8408
5091eb23
DE
8409 * inferiors.c (remove_process): Fix memory leak, free process.
8410 * linux-low.c (linux_remove_process): New function.
8411 (linux_kill): Call it instead of remove_process.
8412 (linux_detach, linux_wait_1): Ditto.
8413
155c8968
PA
84142009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8415
8416 * configure.srv: Add x86 Windows CE target.
8417
7fe519cb
UW
84182009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8419
8420 * inferiors.c (get_thread_process): Make global.
8421 * server.h (get_thread_process): Add prototype.
8422 * thread-db.c (find_one_thread): Use get_thread_process
8423 instead of current_process.
8424 (thread_db_get_tls_address): Do not crash if called when
8425 thread layer is not yet initialized.
8426
5472f405
UW
84272009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8428
8429 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8430 * spu-low.c (current_tid): Rename to ...
8431 (current_ptid): ... this.
8432 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8433 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8434 ptid_get_lwp (current_ptid) instead of current_tid.
8435 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8436 instead of current_tid. Use find_process_pid to verify pid
8437 argument is valid. Pass proper argument to remove_process.
8438 (spu_thread_alive): Compare current_ptid instead of current_tid.
8439 (spu_resume): Likewise.
8440
55ac2b99
PA
84412009-04-02 Pedro Alves <pedro@codesourcery.com>
8442
8443 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8444 variable.
8445
95954743
PA
84462009-04-01 Pedro Alves <pedro@codesourcery.com>
8447
8448 Implement the multiprocess extensions, and add linux multiprocess
8449 support.
8450
8451 * server.h (ULONGEST): Declare.
8452 (struct ptid, ptid_t): New.
8453 (minus_one_ptid, null_ptid): Declare.
8454 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8455 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8456 (struct inferior_list_entry): Change `id' type from unsigned from
8457 to ptid_t.
8458 (struct sym_cache, struct breakpoint, struct
8459 process_info_private): Forward declare.
8460 (struct process_info): Declare.
8461 (current_process): Declare.
8462 (all_processes): Declare.
8463 (initialize_inferiors): Declare.
8464 (add_thread): Adjust to use ptid_t.
8465 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8466 (add_process, remove_process, find_thread_pid): Declare.
8467 (find_inferior_id): Adjust to use ptid_t.
8468 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8469 (multi_process): Declare.
8470 (push_event): Adjust to use ptid_t.
8471 (read_ptid, write_ptid): Declare.
8472 (prepare_resume_reply): Adjust to use ptid_t.
8473 (clear_symbol_cache): Declare.
8474 * inferiors.c (all_processes): New.
8475 (null_ptid, minus_one_ptid): New.
8476 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8477 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8478 (add_thread): Change unsigned long to ptid. Remove gdb_id
8479 parameter. Adjust.
8480 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8481 (gdb_id_to_thread): Rename to ...
8482 (find_thread_pid): ... this. Change unsigned long to ptid.
8483 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8484 (loaded_dll, pull_pid_from_list): Adjust.
8485 (add_process, remove_process, find_process_pid)
8486 (get_thread_process, current_process, initialize_inferiors): New.
8487 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8488 (struct target_waitstatus) <related_pid>: Ditto.
8489 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8490 return type to int.
8491 (struct target_ops) <join>: Add `pid' argument.
8492 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8493 (struct target_ops) <wait>: Add `ptid' field. Change return type
8494 to ptid.
8495 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8496 (mywait): Add `ptid' argument. Change return type to ptid_t.
8497 (target_pid_to_str): Declare.
8498 * target.c (set_desired_inferior): Adjust to use ptids.
8499 (mywait): Add new `ptid' argument. Adjust.
8500 (target_pid_to_str): New.
8501 * mem-break.h (free_all_breakpoints): Declare.
8502 * mem-break.c (breakpoints): Delelete.
8503 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8504 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8505 to use per-process breakpoint list.
8506 (free_all_breakpoints): New.
8507 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8508 (symbol_cache, all_symbols_looked_up): Delete.
8509 (hexchars): New.
8510 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8511 read_ptid): New.
8512 (prepare_resume_reply): Change ptid argument's type from unsigned
8513 long to ptid_t. Adjust. Implement W;process and X;process.
8514 (free_sym_cache, clear_symbol_cache): New.
8515 (look_up_one_symbol): Adjust to per-process symbol cache. *
8516 * server.c (cont_thread, general_thread, step_thread): Change type
8517 to ptid_t.
8518 (attached): Delete.
8519 (multi_process): New.
8520 (last_ptid): Change type to ptid_t.
8521 (struct vstop_notif) <ptid>: Change type to ptid_t.
8522 (queue_stop_reply, push_event): Change `ptid' argument's type to
8523 ptid_t.
8524 (discard_queued_stop_replies): Add `pid' argument.
8525 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8526 changes. Don't reference the `attached' global.
8527 (attach_inferior): Adjust to mywait interface changes.
8528 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8529 features. Handle and report "multiprocess+". Handle
8530 "qAttached:PID".
8531 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8532 changes.
8533 (handle_v_kill): New.
8534 (handle_v_stopped): Adjust to use target_pid_to_str.
8535 (handle_v_requests): Allow multiple attaches and runs when
8536 multiprocess extensions are in effect. Handle "vKill".
8537 (myresume): Adjust to use ptids.
8538 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8539 (handle_status): Adjust to discard_queued_stop_replies interface
8540 change.
8541 (first_thread_of, kill_inferior_callback)
8542 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8543 (main): Call initialize_inferiors. Adjust to use ptids, killing
8544 and detaching from all inferiors. Handle multiprocess packet
8545 variants.
8546 * linux-low.h: Include gdb_proc_service.h.
8547 (struct process_info_private): New.
8548 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8549 <lwpid_of>: Use ptid_get_lwp.
8550 (get_lwp_thread): Adjust.
8551 (struct lwp_info): Add `dead' member.
8552 (find_lwp_pid): Declare.
8553 * linux-low.c (thread_db_active): Delete.
8554 (new_inferior): Adjust comment.
8555 (inferior_pid): Delete.
8556 (linux_add_process): New.
8557 (handle_extended_wait): Adjust.
8558 (add_lwp): Change unsigned long to ptid.
8559 (linux_create_inferior): Add process to processes table. Adjust
8560 to use ptids. Don't set new_inferior here.
8561 (linux_attach_lwp): Rename to ...
8562 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8563 it. Adjust to use ptids.
8564 (linux_attach_lwp): New.
8565 (linux_attach): Add process to processes table. Don't set
8566 new_inferior here.
8567 (struct counter): New.
8568 (second_thread_of_pid_p, last_thread_of_process_p): New.
8569 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8570 multiple processes.
8571 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8572 processes. Remove process from process table.
8573 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8574 to multiple processes.
8575 (any_thread_of): New.
8576 (linux_detach): Add `pid' argument, and handle it. Remove process
8577 from processes table.
8578 (linux_join): Add `pid' argument. Handle it.
8579 (linux_thread_alive): Change unsighed long argument to ptid_t.
8580 Consider dead lwps as not being alive.
8581 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8582 threads we're not interested in.
8583 (same_lwp, find_lwp_pid): New.
8584 (linux_wait_for_lwp): Change `pid' argument's type from int to
8585 ptid_t. Adjust.
8586 (linux_wait_for_event): Rename to ...
8587 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8588 from int to ptid_t. Adjust.
8589 (linux_wait_for_event): New.
8590 (linux_wait_1): Add `ptid' argument. Change return type to
8591 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8592 that exit from the process table.
8593 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8594 Adjust.
8595 (mark_lwp_dead): New.
8596 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8597 stopping all threads, mark its main lwp as dead.
8598 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8599 ptids.
8600 (fetch_register, usr_store_inferior_registers)
8601 (regsets_fetch_inferior_registers)
8602 (regsets_store_inferior_registers, linux_read_memory)
8603 (linux_write_memory): Inline `inferior_pid'.
8604 (linux_look_up_symbols): Adjust to use per-process
8605 `thread_db_active'.
8606 (linux_request_interrupt): Adjust to use ptids.
8607 (linux_read_auxv): Inline `inferior_pid'.
8608 (initialize_low): Don't reference thread_db_active.
8609 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8610 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8611 (ps_getpid): Return the pid of the current inferior.
8612 * thread-db.c (proc_handle, thread_agent): Delete.
8613 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8614 per-process data.
8615 (find_one_thread): Change argument type to ptid_t. Adjust to
8616 per-process data.
8617 (maybe_attach_thread): Adjust to per-process data and ptids.
8618 (thread_db_find_new_threads): Ditto.
8619 (thread_db_init): Ditto.
8620 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8621 processes table. Adjust to use ptids.
8622 (spu_kill, spu_detach): Adjust interface. Remove process from
8623 processes table.
8624 (spu_join, spu_thread_alive): Adjust interface.
8625 (spu_wait): Adjust interface. Remove process from processes
8626 table. Adjust to use ptids.
8627 * win32-low.c (current_inferior_tid): Delete.
8628 (current_inferior_ptid): New.
8629 (debug_event_ptid): New.
8630 (thread_rec): Take a ptid. Adjust.
8631 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8632 (child_delete_thread): Ditto.
8633 (do_initial_child_stuff): Add `attached' argument. Add process to
8634 processes table.
8635 (child_fetch_inferior_registers, child_store_inferior_registers):
8636 Adjust.
8637 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8638 (win32_attach): Pass 1 to do_initial_child_stuff.
8639 (win32_kill): Adjust interface. Remove process from processes
8640 table.
8641 (win32_detach): Ditto.
8642 (win32_join): Adjust interface.
8643 (win32_thread_alive): Take a ptid.
8644 (win32_resume): Adjust to use ptids.
8645 (get_child_debug_event): Ditto.
8646 (win32_wait): Adjust interface. Remove exiting process from
8647 processes table.
8648
bd99dc85
PA
86492009-04-01 Pedro Alves <pedro@codesourcery.com>
8650
8651 Non-stop mode support.
8652
8653 * server.h (non_stop): Declare.
8654 (gdb_client_data, handler_func): Declare.
8655 (delete_file_handler, add_file_handler, start_event_loop):
8656 Declare.
8657 (handle_serial_event, handle_target_event, push_event)
8658 (putpkt_notif): Declare.
8659 * target.h (enum resume_kind): New.
8660 (struct thread_resume): Replace `step' field by `kind' field.
8661 (TARGET_WNOHANG): Define.
8662 (struct target_ops) <wait>: Add `options' argument.
8663 <supports_non_stop, async, start_non_stop>: New fields.
8664 (target_supports_non_stop, target_async): New.
8665 (start_non_stop): Declare.
8666 (mywait): Add `options' argument.
8667 * target.c (mywait): Add `options' argument. Print child exit
8668 notifications here.
8669 (start_non_stop): New.
8670 * server.c (non_stop, own_buf, mem_buf): New globals.
8671 (struct vstop_notif): New.
8672 (notif_queue): New global.
8673 (queue_stop_reply, push_event, discard_queued_stop_replies)
8674 (send_next_stop_reply): New.
8675 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8676 interface changes.
8677 (attach_inferior): In non-stop mode, don't wait for the target
8678 here.
8679 (handle_general_set): Handle QNonStop.
8680 (handle_query): When handling qC, return the current general
8681 thread, instead of the first thread of the list.
8682 (handle_query): If the backend supports non-stop mode, include
8683 QNonStop+ in the qSupported query response.
8684 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8685 and non-stop mode.
8686 (handle_v_attach, handle_v_run): Handle non-stop mode.
8687 (handle_v_stopped): New.
8688 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8689 (myresume): Adjust to use resume_kind. Handle non-stop.
8690 (queue_stop_reply_callback): New.
8691 (handle_status): Handle non-stop mode.
8692 (main): Clear non_stop flag on reconnection. Use the event-loop.
8693 Refactor serial protocol handling from here ...
8694 (process_serial_event): ... to this new function. When GDB
8695 selects any thread, select one here. In non-stop mode, wait until
8696 GDB acks all pending events before exiting.
8697 (handle_serial_event, handle_target_event): New.
8698 * remote-utils.c (remote_open): Install remote_desc in the event
8699 loop.
8700 (remote_close): Remove remote_desc from the event loop.
8701 (putpkt_binary): Rename to...
8702 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8703 (putpkt_binary): New as wrapper around putpkt_binary_1.
8704 (putpkt_notif): New.
8705 (prepare_resume_reply): In non-stop mode, don't change the
8706 general_thread.
8707 * event-loop.c: New.
8708 * Makefile.in (OBJ): Add event-loop.o.
8709 (event-loop.o): New rule.
8710
8711 * linux-low.h (pid_of): Moved here.
8712 (lwpid_of): New.
8713 (get_lwp_thread): Use lwpid_of.
8714 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8715 * linux-low.c (pid_of): Delete.
8716 (inferior_pid): Use lwpid_of.
8717 (linux_event_pipe): New.
8718 (target_is_async_p): New.
8719 (delete_lwp): New.
8720 (handle_extended_wait): Use lwpid_of.
8721 (add_lwp): Don't set lwpid field.
8722 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8723 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8724 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8725 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8726 first. Adjust to linux_wait_for_event interface changes. Use
8727 lwpid_of.
8728 (linux_detach): Don't delete the main lwp here.
8729 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8730 (status_pending_p): Don't consider explicitly suspended lwps.
8731 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8732 pointer. Add OPTIONS argument. Change return type to int. Use
8733 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8734 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8735 pointer. Add status pointer argument. Return a pid instead of a
8736 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8737 changes. In non-stop mode, don't switch to a random thread.
8738 (linux_wait): Rename to...
8739 (linux_wait_1): ... this. Add target_options argument, and handle
8740 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8741 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8742 clean exit and signal exit code. Don't stop all threads in
8743 non-stop mode. In all-stop mode, only stop all threads when
8744 reporting a stop to GDB. Handle explicit thread stop requests.
8745 (async_file_flush, async_file_mark): New.
8746 (linux_wait): New.
8747 (send_sigstop): Use lwpid_of.
8748 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8749 interface changes. In non-stop mode, don't switch to a random
8750 thread.
8751 (linux_resume_one_lwp): Use lwpid_of.
8752 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8753 (linux_resume_one_thread): ... this. Handle resume_stop. In
8754 non-stop mode, don't look for pending flag in all threads.
8755 (resume_status_pending_p): Don't consider explicitly suspended
8756 threads.
8757 (my_waitpid): Reimplement. Emulate __WALL.
8758 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8759 Use lwpid_of.
8760 (sigchld_handler, linux_supports_non_stop, linux_async)
8761 (linux_start_non_stop): New.
8762 (linux_target_ops): Register linux_supports_non_stop, linux_async
8763 and linux_start_non_stop.
8764 (initialize_low): Install SIGCHLD handler.
8765 * thread-db.c (thread_db_create_event, find_one_thread)
8766 (thread_db_get_tls_address): Use lwpid_of.
8767 * win32-low.c (win32_detach): Adjust to use resume_kind.
8768 (win32_wait): Add `options' argument.
8769 * spu-low.c (spu_resume): Adjust to use resume_kind.
8770 (spu_wait): Add `options' argument.
8771
5b1c542e
PA
87722009-04-01 Pedro Alves <pedro@codesourcery.com>
8773
8774 Decouple target code from remote protocol.
8775
8776 * target.h (enum target_waitkind): New.
8777 (struct target_waitstatus): New.
8778 (struct target_ops) <wait>: Return an unsigned long. Take a
8779 target_waitstatus pointer instead of a char pointer.
8780 (mywait): Likewise.
8781 * target.c (mywait): Change prototype to return an unsigned long.
8782 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8783 * server.h (thread_from_wait, old_thread_from_wait): Delete
8784 declarations.
8785 (prepare_resume_reply): Change prototype to take a
8786 target_waitstatus.
8787 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8788 (last_status, last_ptid): New.
8789 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8790 pid instead of a signal.
8791 (attach_inferior): Remove "status" and "signal" parameters.
8792 Adjust.
8793 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8794 not as an address.
8795 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8796 (handle_v_requests, myresume): Remove "status" and "signal"
8797 parameters. Adjust.
8798 (handle_status): New.
8799 (main): Delete local `status'. Adjust.
8800 * remote-utils.c: Include target.h.
8801 (prepare_resume_reply): Change prototype to take a
8802 target_waitstatus. Adjust.
8803
8804 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8805 interface.
8806 * spu-low.c (spu_wait): Adjust.
8807 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8808 Delete.
8809 (win32_wait): Adjust.
8810
2bd7c093
PA
88112009-04-01 Pedro Alves <pedro@codesourcery.com>
8812
8813 * target.h (struct thread_resume): Delete leave_stopped member.
8814 (struct target_ops): Add a `n' argument to the `resume' callback.
8815 * server.c (start_inferior): Adjust.
8816 (handle_v_cont, myresume): Adjust.
8817 * linux-low.c (check_removed_breakpoint): Adjust to resume
8818 interface change, and to removed leave_stopped field.
8819 (resume_ptr): Delete.
8820 (struct thread_resume_array): New.
8821 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8822 resume interface change.
8823 (linux_continue_one_thread, linux_queue_one_thread)
8824 (resume_status_pending_p): Check if the resume field is NULL
8825 instead of checking the leave_stopped member.
8826 (linux_resume): Adjust to the target resume interface change.
8827 * spu-low.c (spu_resume): Adjust to the target resume interface
8828 change.
8829 * win32-low.c (win32_detach, win32_resume): Ditto.
8830
c35fafde
PA
88312009-04-01 Pedro Alves <pedro@codesourcery.com>
8832
8833 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8834 flag.
8835 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8836 pending.
8837 (linux_continue_one_thread): Only preserve the stepping flag if
8838 there's a pending breakpoint.
8839
0a59d50b
PA
88402009-03-31 Pedro Alves <pedro@codesourcery.com>
8841
8842 * server.c (main): After the inferior having exited, call
8843 remote_close before exiting gdbserver.
8844
f04c6d38
TJB
88452009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8846
8847 Fix size of FPSCR in Power 7 processors.
8848 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8849 (PPC_FEATURE_HAS_DFP): New #define.
8850 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8851 size of the FPSCR.
8852
78e5cee6
PA
88532009-03-23 Pedro Alves <pedro@codesourcery.com>
8854
8855 * server.c (handle_query) Whitespace and formatting.
8856
1b3f6016
PA
88572009-03-22 Pedro Alves <pedro@codesourcery.com>
8858
8859 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8860 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8861 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8862 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8863 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8864 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8865 Makefile.in, configure.ac: Fix whitespace throughout.
8866 * configure: Regenerate.
8867
a07b2135
PA
88682009-03-22 Pedro Alves <pedro@codesourcery.com>
8869
8870 * inferiors.c (find_inferior): Make it safe for the callback
8871 function to delete the currently iterated inferior.
8872
67cc2626
PA
88732009-03-22 Pedro Alves <pedro@codesourcery.com>
8874
8875 * Makefile.in (linuw_low_h): Move higher.
8876 (thread-db.o): Depend on $(linux_low_h).
8877
54a0b537
PA
88782009-03-17 Pedro Alves <pedro@codesourcery.com>
8879
8880 Rename "process" to "lwp" throughout.
8881
8882 * linux-low.c (all_processes): Rename to...
8883 (all_lwps): ... this.
8884 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8885 (add_process): Rename to ...
8886 (add_lwp): ... this. Adjust.
8887 (linux_create_inferior): Adjust.
8888 (linux_attach_lwp): Adjust.
8889 (linux_attach): Adjust.
8890 (linux_kill_one_process): Rename to ...
8891 (linux_kill_one_lwp): ... this. Adjust.
8892 (linux_kill): Adjust.
8893 (linux_detach_one_process): Rename to ...
8894 (linux_detach_one_lwp): ... this. Adjust.
8895 (linux_detach): Adjust.
8896 (check_removed_breakpoint): Adjust.
8897 (status_pending_p): Adjust.
8898 (linux_wait_for_process): Rename to ...
8899 (linux_wait_for_lwp): ... this. Adjust.
8900 (linux_wait_for_event): Adjust.
8901 (send_sigstop): Adjust.
8902 (wait_for_sigstop): Adjust.
8903 (stop_all_processes): Rename to ...
8904 (stop_all_lwps): ... this.
8905 (linux_resume_one_process): Rename to ...
8906 (linux_resume_one_lwp): ... this. Adjust.
8907 (linux_set_resume_request, linux_continue_one_thread)
8908 (linux_queue_one_thread, resume_status_pending_p)
8909 (usr_store_inferior_registers, regsets_store_inferior_registers)
8910 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8911 Adjust.
8912 * linux-low.h (get_process): Rename to ...
8913 (get_lwp): ... this. Adjust.
8914 (get_thread_process): Rename to ...
8915 (get_thread_lwp): ... this. Adjust.
8916 (get_process_thread): Rename to ...
8917 (get_lwp_thread): ... this. Adjust.
8918 (struct process_info): Rename to ...
8919 (struct lwp_info): ... this.
8920 (all_processes): Rename to ...
8921 (all_lwps): ... this.
8922 * proc-service.c (ps_lgetregs): Adjust.
8923 * thread-db.c (thread_db_create_event, find_one_thread)
8924 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8925
0b16c5cf
PA
89262009-03-14 Pedro Alves <pedro@codesourcery.com>
8927
8928 * server.c (handle_query): Handle "qAttached".
8929
32de4b9d
NS
89302009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8931
8932 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8933 GPLv3, update license URL.
8934
2aecd87f
DE
89352009-03-01 Doug Evans <dje@google.com>
8936
93efd302 8937 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8938 (server_h): Add gdb_signals.h.
8939 (signals.o): Update.
8940 * server.h (target_signal_from_host,target_signal_to_host_p)
8941 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8942
86b1f9c5
PM
89432009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8944
8945 * remote-utils.c (getpkt): Also generate remote-debug
8946 information if noack_mode is set.
8947
4aa995e1
PA
89482009-02-06 Pedro Alves <pedro@codesourcery.com>
8949
8950 * server.c (handle_query): Report qXfer:siginfo:read and
8951 qXfer:siginfo:write as supported and handle them.
8952 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8953 * linux-low.c (linux_xfer_siginfo): New.
8954 (linux_target_ops): Set it.
8955
62709adf
PA
89562009-01-26 Pedro Alves <pedro@codesourcery.com>
8957
8958 * server.c (gdbserver_usage): Mention --remote-debug.
8959 (main): Accept '--remote-debug' switch.
8960
aef93bd7
DE
89612009-01-18 Doug Evans <dje@google.com>
8962
8963 * regcache.c (new_register_cache): No need to check result of xcalloc.
8964 * server.c (handle_search_memory): Back out calls to xmalloc,
8965 result is checked and error is returned to user upon failure.
8966 (handle_query): Ditto. Add more checks for result of malloc.
8967 (handle_v_cont): Check result of malloc, report error back to
8968 user upon failure.
8969 (handle_v_run): Ditto. Call freeargv.
8970 * server.h (freeargv): Declare.
8971 * utils.c (freeargv): New fn.
8972
54363045
DE
89732009-01-15 Doug Evans <dje@google.com>
8974
f626972c
DE
8975 * gdbreplay.c (perror_with_name): Make arg const char *.
8976 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8977 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8978 * utils.c (perror_with_name): Make arg const char *.
54363045 8979
18aae699
PA
89802009-01-14 Pedro Alves <pedro@codesourcery.com>
8981
8982 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8983 when handling a EXIT_PROCESS_DEBUG_EVENT.
8984
ff703abe
JB
89852009-01-06 Joel Brobecker <brobecker@adacore.com>
8986
8987 * gdbreplay.c (gdbreplay_version): Update copyright year.
8988 * server.c (gdbserver_version): Likewise.
8989
f21cc1a2 89902009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8991
8992 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8993 (handle_extended_wait): Improve comment.
0e21c1ec 8994
bca929d3
DE
89952008-12-13 Doug Evans <dje@google.com>
8996
8997 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8998 * server.h (ATTR_MALLOC): New macro.
8999 (xmalloc,xcalloc,xstrdup): Declare.
9000 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9001 * inferiors.c: Ditto.
9002 * linux-low.c: Ditto.
9003 * mem-break.c: Ditto.
9004 * regcache.c: Ditto.
9005 * remote-utils.c: Ditto.
9006 * server.c: Ditto.
9007 * target.c: Ditto.
9008 * win32-low.c: Ditto.
9009
97438e3f
DE
90102008-12-12 Doug Evans <dje@google.com>
9011
896c7fbb
DE
9012 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9013 in debugging printf.
9014
97438e3f
DE
9015 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9016
e3b886f8
DE
90172008-12-09 Doug Evans <dje@google.com>
9018
9019 * linux-low.h (struct process_info): Delete member tid, unused.
9020 * thread-db.c (find_one_thread): Update.
9021 (maybe_attach_thread): Update.
9022
07e059b5
VP
90232008-12-02 Pedro Alves <pedro@codesourcery.com>
9024
889bf7c5
PA
9025 * target.h (struct target_ops): Add qxfer_osdata member.
9026 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9027 and dirent.h.
9028 (linux_qxfer_osdata): New functions.
9029 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9030 callback.
9031 * server.c (handle_query): Handle "qXfer:osdata:read:".
9032 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9033 (buffer_xml_printf): New functions.
9034 * server.h (struct buffer): New.
9035 (buffer_grow_str, buffer_grow_str0): New macros.
9036 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9037 (buffer_xml_printf): Declare.
07e059b5 9038
4cab47ab
DE
90392008-11-24 Doug Evans <dje@google.com>
9040
9041 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9042
f142445f
DJ
90432008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9044
9045 * server.c (handle_v_run): Always use the supplied argument list.
9046
d0107bb6 90472008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 9048
d0107bb6
BW
9049 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9050 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 9051
2c4ad781
TJB
90522008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9053
9054 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9055 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9056 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9057 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9058 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9059 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9060 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9061 XML target descriptions.
9062 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9063 when inferior is running on an ISA 2.05 or later processor. Add
9064 special case to return offset for full 64-bit slot of FPSCR when
9065 in 32-bits.
9066
dfb64f85
DJ
90672008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9068
9069 * Makefile.in (SFILES, clean): Added sparc64 files.
9070 (reg-sparc64.o, reg-sparc64.c): New.
9071 * configure.srv (sparc*-*-linux*): New configuration.
9072 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9073 syscall arguments for SPARC.
9074 (regsets_store_inferior_registers): Likewise.
9075 * linux-sparc-low.c: New file.
9076
66b6e1dd
DE
90772008-10-21 Doug Evans <dje@google.com>
9078
9079 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9080 (READLINE_DIR,READLINE_DEP): Delete.
9081 (INTERNAL_CFLAGS): Update.
9082 (LINTFLAGS): Update.
9083
9b710a42
PA
90842008-10-10 Pedro Alves <pedro@codesourcery.com>
9085
9086 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9087 whole argv from the last run, not just argv[0].
9088
5822d809
PA
90892008-09-08 Pedro Alves <pedro@codesourcery.com>
9090
9091 * regcache.c (new_register_cache): Return NULL if the register
9092 cache size isn't known yet.
9093 (free_register_cache): Avoid dereferencing a NULL regcache.
9094
74aac56f
DJ
90952008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9096
9097 * configure.srv: Merge MIPS and MIPS64.
9098
400b20f5
MR
90992008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9100
9101 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9102
677c5bb1
LM
91032008-08-18 Luis Machado <luisgpm@br.ibm.com>
9104
9105 * Makefile.in: Add required vsx dependencies.
9106
9107 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9108 Declare init_registers_powerpc_vsx32l.
9109 Declare init_registers_powerpc_vsx64l.
9110 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9111 (ppc_arch_setup): Check for VSX in hwcap.
9112 (ppc_fill_vsxregset): New function.
9113 (ppc_store_vsxregset): New function.
9114 Add new VSX entry in regset_info target_regsets.
9115
9116 * configure.srv: Add new VSX dependencies.
9117
a6f3e723
SL
91182008-08-12 Pedro Alves <pedro@codesourcery.com>
9119
9120 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9121 (remote_open): Set or clear transport_is_reliable.
9122 (putpkt_binary): Don't expect acks in noack mode.
9123 (getpkt): Don't send ack/nac in noack mode.
9124 * server.c (handle_general_set): Handle QStartNoAckMode.
9125 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9126 qSupported.
9127 (main): Reset noack_mode on every connection.
9128 * server.h (noack_mode): Declare.
9129
a417dc56
RW
91302008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9131
9132 * Makefile.in (GDBREPLAY_OBS): New variable.
9133 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9134
3221518c
UW
91352008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9136 Daniel Jacobowitz <dan@codesourcery.com>
9137
9138 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9139 (usr_store_inferior_registers): Likewise.
9140 (regsets_store_inferior_registers): Likewise.
9141
ec56be1b
PA
91422008-07-31 Rolf Jansen <rj@surtec.com>
9143 Pedro Alves <pedro@codesourcery.com>
9144
9145 * configure.ac: Check for memmem declaration.
9146 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9147 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9148 (disable_packet_qfThreadInfo): Unconditionally compile.
9149 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9150 * configure, config.in: Regenerate.
9151
2fe5e3ff
DE
91522008-07-28 Doug Kwan <dougkwan@google.com>
9153
9154 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9155 (linux_write_memory): Remove declaration of errno.
9156
836acd6d
UW
91572008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9158
9159 * linux-low.c (handle_extended_wait): Do not use "status"
9160 variable uninitialized.
9161
aeba519e
PA
91622008-07-07 Pedro Alves <pedro@codesourcery.com>
9163
9164 * server.c (handle_v_attach): Inhibit reporting dll changes.
9165
db42f210
PA
91662008-06-27 Pedro Alves <pedro@codesourcery.com>
9167
9168 * remote-utils.c (prepare_resume_reply): If requested, don't
9169 output "thread:TID" in the T stop reply.
9170
9171 * server.c (disable_packet_vCont, disable_packet_Tthread)
9172 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9173 (handle_query): If requested, disable support for qC, qfThreadInfo
9174 and qsThreadInfo.
9175 (handle_v_requests): If requested, disable support for vCont.
9176 (gdbserver_show_disableable): New.
9177 (main): Handle --disable-packet and --disable-packet=LIST.
9178
9179 * server.h (disable_packet_vCont, disable_packet_Tthread)
9180 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9181
8e4c5421
CD
91822008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9183
9184 * server.c (gdbserver_usage): Mention --version.
9185
6e23a804
DJ
91862008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9187
9188 * Makefile.in (gdbreplay.o): New rule.
9189
90aa6a40
JM
91902008-06-06 Joseph Myers <joseph@codesourcery.com>
9191
9192 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9193 message, not gdbserver.
9194
c16158bc 91952008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
9196 Nathan Sidwell <nathan@codesourcery.com>
9197 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
9198
9199 * acinclude.m4: Include ../../config/acx.m4.
9200 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9201 * configure, config.in: Regenerate.
9202 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9203 * server.c (gdbserver_version): Print PKGVERSION.
9204 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9205 (main): Adjust gdbserver_usage calls.
9206 * gdbreplay.c (version, host_name): Add declarations.
9207 (gdbreplay_version, gdbreplay_usage): New.
9208 (main): Accept --version and --help options.
9209
aeb75bf5
DJ
92102008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9211
9212 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9213 (arm_breakpoint_at): Handle Thumb.
9214 (the_low_target): Add comment.
9215
76b233dd
UW
92162008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9217
9218 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9219
08388c79
DE
92202008-05-09 Doug Evans <dje@google.com>
9221
a3c83fae
DE
9222 * server.h (decode_search_memory_packet): Declare.
9223 * remote-utils.c (decode_search_memory_packet): New fn.
9224 * server.c (handle_search_memory_1): New fn.
08388c79
DE
9225 (handle_search_memory): New fn.
9226 (handle_query): Process qSearch:memory packets.
9227
bb9c3d36
UW
92282008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9229
9230 * regcache.c (registers_length): Remove.
9231 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9232 full register packet.
9233 * regcache.h (registers_length): Remove prototype.
9234 * server.h (PBUFSIZ): Define to 16384.
9235
7284e1be
UW
92362008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9237
9238 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9239 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9240 powerpc-64l.o, and powerpc-altivec64l.o.
9241 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9242 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9243 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9244 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9245 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9246 to srv_xmlfiles.
9247
9248 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9249 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9250 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9251 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9252 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9253 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9254 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9255 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9256 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9257 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9258 (clean): Update.
9259
9260 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9261 (init_registers_powerpc_32l): ... this new prototype.
9262 (init_registers_powerpc_32): Remove, replace by ...
9263 (init_registers_powerpc_altivec32l): ... this new prototype.
9264 (init_registers_powerpc_e500): Remove, replace by ...
9265 (init_registers_powerpc_e500l): ... this new prototype.
9266 (init_registers_ppc64): Remove, replace by ...
9267 (init_registers_powerpc_64l): ... this new prototype.
9268 (init_registers_powerpc_64): Remove, replace by ...
9269 (init_registers_powerpc_altivec64l): ... this new prototype.
9270 (ppc_num_regs): Set to 73.
9271 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9272 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9273 (ppc_cannot_store_register): Handle orig_r3 and trap.
9274 (ppc_arch_setup): Update init_registers_... calls.
9275 (ppc_fill_gregset): Handle orig_r3 and trap.
9276
9277 * inferiors.c (clear_inferiors): Reset current_inferior.
9278
fdc59709
PB
92792008-04-23 Paolo Bonzini <bonzini@gnu.org>
9280
889bf7c5
PA
9281 * acinclude.m4: Add override.m4.
9282 * configure: Regenerate.
fdc59709 9283
c9b2f845
UW
92842008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9285
9286 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9287 initial call to init_register_ppc64.
9288
550512b8
UW
92892008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9290
43aaf8b6
PA
9291 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9292 single powerpc*-*-linux* case.
550512b8
UW
9293 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9294
b6430ec3
UW
92952008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9296
9297 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 9298 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
9299 from reg_xmlfiles.
9300 * linux-ppc-low.c: Include <elf.h>.
9301 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9302 (ppc_hwcap): New global variable.
9303 (ppc_regmap): Remove __SPE__ #ifdef sections.
9304 (ppc_regmap_e500): New global variable.
9305 (ppc_cannot_store_register): Update __SPE__ special case.
9306 (ppc_get_hwcap): New function.
9307 (ppc_arch_setup): Use it to determine whether inferior supports
9308 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9309 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9310 Do not access registers if target does not support AltiVec.
9311 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9312 Do not access registers if target does not support SPE.
9313 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9314
52fa2412
UW
93152008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9316
9317 * linux-low.c (disabled_regsets, num_regsets): New.
9318 (use_regsets_p): Delete.
9319 (linux_wait_for_process): Clear disabled_regsets.
9320 (regsets_fetch_inferior_registers): Check and set it.
9321 (regsets_store_inferior_registers): Likewise.
9322 (linux_fetch_registers, linux_store_registers): Do not use
9323 use_regsets_p.
9324 (initialize_low): Allocate disabled_regsets.
9325
e28b3332
DJ
93262008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9327
9328 * Makefile.in (LIBOBJS): New.
9329 (OBS): Use LIBOBJS.
9330 (memmem.o): New rule.
9331 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9332 * configure: Regenerated.
9333
4536995d
UW
93342008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9335
9336 * server.c (handle_query): Never return "unsupported" for
9337 qXfer:features:read queries.
9338
221c031f
UW
93392008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9340
9341 * server.c (get_features_xml): Fix inverted condition.
9342 (handle_query): Always support qXfer:feature:read.
9343
ccd213ac
DJ
93442008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9345
9346 * server.c (wrapper_argv): New.
9347 (start_inferior): Handle wrapper_argv. If set, expect an extra
9348 trap.
9349 (gdbserver_usage): Document --wrapper.
9350 (main): Parse --wrapper.
9351
6fe305f7
UW
93522008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9353
9354 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9355 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9356 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9357 (ppc_set_pc): Likewise.
9358 (ppc_arch_setup): New function.
9359 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9360 of collect_register.
889bf7c5 9361 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9362
5b0a002e
UW
93632008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9364
9365 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9366 instead of linux-ppc64-low.o.
9367 * linux-ppc64-low.c: Remove file.
9368 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9369 (linux-ppc64-low.o): Remove rule.
9370
9371 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9372 (init_registers_powerpc_64): Likewise.
9373 (ppc_regmap): Conditionally define depending on __powerpc64__.
9374 (ppc_cannot_store_register): Do not special-case "fpscr" when
9375 compiled on __powerpc64__.
9376 (ppc_collect_ptrace_register): New function.
9377 (ppc_supply_ptrace_register): New function.
9378 (ppc_breakpoint): Change type to "unsigned int".
9379 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9380 (the_low_target): Conditionally provide initializers for the
889bf7c5 9381 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9382 collect_ptrace_register and supply_ptrace_register members.
9383
9b4b61c8
UW
93842008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9385
9386 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9387 * server.c (gdbserver_xmltarget): Define.
9388 (get_features_xml): Use it to replace "target.xml" and arch_string.
9389
9390 * configure.srv: Remove srv_xmltarget. Add XML files that were
9391 mentioned there to srv_xmlfiles instead. Remove conditional tests
9392 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9393 srv_xmlfiles and srv_regobj to include all possible choices.
9394 * configure.ac (srv_xmltarget): Remove.
9395 (srv_xmlfiles): Do not add "target.xml".
9396 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9397 checks for supplementary target information.
9398 * configure: Regenerate.
9399 * Makefile.in (XML_TARGET): Remove.
9400 (target.xml): Remove rule.
9401 (clean): Do not clean up target.xml.
9402 (.PRECIOUS): Do not mention target.xml.
9403
9404 * target.h (struct target_ops): Remove arch_string member.
9405 * linux-low.c (linux_arch_string): Remove.
9406 (linux_target_ops): Remove arch_string initializer.
9407 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9408 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9409 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9410 * spu-low.c (spu_arch_string): Remove.
9411 (spu_target_ops): Remove arch_string initializer.
9412 * win32-low.c (win32_arch_string): Remove.
9413 (win32_target_ops): Remove arch_string initializer.
9414 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9415 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9416 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9417
ee1a7ae4
UW
94182008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9419
9420 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9421 by collect_ptrace_register and supply_ptrace_register hooks.
9422 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9423 instead of checking for the_low_target.left_pad_xfer.
9424 (usr_store_inferior_registers): Use collect_ptrace_register callback
9425 instead of checking for the_low_target.left_pad_xfer.
9426
9427 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9428 (s390_supply_ptrace_register): Likewise.
9429 (s390_fill_gregset): Call s390_collect_ptrace_register.
9430 (the_low_target): Update.
9431
9432 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9433 (ppc_supply_ptrace_register): Likewise.
9434 (the_low_target): Update.
9435
9436 * linux-i386-low.c (the_low_target): Update.
9437 * linux-x86-64-low.c (the_low_target): Update.
9438
d61ddec4
UW
94392008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9440
9441 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9442 reg-s390.o and reg-s390x.o.
9443
9444 * linux-low.c (new_inferior): New global variable.
9445 (linux_create_inferior, linux_attach): Set it.
9446 (linux_wait_for_process): Call the_low_target.arch_setup after the
9447 target has stopped for the first time.
9448 (initialize_low): Do not call the_low_target.arch_setup.
9449
9450 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9451 (s390_set_pc): Likewise.
9452 (s390_arch_setup): New function.
9453 (the_low_target): Use s390_arch_setup as arch_setup routine.
9454
9455 * regcache.c (realloc_register_cache): New function.
9456 (set_register_cache): Call it for each existing regcache.
9457
d05b4ac3
UW
94582008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9459
9460 * server.h (init_registers): Remove prototype.
9461
9462 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9463 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9464 instead of init_registers ().
9465 * linux-arm-low.c (init_registers_arm): Add prototype.
9466 (init_registers_arm_with_iwmmxt): Likewise.
9467 (the_low_target): Add initializer for arch_setup field.
9468 * linux-cris-low.c (init_registers_cris): Add prototype.
9469 (the_low_target): Add initializer for arch_setup field.
9470 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9471 (the_low_target): Add initializer for arch_setup field.
9472 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9473 (the_low_target): Add initializer for arch_setup field.
9474 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9475 (the_low_target): Add initializer for arch_setup field.
9476 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9477 (the_low_target): Add initializer for arch_setup field.
9478 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9479 (the_low_target): Add initializer for arch_setup field.
9480 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9481 (init_registers_mips64_linux): Likewise.
9482 (the_low_target): Add initializer for arch_setup field.
9483 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9484 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9485 (the_low_target): Add initializer for arch_setup field.
9486 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9487 (init_registers_powerpc_64): Likewise.
9488 (the_low_target): Add initializer for arch_setup field.
9489 * linux-s390-low.c (init_registers_s390): Add prototype.
9490 (init_registers_s390x): Likewise.
9491 (the_low_target): Add initializer for arch_setup field.
9492 * linux-sh-low.c (init_registers_sh): Add prototype.
9493 (the_low_target): Add initializer for arch_setup field.
9494 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9495 (the_low_target): Add initializer for arch_setup field.
9496 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9497 (the_low_target): Add initializer for arch_setup field.
9498
9499 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9500 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9501 instead of init_registers ().
9502 * win32-arm-low.c (init_registers_arm): Add prototype.
9503 (the_low_target): Add initializer for arch_setup field.
9504 * win32-i386-low.c (init_registers_i386): Add prototype.
9505 (the_low_target): Add initializer for arch_setup field.
9506
9507 * spu-low.c (init_registers_spu): Add prototype.
9508 (initialize_low): Call initialie_registers_spu () instead of
9509 initialize_registers ().
9510
fd96d250
PA
95112008-02-19 Pedro Alves <pedro@codesourcery.com>
9512
9513 * server.c (handle_v_requests): When handling the vRun and vAttach
9514 packets, if already debugging a process, don't kill it. Return an
9515 error instead.
9516
d41b6bb4
DJ
95172008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9518
9519 * server.c (handle_query): Correct length check.
9520
5ac588cf
PA
95212008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9522
9523 * win32-low.c (do_initial_child_stuff): Add process handle
9524 parameter. Set current_process_handle and current_process_id from the
9525 parameters. Clear globals.
9526 (win32_create_inferior): Don't set current_process_handle and
9527 current_process_id here. Instead pass them on the call to
9528 do_initial_child_stuff.
9529 (win32_attach): Likewise.
9530 (win32_clear_inferiors): New.
9531 (win32_kill): Don't close the current process handle or the
9532 current thread handle here. Instead call win32_clear_inferiors.
9533 (win32_detach): Don't open a new handle to the process. Call
9534 win32_clear_inferiors.
9535 (win32_join): Don't rely on current_process_handle; open a new
9536 handle using the process id.
9537 (win32_wait): Call win32_clear_inferiors when the inferior process
9538 has exited.
9539
ecd7ecbc
DJ
95402008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9541
9542 * server.c (monitor_show_help): Add "exit".
9543
1525d545
MG
95442008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9545
ecd7ecbc 9546 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9547 (clean): Add reg-xtensa.c.
9548 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9549 * configure.srv (xtensa*-*-linux*) New target.
9550 * linux-xtensa-low.c: New.
9551 * xtensa-xtregs.c: New.
1525d545 9552
59a016f0
PA
95532008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9554
9555 * hostio.c: Don't include errno.h.
9556 (errno_to_fileio_errno): Move to hostio-errno.
9557 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9558 error number outputting to the target->hostio_last_error callback.
9559 (hostio_packet_error): Use FILEIO_EINVAL directly.
9560 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9561 calls to hostio_error.
9562 * hostio-errno.c: New.
9563 * server.h (hostio_last_error_from_errno): Declare.
9564 * target.h (target_ops): Add hostio_last_error member.
9565 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9566 as hostio_last_error handler.
889bf7c5 9567 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9568 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9569 (wince_hostio_last_error): New functions.
9570 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9571 as hostio_last_error handler.
9572 (win32_target_ops) [!_WIN32_WCE]: Register
9573 hostio_last_error_from_errno as hostio_last_error handler.
9574 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9575 (hostio-errno.o): New rule.
9576 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9577 * configure.srv (srv_hostio_err_objs): New variable. Default to
9578 hostio-errno.o.
9579 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9580 * configure: Regenerate.
9581
2d717e4f
DJ
95822008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9583
9584 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9585 (linux_kill, linux_detach): Clean up the process list.
9586 * remote-utils.c (remote_open): Improve port number parsing.
9587 (putpkt_binary, input_interrupt): Only send interrupts if the target
9588 is running.
9589 * server.c (extended_protocol): Make static.
9590 (attached): Define earlier.
9591 (exit_requested, response_needed, program_argv): New variables.
9592 (target_running): New.
9593 (start_inferior): Clear attached here.
9594 (attach_inferior): Set attached here.
9595 (require_running): Define.
9596 (handle_query): Use require_running and target_running. Implement
9597 "monitor exit".
9598 (handle_v_attach, handle_v_run): New.
9599 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9600 (gdbserver_usage): Update.
9601 (main): Redo argument parsing. Handle --debug and --multi. Handle
9602 --attach along with other options or after the port. Save
9603 program_argv. Support no initial program. Resynchronize
9604 communication with GDB after an error. Handle "monitor exit".
9605 Use require_running and target_running. Always allow the extended
9606 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9607 restart in extended mode.
9608 * README: Refer to the GDB manual. Update --attach usage.
9609
7407e2de
AS
96102007-12-20 Andreas Schwab <schwab@suse.de>
9611
9612 * linux-low.c (STACK_SIZE): Define.
9613 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9614 (linux_test_for_tracefork): Likewise.
9615
b65d95c5
DJ
96162007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9617
9618 * linux-low.c (linux_wait_for_event): Update messages. Do not
9619 reinsert auto-delete breakpoints.
9620 * mem-break.c (struct breakpoint): Change return type of handler to
9621 int.
9622 (set_breakpoint_at): Update handler type.
9623 (reinsert_breakpoint_handler): Return 1 instead of calling
9624 delete_breakpoint.
9625 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9626 setting a new one.
9627 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9628 * mem-break.h (set_breakpoint_at): Update handler type.
9629 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9630 * win32-low.c (auto_delete_breakpoint): New.
9631 (get_child_debug_event): Use it.
9632
4e799345
DJ
96332007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9634
9635 * configure.ac: Check for pread and pwrite.
9636 * hostio.c (handle_pread): Fall back to lseek and read.
9637 (handle_pwrite): Fall back to lseek and write.
9638 * config.in, configure: Regenerated.
9639
27524b67
DJ
96402007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9641
9642 * server.c (myresume): Add own_buf argument.
9643 (main): Update calls.
9644
a20d5e98
DJ
96452007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9646
9647 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9648 * remote-utils.c (remote_open): Do not call disable_async_io.
9649 (block_async_io): Delete.
9650 (unblock_async_io): Make static.
9651 (initialize_async_io): New.
9652 * server.c (handle_v_cont): Handle async I/O here.
9653 (myresume): Likewise. Move other common resume tasks here...
9654 (main): ... from here. Call initialize_async_io. Disable async
9655 I/O before the main loop.
9656 * server.h (initialize_async_io): Declare.
9657 (block_async_io, unblock_async_io): Delete prototypes.
9658 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9659
b79d787e
DJ
96602007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9661
9662 * remote-utils.c (readchar): Allow binary data in received messages.
9663
d97903b2
PA
96642007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9665
9666 * win32-low.c (attaching): New global.
9667 (win32_create_inferior): Clear the `attaching' global.
9668 (win32_attach): Set the `attaching' global.
9669 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9670 attaching. Only set a breakpoint at the entry point if not
9671 attaching.
9672
311de423
PA
96732007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9674
9675 * server.c (main): Don't report dll events on the initial
9676 connection on attaches.
9677
6c2d16d2
PA
96782007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9679
9680 * server.c (main): Relax numerical bases supported for the pid of
9681 the --attach command line argument.
9682
5ca906e6
PA
96832007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9684
9685 * win32-low.c (win32_attach): Call OpenProcess before
9686 DebugActiveProcess, not after. Add last error output to error
9687 call.
9688
9c6c8194
PA
96892007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9690
9691 * win32-low.c (win32_get_thread_context)
9692 (win32_set_thread_context): New functions.
9693 (thread_rec): Use win32_get_thread_context.
9694 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9695 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9696 field.
9697
4d5d1aaa
PA
96982007-12-03 Leo Zayas
9699 Pedro Alves <pedro_alves@portugalmail.pt>
9700
9701 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9702 global variables.
9703 (child_add_thread): Minor cleanup.
9704 (child_continue): Resume artificially suspended threads before
9705 calling ContinueDebugEvent.
9706 (suspend_one_thread): New.
9707 (fake_breakpoint_event): New.
9708 (get_child_debug_event): Change return type to int. Check here if
9709 gdb sent an interrupt request. If a soft interrupt was requested,
9710 fake a breakpoint event. Return 0 if there is no event to handle,
9711 and 1 otherwise.
9712 (win32_wait): Don't check here if gdb sent an interrupt request.
9713 Ensure there is a valid event to handle.
9714 (win32_request_interrupt): Add soft interruption method as last
9715 resort.
9716
c436e841
PA
97172007-12-03 Leo Zayas
9718 Pedro Alves <pedro_alves@portugalmail.pt>
9719
9720 * win32-low.h (win32_thread_info): Add descriptions to the
9721 structure members. Replace `suspend_count' counter by a
9722 `suspended' flag.
9723 * win32-low.c (thread_rec): Update condition of when to get the
9724 context from the inferior. Rely on ContextFlags being set if it
9725 has already been retrieved. Only suspend the inferior thread if
9726 we haven't already. Warn if that fails.
9727 (continue_one_thread): s/suspend_count/suspended/. Only call
9728 ResumeThread once. Warn if that fails.
9729
e7b5fa67
PA
97302007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9731
9732 * win32-low.c (win32_wait): Don't read from the inferior when it
9733 has already exited.
9734
a385171d
PA
97352007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9736
9737 * Makefile.in (win32_low_h): New variable.
9738 (win32-low.o): Add dependency on $(win32_low_h).
9739 (win32-arm-low.o, win32-i386-low.o): New rules.
9740
f80c84b3
DJ
97412007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9742
9743 * hostio.c: Correct copyright year.
9744
a6b151f1
DJ
97452007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9746
9747 * Makefile.in (OBS): Add hostio.o.
9748 (hostio.o): New rule.
9749 * server.h (handle_vFile): Declare.
9750 * hostio.c: New file.
9751 * server.c (handle_v_requests): Take packet_len and new_packet_len
9752 for binary packets. Call handle_vFile.
9753 (main): Update call to handle_v_requests.
9754
f9387fc3
DJ
97552007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9756
9757 * linux-low.c: Include <sched.h>.
9758
51c2684e
DJ
97592007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9760
9761 * linux-low.c (linux_tracefork_grandchild): New.
9762 (linux_tracefork_child): Use clone.
9763 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9764
75f83163
JB
97652007-10-31 Joel Brobecker <brobecker@adacore.com>
9766
9767 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9768
da5898ce
DJ
97692007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9770
9771 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9772
24a09b5f
DJ
97732007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9774
9775 * inferiors.c (change_inferior_id): Delete.
9776 (add_pid_to_list, pull_pid_from_list): New.
9777 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9778 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9779 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9780 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9781 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9782 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9783 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9784 (using_threads): Always set to 1.
9785 (handle_extended_wait): New.
9786 (add_process): Do not set TID.
9787 (linux_create_inferior): Set must_set_ptrace_flags.
9788 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9789 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9790 (linux_thread_alive): Rename TID argument to LWPID.
9791 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9792 (linux_wait_for_event): Do not use TID or check using_threads. Update
9793 call to dead_thread_notify. Call handle_extended_wait.
9794 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9795 (send_sigstop): Delete sigstop_sent.
9796 (wait_for_sigstop): Avoid TID.
9797 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9798 (linux_test_for_tracefork): New.
9799 (linux_lookup_signals): Use thread_db_active and
9800 linux_supports_tracefork_flag.
9801 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9802 * linux-low.h (get_process_thread): Avoid TID.
9803 (struct process_ifo): Move thread_known and tid to the end. Remove
9804 sigstop_sent.
9805 (linux_attach_lwp, thread_db_init): Update prototypes.
9806 * server.h (change_inferior_id): Delete prototype.
9807 (add_pid_to_list, pull_pid_from_list): New prototypes.
9808 * thread-db.c (thread_db_use_events): New.
9809 (find_first_thread): Rename to...
9810 (find_one_thread): ...this. Update callers and messages. Do not
9811 call fatal. Check thread_db_use_events. Do not call
9812 change_inferior_id or new_thread_notify.
9813 (maybe_attach_thread): Update. Do not call new_thread_notify.
9814 (thread_db_init): Set thread_db_use_events. Check use_events.
9815 * utils.c (fatal, warning): Correct message prefix.
9816
30ed0a8f
DJ
98172007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9818
9819 * Makefile.in (clean): Remove new files.
9820 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9821 (powerpc-64.o, powerpc-64.c): New rules.
9822 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9823 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9824 with SPE.
9825 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9826 SPE targets.
9827 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9828 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9829 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9830 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9831 (target_regsets): Add AltiVec and SPE register sets.
9832 * configure.ac: Check for AltiVec and SPE.
9833 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9834 (ppc_fill_vrregset, ppc_store_vrregset): New.
9835 (target_regsets): Add AltiVec register set.
9836 * configure: Regenerated.
9837
fd462a61
DJ
98382007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9839
9840 * linux-low.c (O_LARGEFILE): Define.
9841 (linux_read_memory): Use /proc/PID/mem.
9842 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9843 * configure, config.in: Regenerated.
9844
69f223ed
DJ
98452007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9846
9847 * linux-low.c (linux_wait_for_event): Do not pass signals while
9848 single-stepping.
9849
aec18585
PA
98502007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9851
9852 * win32-low.c (create_process): New.
9853 (win32_create_inferior): Use create_process instead of
9854 CreateProcess. If create_process failed retry appending an ".exe"
9855 suffix. Store the GetLastError result immediatelly after
9856 create_process calls and use it on the call to error.
9857
34d86ddd
PA
98582007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9859
9860 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9861
5a0e3bd0
JB
98622007-08-23 Joel Brobecker <brobecker@adacore.com>
9863
9864 * configure.ac: Switch license to GPLv3.
9865
f88c79e6
MS
98662007-08-01 Michael Snyder <msnyder@access-company.com>
9867
9868 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9869
6b3d9b83
PA
98702007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9871
9872 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9873 typedef.
9874 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9875 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9876 CloseToolhelp32Snapshot.
9877 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9878 CloseToolhelp32Snapshot.
9879
c588c53c
MS
98802007-07-27 Michael Snyder <michael.snyder@access-company.com>
9881
9882 * server.c (main): Check for inferior exit before main loop.
9883
aa0403d9
PA
98842007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9885
9886 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9887 instead of on tmp_desc.
9888
255e7678
DJ
98892007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9890 Daniel Jacobowitz <dan@codesourcery.com>
9891
9892 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9893 (add_thread): Minor cleanups.
9894 (clear_inferiors): Move lower in the file. Clear the DLL
9895 list.
9896 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9897 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9898 (xml_escape_text): New.
9899 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9900 for qSupported.
9901 (handle_v_cont): Report errors.
9902 (gdbserver_version): Update.
9903 (main): Correct size of own_buf. Do not report initial DLL events.
9904 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9905 (unloaded_dll, xml_escape_text): New.
9906 * win32-low.c (enum target_waitkind): Update comments.
9907 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9908 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9909 (win32_EnumProcessModules, win32_GetModuleInformation)
9910 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9911 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9912 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9913 (win32_Module32First, win32_Module32Next, load_toolhelp)
9914 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9915 (get_child_debug_event): Handle DLL events.
9916 (win32_wait): Likewise.
9917
0d37add9
DJ
99182007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9919
9920 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9921 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9922
45e2715e
PA
99232007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9924
9925 * win32-low.c (handle_output_debug_string): Ignore event if not
9926 waiting.
9927
c5674cf1
PA
99282007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9929
9930 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9931
2bbe3cc1
DJ
99322007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9933
9934 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9935
ae13219e
DJ
99362007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9937
9938 * inferiors.c (change_inferior_id): Add comment.
9939 * linux-low.c (check_removed_breakpoint): Add an early
9940 prototype. Improve debug output.
9941 (linux_attach): Doc update.
9942 (linux_detach_one_process, linux_detach): Clean up before releasing
9943 each process.
9944 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9945 * linux-low.h (struct process_info): Doc improvement.
9946 * mem-break.c (delete_all_breakpoints): New.
9947 * mem-break.h (delete_all_breakpoints): New prototype.
9948 * thread-db.c (find_first_thread): New.
9949 (thread_db_create_event): Call it instead of
9950 thread_db_find_new_threads. Clean up unused variables.
9951 (maybe_attach_thread): Remove first thread handling.
9952 (thread_db_find_new_threads): Use find_first_thread.
9953 (thread_db_get_tls_address): Likewise.
9954
4105de34
DJ
99552007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9956
9957 * thread-db.c (thread_db_find_new_threads): Add prototype.
9958 (thread_db_create_event): Check for the main thread before adding
9959 a new thread.
9960 (maybe_attach_thread): Only enable event reporting if TID == 0.
9961 (thread_db_get_tls_address): Check for new threads.
9962
2b876972
DJ
99632007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9964
9965 * linux-low.c (linux_create_inferior): Try execv before execvp.
9966 * spu-low.c (spu_create_inferior): Likewise.
9967
7a245884
DJ
99682007-06-13 Mike Frysinger <vapier@gentoo.org>
9969
9970 * linux-low.c (linux_create_inferior): Change execv to execvp.
9971 * spu-low.c (spu_create_inferior): Likewies.
9972
117ce543
DJ
99732007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9974
9975 * Makefile.in (clean): Clean new files instead of deleted ones.
9976 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9977 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9978 rules.
9979 * configure.srv: Specify XML files and new regformats for MIPS and
9980 MIPS64 GNU/Linux.
9981 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9982 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9983 an entry for the restart register.
9984 (mips_cannot_fetch_register, mips_cannot_store_register)
9985 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9986 register names to match the XML descriptions.
9987 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9988 restart register instead of $0.
9989
0e7f50da
UW
99902007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9991 Markus Deuling <deuling@de.ibm.com>
9992
9993 * remote-utils.c (decode_xfer_write): New function.
9994 * server.h (decode_xfer_write): Add prototype.
9995 * server.c (handle_query): Add PACKET_LEN argument. Support
9996 qXfer:spu:read and qXfer:spu:write packets.
9997 (main): Pass packet_len to handle_query.
9998 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9999 * target.h (target_ops): Add qxfer_spu.
10000
374c1d38
UW
100012007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10002
10003 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10004 accessing non-seekable spufs files.
10005
bb63802a
UW
100062007-05-16 Markus Deuling <deuling@de.ibm.com>
10007
889bf7c5 10008 * server.c (handle_query): Add reply for qC packet.
bb63802a 10009
7390519e
PA
100102007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10011 Leo Zayas <lerele@champenstudios@com>
10012
10013 * server.h (check_remote_input_interrupt_request): New function.
10014 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10015 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10016 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10017 (check_remote_input_interrupt_request): New function.
10018 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 10019 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
10020 winapi_GenerateConsoleCtrlEvent): New typedefs.
10021 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10022 to 250 ms.
10023 (win32_wait): Check for remote interrupt request
10024 with check_remote_input_interrupt_request.
10025 (win32_request_interrupt): New function.
10026 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10027
34b34921
PA
100282007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10029
10030 * win32-low.c (debug_registers_changed,
10031 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10032 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10033 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10034 (thread_rec): Get context using the low target.
10035 (child_add_thread): Call thread_added on the low target,
10036 which does the same thing.
10037 (regptr): Delete.
10038 (do_initial_child_stuff): Remove debug registers references.
10039 Set context using the low target. Resume threads after
10040 setting the contexts.
10041 (child_continue): Remove dead variable. Remove debug
10042 registers references.
10043 (child_fetch_inferior_registers): Go through the low target.
10044 (do_child_store_inferior_registers): Remove.
10045 (child_store_inferior_registers): Go through the low target.
10046 (win32_resume): Remove debug registers references.
10047 Set context using the low target.
10048 (handle_exception): Change return type to void. Don't record
10049 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10050 first chance exception.
889bf7c5 10051 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
10052 goto loop. Always return after waiting for debug event.
10053 (win32_wait): Convert to switch statement. Handle spurious
10054 events.
10055
10056 * win32-i386-low.c (debug_registers_changed,
10057 debug_registers_used): New.
10058 (initial_stuff): Rename to ...
10059 (i386_initial_stuff): ... this. Clear debug registers
10060 state variables.
10061 (store_debug_registers): Delete.
10062 (i386_get_thread_context): New.
10063 (load_debug_registers): Delete.
10064 (i386_set_thread_context): New.
10065 (i386_thread_added): New.
10066 (single_step): Rename to ...
10067 (i386_single_step): ... this.
10068 (do_fetch_inferior_registers): Rename to ...
10069 (i386_fetch_inferior_register): ... this.
10070 (i386_store_inferior_register): New.
10071 (the_low_target): Adapt to new interface.
10072
10073 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10074 (arm_get_thread_context): New.
10075 (arm_set_thread_context): New.
10076 (regptr): New.
10077 (do_fetch_inferior_registers): Rename to ...
10078 (arm_fetch_inferior_register): ... this.
10079 (arm_store_inferior_register): New.
10080 (arm_wince_breakpoint): Reimplement as unsigned long.
10081 (arm_wince_breakpoint_len): Define.
10082 (the_low_target): Adapt to new interface.
10083
10084 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10085 load_debug_registers. Add get_thread_context, set_thread_context,
10086 thread_added and store_inferior_register. Rename
10087 fetch_inferior_registers to fetch_inferior_register.
10088 (regptr): Remove declaration.
10089
dd6953e1
PA
100902007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10091
10092 * linux-low.c (linux_detach): Change return type to int. Return 0.
10093 * spu-low.c (spu_detach): Likewise.
10094
444d6139
PA
100952007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10096
10097 * target.h (target_ops): Change return type of detach to int.
10098 Add join.
10099 (join_inferior): New.
10100 * server.c (main): Don't skip detach support on mingw32.
10101 If the inferior doesn't support detaching return error.
10102 Call join_inferior instead of using waitpid.
10103 * linux-low.c (linux_join): New.
10104 (linux_target_op): Add linux_join.
10105 * spu-low.c (spu_join): New.
10106 (spu_target_ops): Add spu_join.
10107 * win32-low.c (win32_detach): Adapt to new interface.
10108 Reopen current_process_handle before detaching. Issue a child
10109 resume before detaching.
10110 (win32_join): New.
10111 (win32_target_op): Add win32_join.
10112
1d5315fe
PA
101132007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10114
10115 * win32-low.c (win32-attach): Fix return value.
10116 * target.h (target_ops): Describe ATTACH return values.
10117
bf914831
PA
101182007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10119
10120 * win32-low.c (GETPROCADDRESS): Define.
10121 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10122 (winapi_DebugSetProcessKillOnExit): Likewise.
10123 (win32_create_inferior): Force usage of ansi CreateProcessA.
10124 (win32_attach): Use GETPROCADDRESS.
10125 (win32_detach): Likewise.
10126
f72f3e60
PA
101272007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10128
10129 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10130
ed50f18f
PA
101312007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10132
10133 * win32-low.c: Commit leftover changes from 2007-03-29.
10134
0c2ead7e
DJ
101352007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10136
10137 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10138 fields short instead of int. Add explicit padding.
10139 (i387_cache_to_fsave): Remove unnecessary casts.
10140 (i387_fsave_to_cache): Doc fix.
10141 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10142
73725ff3
DJ
101432007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10144
10145 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10146 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10147
d99f33d8
PA
101482007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10149
10150 * configure.srv (arm*-*-mingw32ce*): Move near the other
10151 arm targets.
10152
68070c10
PA
101532007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10154
2482afc6 10155 * configure.ac: Add errno checking.
68070c10
PA
10156 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10157 sys/file.h and malloc.h.
10158 (AC_CHECK_DECLS): Add perror.
10159 (srv_mingwce): Handle.
2482afc6 10160 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
10161 win32-i386-low.o to srv_tgtobj.
10162 (i[34567]86-*-mingw*): Likewise.
10163 (arm*-*-mingw32ce*): Add case.
10164 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10165 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10166 [__MINGW32CE__] (strerror): New function.
10167 [__MINGW32CE__] (errno): Define to GetLastError.
10168 [__MINGW32CE__] (COUNTOF): New macro.
10169 (remote_open): Remove extra close call.
10170 * mem-break.c (delete_breakpoint_at): New function.
10171 * mem-break.h (delete_breakpoint_at): Declare.
10172 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10173 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10174 [USE_WIN32API] (read, write): Add char* casts.
10175 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10176 * server.h: Include wincecompat.h on Windows CE.
10177 [HAVE_ERRNO_H]: Check.
10178 (perror): Declare if not declared.
10179 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10180 (perror_with_name): Remove errno declaration.
10181 * wincecompat.h: New.
10182 * wincecompat.c: New.
10183 * win32-low.h: New.
10184 * win32-arm-low.c: New.
10185 * win32-i386-low.c: New.
10186 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10187 (OUTMSG2): Make it safe.
10188 (_T): New macro.
10189 (COUNTOF): New macro.
10190 (NUM_REGS): Get it from the low target.
10191 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10192 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10193 (thread_rec): Let low target handle debug registers.
10194 (child_add_thread): Likewise.
10195 (child_init_thread_list): Likewise.
10196 (continue_one_thread): Likewise.
10197 (regptr): New.
10198 (do_child_fetch_inferior_registers): Move to ...
10199 * win32-i386-low.c: ... here, and rename to ...
10200 (do_fetch_inferior_registers): ... this.
889bf7c5 10201 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
10202 Go through the low target.
10203 (do_child_store_inferior_registers): Use regptr.
10204 (strwinerror): New function.
10205 (win32_create_inferior): Handle Windows CE.
10206 Use strwinerror instead of strerror on Windows error
10207 codes. Add program to the error output.
10208 Don't close the main thread handle on Windows CE.
10209 (win32_attach): Use coredll.dll on Windows CE.
10210 (win32_kill): Close current process and current
10211 thread handles.
10212 (win32_detach): Use coredll.dll on Windows CE.
10213 (win32_resume): Let low target handle debug registers, and
10214 step request.
10215 (handle_exception): Add/Remove initial breakpoint. Avoid
10216 non-existant WSTOPSIG on Windows CE.
10217 (win32_read_inferior_memory): Cast to remove warning.
10218 (win32_arch_string): Go through the low target.
10219 (initialize_low): Call set_breakpoint_data with the low
10220 target's breakpoint.
10221 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10222 FOP_REGNUM, mappings): Move to ...
10223 * win32-i386-low.c: ... here.
10224 * win32-low.c (win32_thread_info): Move to ...
10225 * win32-low.h: ... here.
10226 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10227 win32-arm-low.c and wincecompat.c.
10228 (all:): Add $EXEEXT.
10229 (install-only:): Likewise.
10230 (gdbserver:): Likewise.
10231 (gdbreplay:): Likewise.
10232 * config.in: Regenerate.
10233 * configure: Regenerate.
10234
41093d81
PA
102352007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10236
10237 * win32-low.c: Rename typedef thread_info to
10238 win32_thread_info throughout.
10239
544afa54
PA
102402007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10241
10242 * win32-i386-low.c: Rename to ...
10243 * win32-low.c: ... this.
10244 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10245 * Makefile.in: Likewise.
10246
bce7165d
PA
102472007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10248
10249 * remote-utils.c (monitor_output): Constify msg parameter.
10250 * server.h (monitor_output): Likewise.
10251 * win32-i386-low.c (handle_output_debug_string): New.
10252 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10253 handle_output_debug_string.
10254 (get_child_debug_event): Likewise.
10255
506c7aa0
DJ
102562007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10257
10258 * server.c (main): Correct strtoul check.
10259
42c81e2a
DJ
102602007-03-27 Jon Ringle <jon@ringle.org>
10261
10262 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10263
9453113a
DJ
102642007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10265
10266 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10267
64a69107
DJ
102682007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10269
10270 * terminal.h: Check HAVE_SGTTY_H.
10271
102722007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
10273
10274 * remote-utils.c (remote_open): Print out the assigned port number.
10275
c74d0ad8
DJ
102762007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10277
10278 * remote-utils.c (monitor_output): New function.
10279 * server.c (debug_threads): Define here.
10280 (monitor_show_help): New function.
10281 (handle_query): Handle qRcmd.
10282 (main): Do not handle 'd' packet.
10283 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10284 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10285 of debug_threads.
10286
de7c3b4a
PA
102872007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10288
10289 * Makefile.in (EXEEXT): New.
10290 (clean): Use $(EXEEXT).
10291
ef57601b
PA
102922007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10293
10294 * target.h (target_ops): Rename send_signal to request_interrupt,
10295 and remove enum target_signal parameter.
10296 * linux-low.c (linux_request_interrupt): Rename from
10297 linux_send_signal, and always send SIGINT.
10298 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10299 and always send SIGINT.
10300 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10301 of send_signal.
10302 (input_interrupt): Likewise.
10303
820f2bda
PA
103042007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10305
10306 * server.c (get_features_xml): Check if target implemented
10307 arch_string.
10308 * win32-i386-low.c (win32_arch_string): New.
10309 (win32_target_ops): Add win32_arch_string as arch_string member.
10310
ab39bf24
UW
103112007-02-22 Markus Deuling <deuling@de.ibm.com>
10312
10313 * spu-low.c (spu_arch_string): New.
10314 (spu_target_ops): Add spu_arch_string.
10315
61ff6e04
DJ
103162007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10317
10318 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10319 * configure.ac: Do not check for terminal.h.
10320 * configure, config.in: Regenerated.
10321
fb1e4ffc
DJ
103222007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10323
10324 * Makefile.in (OBS): Add $(XML_BUILTIN).
10325 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10326 (clean): Update.
10327 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10328 (arm-with-iwmmxt.c): New.
10329 * config.in, configure: Regenerate.
10330 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10331 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10332 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10333 (arm*-*-linux*): Add iWMMXt and regset support.
10334 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10335 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10336 (arm_store_wmmxregset, target_regsets): New.
10337 * server.c (get_features_xml): Take annex argument. Check builtin
10338 XML documents.
10339 (handle_query): Handle multiple annexes.
10340
0f48aa01
DJ
103412007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10342
10343 * remote-utils.c [USE_WIN32API] (read, write): Define.
10344 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10345 write.
10346
23181151
DJ
103472007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10348
10349 * linux-i386-low.c (the_low_target): Set arch_string.
10350 * linux-x86-64-low.c (the_low_target): Likewise.
10351 * linux-low.c (linux_arch_string): New.
10352 (linux_target_ops): Add it.
10353 * linux-low.h (struct linux_target_ops): Add arch_string.
10354 * server.c (write_qxfer_response): Use const void * for DATA.
10355 (get_features_xml): New.
10356 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10357 * target.h (struct target_ops): Add arch_string method.
10358
9d606399
DJ
103592007-01-03 Denis Pilat <denis.pilat@st.com>
10360 Daniel Jacobowitz <dan@codesourcery.com>
10361
10362 * linux-low.c (linux_kill): Handle being called with no threads.
10363 * win32-i386-low.c (win32_kill): Likewise.
10364 (get_child_debug_event): Clear current_process_handle.
10365
103662006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10367 Daniel Jacobowitz <dan@codesourcery.com>
10368
10369 * remote-utils.c (remote_open): Check the type of specified
10370 serial port devices before opening them.
10371 * server.c (main): Kill the inferior if an error occurs during
10372 the first remote_open.
10373
a5e13d24
DJ
103742006-12-05 Markus Deuling <deuling@de.ibm.com>
10375
10376 * README: Update supported targets.
10377
186947f7
DJ
103782006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10379
10380 * Makefile.in (clean): Remove reg-mips64.c.
10381 (reg-mips64.c, reg-mips64.o): New rules.
10382 * configure.srv: Handle mips64. Include regset support for mips.
10383 * linux-mips-low.c (union mips_register): New.
10384 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10385 (mips_breakpoint, mips_breakpoint_at): Use int.
10386 (mips_collect_register, mips_supply_register)
10387 (mips_collect_register_32bit, mips_supply_register_32bit)
10388 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10389 (mips_store_fpregset, target_regsets): New.
10390 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10391
a13e2c95
UW
103922006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10393
10394 * configure.srv: Add target "spu*-*-*".
10395 * Makefile.in (clean): Remove reg-spu.c.
10396 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10397 * spu-low.c: New file.
10398
cb7283db
DJ
103992006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10400
10401 * configure.ac: Correct td_thr_tls_get_addr test.
10402 * configure: Regenerated.
10403
89be2091
DJ
104042006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10405
10406 * linux-low.c (linux_wait_for_event): Reformat. Use the
10407 pass_signals array.
10408 * remote-utils.c (decode_address_to_semicolon): New.
10409 * server.c (pass_signals, handle_general_set): New.
10410 (handle_query): Mention QPassSignals for qSupported.
10411 (main): Call handle_general_set.
10412 * server.h (pass_signals, decode_address_to_semicolon): New.
10413
000ef4f0
DJ
104142006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10415
10416 * server.c (handle_query): Correct error handling for read_auxv.
10417
b7149293
UW
104182005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10419
10420 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10421 and srv_linux_thread_db to yes.
10422 * linux-s390-low.c (s390_fill_gregset): New function.
10423 (target_regsets): Define data structure.
10424
dae5f5cf
DJ
104252006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10426
10427 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10428 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10429 * config.in, configure: Regenerated.
10430 * inferiors.c (gdb_id_to_thread): New function.
10431 (gdb_id_to_thread_id): Use it.
10432 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10433 * linux-low.h (struct process_info): Add th member.
10434 (thread_db_get_tls_address): New prototype.
10435 * remote-utils.c (decode_address): Make non-static.
10436 * server.c (handle_query): Handle qGetTLSAddr.
10437 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10438 * target.h (struct target_ops): Add get_tls_address.
10439 * thread-db.c (maybe_attach_thread): Save the thread handle.
10440 (thread_db_get_tls_address): New.
10441
32ca6d61
DJ
104422006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10443
10444 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10445 (linux_resume_one_process): Take a siginfo_t *. Update all
10446 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10447 (struct pending_signals): Add a siginfo_t.
10448 (linux_wait_for_process): Always set last_status.
10449 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10450 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10451 * linux-low.h (struct process_info): Add last_status.
10452
5ffff7c1
DJ
104532006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10454
10455 * remote-utils.c (try_rle): New function.
10456 (putpkt_binary): Use it.
10457
8695c747
DJ
104582006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10459
10460 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10461 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10462 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10463 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10464 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10465 point registers.
10466
290fadea
RS
104672006-08-08 Richard Sandiford <richard@codesourcery.com>
10468
10469 * server.c (terminal_fd): New variable.
10470 (old_foreground_pgrp): Likewise.
10471 (restore_old_foreground_pgrp): New function.
10472 (start_inferior): Record the terminal file descriptor in terminal_fd
10473 and its original foreground group in old_foreground_pgrp. Register
10474 restore_old_foreground_pgrp with atexit().
10475
9f2e1e63
DJ
104762006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10477
10478 * server.c (handle_query): Correct qPart to qXfer.
10479
b80864fb
DJ
104802006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10481
10482 * configure.ac: Check for more headers which are missing on
10483 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10484 * configure.srv: Add Cygwin and mingw32.
10485 * remote-utils.c: Don't include headers unconditionally which
10486 are missing on mingw32. Include <winsock.h> for mingw32.
10487 (remote_open): Adjust for mingw32 support. Flush
10488 standard error after writing to it.
10489 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10490 (unblock_async_io, enable_async_io, disable_async_io)
10491 (readchar, getpkt): Update for Winsock support.
10492 (prepare_resume_reply): Expect a protocol signal number.
10493 * server.c: Disable <sys/wait.h> on mingw32.
10494 (start_inferior): Adjust for mingw32 support. Flush
10495 standard error after writing to it.
10496 (attach_inferior): Likewise. Use protocol signal
10497 numbers.
10498 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10499 and names.
10500 * win32-i386-low.c: New file.
10501 * Makefile.in (XM_CLIBS): Set.
10502 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10503 (win32-i386-low.o): New dependency rule.
10504 * linux-low.c (linux_wait): Use target signal numbers.
10505 * target.h (struct target_ops): Doc fix.
10506 * server.h (target_signal_to_name): New prototype.
10507 * gdbreplay.c: Don't include headers unconditionally which
10508 are missing on mingw32. Include <winsock.h> for mingw32.
10509 (remote_close, remote_open): Adjust for Winsock support.
10510 * configure, config.in: Regenerated.
10511
0876f84a
DJ
105122006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10513
10514 * server.c (decode_xfer_read, write_qxfer_response): New.
10515 (handle_query): Take a packet length argument. Handle
10516 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10517 the qSupported response.
10518 (main): Update call to handle_query.
10519
01f9e8fa
DJ
105202006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10521
10522 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10523 (putpkt_binary): Renamed from putpkt and adjusted for binary
10524 data.
10525 (putpkt): New wrapper for putpkt_binary.
10526 (readchar): Don't mask off the high bit.
10527 (decode_X_packet): New function.
10528 * server.c (main): Call putpkt_binary if a handler sets the packet
10529 length. Save the length of the incoming packet. Handle 'X'.
10530 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10531
be2a5f71
DJ
105322006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10533
10534 * server.c (handle_query): Handle qSupported.
10535
ea025f5f
DJ
105362006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10537
10538 * remote-utils.c (all_symbols_looked_up): New variable.
10539 (look_up_one_symbol): Check it.
10540 * server.h (look_up_one_symbol): New declaration.
10541 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10542
9308fc88
DJ
105432006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10544
10545 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10546 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10547 (PTRACE_GET_THREAD_AREA): Define.
10548 (ps_get_thread_area): New function.
10549
52fb6437
NS
105502006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10551
10552 * configure.srv (m68k*-*-uclinux*): New target.
10553 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10554 (linux_resume_one_process): Remove extraneous cast.
10555 (linux_read_offsets): New.
10556 (linux_target_op): Add linux_read_offsets on mmuless systems.
10557 * server.c (handle_query): Add qOffsets logic.
10558 * target.h (struct target_ops): Add read_offsets.
10559
21b0f40c
DJ
105602006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10561
10562 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10563 (PTRACE_GET_THREAD_AREA): Define.
10564 (ps_get_thread_area): New function.
10565 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10566 (linux-x86-64-low.o): Update.
10567
0050a760
DJ
105682006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10569
10570 * configure.ac: Remove checks for prfpregset_t.
10571 * gdb_proc_service.h: New file.
10572 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10573 new "gdb_proc_service.h".
10574 * proc-service.c: Likewise.
10575 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10576 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10577 * Makefile.in (gdb_proc_service_h): Updated.
10578 * configure, config.in: Regenerated.
10579
b92a518e
DJ
105802006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10581
10582 * remote-utils.c (prepare_resume_reply): Move declaration
10583 of gdb_id_from_wait to the top of the block.
10584
545587ee
DJ
105852006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10586
10587 * linux-low.c (regsets_store_inferior_registers): Read the regset
10588 from the target before filling it.
10589
9db87ebd
DJ
105902006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10591
10592 * server.c (attach_inferior): Return SIGTRAP for a successful
10593 attach.
10594
dd24457d
DJ
105952006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10596
10597 * Makefile.in (OBS): Add version.o.
10598 (STAGESTUFF): Delete.
10599 (version.o): Add dependencies.
10600 (version.c): Replace rule.
10601 (clean): Remove version.c.
10602 * server.c (gdbserver_version): New.
10603 (gdbserver_usage): Use printf.
10604 (main): Handle --version and --help.
10605 * server.h (version, host_name): Add declarations.
10606
6f0f660e
EZ
106072005-12-23 Eli Zaretskii <eliz@gnu.org>
10608
889bf7c5
PA
10609 * linux-arm-low.c:
10610 * linux-arm-low.c:
10611 * inferiors.c:
10612 * i387-fp.h:
10613 * i387-fp.c:
10614 * gdbreplay.c:
10615 * regcache.c:
10616 * proc-service.c:
10617 * mem-break.h:
10618 * mem-break.c:
10619 * linux-x86-64-low.c:
10620 * linux-sh-low.c:
10621 * linux-s390-low.c:
10622 * linux-ppc64-low.c:
10623 * linux-ppc-low.c:
10624 * linux-mips-low.c:
10625 * linux-m68k-low.c:
10626 * linux-m32r-low.c:
10627 * linux-low.h:
10628 * linux-low.c:
10629 * linux-ia64-low.c:
10630 * linux-i386-low.c:
10631 * linux-crisv32-low.c:
10632 * thread-db.c:
10633 * terminal.h:
10634 * target.h:
10635 * target.c:
10636 * server.h:
10637 * server.c:
10638 * remote-utils.c:
10639 * regcache.h:
10640 * utils.c:
10641 * Makefile.in:
10642 * configure.ac:
6f0f660e
EZ
10643 * gdbserver.1: Add (C) after Copyright. Update the FSF
10644 address.
10645
9d1fb177
DJ
106462005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10647
10648 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10649 (arm_breakpoint_at): Recognize both breakpoints.
10650 (the_low_target): Use the correct breakpoint instruction.
10651
011a70c2
DJ
106522005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10653
10654 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10655 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10656 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10657 (the_low_target): Update.
10658
7fb85e41
AS
106592005-10-25 Andreas Schwab <schwab@suse.de>
10660
10661 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10662
10663 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10664 (ia64_num_regs): Reduce to 462.
10665
3db0444b
DJ
106662005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10667
10668 * acinclude.m4: Correct quoting.
10669 * aclocal.m4: Regenerated.
10670
10671 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10672 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10673 (thread_db_init): Call thread_db_err_str.
10674 * configure.ac: Check for TD_VERSION.
10675 * config.in, configure: Regenerated.
10676
bee0189a
DJ
106772005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10678
10679 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10680
e9d25b98
DJ
106812005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10682
10683 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10684 is not available. Define HAVE_PTRACE_GETREGS if it is.
10685 * config.in, configure: Regenerated.
10686 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10687 * linux-i386-low.c, linux-m68k-low.c: Update to use
10688 HAVE_PTRACE_GETREGS.
10689 * linux-low.c (regsets_fetch_inferior_registers)
10690 (regsets_store_inferior_registers): Only return 0 if we processed
10691 GENERAL_REGS.
10692 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10693 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10694
a06660f7
DJ
106952005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10696
10697 * inferiors.c (struct thread_info): Add gdb_id.
10698 (add_thread): Add gdb_id argument.
10699 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10700 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10701 calls to add_thread.
10702 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10703 * server.c (handle_query): Use thread_to_gdb_id.
10704 (handle_v_cont, main): Use gdb_id_to_thread_id.
10705 * server.h (add_thread): Update prototype.
10706 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10707 prototypes.
10708
5a1f5858
DJ
107092005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10710
10711 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10712 left-padded registers.
10713 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10714 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10715
e122f1f5
SE
107162005-07-01 Steve Ellcey <sje@cup.hp.com>
10717
10718 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10719 * configure: Regenerate.
10720 * config.in: Regenerate.
10721 * server.h (NEED_DECLARATION_STRERROR):
10722 Replace with !HAVE_DECL_STRERROR.
10723
d592fa2f
DJ
107242005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10725
10726 * linux-low.c (linux_wait, linux_send_signal): Don't test
10727 an unsigned long variable for > 0 if it could be MAX_ULONG.
10728 * server.c (myresume): Likewise.
10729 * target.c (set_desired_inferior): Likewise.
10730
ccbd4912
MK
107312005-06-13 Mark Kettenis <kettenis@gnu.org>
10732
10733 * configure.ac: Simplify and improve check for socklen_t.
10734 * configure, config.in: Regenerate.
10735
f450004a
DJ
107362005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10737
10738 * acconfig.h: Remove.
10739 * configure.ac: Add a test for socklen_t. Use three-argument
10740 AC_DEFINE throughout.
10741 * config.in: Regenerated using autoheader 2.59.
10742 * configure: Regenerated.
10743
10744 * gdbreplay.c (socklen_t): Provide a default.
10745 (remote_open): Use socklen_t.
10746 * remote-utils.c (socklen_t): Provide a default.
10747 (remote_open): Use socklen_t.
10748 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10749 unsigned char.
10750
10751 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10752 char for buffers.
10753 * linux-low.c (linux_read_memory, linux_write_memory)
10754 (linux_read_auxv): Likewise.
10755 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10756 (check_mem_write): Likewise.
10757 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10758 Likewise.
10759 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10760 (registers_from_string, register_data): Likewise.
10761 * server.c (handle_query, main): Likewise.
10762 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10763 (decode_M_packet): Likewise.
10764 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10765 * target.h (struct target_ops): Update read_memory, write_memory,
10766 and read_auxv.
10767 (read_inferior_memory, write_inferior_memory): Update.
10768 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10769 to unsigned char *.
10770 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10771 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10772 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10773 linux-s390-low.c, linux-sh-low.c: Update for changes in
10774 read_inferior_memory and the_low_target->breakpoint.
10775
eee84df1
DJ
107762005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10777
10778 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10779 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10780 * configure.srv: Add powerpc64-*-linux*.
10781 * linux-ppc64-low.c: New file.
10782
45b134e5
OF
107832005-05-23 Orjan Friberg <orjanf@axis.com>
10784
10785 * linux-cris-low.c: New file with support for CRIS.
10786 * linux-crisv32-low.c: Ditto for CRISv32.
10787 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10788 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10789 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10790 reg-crisv32.o, and reg-crisv32.c to make rules.
10791 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10792 recognized targets.
10793
48d93c75
UW
107942005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10795
10796 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10797 of sizeof (PTRACE_XFER_TYPE).
10798 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10799
e013ee27
OF
108002005-05-12 Orjan Friberg <orjanf@axis.com>
10801
889bf7c5 10802 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10803 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10804 pointers for hardware watchpoint support.
10805 * linux-low.h (struct linux_target_ops): Ditto.
10806 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10807 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10808 to linux_target_ops.
10809 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10810 reply packet.
10811 * server.c (main): Recognize 'Z' and 'z' packets.
10812
b0ded00b
UW
108132005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10814
10815 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10816 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10817 (the_low_target): Add new members.
10818
8643e2ad
DJ
108192005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10820
10821 * proc-service.c (ps_lgetregs): Search all_processes instead of
10822 all_threads.
10823
fc620387
DJ
108242005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10825
10826 * server.c (start_inferior): Change return type to int.
10827 (attach_inferior): Change sigptr to int *.
10828 (handle_v_cont, handle_v_requests): Change signal to int *.
10829 (main): Change signal to int.
10830
108312005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10832
10833 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10834 * configure.srv: Add m32r*-*-linux*.
10835 * linux-m32r-low.c: New file.
10836
e0e76420
DJ
108372005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10838
10839 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10840
a1928bad
DJ
108412005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10842
10843 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10844 Take unsigned long arguments for PIDs.
10845 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10846 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10847 (wait_for_sigstop, linux_resume_one_process)
10848 (regsets_fetch_inferior_registers, linux_send_signal)
10849 (linux_read_auxv): Likewise. Update the types of variables holding
10850 PIDs. Update format string specifiers.
10851 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10852 * remote-utils.c (prepare_resume_reply): Likewise.
10853 * server.c (cont_thread, general_thread, step_thread)
10854 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10855 unsigned long.
10856 (handle_query): Update format specifiers.
10857 (handle_v_cont, main): Use strtoul for thread IDs.
10858 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10859 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10860 (general_thread, step_thread, thread_from_wait)
10861 (old_thread_from_wait): Update.
10862 * target.h (struct thread_resume): Use unsigned long for THREAD.
10863 (struct target_ops): Use unsigned long for arguments to attach and
10864 thread_alive.
10865
dcdb98d2
DJ
108662005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10867
10868 * acinclude.m4: Include bfd/bfd.m4 directly.
10869 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10870 <agriffis@toolchain.org>.
10871 * aclocal.m4, configure: Regenerated.
10872
bec39cab
AC
108732005-01-07 Andrew Cagney <cagney@gnu.org>
10874
10875 * configure.ac: Rename configure.in, require autoconf 2.59.
10876 * configure: Re-generate.
10877
434c4c77
DJ
108782004-12-08 Daniel Jacobowitz <dan@debian.org>
10879
10880 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10881 LIBS when finished.
10882 * aclocal.m4: Regenerated.
10883 * configure: Regenerated.
10884
db1d3e1b
AS
108852004-11-21 Andreas Schwab <schwab@suse.de>
10886
10887 * linux-m68k-low.c (m68k_num_gregs): Define.
10888 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10889 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10890 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10891 (m68k_breakpoint_at): New. Add to the_low_target.
10892
10893 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10894 srv_linux_thread_db to yes.
10895
43360365
JB
108962004-10-20 Joel Brobecker <brobecker@gnat.com>
10897
10898 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10899 (ARCH_SET_FS): Likewise.
10900 (ARCH_GET_FS): Likewise.
10901 (ARCH_GET_GS): Likewise.
10902
fd500816
DJ
109032004-10-16 Daniel Jacobowitz <dan@debian.org>
10904
10905 * linux-i386-low.c (ps_get_thread_area): New.
10906 * linux-x86-64-low.c (ps_get_thread_area): New.
10907 * linux-low.c: Include <sys/syscall.h>.
10908 (linux_kill_one_process): Don't kill the first thread here.
10909 (linux_kill): Kill the first thread here.
10910 (kill_lwp): New function.
10911 (send_sigstop, linux_send_signal): Use it.
10912 * proc-service.c: Clean up #ifdefs.
10913 (fpregset_info): Delete.
10914 (ps_lgetregs): Update and enable implementation.
10915 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10916 implementations.
10917 * remote-utils.c (struct sym_cache, symbol_cache): New.
10918 (input_interrupt): Print a clearer message.
10919 (async_io_enabled): New variable.
10920 (enable_async_io, disable_async_io): Use it. Update comments.
10921 (look_up_one_symbol): Use the symbol cache.
10922 * thread-db.c (thread_db_look_up_symbols): New function.
10923 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10924
f6de3c42
DJ
109252004-10-16 Daniel Jacobowitz <dan@debian.org>
10926
10927 * configure.in: Test for -rdynamic.
10928 * configure: Regenerated.
10929 * Makefile (INTERNAL_LDFLAGS): New.
10930 (gdbserver, gdbreplay): Use it.
10931
2c0fc042
AC
109322004-09-02 Andrew Cagney <cagney@gnu.org>
10933
10934 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10935
075b3282
DJ
109362004-03-23 Daniel Jacobowitz <drow@mvista.com>
10937
10938 * linux-low.c (linux_wait): Clear all_processes list also.
10939
fa6a77dc
DJ
109402004-03-12 Daniel Jacobowitz <drow@mvista.com>
10941
10942 * linux-low.c: Include <errno.h>. Remove extern declaration of
10943 errno.
10944
6d782a97
DJ
109452004-03-12 Daniel Jacobowitz <drow@mvista.com>
10946
10947 * gdbreplay.c, server.h, utils.c: Update copyright years.
10948
3a7fb99b
DJ
109492004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10950
10951 * server.c (main): Print child status or termination signal from
10952 variable 'signal', not 'sig'.
10953
c3e735a6
DJ
109542004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10955
10956 * linux-low.c (linux_read_memory): Change return type to
10957 int. Check for and return error from ptrace().
10958 * target.c (read_inferior_memory): Change return type to int. Pass
10959 back return status from the_target->read_memory().
10960 * target.h (struct target_ops): Adapt *read_memory() prototype.
10961 Update comment.
10962 (read_inferior_memory): Adapt prototype.
10963 * server.c (main): Return an error packet if
10964 read_inferior_memory() returns an error.
10965
a59d1c82
DJ
109662004-03-04 Daniel Jacobowitz <drow@mvista.com>
10967
10968 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10969 Unify with other clean targets.
10970
dc3f8883
DJ
109712004-02-29 Daniel Jacobowitz <drow@mvista.com>
10972
10973 * server.c (handle_v_cont): Call set_desired_inferior.
10974
89a208da
DJ
109752004-02-29 Daniel Jacobowitz <drow@mvista.com>
10976
10977 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10978
62ea82f5
DJ
109792004-02-29 Daniel Jacobowitz <drow@mvista.com>
10980
10981 * linux-low.c (linux_wait): Unblock async I/O.
10982 (linux_resume): Block and enable async I/O.
10983 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10984 * server.h (block_async_io, unblock_async_io): Add prototypes.
10985
6910d122
DJ
109862004-02-29 Daniel Jacobowitz <drow@mvista.com>
10987
10988 * remote-utils.c (remote_open): Print a status notice after
10989 opening a TCP port.
10990 * server.c (attach_inferior): Print a status notice after
10991 attaching.
10992
109932004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10994
10995 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10996
c89dc5d4
DJ
109972004-02-26 Daniel Jacobowitz <drow@mvista.com>
10998
10999 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11000 error packet.
11001 * server.c, target.h: Update copyright years.
11002
4b8dad4a
RM
110032004-02-25 Roland McGrath <roland@redhat.com>
11004
11005 * target.h (struct target_ops): New member `read_auxv'.
11006 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11007 * linux-low.c (linux_read_auxv): New function.
11008 (linux_target_ops): Initialize `read_auxv' member to that.
11009
d7446758
JB
110102004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11011
11012 Committed by Jim Blandy <jimb@redhat.com>.
11013
11014 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 11015 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
11016 instead of GPR_SIZE to distiguish s390 and s390x targets.
11017
5544ad89
DJ
110182004-01-31 Daniel Jacobowitz <drow@mvista.com>
11019
11020 * linux-low.c: Update copyright year.
11021 (check_removed_breakpoint): Clear pending_is_breakpoint.
11022 (linux_set_resume_request, linux_queue_one_thread)
11023 (resume_status_pending_p): New functions.
11024 (linux_continue_one_thread): Use process->resume.
11025 (linux_resume): Only resume threads if there are no pending events.
11026 * linux-low.h (struct process_info): Add resume request
11027 pointer.
11028
2a68b70e
DJ
110292004-01-30 Daniel Jacobowitz <drow@mvista.com>
11030
11031 * regcache.c (new_register_cache): Clear the allocated register
11032 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11033
64386c31
DJ
110342003-10-13 Daniel Jacobowitz <drow@mvista.com>
11035
11036 * linux-low.c (linux_resume): Take a struct thread_resume *
11037 argument.
11038 (linux_wait): Update call.
11039 (resume_ptr): New static variable.
11040 (linux_continue_one_thread): Renamed from
11041 linux_continue_one_process. Use resume_ptr.
11042 (linux_resume): Use linux_continue_one_thread.
11043 * server.c (handle_v_cont, handle_v_requests): New functions.
11044 (myresume): New function.
11045 (main): Handle 'v' case.
11046 * target.h (struct thread_resume): New type.
11047 (struct target_ops): Change argument of "resume" to struct
11048 thread_resume *.
11049 (myresume): Delete macro.
11050
c938e9b0
L
110512003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11052
11053 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11054 (uninstall): Support DESTDIR.
11055
7f313d07
BC
11056Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11057
11058 * configure.srv: Add xscale*linux copy of arm*linux entry.
11059
3b2fc2ea
DJ
110602003-07-24 Daniel Jacobowitz <drow@mvista.com>
11061
11062 * linux-arm-low.c (arm_reinsert_addr): New function.
11063 (the_low_target): Add arm_reinsert_addr.
11064
1c0a559e
MK
110652003-07-08 Mark Kettenis <kettenis@gnu.org>
11066
11067 * mem-break.c: Remove whitespace at end of file.
11068
43d5792c
DJ
110692003-06-28 Daniel Jacobowitz <drow@mvista.com>
11070
11071 * configure.in: Check whether we need to prototype strerror.
11072 * server.h: Optionally prototype strerror.
11073 * gdbreplay.c (perror_with_name): Use strerror.
11074 * linux-low.c (linux_attach_lwp): Use strerror.
11075 * utils.c (perror_with_name): Use strerror.
11076 * config.in, configure: Regenerated.
11077
c8a86edf
DJ
110782003-06-28 Daniel Jacobowitz <drow@mvista.com>
11079
11080 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11081 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11082
73d37363
DJ
110832003-06-20 Daniel Jacobowitz <drow@mvista.com>
11084
11085 * Makefile.in (SFILES): Update.
11086 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11087 low-sun3.c: Remove files.
11088
6ad8ae5c
DJ
110892003-06-17 Daniel Jacobowitz <drow@mvista.com>
11090
11091 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11092 (linux_detach_one_process, linux_detach): New functions.
11093 (linux_target_ops): Add linux_detach.
11094 * server.c (main): Handle 'D' packet.
11095 * target.h (struct target_ops): Add "detach" member.
11096 (detach_inferior): Define.
11097
1581182a
MK
110982003-06-13 Mark Kettenis <kettenis@gnu.org>
11099
11100 From Kelley Cook <kelleycook@wideopenwest.com>:
11101 * configure.srv: Accept i[34567]86 variants.
11102
e5379b03
DJ
111032003-06-05 Daniel Jacobowitz <drow@mvista.com>
11104
11105 * linux-low.c (linux_wait_for_event): Correct comment typos.
11106 (linux_resume_one_process): Call check_removed_breakpoint.
11107 (linux_send_signal): New function.
11108 (linux_target_ops): Add linux_send_signal.
11109 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11110 of kill.
11111 * target.h (struct target_ops): Add send_signal.
11112
2ff29de4
JB
111132003-05-29 Jim Blandy <jimb@redhat.com>
11114
11115 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11116 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11117 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11118 away part of the register's value.
11119
254787d4
DJ
111202003-03-26 Daniel Jacobowitz <drow@mvista.com>
11121
11122 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11123 (linux_wait_for_event, linux_init_signals): Likewise.
11124
94e10508
DJ
111252003-03-17 Daniel Jacobowitz <drow@mvista.com>
11126
11127 * configure.in: Check for stdlib.h.
11128 * configure: Regenerated.
11129 * config.in: Regenerated.
11130
4c0711e0
DJ
111312003-01-04 Andreas Schwab <schwab@suse.de>
11132
11133 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11134
ef66e766
AC
111352003-01-02 Andrew Cagney <ac131313@redhat.com>
11136
11137 * Makefile.in: Remove obsolete code.
11138
a1358604
DJ
111392002-11-20 Daniel Jacobowitz <drow@mvista.com>
11140
11141 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11142 defined(PT_FPR0_HI).
11143
23ce3b1c
DJ
111442002-11-17 Stuart Hughes <seh@zee2.com>
11145
11146 * linux-arm-low.c (arm_num_regs): Increase.
11147 (arm_regmap): Include status register.
11148
111492002-11-17 Daniel Jacobowitz <drow@mvista.com>
11150
11151 * linux-low.c (register_addr): Remove incorrect -1 check.
11152
a9fa9f7d
DJ
111532002-08-29 Daniel Jacobowitz <drow@mvista.com>
11154
11155 * linux-low.c (linux_create_inferior): Call setpgid. Return
11156 the new PID.
11157 (unstopped_p, linux_signal_pid): Remove.
11158 (linux_target_ops): Remove linux_signal_pid.
11159 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11160 global instead of target method.
11161 * target.h (struct target_ops): Remove signal_pid. Update comment
11162 for create_inferior.
11163 * server.c (signal_pid): New variable.
11164 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 11165 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
11166 (attach_inferior): Set signal_pid.
11167
17574093
DJ
111682002-08-23 Daniel Jacobowitz <drow@mvista.com>
11169
11170 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11171
111722002-08-20 Jim Blandy <jimb@redhat.com>
11173
11174 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11175 default for this.
11176
111772002-08-01 Andrew Cagney <cagney@redhat.com>
11178
11179 * Makefile.in: Make chill references obsolete.
11180
111812002-07-24 Kevin Buettner <kevinb@redhat.com>
11182
11183 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11184 * configure: Regenerate.
11185 * config.in: Regenerate.
11186
111872002-07-09 David O'Brien <obrien@FreeBSD.org>
11188
11189 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11190 (perror_with_name, remote_close, remote_open, expect, play): Static.
11191
111922002-07-04 Michal Ludvig <mludvig@suse.cz>
11193
4b8dad4a 11194 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
11195 byte offsets instead of an array of indexes.
11196 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11197
111982002-06-13 Daniel Jacobowitz <drow@mvista.com>
11199
11200 * regcache.c: Add comment.
11201
112022002-06-11 Daniel Jacobowitz <drow@mvista.com>
11203
11204 * thread-db.c: New file.
11205 * proc-service.c: New file.
11206 * acinclude.m4: New file.
11207 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11208 proc-service.o, and thread-db.o.
11209 (linux-low.o): Add USE_THREAD_DB.
11210 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11211 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11212 * aclocal.m4: Regenerated.
11213 * config.in: Regenerated.
11214 * configure: Regenerated.
11215 * configure.in: Check for proc_service.h, sys/procfs.h,
11216 thread_db.h, and linux/elf.h headrs.
11217 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11218 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11219 Check for -lthread_db and thread support.
11220 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11221 PowerPC, and SuperH.
11222 * i387-fp.c: Constify arguments.
11223 * i387-fp.h: Likewise.
11224 * inferiors.c: (struct thread_info): Renamed from
11225 `struct inferior_info'. Remove PID member. Use generic inferior
11226 list header. All uses updated.
11227 (inferiors, signal_pid): Removed.
11228 (all_threads): New variable.
11229 (get_thread): Define.
11230 (add_inferior_to_list): New function.
11231 (for_each_inferior): New function.
11232 (change_inferior_id): New function.
11233 (add_inferior): Removed.
11234 (remove_inferior): New function.
11235 (add_thread): New function.
11236 (free_one_thread): New function.
11237 (remove_thread): New function.
11238 (clear_inferiors): Use for_each_inferior and free_one_thread.
11239 (find_inferior): New function.
11240 (find_inferior_id): New function.
11241 (inferior_target_data): Update argument type.
11242 (set_inferior_target_data): Likewise.
11243 (inferior_regcache_data): Likewise.
11244 (set_inferior_regcache_data): Likewise.
11245 * linux-low.c (linux_bp_reinsert): Remove.
11246 (all_processes, stopping_threads, using_thrads)
11247 (struct pending_signals, debug_threads, pid_of): New.
11248 (inferior_pid): Replace with macro.
11249 (struct inferior_linux_data): Remove.
11250 (get_stop_pc, add_process): New functions.
11251 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11252 Use add_process and add_thread.
11253 (linux_attach_lwp): New function, based on old linux_attach. Use
11254 add_process and add_thread. Set stop_expected for new threads.
11255 (linux_attach): New function.
11256 (linux_kill_one_process): New function.
11257 (linux_kill): Kill all LWPs.
11258 (linux_thread_alive): Use find_inferior_id.
11259 (check_removed_breakpoints, status_pending_p): New functions.
11260 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11261 Update. Use WNOHANG. Wait for cloned processes also. Update process
11262 struct for the found process.
11263 (linux_wait_for_event): New function.
11264 (linux_wait): Use it. Support LWPs.
11265 (send_sigstop, wait_for_sigstop, stop_all_processes)
11266 (linux_resume_one_process, linux_continue_one_process): New functions.
11267 (linux_resume): Support LWPs.
11268 (REGISTER_RAW_SIZE): Remove.
11269 (fetch_register): Use register_size instead. Call supply_register.
11270 (usr_store_inferior_registers): Likewise. Call collect_register.
11271 Fix recursive case.
11272 (regsets_fetch_inferior_registers): Improve error message.
11273 (regsets_store_inferior_registers): Add debugging.
11274 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11275 (unstopped_p, linux_signal_pid): New functions.
11276 (linux_target_ops): Add linux_signal_pid.
11277 (linux_init_signals): New function.
11278 (initialize_low): Call it. Initialize using_threads.
11279 * regcache.c (inferior_regcache_data): Add valid
11280 flag.
11281 (get_regcache): Fetch registers lazily. Add fetch argument
11282 and update all callers.
11283 (regcache_invalidate_one, regcache_invalidate): New
11284 functions.
11285 (new_register_cache): Renamed from create_register_cache.
11286 Return the new regcache.
11287 (free_register_cache): Change argument to a void *.
11288 (registers_to_string, registers_from_string): Call get_regcache
11289 with fetch flag set.
11290 (register_data): Make static. Pass fetch flag to get_regcache.
11291 (supply_register): Call get_regcache with fetch flag clear.
11292 (collect_register): Call get_regcache with fetch flag set.
11293 (collect_register_as_string): New function.
11294 * regcache.h: Update.
11295 * remote-utils.c (putpkt): Flush after debug output and use
11296 stderr.
11297 Handle input interrupts while waiting for an ACK.
11298 (input_interrupt): Use signal_pid method.
11299 (getpkt): Flush after debug output and use stderr.
11300 (outreg): Use collect_register_as_string.
11301 (new_thread_notify, dead_thread_notify): New functions.
11302 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11303 and general_thread.
11304 (look_up_one_symbol): Flush after debug output.
11305 * server.c (step_thread, server_waiting): New variables.
11306 (start_inferior): Don't use signal_pid. Update call to mywait.
11307 (attach_inferior): Update call to mywait.
11308 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11309 (main): Don't fetch/store registers explicitly. Use
11310 set_desired_inferior. Support proposed ``Hs'' packet. Update
11311 calls to mywait.
11312 * server.h: Update.
11313 (struct inferior_list, struct_inferior_list_entry): New.
11314 * target.c (set_desired_inferior): New.
11315 (write_inferior_memory): Constify.
11316 (mywait): New function.
11317 * target.h: Update.
11318 (struct target_ops): New signal_pid method.
11319 (mywait): Removed macro, added prototype.
11320
11321 * linux-low.h (regset_func): Removed.
11322 (regset_fill_func, regset_store_func): New.
11323 (enum regset_type): New.
11324 (struct regset_info): Add type field. Use new operation types.
11325 (struct linux_target_ops): stop_pc renamed to get_pc.
11326 Add decr_pc_after_break and breakpoint_at.
11327 (get_process, get_thread_proess, get_process_thread)
11328 (strut process_info, all_processes, linux_attach_lwp)
11329 (thread_db_init): New.
11330
11331 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11332 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11333 (the_low_target): Add new members.
11334 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11335 (i386_store_fpxregset): Constify.
11336 (target_regsets): Add new kind identifier.
11337 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11338 (i386_set_pc): Add debugging.
11339 (i386_breakpoint_at): New function.
11340 (the_low_target): Add new members.
11341 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11342 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11343 (mips_breakpoint_at): New.
11344 (the_low_target): Add new members.
11345 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11346 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11347 (the_low_target): Add new members.
11348 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11349 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11350 (the_low_target): Add new members.
11351 * linux-x86-64-low.c (target_regsets): Add new kind
11352 identifier.
11353
113542002-05-15 Daniel Jacobowitz <drow@mvista.com>
11355
11356 From Martin Pool <mbp@samba.org>:
11357 * server.c (gdbserver_usage): New function.
11358 (main): Call it.
11359
113602002-05-14 Daniel Jacobowitz <drow@mvista.com>
11361
11362 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11363 stop_at -> stop_pc.
11364
113652002-05-04 Andrew Cagney <ac131313@redhat.com>
11366
11367 * Makefile.in: Remove obsolete code.
11368
113692002-04-24 Michal Ludvig <mludvig@suse.cz>
11370
11371 * linux-low.c (regsets_fetch_inferior_registers),
11372 (regsets_store_inferior_registers): Removed cast to int from
11373 ptrace() calls.
11374 * regcache.h: Added declaration of struct inferior_info.
11375
113762002-04-20 Daniel Jacobowitz <drow@mvista.com>
11377
11378 * inferiors.c (struct inferior_info): Add regcache_data.
11379 (add_inferior): Call create_register_cache.
11380 (clear_inferiors): Call free_register_cache.
11381 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11382 * regcache.c (struct inferior_regcache_data): New.
11383 (registers): Remove.
11384 (get_regcache): New function.
11385 (create_register_cache, free_register_cache): New functions.
11386 (set_register_cache): Don't initialize the register cache here.
11387 (registers_to_string, registers_from_string, register_data): Call
11388 get_regcache.
11389 * regcache.h: Add prototypes.
11390 * server.h: Likewise.
11391
113922002-04-20 Daniel Jacobowitz <drow@mvista.com>
11393
11394 * mem-break.c: New file.
11395 * mem-break.h: New file.
11396 * Makefile.in: Add mem-break.o rule; update server.h
11397 dependencies.
11398 * inferiors.c (struct inferior_info): Add target_data
11399 member.
11400 (clear_inferiors): Free target_data member if set.
11401 (inferior_target_data, set_inferior_target_data): New functions.
11402 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11403 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11404 * linux-low.c (linux_bp_reinsert): New variable.
11405 (struct inferior_linux_data): New.
11406 (linux_create_inferior): Use set_inferior_target_data.
11407 (linux_attach): Likewise. Call add_inferior.
11408 (linux_wait_for_one_inferior): New function.
11409 (linux_wait): Call it.
11410 (linux_write_memory): Add const.
11411 (initialize_low): Call set_breakpoint_data.
11412 * linux-low.h (struct linux_target_ops): Add breakpoint
11413 handling members.
11414 * server.c (attach_inferior): Remove extra add_inferior
11415 call.
11416 * server.h: Include mem-break.h. Update inferior.c
11417 prototypes.
11418 * target.c (read_inferior_memory)
11419 (write_inferior_memory): New functions.
11420 * target.h (read_inferior_memory)
11421 (write_inferior_memory): Change macros to prototypes.
11422 (struct target_ops): Update comments. Add const to write_memory
11423 definition.
11424
114252002-04-11 Daniel Jacobowitz <drow@mvista.com>
11426
11427 * linux-low.c (usr_store_inferior_registers): Support
11428 registers which are allowed to fail to store.
11429 * linux-low.h (linux_target_ops): Likewise.
11430 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11431 (ppc_cannot_store_register): FPSCR may not be storable.
11432
114332002-04-09 Daniel Jacobowitz <drow@mvista.com>
11434
11435 * server.h: Include <string.h> if HAVE_STRING_H.
11436 * ChangeLog: Correct paths in last ChangeLog entry.
11437
114382002-04-09 Daniel Jacobowitz <drow@mvista.com>
11439
11440 * linux-low.h: Remove obsolete prototypes.
11441 (struct linux_target_ops): New.
11442 (extern the_low_target): New.
11443 * linux-low.c (num_regs, regmap): Remove declarations.
11444 (register_addr): Use the_low_target explicitly.
11445 (fetch_register): Likewise.
11446 (usr_fetch_inferior_registers): Likewise.
11447 (usr_store_inferior_registers): Likewise.
11448 * linux-arm-low.c (num_regs): Remove.
11449 (arm_num_regs): Define.
11450 (arm_regmap): Renamed from regmap, made static.
11451 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11452 made static.
11453 (arm_cannot_store_register): Renamed from cannot_store_register,
11454 made static.
11455 (the_low_target): New.
11456 * linux-i386-low.c (num_regs): Remove.
11457 (i386_num_regs): Define.
11458 (i386_regmap): Renamed from regmap, made static.
11459 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11460 made static.
11461 (i386_cannot_store_register): Renamed from cannot_store_register,
11462 made static.
11463 (the_low_target): New.
11464 * linux-ia64-low.c (num_regs): Remove.
11465 (ia64_num_regs): Define.
11466 (ia64_regmap): Renamed from regmap, made static.
11467 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11468 made static.
11469 (ia64_cannot_store_register): Renamed from cannot_store_register,
11470 made static.
11471 (the_low_target): New.
11472 * linux-m68k-low.c (num_regs): Remove.
11473 (m68k_num_regs): Define.
11474 (m68k_regmap): Renamed from regmap, made static.
11475 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11476 made static.
11477 (m68k_cannot_store_register): Renamed from cannot_store_register,
11478 made static.
11479 (the_low_target): New.
11480 * linux-mips-low.c (num_regs): Remove.
11481 (mips_num_regs): Define.
11482 (mips_regmap): Renamed from regmap, made static.
11483 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11484 made static.
11485 (mips_cannot_store_register): Renamed from cannot_store_register,
11486 made static.
11487 (the_low_target): New.
11488 * linux-ppc-low.c (num_regs): Remove.
11489 (ppc_num_regs): Define.
11490 (ppc_regmap): Renamed from regmap, made static.
11491 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11492 made static.
11493 (ppc_cannot_store_register): Renamed from cannot_store_register,
11494 made static.
11495 (the_low_target): New.
11496 * linux-s390-low.c (num_regs): Remove.
11497 (s390_num_regs): Define.
11498 (s390_regmap): Renamed from regmap, made static.
11499 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11500 made static.
11501 (s390_cannot_store_register): Renamed from cannot_store_register,
11502 made static.
11503 (the_low_target): New.
11504 * linux-sh-low.c (num_regs): Remove.
11505 (sh_num_regs): Define.
11506 (sh_regmap): Renamed from regmap, made static.
11507 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11508 made static.
11509 (sh_cannot_store_register): Renamed from cannot_store_register,
11510 made static.
11511 (the_low_target): New.
11512 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11513 (the_low_target): New.
11514
115152002-04-09 Daniel Jacobowitz <drow@mvista.com>
11516
11517 * Makefile.in: Add stamp-h target.
11518 * configure.in: Create stamp-h.
11519 * configure: Regenerated.
11520
115212002-04-09 Daniel Jacobowitz <drow@mvista.com>
11522
11523 * inferiors.c: New file.
11524 * target.c: New file.
11525 * target.h: New file.
11526 * Makefile.in: Add target.o and inferiors.o. Update
11527 dependencies.
11528 * linux-low.c (inferior_pid): New static variable,
11529 moved from server.c.
11530 (linux_create_inferior): Renamed from create_inferior.
11531 Call add_inferior. Return 0 on success instead of a PID.
11532 (linux_attach): Renamed from myattach.
11533 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11534 (linux_thread_alive): Renamed from mythread_alive.
11535 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11536 child dies.
11537 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11538 (regsets_store_inferior_registers): Correct error message.
11539 Add missing ``return 0''.
11540 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11541 (linux_store_registers): Renamed from store_inferior_registers.
11542 (linux_read_memory): Renamed from read_inferior_memory.
11543 (linux_write_memory): Renamed from write_inferior_memory.
11544 (linux_target_ops): New structure.
11545 (initialize_low): Call set_target_ops ().
11546 * remote-utils.c (unhexify): New function.
11547 (hexify): New function.
11548 (input_interrupt): Send signals to ``signal_pid''.
11549 * server.c (inferior_pid): Remove.
11550 (start_inferior): Update create_inferior call.
11551 (attach_inferior): Call add_inferior.
11552 (handle_query): New function.
11553 (main): Call handle_query for `q' packets.
11554 * server.h: Include "target.h". Remove obsolete prototypes.
11555 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11556
115572002-04-09 Daniel Jacobowitz <drow@mvista.com>
11558
11559 * Makefile.in: Add WARN_CFLAGS. Update configury
11560 dependencies.
11561 * configure.in: Check for <string.h>
11562 * configure: Regenerate.
11563 * config.in: Regenerate.
11564 * gdbreplay.c: Include needed system headers.
11565 (remote_open): Remove strchr prototype.
11566 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11567 * regcache.c (supply_register): Change buf argument to const void *.
11568 (supply_register_by_name): Likewise.
11569 (collect_register): Change buf argument to void *.
11570 (collect_register_by_name): Likewise.
11571 * regcache.h: Add missing prototypes.
11572 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11573 * server.c (handle_query): New function.
11574 (attached): New static variable, moved out of main.
11575 (main): Quiet longjmp clobber warnings.
11576 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11577 * utils.c (error): Remove NORETURN.
11578 (fatal): Likewise.