Disable Z0 packet on aarch64 on multi-arch debugging
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-08-04 Yao Qi <yao.qi@linaro.org>
2
3 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5 * server.c (extended_protocol): Remove "static".
6 * server.h (extended_protocol): Declare it.
7
8 2015-08-04 Yao Qi <yao.qi@linaro.org>
9
10 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
11 both aarch64 and aarch32.
12 (aarch64_set_pc): Likewise.
13
14 2015-08-04 Yao Qi <yao.qi@linaro.org>
15
16 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
17 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
18 arm-with-neon.xml to srv_xmlfiles.
19 * linux-aarch64-low.c: Include linux-aarch32-low.h.
20 (is_64bit_tdesc): New function.
21 (aarch64_linux_read_description): New function.
22 (aarch64_arch_setup): Call aarch64_linux_read_description.
23 (regs_info): Rename to regs_info_aarch64.
24 (aarch64_regs_info): Return right regs_info.
25 (initialize_low_arch): Call initialize_low_arch_aarch32.
26
27 2015-08-04 Yao Qi <yao.qi@linaro.org>
28
29 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
30 * linux-aarch32-low.c: New file.
31 * linux-aarch32-low.h: New file.
32 * linux-arm-low.c (arm_fill_gregset): Move it to
33 linux-aarch32-low.c.
34 (arm_store_gregset): Likewise.
35 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
36 (arm_store_vfpregset): Call arm_store_vfpregset_num.
37 (arm_arch_setup): Check if PTRACE_GETREGSET works.
38 (regs_info): Rename to regs_info_arm.
39 (arm_regs_info): Return regs_info_aarch32 if
40 have_ptrace_getregset is 1 and target description is
41 arm_with_neon or arm_with_vfpv3.
42 (initialize_low_arch): Don't call init_registers_arm_with_neon.
43 Call initialize_low_arch_aarch32 instead.
44
45 2015-08-04 Yao Qi <yao.qi@linaro.org>
46
47 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
48 * linux-low.c: ... here.
49 * linux-low.h (have_ptrace_getregset): Declare it.
50
51 2015-08-04 Pedro Alves <palves@redhat.com>
52
53 * thread-db.c (struct thread_db): Use new typedefs.
54 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
55 CHK calls.
56 (disable_thread_event_reporting): Cast result of dlsym to
57 destination function pointer type.
58 (thread_db_mourn): Use td_ta_delete_ftype.
59
60 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
61
62 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
63 arch variant.
64 (CDX_BREAKPOINT): Define for R2.
65 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
66 (the_low_target): Add comments.
67
68 2015-07-30 Yao Qi <yao.qi@linaro.org>
69
70 * linux-arm-low.c (arm_hwcap): Remove it.
71 (arm_read_description): New local variable arm_hwcap. Don't
72 set arm_hwcap to zero.
73
74 2015-07-30 Yao Qi <yao.qi@linaro.org>
75
76 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
77 Use regcache->tdesc instead.
78 (arm_store_wmmxregset): Likewise.
79 (arm_fill_vfpregset): Likewise.
80 (arm_store_vfpregset): Likewise.
81
82 2015-07-30 Yao Qi <yao.qi@linaro.org>
83
84 * linux-arm-low.c: Include arch/arm.h.
85 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
86 (arm_store_gregset): Likewise.
87
88 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
89
90 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
91 ptrace's 4th parameter.
92
93 2015-07-27 Yao Qi <yao.qi@linaro.org>
94
95 * configure.srv (case aarch64*-*-linux*): Don't set
96 srv_linux_usrregs.
97
98 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
99
100 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
101 sys/ptrace.h.
102 * linux-arm-low.c: Likewise.
103 * linux-cris-low.c: Likewise.
104 * linux-crisv32-low.c: Likewise.
105 * linux-low.c: Likewise.
106 * linux-m68k-low.c: Likewise.
107 * linux-mips-low.c: Likewise.
108 * linux-nios2-low.c: Likewise.
109 * linux-s390-low.c: Likewise.
110 * linux-sparc-low.c: Likewise.
111 * linux-tic6x-low.c: Likewise.
112 * linux-tile-low.c: Likewise.
113 * linux-x86-low.c: Likewise.
114
115 2015-07-24 Pedro Alves <palves@redhat.com>
116
117 * config.in: Regenerate.
118 * configure: Regenerate.
119
120 2015-07-24 Pedro Alves <palves@redhat.com>
121
122 * acinclude.m4: Include ../ptrace.m4.
123 * configure.ac: Call GDB_AC_PTRACE.
124 * config.in, configure: Regenerate.
125
126 2015-07-24 Yao Qi <yao.qi@linaro.org>
127
128 * linux-low.c (linux_create_inferior): Remove setting to
129 proc->priv->new_inferior.
130 (linux_attach): Likewise.
131 (linux_low_filter_event): Likewise.
132 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
133
134 2015-07-24 Yao Qi <yao.qi@linaro.org>
135
136 * linux-low.c (linux_arch_setup): New function.
137 (linux_low_filter_event): If proc->tdesc is NULL and
138 proc->attached is true, call the_low_target.arch_setup.
139 Otherwise, keep status pending, and return.
140 (linux_resume_one_lwp_throw): Don't call get_pc if
141 thread->while_stepping isn't NULL. Don't call
142 get_thread_regcache if proc->tdesc is NULL.
143 (need_step_over_p): Return 0 if proc->tdesc is NULL.
144 (linux_target_ops): Install arch_setup.
145 * server.c (start_inferior): Call the_target->arch_setup.
146 * target.h (struct target_ops) <arch_setup>: New field.
147 (target_arch_setup): New marco.
148 * lynx-low.c (lynx_target_ops): Update.
149 * nto-low.c (nto_target_ops): Update.
150 * spu-low.c (spu_target_ops): Update.
151 * win32-low.c (win32_target_ops): Update.
152
153 2015-07-24 Yao Qi <yao.qi@linaro.org>
154
155 * linux-low.c (linux_add_process): Don't set
156 proc->priv->new_inferior.
157 (linux_create_inferior): Set proc->priv->new_inferior to 1.
158 (linux_attach): Likewise.
159
160 2015-07-24 Yao Qi <yao.qi@linaro.org>
161
162 * server.c (start_inferior): Code refactor.
163
164 2015-07-24 Yao Qi <yao.qi@linaro.org>
165
166 * server.c (process_serial_event): Set general_thread.
167
168 2015-07-21 Yao Qi <yao.qi@linaro.org>
169
170 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
171 aarch64_linux_get_debug_reg_capacity.
172
173 2015-07-17 Yao Qi <yao.qi@linaro.org>
174
175 * Makefile.in (aarch64-linux-hw-point.o): New rule.
176 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
177 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
178 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
179 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
180 (AARCH64_HWP_ALIGNMENT): Likewise.
181 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
182 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
183 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
184 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
185 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
186 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
187 (struct aarch64_debug_reg_state): Likewise.
188 (struct arch_lwp_info): Likewise.
189 (aarch64_align_watchpoint): Likewise.
190 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
191 (aarch64_watchpoint_length): Likewise.
192 (aarch64_point_encode_ctrl_reg): Likewise
193 (aarch64_point_is_aligned): Likewise.
194 (aarch64_align_watchpoint): Likewise.
195 (aarch64_linux_set_debug_regs):
196 (aarch64_dr_state_insert_one_point): Likewise.
197 (aarch64_dr_state_remove_one_point): Likewise.
198 (aarch64_handle_breakpoint): Likewise.
199 (aarch64_handle_aligned_watchpoint): Likewise.
200 (aarch64_handle_unaligned_watchpoint): Likewise.
201 (aarch64_handle_watchpoint): Likewise.
202
203 2015-07-17 Yao Qi <yao.qi@linaro.org>
204
205 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
206 and don't aarch64_get_debug_reg_state. All callers update.
207 (aarch64_handle_aligned_watchpoint): Likewise.
208 (aarch64_handle_unaligned_watchpoint): Likewise.
209 (aarch64_handle_watchpoint): Likewise.
210 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
211 (aarch64_remove_point): Likewise.
212
213 2015-07-17 Yao Qi <yao.qi@linaro.org>
214
215 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
216 debug_printf.
217 (aarch64_handle_unaligned_watchpoint): Likewise.
218
219 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
220
221 Revert the previous 3 commits:
222 Move gdb_regex* to common/
223 Move linux_find_memory_regions_full & co.
224 gdbserver build-id attribute generator
225
226 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
227 Jan Kratochvil <jan.kratochvil@redhat.com>
228
229 gdbserver build-id attribute generator.
230 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
231 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
232 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
233 (find_phdr): New.
234 (get_dynamic): Use find_pdhr to traverse program headers.
235 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
236 (compare_mapping_entry_range, struct find_memory_region_callback_data)
237 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
238 (get_hex_build_id): New.
239 (linux_qxfer_libraries_svr4): Add optional build-id attribute
240 to reply XML document.
241
242 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
243 Jan Kratochvil <jan.kratochvil@redhat.com>
244
245 * target.c: Include target/target-utils.h and fcntl.h.
246 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
247 (target_fileio_read_stralloc): New functions.
248
249 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
250
251 * Makefile.in (OBS): Add gdb_regex.o.
252 (gdb_regex.o): New.
253 * config.in: Rebuilt.
254 * configure: Rebuilt.
255
256 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
257 Jan Kratochvil <jan.kratochvil@redhat.com>
258
259 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
260 * Makefile.in (OBS): Add target-utils.o.
261 (linux-maps.o, target-utils.o): New.
262 * configure.srv (srv_linux_obj): Add linux-maps.o.
263
264 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
265
266 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
267 function, return 1.
268 (the_low_target): Install it.
269
270 2015-07-14 Pedro Alves <palves@redhat.com>
271
272 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
273 Instead, ignore ECHILD, and throw an error for other errnos.
274
275 2015-07-10 Pedro Alves <palves@redhat.com>
276
277 * event-loop.c (struct callback_event) <data>: Change type to
278 gdb_client_data instance instead of gdb_client_data pointer.
279 (append_callback_event): Adjust.
280
281 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
282
283 * linux-aarch64-low.c: Add comments for each linux_target_ops
284 method. Remove comments already covered in target_ops and
285 linux_target_ops definitions.
286 (the_low_target): Add comments for each unimplemented method.
287
288 2015-07-09 Yao Qi <yao.qi@linaro.org>
289
290 * linux-aarch64-low.c (aarch64_regmap): Remove.
291 (aarch64_usrregs_info): Remove.
292 (regs_info): Set field usrregs to NULL.
293
294 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
295
296 * linux-low.c: Include "rsp-low.h"
297 (linux_low_encode_pt_config, linux_low_encode_raw): New.
298 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
299 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
300 (handle_btrace_enable_pt): New.
301 (handle_btrace_general_set): Support "pt".
302 (handle_btrace_conf_general_set): Support "pt:size".
303
304 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
305
306 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
307 Z_PACKET_SW_BP.
308
309 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
310
311 * linux-aarch64-low.c: Remove comment about endianness.
312 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
313 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
314 memcmp.
315
316 2015-06-24 Gary Benson <gbenson@redhat.com>
317
318 * linux-i386-ipa.c (stdint.h): Do not include.
319 * lynx-i386-low.c (stdint.h): Likewise.
320 * lynx-ppc-low.c (stdint.h): Likewise.
321 * mem-break.c (stdint.h): Likewise.
322 * thread-db.c (stdint.h): Likewise.
323 * tracepoint.c (stdint.h): Likewise.
324 * win32-low.c (stdint.h): Likewise.
325
326 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
327
328 * server.c (write_qxfer_response): Update call to
329 remote_escape_output.
330
331 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
332 Jan Kratochvil <jan.kratochvil@redhat.com>
333
334 Merge multiple hex conversions.
335 * gdbreplay.c (tohex): Rename to 'fromhex'.
336 (logchar): Use fromhex.
337
338 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
339
340 * server.c (handle_qxfer_libraries): Set `version' attribute for
341 <library-list>.
342
343 2015-06-10 Gary Benson <gbenson@redhat.com>
344
345 * target.h (struct target_ops) <multifs_open>: New field.
346 <multifs_unlink>: Likewise.
347 <multifs_readlink>: Likewise.
348 * linux-low.c (nat/linux-namespaces.h): New include.
349 (linux_target_ops): Initialize the_target->multifs_open,
350 the_target->multifs_unlink and the_target->multifs_readlink.
351 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
352 * hostio.c (hostio_fs_pid): New static variable.
353 (hostio_handle_new_gdb_connection): New function.
354 (handle_setfs): Likewise.
355 (handle_open): Use the_target->multifs_open as appropriate.
356 (handle_unlink): Use the_target->multifs_unlink as appropriate.
357 (handle_readlink): Use the_target->multifs_readlink as
358 appropriate.
359 (handle_vFile): Handle vFile:setfs packets.
360 * server.c (handle_query): Call hostio_handle_new_gdb_connection
361 after target_handle_new_gdb_connection.
362
363 2015-06-10 Gary Benson <gbenson@redhat.com>
364
365 * configure.ac (AC_CHECK_FUNCS): Add setns.
366 * config.in: Regenerate.
367 * configure: Likewise.
368 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
369 (linux-namespaces.o): New rule.
370 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
371
372 2015-06-09 Gary Benson <gbenson@redhat.com>
373
374 * hostio.c (handle_open): Process mode argument with
375 fileio_to_host_mode.
376
377 2015-06-01 Yao Qi <yao.qi@linaro.org>
378
379 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
380 * linux-x86-low.c: Likewise.
381
382 2015-05-28 Don Breazeal <donb@codesourcery.com>
383
384 * linux-low.c (handle_extended_wait): Initialize
385 thread_info.last_resume_kind for new fork children.
386
387 2015-05-15 Pedro Alves <palves@redhat.com>
388
389 * target.h (target_handle_new_gdb_connection): Rewrite using if
390 wrapped in do/while.
391
392 2015-05-14 Joel Brobecker <brobecker@adacore.com>
393
394 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
395 * configure, config.in: Regenerate.
396 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
397 Declare typedef.
398
399 2015-05-12 Don Breazeal <donb@codesourcery.com>
400
401 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
402 PTRACE_EVENT_VFORK_DONE.
403 (linux_low_ptrace_options, extended_event_reported): Add vfork
404 events.
405 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
406 and "vforkdone" for RSP 'T' Stop Reply Packet.
407 * server.h (report_vfork_events): Declare
408 global variable.
409
410 2015-05-12 Don Breazeal <donb@codesourcery.com>
411
412 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
413 (the_low_target) <new_fork>: Initialize new member.
414 * linux-arm-low.c (arm_new_fork): New function.
415 (the_low_target) <new_fork>: Initialize new member.
416 * linux-low.c (handle_extended_wait): Call new target function
417 new_fork.
418 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
419 * linux-mips-low.c (mips_add_watchpoint): New function
420 extracted from mips_insert_point.
421 (the_low_target) <new_fork>: Initialize new member.
422 (mips_linux_new_fork): New function.
423 (mips_insert_point): Call mips_add_watchpoint.
424 * linux-x86-low.c (x86_linux_new_fork): New function.
425 (the_low_target) <new_fork>: Initialize new member.
426
427 2015-05-12 Don Breazeal <donb@codesourcery.com>
428
429 * linux-low.c (handle_extended_wait): Implement return value,
430 rename argument 'event_child' to 'event_lwp', handle
431 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
432 (linux_low_ptrace_options): New function.
433 (linux_low_filter_event): Call linux_low_ptrace_options,
434 use different argument fo linux_enable_event_reporting,
435 use return value from handle_extended_wait.
436 (extended_event_reported): New function.
437 (linux_wait_1): Call extended_event_reported and set
438 status to report fork events.
439 (linux_write_memory): Add pid to debug message.
440 (reset_lwp_ptrace_options_callback): New function.
441 (linux_handle_new_gdb_connection): New function.
442 (linux_target_ops): Initialize new structure member.
443 * linux-low.h (struct lwp_info) <waitstatus>: New member.
444 * lynx-low.c: Initialize new structure member.
445 * remote-utils.c (prepare_resume_reply): Implement stop reason
446 "fork" for "T" stop message.
447 * server.c (handle_query): Call handle_new_gdb_connection.
448 * server.h (report_fork_events): Declare global flag.
449 * target.h (struct target_ops) <handle_new_gdb_connection>:
450 New member.
451 (target_handle_new_gdb_connection): New macro.
452 * win32-low.c: Initialize new structure member.
453
454 2015-05-12 Don Breazeal <donb@codesourcery.com>
455
456 * mem-break.c (APPEND_TO_LIST): Define macro.
457 (clone_agent_expr): New function.
458 (clone_one_breakpoint): New function.
459 (clone_all_breakpoints): New function.
460 * mem-break.h: Declare new functions.
461
462 2015-05-12 Don Breazeal <donb@codesourcery.com>
463
464 * linux-low.c (linux_supports_fork_events): New function.
465 (linux_supports_vfork_events): New function.
466 (linux_target_ops): Initialize new structure members.
467 (initialize_low): Call linux_check_ptrace_features.
468 * lynx-low.c (lynx_target_ops): Initialize new structure
469 members.
470 * server.c (report_fork_events, report_vfork_events):
471 New global flags.
472 (handle_query): Add new features to qSupported packet and
473 response.
474 (captured_main): Initialize new global variables.
475 * target.h (struct target_ops) <supports_fork_events>:
476 New member.
477 <supports_vfork_events>: New member.
478 (target_supports_fork_events): New macro.
479 (target_supports_vfork_events): New macro.
480 * win32-low.c (win32_target_ops): Initialize new structure
481 members.
482
483 2015-05-12 Gary Benson <gbenson@redhat.com>
484
485 * server.c (handle_qxfer_exec_file): Use current process
486 if annex is empty.
487
488 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
489
490 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
491 Remove HAVE_PTRACE_GETREGS conditionals.
492 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
493 instead of PTRACE_GETREGS and PTRACE_SETREGS.
494
495 2015-05-08 Yao Qi <yao.qi@linaro.org>
496
497 * linux-low.c (linux_supports_conditional_breakpoints): New
498 function.
499 (linux_target_ops): Install new target method.
500 * lynx-low.c (lynx_target_ops): Install NULL hook for
501 supports_conditional_breakpoints.
502 * nto-low.c (nto_target_ops): Likewise.
503 * spu-low.c (spu_target_ops): Likewise.
504 * win32-low.c (win32_target_ops): Likewise.
505 * server.c (handle_query): Check
506 target_supports_conditional_breakpoints.
507 * target.h (struct target_ops) <supports_conditional_breakpoints>:
508 New field.
509 (target_supports_conditional_breakpoints): New macro.
510
511 2015-05-06 Pedro Alves <palves@redhat.com>
512
513 PR server/18081
514 * server.c (start_inferior): If the process exits, mourn it.
515
516 2015-04-21 Gary Benson <gbenson@redhat.com>
517
518 * hostio.c (fileio_open_flags_to_host): Factored out to
519 fileio_to_host_openflags in common/fileio.c. Single use
520 updated.
521
522 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
523
524 * linux-xtensa-low.c (xtensa_fill_gregset)
525 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
526 XCHAL_HAVE_LOOP.
527
528 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
529
530 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
531 (regs_info): Replace usrregs pointer with NULL.
532
533 2015-04-17 Gary Benson <gbenson@redhat.com>
534
535 * target.h (struct target_ops) <pid_to_exec_file>: New field.
536 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
537 * server.c (handle_qxfer_exec_file): New function.
538 (qxfer_packets): Add exec-file entry.
539 (handle_query): Report qXfer:exec-file:read as supported packet.
540
541 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
542
543 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
544
545 2015-04-09 Gary Benson <gbenson@redhat.com>
546
547 * hostio-errno.c (errno_to_fileio_error): Remove function.
548 Update caller to use remote_fileio_to_fio_error.
549
550 2015-04-09 Yao Qi <yao.qi@linaro.org>
551
552 * linux-low.c (linux_insert_point): Call
553 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
554 (linux_remove_point): Call remove_memory_breakpoint if type is
555 raw_bkpt_type_sw.
556 * linux-x86-low.c (x86_insert_point): Don't call
557 insert_memory_breakpoint.
558 (x86_remove_point): Don't call remove_memory_breakpoint.
559
560 2015-04-01 Pedro Alves <palves@redhat.com>
561 Cleber Rosa <crosa@redhat.com>
562
563 * server.c (gdbserver_usage): Reorganize and extend the usage
564 message.
565
566 2015-03-24 Pedro Alves <palves@redhat.com>
567
568 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
569 output. Also dump TRAP_TRACE.
570 (linux_low_filter_event): In debug output, distinguish a
571 resume_stop SIGSTOP from a delayed SIGSTOP.
572
573 2015-03-24 Gary Benson <gbenson@redhat.com>
574
575 * linux-x86-low.c (x86_linux_new_thread): Moved to
576 nat/x86-linux.c.
577 (x86_linux_prepare_to_resume): Likewise.
578
579 2015-03-24 Gary Benson <gbenson@redhat.com>
580
581 * Makefile.in (x86-linux-dregs.o): New rule.
582 * configure.srv: Add x86-linux-dregs.o to relevant targets.
583 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
584 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
585 (x86_linux_dr_get): Likewise.
586 (x86_linux_dr_set): Likewise.
587 (update_debug_registers_callback): Likewise.
588 (x86_linux_dr_set_addr): Likewise.
589 (x86_linux_dr_get_addr): Likewise.
590 (x86_linux_dr_set_control): Likewise.
591 (x86_linux_dr_get_control): Likewise.
592 (x86_linux_dr_get_status): Likewise.
593 (x86_linux_update_debug_registers): Likewise.
594
595 2015-03-24 Gary Benson <gbenson@redhat.com>
596
597 * linux-x86-low.c (x86_linux_update_debug_registers):
598 New function, factored out from...
599 (x86_linux_prepare_to_resume): ...this.
600
601 2015-03-24 Gary Benson <gbenson@redhat.com>
602
603 * linux-x86-low.c (x86_linux_dr_get): Update comments.
604 (x86_linux_dr_set): Likewise.
605 (update_debug_registers_callback): Likewise.
606 (x86_linux_dr_set_addr): Likewise.
607 (x86_linux_dr_get_addr): Likewise.
608 (x86_linux_dr_set_control): Likewise.
609 (x86_linux_dr_get_control): Likewise.
610 (x86_linux_dr_get_status): Likewise.
611 (x86_linux_prepare_to_resume): Likewise.
612
613 2015-03-24 Gary Benson <gbenson@redhat.com>
614
615 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
616 Use perror_with_name. Pass string through gettext.
617 (x86_linux_dr_set): Likewise.
618
619 2015-03-24 Gary Benson <gbenson@redhat.com>
620
621 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
622 (x86_linux_dr_set_addr): ...this.
623 (x86_dr_low_get_addr): Rename to...
624 (x86_linux_dr_get_addr): ...this.
625 (x86_dr_low_set_control): Rename to...
626 (x86_linux_dr_set_control): ...this.
627 (x86_dr_low_get_control): Rename to...
628 (x86_linux_dr_get_control): ...this.
629 (x86_dr_low_get_status): Rename to...
630 (x86_linux_dr_get_status): ...this.
631 (x86_dr_low): Update with new function names.
632
633 2015-03-24 Gary Benson <gbenson@redhat.com>
634
635 * Makefile.in (x86-linux.o): New rule.
636 * configure.srv: Add x86-linux.o to relevant targets.
637 * linux-low.c (lwp_set_arch_private_info): New function.
638 (lwp_arch_private_info): Likewise.
639 * linux-x86-low.c: Include nat/x86-linux.h.
640 (arch_lwp_info): Removed structure.
641 (update_debug_registers_callback):
642 Use lwp_set_debug_registers_changed.
643 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
644 and lwp_set_debug_registers_changed.
645 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
646
647 2015-03-24 Gary Benson <gbenson@redhat.com>
648
649 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
650 * linux-arm-low.c (arm_new_thread): Likewise.
651 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
652 * linux-mips-low.c (mips_linux_new_thread): Likewise.
653 * linux-x86-low.c (x86_linux_new_thread): Likewise.
654 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
655
656 2015-03-24 Gary Benson <gbenson@redhat.com>
657
658 * linux-low.c (ptid_of_lwp): New function.
659 (lwp_is_stopped): Likewise.
660 (lwp_stop_reason): Likewise.
661 * linux-x86-low.c (update_debug_registers_callback):
662 Use lwp_is_stopped.
663 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
664 lwp_stop_reason.
665
666 2015-03-24 Gary Benson <gbenson@redhat.com>
667
668 * linux-low.h (linux_stop_lwp): Remove declaration.
669
670 2015-03-24 Gary Benson <gbenson@redhat.com>
671
672 * linux-low.h: Include nat/linux-nat.h.
673 * linux-low.c (iterate_over_lwps_args): New structure.
674 (iterate_over_lwps_filter): New function.
675 (iterate_over_lwps): Likewise.
676 * linux-x86-low.c (update_debug_registers_callback):
677 Update signature to what iterate_over_lwps expects.
678 Remove PID check that iterate_over_lwps now performs.
679 (x86_dr_low_set_addr): Use iterate_over_lwps.
680 (x86_dr_low_set_control): Likewise.
681
682 2015-03-24 Gary Benson <gbenson@redhat.com>
683
684 * linux-x86-low.c (x86_debug_reg_state): New function.
685 (x86_linux_prepare_to_resume): Use the above.
686
687 2015-03-24 Gary Benson <gbenson@redhat.com>
688
689 * linux-low.c (current_lwp_ptid): New function.
690 * linux-x86-low.c: Include nat/linux-nat.h.
691 (x86_dr_low_get_addr): Use current_lwp_ptid.
692 (x86_dr_low_get_control): Likewise.
693 (x86_dr_low_get_status): Likewise.
694
695 2015-03-20 Pedro Alves <palves@redhat.com>
696
697 * tracepoint.c (cmd_qtstatus): Make "str" const.
698
699 2015-03-20 Pedro Alves <palves@redhat.com>
700
701 * server.c (handle_general_set): Make "req_str" const.
702
703 2015-03-19 Pedro Alves <palves@redhat.com>
704
705 * linux-low.c (linux_resume_one_lwp): Rename to ...
706 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
707 instead call perror_with_name.
708 (check_ptrace_stopped_lwp_gone): New function.
709 (linux_resume_one_lwp): Reimplement as wrapper around
710 linux_resume_one_lwp_throw that swallows errors if the LWP is
711 gone.
712
713 2015-03-19 Pedro Alves <palves@redhat.com>
714
715 * linux-low.c (count_events_callback, select_event_lwp_callback):
716 No longer check whether the thread has resume_stop as last resume
717 kind.
718
719 2015-03-19 Pedro Alves <palves@redhat.com>
720
721 * linux-low.c (count_events_callback, select_event_lwp_callback):
722 Use the lwp's status_pending_p field, not the thread's.
723
724 2015-03-19 Pedro Alves <palves@redhat.com>
725
726 * linux-low.c (select_event_lwp_callback): Update comments to
727 no longer mention SIGTRAP.
728
729 2015-03-18 Gary Benson <gbenson@redhat.com>
730
731 * server.c (handle_query): Do not report vFile:fstat as supported.
732
733 2015-03-11 Gary Benson <gbenson@redhat.com>
734
735 * hostio.c (sys/types.h): New include.
736 (sys/stat.h): Likewise.
737 (common-remote-fileio.h): Likewise.
738 (handle_fstat): New function.
739 (handle_vFile): Handle vFile:fstat packets.
740
741 2015-03-11 Gary Benson <gbenson@redhat.com>
742
743 * configure.ac (AC_CHECK_MEMBERS): Add checks for
744 struct stat.st_blocks and struct stat.st_blksize.
745 * configure: Regenerate.
746 * config.in: Likewise.
747 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
748 (OBS): Add common-remote-fileio.o.
749 (common-remote-fileio.o): New rule.
750
751 2015-03-09 Pedro Alves <palves@redhat.com>
752
753 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
754 'struct sockaddr' pointer in 'accept' call.
755
756 2015-03-09 Pedro Alves <palves@redhat.com>
757
758 Revert:
759 2015-03-07 Pedro Alves <palves@redhat.com>
760 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
761 or <winsock2.h> here. Instead include "gdb_socket.h".
762 (remote_open): Use union gdb_sockaddr_u.
763 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
764 or <winsock2.h> here. Instead include "gdb_socket.h".
765 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
766 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
767 or <sys/un.h>.
768 (init_named_socket, gdb_agent_helper_thread): Use union
769 gdb_sockaddr_u.
770
771 2015-03-07 Pedro Alves <palves@redhat.com>
772
773 * configure.ac (build_warnings): Move
774 -Wdeclaration-after-statement to the C-specific set.
775 * configure: Regenerate.
776
777 2015-03-07 Pedro Alves <palves@redhat.com>
778
779 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
780 or <winsock2.h> here. Instead include "gdb_socket.h".
781 (remote_open): Use union gdb_sockaddr_u.
782 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
783 or <winsock2.h> here. Instead include "gdb_socket.h".
784 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
785 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
786 or <sys/un.h>.
787 (init_named_socket, gdb_agent_helper_thread): Use union
788 gdb_sockaddr_u.
789
790 2015-03-07 Pedro Alves <palves@redhat.com>
791
792 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
793 instead.
794
795 2015-03-06 Yao Qi <yao.qi@linaro.org>
796
797 * linux-aarch64-low.c (aarch64_insert_point): Use
798 show_debug_regs as a boolean.
799 (aarch64_remove_point): Likewise.
800
801 2015-03-05 Pedro Alves <palves@redhat.com>
802
803 * lynx-low.c (lynx_target_ops): Install NULL hooks for
804 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
805 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
806 * nto-low.c (nto_target_ops): Likewise.
807 * spu-low.c (spu_target_ops): Likewise.
808 * win32-low.c (win32_target_ops): Likewise.
809
810 2015-03-04 Pedro Alves <palves@redhat.com>
811
812 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
813 Decide whether a breakpoint triggered based on the SIGTRAP's
814 siginfo.si_code.
815 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
816 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
817 (linux_low_filter_event): Check for breakpoints before checking
818 watchpoints.
819 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
820 siginfo.si_code.
821 (linux_stopped_by_sw_breakpoint)
822 (linux_supports_stopped_by_sw_breakpoint)
823 (linux_stopped_by_hw_breakpoint)
824 (linux_supports_stopped_by_hw_breakpoint): New functions.
825 (linux_target_ops): Install new target methods.
826
827 2015-03-04 Pedro Alves <palves@redhat.com>
828
829 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
830 * server.c (swbreak_feature, hwbreak_feature): New globals.
831 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
832 (captured_main): Clear swbreak_feature and hwbreak_feature.
833 * server.h (swbreak_feature, hwbreak_feature): Declare.
834 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
835 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
836 supports_stopped_by_hw_breakpoint>: New fields.
837 (target_supports_stopped_by_sw_breakpoint)
838 (target_stopped_by_sw_breakpoint)
839 (target_supports_stopped_by_hw_breakpoint)
840 (target_stopped_by_hw_breakpoint): Declare.
841
842 2015-03-04 Pedro Alves <palves@redhat.com>
843
844 enum lwp_stop_reason -> enum target_stop_reason
845 * linux-low.c (check_stopped_by_breakpoint): Adjust.
846 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
847 (linux_wait_1, stuck_in_jump_pad_callback)
848 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
849 (linux_stopped_by_watchpoint):
850 * linux-low.h (enum lwp_stop_reason): Delete.
851 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
852 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
853
854 2015-03-04 Yao Qi <yao.qi@linaro.org>
855
856 * Makefile.in (SFILES): Add linux-aarch64-low.c.
857
858 2015-03-03 Gary Benson <gbenson@redhat.com>
859
860 * hostio.c (handle_vFile): Fix prefix lengths.
861
862 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
863
864 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
865 ptr_bits.
866
867 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
868
869 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
870 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
871 (clean): Add "rm -f" for above C files.
872 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
873 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
874 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
875 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
876 * linux-s390-low.c (HWCAP_S390_VX): New macro.
877 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
878 (init_registers_s390x_vx_linux64)
879 (init_registers_s390x_tevx_linux64)
880 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
881 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
882 declarations.
883 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
884 (s390_store_vxrs_high): New functions.
885 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
886 NT_S390_VXRS_HIGH.
887 (s390_arch_setup): Add logic for selecting one of the new target
888 descriptions. Activate the new vector regsets if applicable.
889 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
890 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
891 and init_registers_s390x_tevx_linux64.
892
893 2015-03-01 Pedro Alves <palves@redhat.com>
894
895 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
896 parameter.
897
898 2015-02-27 Pedro Alves <palves@redhat.com>
899
900 * linux-x86-low.c (u_debugreg_offset): New function.
901 (x86_linux_dr_get, x86_linux_dr_set): Use it.
902
903 2015-02-27 Pedro Alves <palves@redhat.com>
904
905 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
906 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
907 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
908 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
909 (ps_lsetfpregs, ps_getpid)
910 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
911 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
912 (ps_lsetxregs, ps_plog): Declare.
913
914 2015-02-27 Pedro Alves <palves@redhat.com>
915
916 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
917 IP_AGENT_EXPORT_FUNC.
918 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
919 IP_AGENT_EXPORT_FUNC.
920 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
921 (IP_AGENT_EXPORT): Delete.
922 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
923 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
924 (gdb_trampoline_buffer_error, collecting, gdb_collect)
925 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
926 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
927 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
928 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
929 (traceframe_read_count, traceframe_write_count)
930 (traceframes_created, trace_state_variables, get_raw_reg)
931 (get_trace_state_variable_value, set_trace_state_variable_value)
932 (ust_loaded, helper_thread_id, cmd_buf): Use
933 IPA_SYM_EXPORTED_NAME.
934 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
935 (tracepoints) Use IP_AGENT_EXPORT_VAR.
936 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
937 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
938 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
939 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
940 EXTERN_C_PUSH/EXTERN_C_POP.
941 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
942 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
943 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
944 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
945 (traceframe_write_count, traceframe_read_count)
946 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
947 (about_to_request_buffer_space, get_trace_state_variable_value)
948 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
949 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
950 EXTERN_C_PUSH/EXTERN_C_POP.
951 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
952 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
953 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
954 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
955 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
956 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
957 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
958 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
959 Define.
960 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
961 (IP_AGENT_EXPORT_VAR_DECL): Define.
962 (tracing): Declare.
963 (gdb_agent_get_raw_reg): Declare.
964
965 2015-02-27 Tom Tromey <tromey@redhat.com>
966 Pedro Alves <palves@redhat.com>
967
968 Rename symbols whose names are reserved C++ keywords throughout.
969
970 2015-02-27 Pedro Alves <palves@redhat.com>
971
972 * Makefile.in (COMPILER): New, get it from autoconf.
973 (CXX): Get from autoconf instead.
974 (COMPILE.pre): Use COMPILER.
975 (CC-LD): Rename to ...
976 (CC_LD): ... this. Use COMPILER.
977 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
978 (CXX_FOR_TARGET): Default to g++ instead of gcc.
979 * acinclude.m4: Include build-with-cxx.m4.
980 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
981 Disable -Werror by default if building in C++ mode.
982 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
983 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
984 the C++ compiler. Save/restore CXXFLAGS too.
985 * configure: Regenerate.
986
987 2015-02-27 Pedro Alves <palves@redhat.com>
988
989 * acinclude.m4: Include libiberty.m4.
990 * configure.ac: Call libiberty_INIT.
991 * config.in, configure: Regenerate.
992
993 2015-02-26 Pedro Alves <palves@redhat.com>
994
995 * linux-low.c (linux_wait_1): When incrementing the PC past a
996 program breakpoint always use the_low_target.breakpoint_len as
997 increment, rather than the maximum between that and
998 the_low_target.decr_pc_after_break.
999
1000 2015-02-23 Pedro Alves <palves@redhat.com>
1001
1002 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1003 thread was doing a step-over; always adjust the PC if
1004 we stepped over a permanent breakpoint.
1005 (linux_wait_1): If we stepped over breakpoint that was on top of a
1006 permanent breakpoint, manually advance the PC past it.
1007
1008 2015-02-23 Pedro Alves <palves@redhat.com>
1009
1010 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1011 modes.
1012 (x86_fill_gregset, x86_store_gregset): Use it when handling
1013 $orig_eax.
1014
1015 2015-02-20 Pedro Alves <palves@redhat.com>
1016
1017 * thread-db.c: Include "nat/linux-procfs.h".
1018 (thread_db_init): Skip listing new threads if the kernel supports
1019 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1020
1021 2015-02-20 Pedro Alves <palves@redhat.com>
1022
1023 * linux-low.c (status_pending_p_callback): Use ptid_match.
1024
1025 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1026
1027 PR breakpoints/16812
1028 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1029 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1030 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1031
1032 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1033
1034 PR breakpoints/15956
1035 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1036
1037 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1038
1039 * linux-low.c (linux_low_btrace_conf): Print size.
1040 * server.c (handle_btrace_conf_general_set): New.
1041 (hanle_general_set): Call handle_btrace_conf_general_set.
1042 (handle_query): Report Qbtrace-conf:bts:size as supported.
1043
1044 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1045
1046 * linux-low.c (linux_low_enable_btrace): Update parameters.
1047 (linux_low_btrace_conf): New.
1048 (linux_target_ops)<to_btrace_conf>: Initialize.
1049 * server.c (current_btrace_conf): New.
1050 (handle_btrace_enable): Rename to ...
1051 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1052 to target_enable_btrace. Update comment. Update users.
1053 (handle_qxfer_btrace_conf): New.
1054 (qxfer_packets): Add btrace-conf entry.
1055 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1056 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1057 (target_ops)<read_btrace_conf>: New.
1058 (target_enable_btrace): Update parameters.
1059 (target_read_btrace_conf): New.
1060
1061 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1062
1063 * server.c (handle_btrace_general_set): Remove call to
1064 target_supports_btrace.
1065 (supported_btrace_packets): New.
1066 (handle_query): Call supported_btrace_packets.
1067 * target.h: include btrace-common.h.
1068 (btrace_target_info): Removed.
1069 (supports_btrace, target_supports_btrace): Update parameters.
1070
1071 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1072
1073 * Makefile.in (SFILES): Add common/btrace-common.c.
1074 (OBS): Add common/btrace-common.o.
1075 (btrace-common.o): Add build rules.
1076 * linux-low: Include btrace-common.h.
1077 (linux_low_read_btrace): Use struct btrace_data. Call
1078 btrace_data_init and btrace_data_fini.
1079
1080 2015-02-06 Pedro Alves <palves@redhat.com>
1081
1082 * thread-db.c (find_new_threads_callback): Add debug output.
1083
1084 2015-02-04 Pedro Alves <palves@redhat.com>
1085
1086 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1087 (resume_stopped_resumed_lwps): New function.
1088 (linux_wait_for_event_filtered): Use it.
1089
1090 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1091
1092 * Makefile.in (SFILES): Add linux-personality.c.
1093 (linux-personality.o): New rule.
1094 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1095 list of objects to be built.
1096 * linux-low.c: Include nat/linux-personality.h.
1097 (linux_create_inferior): Remove code to disable address space
1098 randomization (moved to ../nat/linux-personality.c). Create
1099 cleanup to disable address space randomization.
1100
1101 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1102
1103 * Makefile.in (posix-strerror.o): New rule.
1104 (mingw-strerror.o): Likewise.
1105 * configure: Regenerated.
1106 * configure.ac: Source file ../common/common.host. Initialize new
1107 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1108
1109 2015-01-14 Yao Qi <yao@codesourcery.com>
1110
1111 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1112 (ppc-linux.o): New rule.
1113 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1114 * configure.ac: AC_CHECK_FUNCS(getauxval).
1115 * config.in: Re-generated.
1116 * configure: Re-generated.
1117 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1118 ppc64_64bit_inferior_p
1119
1120 2015-01-14 Yao Qi <yao@codesourcery.com>
1121
1122 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1123 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1124 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1125 (PT_ORIG_R3, PT_TRAP): Likewise.
1126 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1127 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1128 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1129
1130 2015-01-10 Joel Brobecker <brobecker@adacore.com>
1131
1132 * i387-fp.c (i387_cache_to_xsave): In look over
1133 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1134 zmmh_low_space field by use of zmmh_high_space.
1135
1136 2015-01-09 Pedro Alves <palves@redhat.com>
1137
1138 * linux-low.c (step_over_bkpt): Move higher up in the file.
1139 (handle_extended_wait): Don't store the stop_pc here.
1140 (get_stop_pc): Adjust comments and rename to ...
1141 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1142 stopped for a software breakpoint or hardware breakpoint.
1143 (thread_still_has_status_pending_p): New function.
1144 (status_pending_p_callback): Use
1145 thread_still_has_status_pending_p. If the event is no longer
1146 interesting, resume the LWP.
1147 (handle_tracepoints): Add assert.
1148 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1149 (wstatus_maybe_breakpoint): New function.
1150 (cancel_breakpoint): Delete function.
1151 (check_stopped_by_watchpoint): New function, factored out from
1152 linux_low_filter_event.
1153 (lp_status_maybe_breakpoint): Delete function.
1154 (linux_low_filter_event): Remove filter_ptid argument.
1155 Leave thread group exits pending here. Store the LWP's stop PC.
1156 Always leave events pending.
1157 (linux_wait_for_event_filtered): Pull all events out of the
1158 kernel, and leave them all pending.
1159 (count_events_callback, select_event_lwp_callback): Consider all
1160 events.
1161 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1162 (select_event_lwp): Only give preference to the stepping LWP in
1163 all-stop mode. Adjust comments.
1164 (ignore_event): New function.
1165 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1166 references to cancel_breakpoints. Adjust to renames. Also give
1167 equal priority to all LWPs that have had events in non-stop mode.
1168 If reporting a software breakpoint event, unadjust the LWP's PC.
1169 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1170 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1171 Adjust.
1172 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1173 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1174 (linux_stopped_by_watchpoint): Adjust.
1175 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1176 * linux-low.h (enum lwp_stop_reason): New.
1177 (struct lwp_info) <stop_pc>: Adjust comment.
1178 <stopped_by_watchpoint>: Delete field.
1179 <stop_reason>: New field.
1180 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1181 * mem-break.c (software_breakpoint_inserted_here)
1182 (hardware_breakpoint_inserted_here): New function.
1183 * mem-break.h (software_breakpoint_inserted_here)
1184 (hardware_breakpoint_inserted_here): Declare.
1185 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1186 (cancel_breakpoints): Delete.
1187 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1188 (upload_fast_traceframes): Remove references to
1189 cancel_breakpoints.
1190
1191 2015-01-09 Pedro Alves <palves@redhat.com>
1192
1193 * thread-db.c (find_new_threads_callback): Ignore thread if the
1194 kernel thread ID is -1.
1195
1196 2015-01-09 Pedro Alves <palves@redhat.com>
1197
1198 * linux-low.c (linux_attach_fail_reason_string): Move to
1199 nat/linux-ptrace.c, and rename.
1200 (linux_attach_lwp): Update comment.
1201 (attach_proc_task_lwp_callback): New function.
1202 (linux_attach): Adjust to rename and use
1203 linux_proc_attach_tgid_threads.
1204 (linux_attach_fail_reason_string): Delete declaration.
1205
1206 2015-01-01 Joel Brobecker <brobecker@adacore.com>
1207
1208 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1209 * server.c (gdbserver_version): Likewise.
1210
1211 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1212
1213 * remote-utils.c: Include ctype.h.
1214 (input_interrupt): Explicitly handle the case when the char
1215 received is the NUL byte. Improve the printing of non-ASCII
1216 characters.
1217
1218 2014-12-16 Joel Brobecker <brobecker@adacore.com>
1219
1220 * linux-low.c (linux_low_filter_event): Update call to
1221 linux_enable_event_reporting following the addition of
1222 a new parameter to that function.
1223
1224 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
1225
1226 PR server/17457
1227 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1228 (AARCH64_FPCR_REGNO): Likewise.
1229 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1230 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1231 (aarch64_store_fpregset): Likewise.
1232
1233 2014-12-15 Joel Brobecker <brobecker@adacore.com>
1234
1235 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1236 Remove FIXME comment about assumption about N.
1237
1238 2014-12-13 Joel Brobecker <brobecker@adacore.com>
1239
1240 * configure.ac: If large-file support is disabled in GDBserver,
1241 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1242 * configure: Regenerate.
1243
1244 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1245
1246 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1247 warning upon ENODATA from ptrace.
1248 * linux-s390-low.c (s390_store_tdb): New.
1249 (s390_regsets): Add regset for NT_S390_TDB.
1250
1251 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1252
1253 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1254 without a fill_function.
1255 * linux-s390-low.c (s390_fill_last_break): Remove.
1256 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1257 (s390_arch_setup): Use regset's size instead of fill_function for
1258 loop end condition.
1259
1260 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1261
1262 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1263 the regset's store function when ptrace returned an error.
1264 * regcache.c (get_thread_regcache): Invalidate register cache
1265 before fetching inferior's registers.
1266
1267 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1268
1269 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1270 while-loop as for-loop.
1271 (regsets_store_inferior_registers): Likewise.
1272
1273 2014-11-28 Yao Qi <yao@codesourcery.com>
1274
1275 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1276 * config.in, configure: Re-generate.
1277 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1278 is defined.
1279
1280 2014-11-21 Yao Qi <yao@codesourcery.com>
1281
1282 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1283 (AC_CHECK_HEADERS): Remove malloc.h.
1284 * configure: Re-generated.
1285 * config.in: Re-generated.
1286 * server.h: Don't include alloca.h and malloc.h.
1287 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1288 Don't include malloc.h.
1289
1290 2014-11-17 Joel Brobecker <brobecker@adacore.com>
1291
1292 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1293 corresponding ERRNO check in same block.
1294
1295 2014-11-12 Pedro Alves <palves@redhat.com>
1296
1297 * server.c (cont_thread): Update comment.
1298 (start_inferior, attach_inferior): No longer clear cont_thread.
1299 (handle_v_cont): No longer set cont_thread.
1300 (captured_main): Clear cont_thread each time a GDB connects.
1301
1302 2014-11-12 Pedro Alves <palves@redhat.com>
1303
1304 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1305 thread, and don't resume all threads if the Hc thread has exited.
1306
1307 2014-11-12 Pedro Alves <palves@redhat.com>
1308
1309 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1310 the process group instead of to a specific LWP.
1311
1312 2014-10-15 Pedro Alves <palves@redhat.com>
1313
1314 PR server/17487
1315 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1316 parameter.
1317 (arm_set_thread_context): Delete.
1318 (the_low_target): Adjust.
1319 * win32-i386-low.c (debug_registers_changed)
1320 (debug_registers_used): Delete.
1321 (update_debug_registers_callback): New function.
1322 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1323 needing to update their debug registers.
1324 (win32_get_current_dr): New function.
1325 (x86_dr_low_get_addr, x86_dr_low_get_control)
1326 (x86_dr_low_get_status): Fetch the debug register from the thread
1327 record's context.
1328 (i386_initial_stuff): Adjust.
1329 (i386_get_thread_context): Remove current_event parameter. Don't
1330 clear debug_registers_changed nor copy DR values to
1331 debug_reg_state.
1332 (i386_set_thread_context): Delete.
1333 (i386_prepare_to_resume): New function.
1334 (i386_thread_added): Mark the thread as needing to update irs
1335 debug registers.
1336 (the_low_target): Remove i386_set_thread_context and install
1337 i386_prepare_to_resume.
1338 * win32-low.c (win32_get_thread_context): Adjust.
1339 (win32_set_thread_context): Use SetThreadContext
1340 directly.
1341 (win32_prepare_to_resume): New function.
1342 (win32_require_context): New function, factored out from ...
1343 (thread_rec): ... this.
1344 (continue_one_thread): Call win32_prepare_to_resume on each thread
1345 we're about to continue.
1346 (win32_resume): Call win32_prepare_to_resume on the event thread.
1347 * win32-low.h (struct win32_thread_info)
1348 <debug_registers_changed>: New field.
1349 (struct win32_target_ops): Change prototype of set_thread_context,
1350 delete set_thread_context and add prepare_to_resume.
1351 (win32_require_context): New declaration.
1352
1353 2014-10-08 Gary Benson <gbenson@redhat.com>
1354
1355 * server.h: Do not include common-exceptions.h.
1356
1357 2014-10-08 Gary Benson <gbenson@redhat.com>
1358
1359 * server.h: Do not include cleanups.h.
1360
1361 2014-09-30 James Hogan <james.hogan@imgtec.com>
1362
1363 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1364 mips64-dsp-linux.c.
1365
1366 2014-09-23 Yao Qi <yao@codesourcery.com>
1367
1368 * linux-low.c (lp_status_maybe_breakpoint): New function.
1369 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1370 (count_events_callback): Likewise.
1371 (select_event_lwp_callback): Likewise.
1372 (cancel_breakpoints_callback): Likewise.
1373
1374 2014-09-19 Don Breazeal <donb@codesourcery.com>
1375
1376 * linux-low.c (handle_extended_wait): Call
1377 linux_ptrace_get_extended_event.
1378 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1379 linux_is_extended_waitstatus.
1380
1381 2014-09-16 Joel Brobecker <brobecker@adacore.com>
1382
1383 * Makefile.in (CPPFLAGS): Define.
1384 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1385 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1386
1387 2014-09-16 Gary Benson <gbenson@redhat.com>
1388
1389 * inferiors.h (current_inferior): Renamed as...
1390 (current_thread): New variable. All uses updated.
1391 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1392 (maybe_move_out_of_jump_pad): Likewise.
1393 (cancel_breakpoint): Likewise.
1394 (linux_low_filter_event): Likewise.
1395 (wait_for_sigstop): Likewise.
1396 (linux_resume_one_lwp): Likewise.
1397 (need_step_over_p): Likewise.
1398 (start_step_over): Likewise.
1399 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1400 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1401 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1402 and save_inferior as saved_thread.
1403 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1404 saved_thread.
1405 (regcache_invalidate_thread): Likewise.
1406 * remote-utils.c (prepare_resume_reply): Likewise.
1407 * thread-db.c (thread_db_get_tls_address): Likewise.
1408 (disable_thread_event_reporting): Likewise.
1409 (remove_thread_event_breakpoints): Likewise.
1410 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1411 as saved_thread.
1412 * target.h (set_desired_inferior): Renamed as...
1413 (set_desired_thread): New declaration. All uses updated.
1414 * server.c (myresume): Updated comment to reference thread instead
1415 of inferior.
1416 (handle_serial_event): Likewise.
1417 (handle_target_event): Likewise.
1418
1419 2014-09-12 Tom Tromey <tromey@redhat.com>
1420 Gary Benson <gbenson@redhat.com>
1421
1422 * regcache.h: Include common-regcache.h.
1423 (regcache_read_pc): Don't declare.
1424 * regcache.c (get_thread_regcache_for_ptid): New function.
1425
1426 2014-09-11 Tom Tromey <tromey@redhat.com>
1427 Gary Benson <gbenson@redhat.com>
1428
1429 * symbol.c: New file.
1430 * Makefile.in (SFILES): Add symbol.c.
1431 (OBS): Add symbol.o.
1432
1433 2014-09-11 Gary Benson <gbenson@redhat.com>
1434
1435 * target.c (target_stop_ptid, target_continue_ptid): New
1436 functions.
1437
1438 2014-09-11 Tom Tromey <tromey@redhat.com>
1439 Gary Benson <gbenson@redhat.com>
1440
1441 * target.h: Include target/target.h.
1442 * target.c (target_read_memory, target_read_uint32)
1443 (target_write_memory): New functions.
1444
1445 2014-09-11 Gary Benson <gbenson@redhat.com>
1446
1447 * server.h (debug_hw_points): Don't declare.
1448 * server.c (debug_hw_points): Don't define. Replace all uses
1449 with show_debug_regs.
1450 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1451 all uses with show_debug_regs.
1452
1453 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1454
1455 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1456 endianness into account.
1457 (ppc_supply_ptrace_register): Likewise.
1458
1459 2014-09-03 James Hogan <james.hogan@imgtec.com>
1460
1461 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1462 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1463
1464 2014-09-03 Gary Benson <gbenson@redhat.com>
1465
1466 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1467 ALL_DEBUG_ADDRESS_REGISTERS.
1468
1469 2014-09-02 Gary Benson <gbenson@redhat.com>
1470
1471 * i386-low.h: Renamed as...
1472 * x86-low.h: New file. All type, function and variable name
1473 prefixes changed from "i386_" to "x86_". All references updated.
1474 * i386-low.c: Renamed as...
1475 * x86-low.c: New file. All type, function and variable name
1476 prefixes changed from "i386_" to "x86_". All references updated.
1477
1478 2014-09-02 Gary Benson <gbenson@redhat.com>
1479
1480 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1481 (x86_linux_new_thread): Likewise.
1482
1483 2014-08-29 Gary Benson <gbenson@redhat.com>
1484
1485 * server.h (setjmp.h): Do not include.
1486 (toplevel): Do not declare.
1487 (common-exceptions.h): Include.
1488 (cleanups.h): Likewise.
1489 * server.c (toplevel): Do not define.
1490 (exit_code): New static global.
1491 (detach_or_kill_for_exit_cleanup): New function.
1492 (main): New function. Original main renamed to...
1493 (captured_main): New function.
1494 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1495
1496 2014-08-29 Gary Benson <gbenson@redhat.com>
1497
1498 * Makefile.in (SFILES): Add common/common-exceptions.c.
1499 (OBS): Add common-exceptions.o.
1500 (common-exceptions.o): New rule.
1501 * utils.c (prepare_to_throw_exception): New function.
1502
1503 2014-08-29 Gary Benson <gbenson@redhat.com>
1504
1505 * config.in: Regenerate.
1506 * configure: Likewise.
1507
1508 2014-08-29 Gary Benson <gbenson@redhat.com>
1509
1510 * Makefile.in (SFILES): Add common/cleanups.c.
1511 (OBS): cleanups.o.
1512 (cleanups.o): New rule.
1513
1514 2014-08-29 Gary Benson <gbenson@redhat.com>
1515
1516 * utils.c (internal_vwarning): New function.
1517
1518 2014-08-28 Gary Benson <gbenson@redhat.com>
1519
1520 * utils.h (fatal): Remove declaration.
1521 * utils.c (fatal): Remove function.
1522
1523 2014-08-28 Gary Benson <gbenson@redhat.com>
1524
1525 * tracepoint.c (gdb_agent_init): Replace fatal with
1526 perror_with_name.
1527 (initialize_tracepoint): Likewise.
1528
1529 2014-08-28 Gary Benson <gbenson@redhat.com>
1530
1531 * remote-utils.c (remote_prepare): Replace fatal with error.
1532
1533 2014-08-28 Gary Benson <gbenson@redhat.com>
1534
1535 * linux-low.c (linux_async): Replace fatal with warning.
1536 Tidy up and return.
1537 (linux_start_non_stop): Return -1 if linux_async failed.
1538
1539 2014-08-28 Gary Benson <gbenson@redhat.com>
1540
1541 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1542 gdb_assert.
1543 (i386_dr_low_get_addr): Remove vague comment.
1544 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1545 gdb_assert.
1546
1547 2014-08-28 Gary Benson <gbenson@redhat.com>
1548
1549 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1550 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1551 internal_error.
1552 (linux_resume_one_lwp): Likewise.
1553 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1554 gdb_assert.
1555 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1556 with internal_error.
1557 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1558 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1559 (find_register_by_name): Replace fatal with internal_error.
1560 (find_regno): Likewise.
1561 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1562 * thread-db.c (thread_db_create_event): Likewise.
1563 (thread_db_load_search): Likewise.
1564 (try_thread_db_load_1): Likewise.
1565 * tracepoint.c (get_jump_space_head): Replace fatal with
1566 internal_error.
1567 (claim_trampoline_space): Likewise.
1568 (have_fast_tracepoint_trampoline_buffer): Likewise.
1569 (cmd_qtstart): Likewise.
1570 (stop_tracing): Likewise.
1571 (fast_tracepoint_collecting): Likewise.
1572 (target_malloc): Likewise.
1573 (download_tracepoint): Likewise.
1574 (download_trace_state_variables): Replace check with gdb_assert.
1575 (upload_fast_traceframes): Replace fatal with internal_error.
1576
1577 2014-08-19 Tom Tromey <tromey@redhat.com>
1578 Gary Benson <gbenson@redhat.com>
1579
1580 * Makefile.in (SFILES): Add common/common-debug.c.
1581 (OBS): Add common-debug.o.
1582 (common-debug.o): New rule.
1583 * debug.h (debug_printf): Don't declare.
1584 * debug.c (debug_printf): Renamed and rewritten as...
1585 (debug_vprintf): New function.
1586
1587 2014-08-19 Gary Benson <gbenson@redhat.com>
1588
1589 * utils.h: Do not include print-utils.h.
1590
1591 2014-08-19 Tom Tromey <tromey@redhat.com>
1592 Gary Benson <gbenson@redhat.com>
1593
1594 * server.h: Add static assertion.
1595 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1596
1597 2014-08-19 Tom Tromey <tromey@redhat.com>
1598 Gary Benson <gbenson@redhat.com>
1599
1600 * Makefile.in (SFILES): Add common/errors.c.
1601 (OBS): Add errors.o.
1602 (IPA_OBS): Add errors-ipa.o.
1603 (errors.o): New rule.
1604 (errors-ipa.o): Likewise.
1605 * utils.h (perror_with_name, error, warning): Don't declare.
1606 * utils.c (warning): Renamed and rewritten as...
1607 (vwarning): New function.
1608 (error): Renamed and rewritten as...
1609 (verror): New function.
1610 (internal_error): Renamed and rewritten as...
1611 (internal_verror): New function.
1612
1613 2014-08-07 Gary Benson <gbenson@redhat.com>
1614
1615 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1616 * configure: Regenerate.
1617 * config.in: Likewise.
1618 * server.h: Do not include errno.h.
1619 * event-loop.c: Likewise.
1620 * hostio-errno.c: Likewise.
1621 * linux-low.c: Likewise.
1622 * remote-utils.c: Likewise.
1623 * spu-low.c: Likewise.
1624 * utils.c: Likewise.
1625 * gdbreplay.c: Unconditionally include errno.h.
1626
1627 2014-08-07 Gary Benson <gbenson@redhat.com>
1628
1629 * server.h: Do not include string.h.
1630 * event-loop.c: Likewise.
1631 * linux-low.c: Likewise.
1632 * regcache.c: Likewise.
1633 * remote-utils.c: Likewise.
1634 * spu-low.c: Likewise.
1635 * utils.c: Likewise.
1636
1637 2014-08-07 Gary Benson <gbenson@redhat.com>
1638
1639 * server.h: Do not include gdb_assert.h.
1640
1641 2014-08-07 Gary Benson <gbenson@redhat.com>
1642
1643 * server.h: Do not include common-utils.h.
1644
1645 2014-08-07 Gary Benson <gbenson@redhat.com>
1646
1647 * server.h: Do not include ptid.h.
1648 * notif.h: Likewise.
1649
1650 2014-08-07 Gary Benson <gbenson@redhat.com>
1651
1652 * server.h: Do not include gdb_locale.h.
1653
1654 2014-08-07 Gary Benson <gbenson@redhat.com>
1655
1656 * server.h: Do not include gdb/signals.h.
1657 * win32-low.c: Likewise.
1658
1659 2014-08-07 Gary Benson <gbenson@redhat.com>
1660
1661 * server.h: Do not include pathmax.h.
1662
1663 2014-08-07 Gary Benson <gbenson@redhat.com>
1664
1665 * server.h: Do not include libiberty.h.
1666 * linux-bfin-low.c: Likewise.
1667
1668 2014-08-07 Gary Benson <gbenson@redhat.com>
1669
1670 * server.h: Do not include ansidecl.h.
1671
1672 2014-08-07 Gary Benson <gbenson@redhat.com>
1673
1674 * linux-x86-low.c: Do not include stddef.h.
1675 * lynx-ppc-low.c: Likewise.
1676 * tracepoint.c: Likewise.
1677
1678 2014-08-07 Gary Benson <gbenson@redhat.com>
1679
1680 * server.h: Do not include stdarg.h.
1681 * nto-low.c: Likewise.
1682
1683 2014-08-07 Gary Benson <gbenson@redhat.com>
1684
1685 * server.h: Do not include stdlib.h.
1686 * inferiors.c: Likewise.
1687 * linux-low.c: Likewise.
1688 * regcache.c: Likewise.
1689 * spu-low.c: Likewise.
1690 * tracepoint.c: Likewise.
1691 * utils.c: Likewise.
1692
1693 2014-08-07 Gary Benson <gbenson@redhat.com>
1694
1695 * server.h: Do not include stdio.h.
1696 * linux-low.c: Likewise.
1697 * remote-utils.c: Likewise.
1698 * spu-low.c: Likewise.
1699 * utils.c: Likewise.
1700 * wincecompat.c: Likewise.
1701
1702 2014-08-06 Gary Benson <gbenson@redhat.com>
1703
1704 * regcache.c (init_register_cache): Move conditionals inside if.
1705
1706 2014-08-06 Gary Benson <gbenson@redhat.com>
1707
1708 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1709
1710 2014-07-31 Gary Benson <gbenson@redhat.com>
1711
1712 * ax.h: Do not include server.h.
1713 * gdbthread.h: Likewise.
1714 * lynx-low.h: Likewise.
1715 * notif.h: Likewise.
1716
1717 2014-07-30 Gary Benson <gbenson@redhat.com>
1718
1719 * server.h: Include common-defs.h.
1720 Do not include config.h or build-gnulib-gdbserver/config.h.
1721
1722 2014-07-30 Gary Benson <gbenson@redhat.com>
1723
1724 * hostio-errno.c: Move server.h to top of includes list.
1725 * inferiors.c: Likewise.
1726 * linux-x86-low.c: Likewise.
1727 * notif.c: Include server.h.
1728
1729 2014-07-24 Tom Tromey <tromey@redhat.com>
1730 Gary Benson <gbenson@redhat.com>
1731
1732 * server.h (CORE_ADDR): Now unsigned.
1733
1734 2014-07-16 Pedro Alves <palves@redhat.com>
1735
1736 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1737
1738 2014-07-15 Pedro Alves <palves@redhat.com>
1739
1740 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1741 copy.
1742
1743 2014-07-11 Pedro Alves <palves@redhat.com>
1744
1745 * linux-low.c (kill_wait_lwp): New function, based on
1746 kill_one_lwp_callback, but use my_waitpid directly.
1747 (kill_one_lwp_callback, linux_kill): Use it.
1748
1749 2014-06-23 Pedro Alves <palves@redhat.com>
1750
1751 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1752 before setting DR0..DR3.
1753
1754 2014-06-20 Gary Benson <gbenson@redhat.com>
1755
1756 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1757 * configure: Regenerated.
1758 * config.in: Likewise.
1759
1760 2014-06-20 Gary Benson <gbenson@redhat.com>
1761
1762 * Makefile.in (SFILES): Update locations for files moved
1763 from common to nat.
1764 (object file files): Reordered.
1765
1766 2014-06-20 Gary Benson <gbenson@redhat.com>
1767
1768 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1769 (i386_dr_low_set_addr): Likewise.
1770 (i386_dr_low_get_addr): Likewise.
1771 (i386_dr_low_can_set_control): Likewise.
1772 (i386_dr_low_set_control): Likewise.
1773 (i386_dr_low_get_control): Likewise.
1774 (i386_dr_low_get_status): Likewise.
1775 (i386_get_debug_register_length): Likewise.
1776 * linux-x86-low.c (i386_dr_low_set_addr):
1777 Changed signature. Made static.
1778 (i386_dr_low_get_addr): Likewise.
1779 (i386_dr_low_set_control): Likewise.
1780 (i386_dr_low_get_control): Likewise.
1781 (i386_dr_low_get_status): Likewise.
1782 (i386_dr_low): New global variable.
1783 * win32-i386-low.c (i386_dr_low_set_addr):
1784 Changed signature. Made static.
1785 (i386_dr_low_get_addr): Likewise.
1786 (i386_dr_low_set_control): Likewise.
1787 (i386_dr_low_get_control): Likewise.
1788 (i386_dr_low_get_status): Likewise.
1789 (i386_dr_low): New global variable.
1790
1791 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1792
1793 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1794 * Makefile.in (AR, AR_FLAGS): Define.
1795 * configure: Regenerate.
1796
1797 2014-06-19 Gary Benson <gbenson@redhat.com>
1798
1799 * Makefile.in (i386-dregs.o): New rule.
1800 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1801 * i386-low.c (target.h): Remove include.
1802 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1803 (DR_CONTROL_SHIFT): Likewise.
1804 (DR_CONTROL_SIZE): Likewise.
1805 (DR_RW_EXECUTE): Likewise.
1806 (DR_RW_WRITE): Likewise.
1807 (DR_RW_READ): Likewise.
1808 (DR_RW_IORW): Likewise.
1809 (DR_LEN_1): Likewise.
1810 (DR_LEN_2): Likewise.
1811 (DR_LEN_4): Likewise.
1812 (DR_LEN_8): Likewise.
1813 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1814 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1815 (DR_ENABLE_SIZE): Likewise.
1816 (DR_LOCAL_SLOWDOWN): Likewise.
1817 (DR_GLOBAL_SLOWDOWN): Likewise.
1818 (DR_CONTROL_RESERVED): Likewise.
1819 (I386_DR_CONTROL_MASK): Likewise.
1820 (I386_DR_VACANT): Likewise.
1821 (I386_DR_LOCAL_ENABLE): Likewise.
1822 (I386_DR_GLOBAL_ENABLE): Likewise.
1823 (I386_DR_DISABLE): Likewise.
1824 (I386_DR_SET_RW_LEN): Likewise.
1825 (I386_DR_GET_RW_LEN): Likewise.
1826 (I386_DR_WATCH_HIT): Likewise.
1827 (i386_wp_op_t): Likewise.
1828 (i386_show_dr): Likewise.
1829 (i386_length_and_rw_bits): Likewise.
1830 (i386_insert_aligned_watchpoint): Likewise.
1831 (i386_remove_aligned_watchpoint): Likewise.
1832 (i386_handle_nonaligned_watchpoint): Likewise.
1833 i386_update_inferior_debug_regs(): Likewise.
1834 (i386_dr_insert_watchpoint): Likewise.
1835 (i386_dr_remove_watchpoint): Likewise.
1836 (i386_dr_region_ok_for_watchpoint): Likewise.
1837 (i386_dr_stopped_data_address): Likewise.
1838 (i386_dr_stopped_by_watchpoint): Likewise.
1839
1840 2014-06-19 Gary Benson <gbenson@redhat.com>
1841
1842 * i386-low.c (i386_dr_show): Renamed to
1843 i386_show_dr and made static. All uses updated.
1844 (i386_dr_length_and_rw_bits): Renamed to
1845 i386_length_and_rw_bits and made static.
1846 All uses updated.
1847 (i386_dr_insert_aligned_watchpoint): Renamed to
1848 i386_insert_aligned_watchpoint and made static.
1849 All uses updated.
1850 (i386_dr_remove_aligned_watchpoint): Renamed to
1851 i386_remove_aligned_watchpoint and made static.
1852 All uses updated.
1853 (i386_dr_update_inferior_debug_regs): Renamed to
1854 i386_update_inferior_debug_regs and made static.
1855 All uses updated.
1856
1857 2014-06-18 Gary Benson <gbenson@redhat.com>
1858
1859 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1860 (i386_dr_low_can_set_control): Likewise.
1861 (i386_get_debug_register_length): Likewise.
1862 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1863 (i386_dr_low_can_set_control): Likewise.
1864 (i386_get_debug_register_length): Likewise.
1865
1866 2014-06-17 Gary Benson <gbenson@redhat.com>
1867
1868 * i386-low.h (i386-dregs.h): New include.
1869 (DR_FIRSTADDR): Now in i386-dregs.h.
1870 (DR_LASTADDR): Likewise.
1871 (DR_NADDR): Likewise.
1872 (DR_STATUS): Likewise.
1873 (DR_CONTROL): Likewise.
1874 (i386_debug_reg_state): Likewise.
1875 (i386_dr_insert_watchpoint): Likewise.
1876 (i386_dr_remove_watchpoint): Likewise.
1877 (i386_dr_region_ok_for_watchpoint): Likewise.
1878 (i386_dr_stopped_data_address): Likewise.
1879 (i386_dr_stopped_by_watchpoint): Likewise.
1880 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1881
1882 2014-06-18 Gary Benson <gbenson@redhat.com>
1883
1884 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1885 i386_dr_insert_watchpoint.
1886 (i386_low_remove_watchpoint): Renamed to
1887 i386_dr_remove_watchpoint.
1888 (i386_low_region_ok_for_watchpoint): Renamed to
1889 i386_dr_region_ok_for_watchpoint.
1890 (i386_low_stopped_data_address): Renamed to
1891 i386_dr_stopped_data_address.
1892 (i386_low_stopped_by_watchpoint): Renamed to
1893 i386_dr_stopped_by_watchpoint.
1894 * i386-low.c (i386_show_dr): Renamed to
1895 i386_dr_show and made nonstatic. All uses updated.
1896 (i386_length_and_rw_bits): Renamed to
1897 i386_dr_length_and_rw_bits and made nonstatic.
1898 All uses updated.
1899 (i386_insert_aligned_watchpoint): Renamed to
1900 i386_dr_insert_aligned_watchpoint and made nonstatic.
1901 All uses updated.
1902 (i386_remove_aligned_watchpoint): Renamed to
1903 i386_dr_remove_aligned_watchpoint and made nonstatic.
1904 All uses updated.
1905 (i386_update_inferior_debug_regs): Renamed to
1906 i386_dr_update_inferior_debug_regs and made nonstatic.
1907 All uses updated.
1908 (i386_low_insert_watchpoint): Renamed to
1909 i386_dr_insert_watchpoint. All uses updated.
1910 (i386_low_remove_watchpoint): Renamed to
1911 i386_dr_remove_watchpoint. All uses updated.
1912 (i386_low_region_ok_for_watchpoint): Renamed to
1913 i386_dr_region_ok_for_watchpoint. All uses updated.
1914 (i386_low_stopped_data_address): Renamed to
1915 i386_dr_stopped_data_address. All uses updated.
1916 (i386_low_stopped_by_watchpoint): Renamed to
1917 i386_dr_stopped_by_watchpoint. All uses updated.
1918
1919 2014-06-18 Gary Benson <gbenson@redhat.com>
1920
1921 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1922 (i386_dr_low_can_set_control): Likewise.
1923 (i386_insert_aligned_watchpoint): New check.
1924
1925 2014-06-18 Gary Benson <gbenson@redhat.com>
1926
1927 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1928 Renamed to state.
1929
1930 2014-06-18 Gary Benson <gbenson@redhat.com>
1931
1932 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1933 instead of fatal and error.
1934 (i386_handle_nonaligned_watchpoint): Likewise.
1935
1936 2014-06-18 Gary Benson <gbenson@redhat.com>
1937
1938 * i386-low.c (i386_get_debug_register_length): New macro.
1939 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1940 (i386_show_dr): Use debug_printf instead of fprintf. Use
1941 phex to format values.
1942
1943 2014-06-18 Gary Benson <gbenson@redhat.com>
1944
1945 * i386-low.h: Comment changes.
1946 * i386-low.c: Likewise.
1947
1948 2014-06-18 Gary Benson <gbenson@redhat.com>
1949
1950 * i386-low.c: Whitespace changes.
1951
1952 2014-06-12 Tom Tromey <tromey@redhat.com>
1953
1954 * utils.c (freeargv): Remove.
1955
1956 2014-06-12 Tom Tromey <tromey@redhat.com>
1957
1958 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1959 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1960 (parse_debug_format_options): Likewise.
1961 (gdbserver_usage): Likewise.
1962 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1963 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1964 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1965 against libiberty.
1966 ($(LIBGNU)): Depend on libiberty.
1967 (all-lib): Recurse into all subdirs.
1968 (install-only): Invoke "install" target in subdirs.
1969 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1970 targets.
1971 * configure: Rebuild.
1972 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1973 for vasprintf, vsnprintf, or gettimeofday.
1974 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1975 srv_tgtobj.
1976
1977 2014-06-05 Joel Brobecker <brobecker@adacore.com>
1978
1979 * development.sh: Delete.
1980 * Makefile.in (config.status): Adjust dependency on development.sh.
1981 * configure.ac: Adjust development.sh source call.
1982 * configure: Regenerate.
1983
1984 2014-06-02 Pedro Alves <palves@redhat.com>
1985
1986 * ax.c (gdb_free_agent_expr): New function.
1987 * ax.h (gdb_free_agent_expr): New declaration.
1988 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1989 list.
1990 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1991 static.
1992 (clear_breakpoint_conditions_and_commands): New function.
1993 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1994 (clear_breakpoint_conditions_and_commands): New declaration.
1995
1996 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1997
1998 * linux-aarch64-low.c (asm/ptrace.h): Include.
1999
2000 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2001
2002 Fix TLS access for -static -pthread.
2003 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2004 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2005 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2006
2007 2014-05-20 Pedro Alves <palves@redhat.com>
2008
2009 * linux-aarch64-low.c (aarch64_insert_point)
2010 (aarch64_remove_point): No longer check whether the type is
2011 supported here. Adjust to new interface.
2012 (the_low_target): Install aarch64_supports_z_point_type as
2013 supports_z_point_type method.
2014 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2015 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2016 instead of a Z packet char. Adjust.
2017 (arm_supports_z_point_type): New function.
2018 (arm_insert_point, arm_remove_point): Adjust to new interface.
2019 (the_low_target): Install arm_supports_z_point_type.
2020 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2021 (cris_insert_point, cris_remove_point): Adjust to new interface.
2022 Don't check whether the type is supported here.
2023 (the_low_target): Install cris_supports_z_point_type.
2024 * linux-low.c (linux_supports_z_point_type): New function.
2025 (linux_insert_point, linux_remove_point): Adjust to new interface.
2026 * linux-low.h (struct linux_target_ops) <insert_point,
2027 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2028 raw_breakpoint pointer parameter.
2029 <supports_z_point_type>: New method.
2030 * linux-mips-low.c (mips_supports_z_point_type): New function.
2031 (mips_insert_point, mips_remove_point): Adjust to new interface.
2032 Use mips_supports_z_point_type.
2033 (the_low_target): Install mips_supports_z_point_type.
2034 * linux-ppc-low.c (the_low_target): Install NULL as
2035 supports_z_point_type method.
2036 * linux-s390-low.c (the_low_target): Install NULL as
2037 supports_z_point_type method.
2038 * linux-sparc-low.c (the_low_target): Install NULL as
2039 supports_z_point_type method.
2040 * linux-x86-low.c (x86_supports_z_point_type): New function.
2041 (x86_insert_point): Adjust to new insert_point interface. Use
2042 insert_memory_breakpoint. Adjust to new
2043 i386_low_insert_watchpoint interface.
2044 (x86_remove_point): Adjust to remove_point interface. Use
2045 remove_memory_breakpoint. Adjust to new
2046 i386_low_remove_watchpoint interface.
2047 (the_low_target): Install x86_supports_z_point_type.
2048 * lynx-low.c (lynx_target_ops): Install NULL as
2049 supports_z_point_type callback.
2050 * nto-low.c (nto_supports_z_point_type): New.
2051 (nto_insert_point, nto_remove_point): Adjust to new interface.
2052 (nto_target_ops): Install nto_supports_z_point_type.
2053 * mem-break.c: Adjust intro comment.
2054 (struct raw_breakpoint) <raw_type, size>: New fields.
2055 <inserted>: Update comment.
2056 <shlib_disabled>: Delete field.
2057 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2058 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2059 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2060 (raw_bkpt_type_to_target_hw_bp_type): New function.
2061 (find_enabled_raw_code_breakpoint_at): New function.
2062 (find_raw_breakpoint_at): New type and size parameters. Use them.
2063 (insert_memory_breakpoint): New function, based off
2064 set_raw_breakpoint_at.
2065 (remove_memory_breakpoint): New function.
2066 (set_raw_breakpoint_at): Reimplement.
2067 (set_breakpoint): New, based on set_breakpoint_at.
2068 (set_breakpoint_at): Reimplement.
2069 (delete_raw_breakpoint): Go through the_target->remove_point
2070 instead of assuming memory breakpoints.
2071 (find_gdb_breakpoint_at): Delete.
2072 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2073 (find_gdb_breakpoint): New function.
2074 (set_gdb_breakpoint_at): Delete.
2075 (z_type_supported): New function.
2076 (set_gdb_breakpoint_1): New function, loosely based off
2077 set_gdb_breakpoint_at.
2078 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2079 (delete_gdb_breakpoint_at): Delete.
2080 (delete_gdb_breakpoint_1): New function, loosely based off
2081 delete_gdb_breakpoint_at.
2082 (delete_gdb_breakpoint): New function.
2083 (clear_gdb_breakpoint_conditions): Rename to ...
2084 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2085 breakpoint.
2086 (add_condition_to_breakpoint): Make static.
2087 (add_breakpoint_condition): Take a struct breakpoint pointer
2088 instead of an address. Adjust.
2089 (gdb_condition_true_at_breakpoint): Rename to ...
2090 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2091 z_type parameter.
2092 (gdb_condition_true_at_breakpoint): Reimplement.
2093 (add_breakpoint_commands): Take a struct breakpoint pointer
2094 instead of an address. Adjust.
2095 (gdb_no_commands_at_breakpoint): Rename to ...
2096 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2097 parameter. Return true if no breakpoint was found. Change debug
2098 output.
2099 (gdb_no_commands_at_breakpoint): Reimplement.
2100 (run_breakpoint_commands): Rename to ...
2101 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2102 and change return type to boolean.
2103 (run_breakpoint_commands): New function.
2104 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2105 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2106 breakpoint. Go through the_target->remove_point instead of
2107 assuming memory breakpoint.
2108 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2109 software and hardware breakpoints.
2110 (reinsert_raw_breakpoint): Go through the_target->insert_point
2111 instead of assuming memory breakpoint.
2112 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2113 software and hardware breakpoints.
2114 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2115 Check both software and hardware breakpoints.
2116 (validate_inserted_breakpoint): Assert the breakpoint is a
2117 software breakpoint. Set the inserted flag to -1 instead of
2118 setting shlib_disabled.
2119 (delete_disabled_breakpoints): Adjust.
2120 (validate_breakpoints): Only validate software breakpoints.
2121 Adjust to inserted flag change.
2122 (check_mem_read, check_mem_write): Skip breakpoint types other
2123 than software breakpoints. Adjust to inserted flag change.
2124 * mem-break.h (enum raw_bkpt_type): New enum.
2125 (raw_breakpoint, struct process_info): Forward declare.
2126 (Z_packet_to_target_hw_bp_type): Delete declaration.
2127 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2128 (set_gdb_breakpoint, delete_gdb_breakpoint)
2129 (clear_breakpoint_conditions): New declarations.
2130 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2131 (breakpoint_inserted_here): Update comment.
2132 (add_breakpoint_condition, add_breakpoint_commands): Replace
2133 address parameter with a breakpoint pointer parameter.
2134 (gdb_breakpoint_here): Update comment.
2135 (delete_gdb_breakpoint_at): Delete.
2136 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2137 * server.c (process_point_options): Take a struct breakpoint
2138 pointer instead of an address. Adjust.
2139 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2140 delete_gdb_breakpoint.
2141 * spu-low.c (spu_target_ops): Install NULL as
2142 supports_z_point_type method.
2143 * target.h: Include mem-break.h.
2144 (struct target_ops) <prepare_to_access_memory>: Update comment.
2145 <supports_z_point_type>: New field.
2146 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2147 instead of a char. Also take a raw breakpoint pointer.
2148 * win32-arm-low.c (the_low_target): Install NULL as
2149 supports_z_point_type.
2150 * win32-i386-low.c (i386_supports_z_point_type): New function.
2151 (i386_insert_point, i386_remove_point): Adjust to new interface.
2152 (the_low_target): Install i386_supports_z_point_type.
2153 * win32-low.c (win32_supports_z_point_type): New function.
2154 (win32_insert_point, win32_remove_point): Adjust to new interface.
2155 (win32_target_ops): Install win32_supports_z_point_type.
2156 * win32-low.h (struct win32_target_ops):
2157 <supports_z_point_type>: New method.
2158 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2159 instead of a char. Also take a raw breakpoint pointer.
2160
2161 2014-05-20 Pedro Alves <palves@redhat.com>
2162
2163 * mem-break.h: Include break-common.h.
2164 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2165 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2166 (Z_packet_to_target_hw_bp_type): New declaration.
2167 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2168 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2169 (Z_PACKET_ACCESS_WP): Delete macros.
2170 (Z_packet_to_hw_type): Delete function.
2171 * i386-low.h: Don't include break-common.h here.
2172 (Z_packet_to_hw_type): Delete declaration.
2173 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2174 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2175 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2176 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2177 * linux-aarch64-low.c: Don't include break-common.h here.
2178 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2179 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2180 (Z_packet_to_target_hw_bp_type): Delete function.
2181 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2182 function.
2183 (mips_insert_point, mips_remove_point): Use
2184 Z_packet_to_target_hw_bp_type.
2185
2186 2014-05-20 Pedro Alves <palves@redhat.com>
2187
2188 * linux-aarch64-low.c: Include break-common.h.
2189 (enum target_point_type): Delete.
2190 (Z_packet_to_point_type): Rename to ...
2191 (Z_packet_to_target_hw_bp_type): ... this, and return a
2192 target_hw_bp_type instead.
2193 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2194 instead of an enum target_point_type.
2195 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2196 breakpoint type.
2197 (aarch64_dr_state_insert_one_point)
2198 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2199 (aarch64_handle_aligned_watchpoint)
2200 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2201 Take an enum target_hw_bp_type instead of an enum
2202 target_point_type.
2203 (aarch64_supports_z_point_type): New function.
2204 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2205 use Z_packet_to_target_hw_bp_type.
2206
2207 2014-05-20 Joel Brobecker <brobecker@adacore.com>
2208
2209 * configure.ac: Only use -Werror by default when DEVELOPMENT
2210 is true.
2211 * configure: Regenerate.
2212
2213 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2214
2215 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2216 * linux-x86-low.c (X86_64_USER_REGS): New.
2217 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2218
2219 2014-04-28 Yao Qi <yao@codesourcery.com>
2220
2221 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2222 name.
2223
2224 2014-04-25 Pedro Alves <palves@redhat.com>
2225
2226 PR server/16255
2227 * linux-low.c (linux_attach_fail_reason_string): New function.
2228 (linux_attach_lwp): Delete.
2229 (linux_attach_lwp_1): Rename to ...
2230 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2231 argument. Remove "initial" parameter. Return int instead of
2232 void. Don't error or warn here.
2233 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2234 failure to attach to the tgid. Call warning when failing to
2235 attach to an lwp.
2236 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2237 argument. Remove "initial" parameter. Return int instead of
2238 void. Don't error or warn here.
2239 (linux_attach_fail_reason_string): New declaration.
2240 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2241 interface change. Use linux_attach_fail_reason_string.
2242
2243 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
2244 Walfred Tedeschi <walfred.tedeschi@intel.com>
2245
2246 * Makefile.in: Added rules to handle new files
2247 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2248 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2249 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2250 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2251 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2252 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2253 x32-avx512-linux.o.
2254 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2255 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2256 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2257 i386/x32-avx512.xml.
2258 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2259 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2260 i386/x32-avx512-linux.xml.
2261 * i387-fp.c (num_avx512_k_registers): New constant for number
2262 of K registers.
2263 (num_avx512_zmmh_low_registers): New constant for number of
2264 lower ZMM registers (0-15).
2265 (num_avx512_zmmh_high_registers): New constant for number of
2266 higher ZMM registers (16-31).
2267 (num_avx512_ymmh_registers): New contant for number of higher
2268 YMM registers (ymm16-31 added by avx521 on x86_64).
2269 (num_avx512_xmm_registers): New constant for number of higher
2270 XMM registers (xmm16-31 added by AVX512 on x86_64).
2271 (struct i387_xsave): Add space for AVX512 registers.
2272 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2273 Add code to handle AVX512 registers.
2274 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2275 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2276 prototypei from generated file.
2277 (tdesc_amd64_avx512_linux): Likewise.
2278 (init_registers_x32_avx512_linux): Likewise.
2279 (tdesc_x32_avx512_linux): Likewise.
2280 (init_registers_i386_avx512_linux): Likewise.
2281 (tdesc_i386_avx512_linux): Likewise.
2282 (x86_64_regmap): Add AVX512 registers.
2283 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2284 mask.
2285 (initialize_low_arch): Add code to initialize AVX512 registers.
2286
2287 2014-04-23 Pedro Alves <palves@redhat.com>
2288
2289 * mem-break.c (find_gdb_breakpoint_at): Make static.
2290 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2291
2292 2014-04-23 Pedro Alves <palves@redhat.com>
2293
2294 * i386-low.c: Don't include break-common.h here.
2295 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2296 prototype to take target_hw_bp_type as argument instead of a Z
2297 packet char.
2298 * i386-low.h: Include break-common.h here.
2299 (Z_packet_to_hw_type): Declare.
2300 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2301 prototypes.
2302 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2303 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2304 (x86_remove_point): Convert the packet number to a
2305 target_hw_bp_type before calling i386_low_remove_watchpoint.
2306 * win32-i386-low.c (i386_insert_point): Convert the packet number
2307 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2308 (i386_remove_point): Convert the packet number to a
2309 target_hw_bp_type before calling i386_low_remove_watchpoint.
2310
2311 2014-04-23 Pedro Alves <palves@redhat.com>
2312
2313 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2314
2315 2014-04-10 Pedro Alves <palves@redhat.com>
2316
2317 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2318 Check if the condition or command is NULL before checking if the
2319 breakpoint is known. On success, return true.
2320 * mem-break.h (add_breakpoint_condition): Document return.
2321 (add_breakpoint_commands): Add describing comment.
2322 * server.c (skip_to_semicolon): New function.
2323 (process_point_options): Use it.
2324
2325 2014-04-09 Pedro Alves <palves@redhat.com>
2326
2327 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2328 to lwpid_of.
2329
2330 2014-02-27 Pedro Alves <palves@redhat.com>
2331
2332 PR 12702
2333 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2334 macros.
2335 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2336 output.
2337 (last_thread_of_process_p): Take a PID argument instead of a
2338 thread pointer.
2339 (linux_wait_for_lwp): Delete.
2340 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2341 functions.
2342 (linux_low_filter_event): New function, party factored out from
2343 linux_wait_for_event.
2344 (linux_wait_for_event): Rename to ...
2345 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2346 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2347 sigsuspend. Check for zombie leaders.
2348 (linux_wait_for_event): Reimplement as wrapper around
2349 linux_wait_for_event_filtered.
2350 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2351 a normal or signal exit is seen, it's the whole process exiting.
2352 (wait_for_sigstop): No longer a for_each_inferior callback.
2353 Rewrite on top of linux_wait_for_event_filtered.
2354 (stop_all_lwps): Call wait_for_sigstop directly.
2355 * server.c (resume, handle_target_event): Handle
2356 TARGET_WAITKIND_NO_RESUMED.
2357
2358 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2359
2360 * win32-low.c (psapi_get_dll_name,
2361 * win32_CreateToolhelp32Snapshot): Delete.
2362 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2363 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2364 Delete.
2365 (handle_load_dll): Add function description.
2366 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2367
2368 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2369
2370 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2371 Add comment.
2372 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2373 base address when calling win32_add_one_solib.
2374 (handle_load_dll): Delete local variable load_addr.
2375 Remove 0x1000 offset applied to DLL base address when calling
2376 win32_add_one_solib.
2377 (handle_unload_dll): Add comment.
2378
2379 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2380
2381 * win32-low.c (win32_add_all_dlls): Renames
2382 win32_ensure_ntdll_loaded. Rewrite function documentation.
2383 Adjust implementation to always load all DLLs.
2384 Add 0x1000 offset to DLL base address when calling
2385 win32_add_one_solib.
2386 (child_initialization_done): New static global.
2387 (do_initial_child_stuff): Set child_initialization_done to
2388 zero during child initialization, and 1 after. Replace call
2389 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2390 Add comment.
2391 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2392 (handle_unload_dll): Add function documentation.
2393 (get_child_debug_event): Ignore load and unload DLL events
2394 during child initialization.
2395
2396 2014-02-20 Doug Evans <dje@google.com>
2397
2398 Remove global all_lwps.
2399 * inferiors.h (ptid_of): Move here from linux-low.h.
2400 (pid_of, lwpid_of): Ditto.
2401 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2402 parameter is a struct thread_info * now.
2403 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2404 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2405 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2406 directly.
2407 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2408 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2409 * linux-arm-low.c (update_registers_callback): Update, "entry"
2410 parameter is a struct thread_info * now.
2411 Fetch lwpid from current_inferior directly.
2412 (arm_insert_point): Pass &all_threads to find_inferior instead of
2413 &all_lwps.
2414 (arm_remove_point): Ditto.
2415 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2416 (arm_prepare_to_resume): Fetch pid from thread.
2417 (arm_read_description): Fetch lwpid from current_inferior directly.
2418 * linux-low.c (all_lwps): Delete.
2419 (delete_lwp): Delete call to remove_inferior.
2420 (handle_extended_wait): Fetch lwpid from thread.
2421 (add_lwp): Don't set lwp->entry.id. Remove call to
2422 add_inferior_to_list.
2423 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2424 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2425 (kill_one_lwp_callback): Ditto.
2426 (linux_kill): Don't dereference NULL pointer.
2427 Fetch ptid,lwpid from thread.
2428 (get_detach_signal): Fetch ptid from thread.
2429 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2430 Simplify call to regcache_invalidate_thread.
2431 (delete_lwp_callback): Update, "entry" parameter is a
2432 struct thread_info * now. Fetch pid from thread.
2433 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2434 (status_pending_p_callback): Update, "entry" parameter is a
2435 struct thread_info * now. Fetch ptid from thread.
2436 (find_lwp_pid): Update, "entry" parameter is a
2437 struct thread_info * now.
2438 (linux_wait_for_lwp): Fetch pid from thread.
2439 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2440 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2441 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2442 (dequeue_one_deferred_signal): Ditto.
2443 (cancel_breakpoint): Fetch ptid from current_inferior.
2444 (linux_wait_for_event): Pass &all_threads to find_inferior,
2445 not &all_lwps. Fetch ptid, lwpid from thread.
2446 (count_events_callback): Update, "entry" parameter is a
2447 struct thread_info * now.
2448 (select_singlestep_lwp_callback): Ditto.
2449 (select_event_lwp_callback): Ditto.
2450 (cancel_breakpoints_callback): Ditto.
2451 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2452 not &all_lwps.
2453 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2454 (unsuspend_one_lwp): Update, "entry" parameter is a
2455 struct thread_info * now.
2456 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2457 not &all_lwps.
2458 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2459 Fetch lwpid from thread, not lwp.
2460 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2461 Pass &all_threads to find_inferior, not &all_lwps.
2462 (send_sigstop): Fetch lwpid from thread, not lwp.
2463 (send_sigstop_callback): Update, "entry" parameter is a
2464 struct thread_info * now.
2465 (suspend_and_send_sigstop_callback): Ditto.
2466 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2467 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2468 struct thread_info * now.
2469 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2470 from thread, lwp.
2471 (lwp_running): Update, "entry" parameter is a
2472 struct thread_info * now.
2473 (stop_all_lwps): Fetch ptid from thread.
2474 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2475 (linux_resume_one_lwp): Fetch lwpid from thread.
2476 (linux_set_resume_request): Update, "entry" parameter is a
2477 struct thread_info * now. Fetch pid, lwpid from thread.
2478 (resume_status_pending_p): Update, "entry" parameter is a
2479 struct thread_info * now.
2480 (need_step_over_p): Ditto. Fetch lwpid from thread.
2481 (start_step_over): Fetch lwpid from thread.
2482 (linux_resume_one_thread): Update, "entry" parameter is a
2483 struct thread_info * now. Fetch lwpid from thread.
2484 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2485 (proceed_one_lwp): Update, "entry" parameter is a
2486 struct thread_info * now. Fetch lwpid from thread.
2487 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2488 struct thread_info * now.
2489 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2490 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2491 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2492 directly.
2493 (regsets_store_inferior_registers): Ditto.
2494 (fetch_register, store_register): Ditto.
2495 (linux_read_memory, linux_write_memory): Ditto.
2496 (linux_request_interrupt): Ditto.
2497 (linux_read_auxv): Ditto.
2498 (linux_xfer_siginfo): Ditto.
2499 (linux_qxfer_spu): Ditto.
2500 (linux_qxfer_libraries_svr4): Ditto.
2501 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2502 moved to inferiors.h.
2503 (get_lwp): Delete.
2504 (get_thread_lwp): Update.
2505 (struct lwp_info): Delete member "entry". Simplify comment for
2506 member "thread".
2507 (all_lwps): Delete.
2508 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2509 current_inferior directly.
2510 (update_watch_registers_callback): Update, "entry" parameter is a
2511 struct thread_info * now. Fetch pid from thread.
2512 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2513 (mips_insert_point): Fetch lwpid from current_inferior.
2514 Pass &all_threads to find_inferior, not &all_lwps.
2515 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2516 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2517 directly.
2518 (mips_stopped_data_address): Ditto.
2519 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2520 directly.
2521 * linux-tile-low.c (tile_arch_setup): Ditto.
2522 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2523 (update_debug_registers_callback): Update, "entry" parameter is a
2524 struct thread_info * now. Fetch pid from thread.
2525 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2526 Pass &all_threads to find_inferior, not &all_lwps.
2527 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2528 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2529 Pass &all_threads to find_inferior, not &all_lwps.
2530 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2531 (i386_dr_low_get_status): Ditto.
2532 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2533 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2534 (x86_linux_read_description): Ditto.
2535 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2536
2537 2014-02-20 Doug Evans <dje@google.com>
2538
2539 * inferiors.c (get_first_inferior): Fix buglet.
2540
2541 2014-02-19 Doug Evans <dje@google.com>
2542
2543 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2544 * inferiors.c (add_thread): Change result type to struct thread_info *.
2545 All callers updated.
2546 (add_lwp): Call add_thread here instead of in callers.
2547 All callers updated.
2548 * linux-low.h (get_lwp_thread): Rewrite.
2549 (struct lwp_info): New member "thread".
2550
2551 2014-02-19 Doug Evans <dje@google.com>
2552
2553 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2554 All callers updated.
2555
2556 2014-02-19 Doug Evans <dje@google.com>
2557
2558 * inferiors.c (add_thread): Fix whitespace.
2559
2560 2014-02-19 Doug Evans <dje@google.com>
2561
2562 * dll.c (clear_dlls): Replace accessing list implemention details
2563 with API function.
2564 * gdbthread.h (get_first_thread): Declare.
2565 * inferiors.c (for_each_inferior_with_data): New function.
2566 (get_first_thread): New function.
2567 (find_thread_ptid): Simplify.
2568 (get_first_inferior): New function.
2569 (clear_list): Delete.
2570 (one_inferior_p): New function.
2571 (clear_inferior_list): New function.
2572 (clear_inferiors): Update.
2573 * inferiors.h (for_each_inferior_with_data): Declare.
2574 (clear_inferior_list): Declare.
2575 (one_inferior_p): Declare.
2576 (get_first_inferior): Declare.
2577 * linux-low.c (linux_wait_for_event): Replace accessing list
2578 implemention details with API function.
2579 * server.c (target_running): Ditto.
2580 (accumulate_file_name_length): New function.
2581 (emit_dll_description): New function.
2582 (handle_qxfer_libraries): Replace accessing list implemention
2583 details with API function.
2584 (handle_qxfer_threads_worker): New function.
2585 (handle_qxfer_threads_proper): Replace accessing list implemention
2586 details with API function.
2587 (handle_query): Ditto.
2588 (visit_actioned_threads_callback_ftype): New typedef.
2589 (visit_actioned_threads_data): New struct.
2590 (visit_actioned_threads): Rewrite to be find_inferior callback.
2591 (resume): Call find_inferior.
2592 (handle_status): Replace accessing list implemention
2593 details with API function.
2594 (process_serial_event): Replace accessing list implemention details
2595 with API function.
2596 * target.c (set_desired_inferior): Replace accessing list implemention
2597 details with API function.
2598 * tracepoint.c (same_process_p): New function.
2599 (gdb_agent_about_to_close): Replace accessing list implemention
2600 details with API function.
2601 * win32-low.c (child_delete_thread): Replace accessing list
2602 implemention details with API function.
2603 (match_dll_by_basename): New function.
2604 (dll_is_loaded_by_basename): New function.
2605 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2606 details call to dll_is_loaded_by_basename.
2607
2608 2014-02-19 Doug Evans <dje@google.com>
2609
2610 * dll.h (struct dll_info): Add comment.
2611 * gdbthread.h (struct thread_info): Add comment.
2612 (current_ptid): Simplify.
2613 * inferiors.c (add_process): Update.
2614 (remove_process): Update.
2615 * inferiors.h (struct process_info): Rename member "head" to "entry".
2616 * linux-low.c (delete_lwp): Update.
2617 (add_lwp): Update.
2618 (last_thread_of_process_p): Update.
2619 (kill_one_lwp_callback, linux_kill): Update.
2620 (status_pending_p_callback): Update.
2621 (wait_for_sigstop): Update. Simplify read of ptid.
2622 (start_step_over): Update.
2623 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2624 (get_lwp_thread): Update.
2625 (struct lwp_info): Rename member "head" to "entry".
2626 * regcache.h (inferior_list_entry): Delete.
2627 * server.c (kill_inferior_callback): Update.
2628 (detach_or_kill_inferior_callback): Update.
2629 (print_started_pid): Update.
2630 (print_attached_pid): Update.
2631 (process_serial_event): Simplify read of ptid.
2632 * thread-db.c (thread_db_create_event): Update.
2633 (thread_db_get_tls_address): Update.
2634 * win32-low.c (current_inferior_ptid): Simplify.
2635
2636 2014-02-19 Tom Tromey <tromey@redhat.com>
2637
2638 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2639 argument.
2640 (target_supports_btrace): Update.
2641
2642 2014-02-14 Yao Qi <yao@codesourcery.com>
2643
2644 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2645 (rsp-low-ipa.o): New target.
2646
2647 2014-02-12 Tom Tromey <tromey@redhat.com>
2648
2649 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2650 convert_ascii_to_int.
2651 * regcache.c (registers_to_string): Likewise.
2652 * remote-utils.c (decode_M_packet): Likewise.
2653 * server.c (process_serial_event): Likewise.
2654
2655 2014-02-12 Tom Tromey <tromey@redhat.com>
2656
2657 * server.c (handle_query, handle_v_run): Use hex2bin, not
2658 unhexify.
2659 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2660
2661 2014-02-12 Tom Tromey <tromey@redhat.com>
2662
2663 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2664 convert_int_to_ascii.
2665 * regcache.c (registers_to_string, collect_register_as_string):
2666 Likewise.
2667 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2668 Likewise.
2669 * server.c (process_serial_event): Likewise.
2670 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2671 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2672
2673 2014-02-12 Tom Tromey <tromey@redhat.com>
2674
2675 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2676 bin2hex, not hexify.
2677 * tracepoint.c (cmd_qtstatus): Likewise.
2678
2679 2014-02-12 Tom Tromey <tromey@redhat.com>
2680
2681 * remote-utils.c (monitor_output): Pass explicit length to
2682 hexify.
2683
2684 2014-02-12 Tom Tromey <tromey@redhat.com>
2685
2686 * tracepoint.c: Include rsp-low.h.
2687 * server.c: Include rsp-low.h.
2688 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2689 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2690 declare.
2691 * remote-utils.c: Include rsp-low.h.
2692 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2693 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2694 (convert_int_to_ascii, convert_ascii_to_int): Move to
2695 common/rsp-low.c.
2696 * regcache.c: Include rsp-low.h.
2697 * ax.c: Include rsp-low.h.
2698 * Makefile.in (SFILES): Add common/rsp-low.c.
2699 (OBS): Add rsp-low.o.
2700 (rsp-low.o): New target.
2701
2702 2014-02-12 Tom Tromey <tromey@redhat.com>
2703
2704 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2705 Include print-utils.h.
2706 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2707 (plongest, thirty_two, phex_nz): Remove.
2708 * Makefile.in (SFILES): Add common/print-utils.c.
2709 (OBS): Add print-utils.o.
2710 (print-utils-ipa.o): New target.
2711 (print-utils.o): New target.
2712 (IPA_OBJS): Add print-utils-ipa.o.
2713
2714 2014-02-06 Tom Tromey <tromey@redhat.com>
2715
2716 * Makefile.in (SFILES): Fix indentation.
2717
2718 2014-02-05 Doug Evans <dje@google.com>
2719
2720 * linux-low.c (linux_wait_for_event): Improve comment.
2721 (linux_wait_1): Keep current_inferior in sync with event_child.
2722
2723 2014-01-22 Doug Evans <dje@google.com>
2724
2725 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2726
2727 2014-01-22 Doug Evans <dje@google.com>
2728
2729 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2730 * configure: Regenerate.
2731 * config.in: Regenerate.
2732 * Makefile.in (SFILES): Add debug.c.
2733 (OBS): Add debug.o.
2734 * debug.c: New file.
2735 * debug.h: New file.
2736 * linux-aarch64-low.c (*): Update all debugging printfs to use
2737 debug_printf instead of fprintf.
2738 * linux-arm-low.c (*): Ditto.
2739 * linux-cris-low.c (*): Ditto.
2740 * linux-crisv32-low.c (*): Ditto.
2741 * linux-m32r-low.c (*): Ditto.
2742 * linux-sparc-low.c (*): Ditto.
2743 * linux-x86.c (*): Ditto.
2744 * linux-low.c (*): Ditto.
2745 (linux_wait_1): Add calls to debug_enter, debug_exit.
2746 (linux_wait): Remove redundant debugging printf.
2747 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2748 (linux_resume, unstop_all_lwps): Ditto.
2749 * mem-break.c (*): Update all debugging printfs to use
2750 debug_printf instead of fprintf.
2751 * remote-utils.c (*): Ditto.
2752 * thread-db.c (*): Ditto.
2753 * server.c #include <ctype.h>, "gdb_vecs.h".
2754 (debug_threads): Moved to debug.c.
2755 (*): Update all debugging printfs to use debug_printf instead of
2756 fprintf.
2757 (start_inferior): Replace call to fflush with call to debug_flush.
2758 (monitor_show_help): Mention set debug-format.
2759 (parse_debug_format_options): New function.
2760 (handle_monitor_command): Handle "monitor set debug-format".
2761 (gdbserver_usage): Mention --debug-format.
2762 (main): Parse --debug-format.
2763 * server.h (debug_threads): Declaration moved to debug.h.
2764 #include "debug.h".
2765 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2766 trace_debug_1 that uses debug_printf.
2767 (tracepoint_look_up_symbols): Update all debugging printfs to use
2768 debug_printf instead of fprintf.
2769
2770 2014-01-20 Baruch Siach <baruch@tkos.co.il>
2771
2772 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2773 sys/ptrace.h.
2774
2775 2014-01-17 Pedro Alves <palves@redhat.com>
2776
2777 PR build/16445
2778 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2779 defined after including gdb_proc_service.h.
2780
2781 2014-01-16 Doug Evans <dje@google.com>
2782
2783 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2784 (match_dll): Use it.
2785
2786 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2787
2788 * target.h (target_ops) <read_btrace>: Change parameters and
2789 return type to allow error reporting.
2790 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2791 trace reading errors on.
2792 * linux-low.c (linux_low_read_btrace): Pass trace reading
2793 errors on.
2794 (linux_low_disable_btrace): New.
2795
2796 2014-01-15 Doug Evans <dje@google.com>
2797
2798 * inferiors.c (thread_id_to_gdb_id): Delete.
2799 * inferiors.h (thread_id_to_gdb_id): Delete.
2800
2801 2014-01-13 Eli Zaretskii <eliz@gnu.org>
2802
2803 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2804 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2805 versions.
2806
2807 2014-01-08 Pedro Alves <palves@redhat.com>
2808
2809 * server.c (handle_status): Don't discard previous queued stop
2810 replies or thread's pending status here.
2811 (main) <disconnection>: Do it here instead.
2812
2813 2014-01-08 Pedro Alves <palves@redhat.com>
2814
2815 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2816 * server.c (visit_actioned_threads, handle_pending_status): New
2817 function.
2818 (handle_v_cont): Factor out parts to ...
2819 (resume): ... this new function. If in all-stop, and a thread
2820 being resumed has a pending status, report it without actually
2821 resuming.
2822 (myresume): Adjust to use the new 'resume' function.
2823 (clear_pending_status_callback, set_pending_status_callback)
2824 (find_status_pending_thread_callback): New functions.
2825 (handle_status): Handle the case of multiple threads having
2826 interesting statuses to report. Report threads' real last signal
2827 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2828 with an interesting thread to report the status for, instead of
2829 always reporting the status of the first thread.
2830
2831 2014-01-01 Joel Brobecker <brobecker@adacore.com>
2832
2833 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2834 * gdbreplay.c (gdbreplay_version): Likewise.
2835
2836 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2837
2838 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2839 iov.iov_len with the real length in use.
2840
2841 2013-12-13 Joel Brobecker <brobecker@adacore.com>
2842
2843 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2844 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2845 for all targets that use win32-low.c.
2846 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2847 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2848
2849 2013-12-13 Pedro Alves <palves@redhat.com>
2850
2851 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2852 if equal to TARGET_WAITKIND_LOADED.
2853 * win32-low.c (cached_status): New static global.
2854 (win32_wait): Add declaration.
2855 (do_initial_child_stuff): Flush all initial pending debug events
2856 up to the initial breakpoint.
2857 (win32_wait): If CACHED_STATUS was set, return that instead
2858 of doing a real wait. Remove the code resuming the execution
2859 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2860 during the initial phase. Also remove the code changing
2861 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2862 TARGET_WAITKIND_STOPPED.
2863
2864 2013-12-11 Yao Qi <yao@codesourcery.com>
2865
2866 * notif.c (handle_notif_ack): Return 0 if no notification
2867 matches.
2868
2869 2013-11-20 Doug Evans <dje@google.com>
2870
2871 * linux-low.c (linux_set_resume_request): Fix comment.
2872
2873 2013-11-20 Doug Evans <dje@google.com>
2874
2875 * linux-low.c (resume_status_pending_p): Tweak comment.
2876
2877 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2878
2879 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2880 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2881 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2882 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2883 (srv_amd64_regobj): Add amd64-mpx.o.
2884 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2885 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2886 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2887 * i387-fp.c (num_pl_bnd_register) Added constant.
2888 (num_pl_bnd_cfg_registers) Added constant.
2889 (struct i387_xsave) Added reserved area and MPX fields.
2890 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2891 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2892 function.
2893 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2894 (init_registers_amd64_mpx_linux): Declare new function.
2895 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2896 (x86_64_regmap): Add MPX registers.
2897 (x86_linux_read_description): Add MPX case.
2898 (initialize_low_arch): Initialize MPX targets.
2899
2900 2013-11-18 Tom Tromey <tromey@redhat.com>
2901
2902 * configure: Rebuild.
2903 * configure.ac: Don't check for stdlib.h.
2904 * gdbreplay.c: Unconditionally include stdlib.h.
2905
2906 2013-11-18 Tom Tromey <tromey@redhat.com>
2907
2908 * config.in: Rebuild.
2909 * configure: Rebuild.
2910 * configure.ac: Don't use AC_HEADER_DIRENT.
2911
2912 2013-11-18 Tom Tromey <tromey@redhat.com>
2913
2914 * server.h: Don't check HAVE_STRING_H.
2915 * gdbreplay.c: Don't check HAVE_STRING_H.
2916 * configure: Rebuild.
2917
2918 2013-11-18 Tom Tromey <tromey@redhat.com>
2919
2920 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2921 LIBGNU.
2922
2923 2013-11-08 Tom Tromey <tromey@redhat.com>
2924
2925 * configure, config.in: Rebuild.
2926 * configure.ac: Remove unused configury.
2927
2928 2013-11-08 Tom Tromey <tromey@redhat.com>
2929
2930 * acinclude.m4: Include common.m4, codeset.m4.
2931 * configure, config.in: Rebuild.
2932 * configure.ac: Use GDB_AC_COMMON.
2933
2934 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2935
2936 * linux-s390-low.c (HWCAP_S390_TE): New define.
2937 (s390_arch_setup): Consider the TE field in the HWCAP for
2938 determining 'have_regset_tdb'.
2939
2940 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2941
2942 PR gdb/16014
2943 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2944 call to sizeof.
2945
2946 2013-10-02 Pedro Alves <palves@redhat.com>
2947
2948 * server.c (process_serial_event): Don't output "GDBserver
2949 exiting" if GDB is connected through stdio.
2950 * target.c (mywait): Likewise, be silent if GDB is connected
2951 through stdio.
2952
2953 2013-10-01 Joel Brobecker <brobecker@adacore.com>
2954
2955 * lynx-low.c (lynx_add_threads_after_attach): New function.
2956 (lynx_attach): Remove call to add_thread. Add call to
2957 lynx_add_threads_after_attach instead.
2958
2959 2013-09-28 Mike Frysinger <vapier@gentoo.org>
2960
2961 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2962 * config.in, configure: Regenerated.
2963
2964 2013-09-18 Yao Qi <yao@codesourcery.com>
2965
2966 PR server/15959
2967 * server.c (start_inferior): Clear 'resume_info'.
2968
2969 2013-09-16 Jiong Wang <jiwang@tilera.com>
2970
2971 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2972 for each register.
2973
2974 2013-09-16 Jiong Wang <jiwang@tilera.com>
2975
2976 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2977 linux-tile-low.o to srv_tgtobj.
2978
2979 2013-09-16 Will Newton <will.newton@linaro.org>
2980
2981 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2982 out regs.
2983
2984 2013-09-06 Pedro Alves <palves@redhat.com>
2985
2986 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2987 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2988 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2989 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2990 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2991 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2992
2993 2013-09-06 Pedro Alves <palves@redhat.com>
2994
2995 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2996 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2997
2998 2013-09-06 Pedro Alves <palves@redhat.com>
2999
3000 * linux-amd64-ipa.c: Include tracepoint.h.
3001 * linux-i386-ipa.c: Include tracepoint.h.
3002
3003 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3004
3005 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3006 (ps_get_thread_area): New function.
3007
3008 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3009
3010 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3011 (initialize_low_arch): Call init_registers_crisv32 rather than
3012 init_register_crisv32.
3013
3014 2013-09-05 Pedro Alves <palves@redhat.com>
3015
3016 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3017 to ...
3018 * hostio.h: ... this new file.
3019 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3020 win32-low.c: Include hostio.h.
3021
3022 2013-09-05 Pedro Alves <palves@redhat.com>
3023
3024 * server.h (gdb_client_data, handler_func, callback_handler_func)
3025 (delete_file_handler, add_file_handler, append_callback_event)
3026 (delete_callback_event, start_event_loop, initialize_event_loop):
3027 Move to event-loop.h and include it.
3028 * event-loop.h: New file.
3029
3030 2013-09-05 Pedro Alves <palves@redhat.com>
3031
3032 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3033 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3034 (loaded_dll, unloaded_dll): Move to ...
3035 * dll.h: ... this new file.
3036 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3037
3038 2013-09-05 Pedro Alves <palves@redhat.com>
3039
3040 * server.h (current_process, get_thread_process, all_processes)
3041 (add_inferior_to_list, for_each_inferior, current_inferior)
3042 (remove_inferior, add_process, remove_process, find_process_pid)
3043 (have_started_inferiors_p, have_attached_inferiors_p)
3044 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3045 (clear_inferiors, find_inferior, find_inferior_id)
3046 (inferior_target_data, set_inferior_target_data)
3047 (inferior_regcache_data, set_inferior_regcache_data): Move to
3048 inferiors.h, and include it.
3049 * inferiors.h: New file.
3050
3051 2013-09-05 Pedro Alves <palves@redhat.com>
3052
3053 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3054 Move ...
3055 * ax.h: ... here.
3056
3057 2013-09-05 Pedro Alves <palves@redhat.com>
3058
3059 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3060 tracepoint.h.
3061 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3062 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3063 (handle_tracepoint_general_set, handle_tracepoint_query)
3064 (tracepoint_finished_step, tracepoint_was_hit)
3065 (release_while_stepping_state_list, current_traceframe)
3066 (in_readonly_region, traceframe_read_mem)
3067 (fetch_traceframe_registers, traceframe_read_sdata)
3068 (traceframe_read_info, struct fast_tpoint_collect_status)
3069 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3070 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3071 (supply_fast_tracepoint_registers)
3072 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3073 (ipa_tdesc, claim_trampoline_space)
3074 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3075 (agent_mem_read, agent_get_trace_state_variable_value)
3076 (agent_set_trace_state_variable_value, agent_tsv_read)
3077 (agent_mem_read_string, get_raw_reg_func_addr)
3078 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3079 * tracepoint.h: ... this new file.
3080
3081 2013-09-05 Pedro Alves <palves@redhat.com>
3082
3083 * server.h (perror_with_name, error, fatal, warning, paddress)
3084 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3085 include it.
3086 * utils.h: New file.
3087
3088 2013-09-05 Pedro Alves <palves@redhat.com>
3089
3090 * server.h (remote_debug, noack_mode, transport_is_reliable)
3091 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3092 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3093 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3094 (write_enn, initialize_async_io, enable_async_io)
3095 (disable_async_io, check_remote_input_interrupt_request)
3096 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3097 (dead_thread_notify, prepare_resume_reply)
3098 (decode_address_to_semicolon, decode_address, decode_m_packet)
3099 (decode_M_packet, decode_X_packet, decode_xfer_write)
3100 (decode_search_memory_packet, unhexify, hexify)
3101 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3102 (look_up_one_symbol, relocate_instruction)
3103 (monitor_output): Move to remote-utils.h, and include it.
3104 * remote-utils.h: New file.
3105
3106 2013-09-05 Pedro Alves <palves@redhat.com>
3107
3108 * server.h (_): Delete.
3109
3110 2013-09-02 Pedro Alves <palves@redhat.com>
3111
3112 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3113 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3114 allocated.
3115 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3116
3117 2013-09-02 Pierre Muller <muller@sourceware.org>
3118
3119 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3120 or WriteProcessMemory complete successfully and handle
3121 ERROR_PARTIAL_COPY error.
3122
3123 2013-09-02 Pedro Alves <palves@redhat.com>
3124
3125 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3126 error instead of EIO.
3127
3128 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3129
3130 PR server/15604
3131 * linux-low.c: Include filestuff.h.
3132 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3133 * lynx-low.c: Include filestuff.h.
3134 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3135 * server.c: Include filestuff.h.
3136 (main): Call notice_open_fds.
3137 * spu-low.c: Include filestuff.h.
3138 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3139
3140 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
3141
3142 * Makefile.in: Explain why ../target and ../nat are not
3143 listed as include file search paths.
3144 (linux-waitpid.o): New object file rule.
3145 * configure.srv (srv_native_linux_obj): New variable.
3146 Replace all occurrences of linux native object files with
3147 $srv_native_linux_obj.
3148 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3149 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3150 (linux_enable_event_reporting): Remove declaration.
3151 (my_waitpid): Moved to common/linux-waitpid.c.
3152 (linux_wait_for_event): Pass ptid when calling
3153 linux_enable_event_reporting.
3154 (linux_supports_tracefork_flag): Remove.
3155 (linux_enable_event_reporting): Likewise.
3156 (linux_tracefork_grandchild): Remove.
3157 (STACK_SIZE): Moved to common/linux-ptrace.c.
3158 (linux_tracefork_child): Remove.
3159 (linux_test_for_tracefork): Remove.
3160 (linux_look_up_symbols): Call linux_supports_traceclone.
3161 (initialize_low): Remove call to linux_test_for_tracefork.
3162 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3163 common/linux-ptrace.h.
3164 (PTRACE_TYPE_ARG4): Likewise.
3165 Include linux-ptrace.h.
3166
3167 2013-08-21 Pedro Alves <palves@redhat.com>
3168
3169 * config.in: Renegerate.
3170
3171 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
3172
3173 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3174 (SFILES): Remove $(srcdir)/common/target-common.c and
3175 add $(srcdir)/target/waitstatus.c.
3176 (OBS): Remove target-common.o and add waitstatus.o.
3177 (server_h): Remove $(srcdir)/../common/target-common.h and
3178 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3179 and $(srcdir)/../target/waitstatus.h.
3180 (target-common.o): Remove.
3181 (waitstatus.o): New target object file.
3182 * target.h: Do not include target-common.h and
3183 include target/resume.h, target/wait.h and
3184 target/waitstatus.h.
3185
3186 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
3187
3188 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3189 to PTRACE_TYPE_ARG3.
3190 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3191 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3192 PTRACE_TYPE_ARG4.
3193 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3194 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3195
3196 2013-07-27 Jie Zhang <jie@codesourcery.com>
3197 Daniel Jacobowitz <dan@codesourcery.com>
3198 Yao Qi <yao@codesourcery.com>
3199
3200 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3201 (mips-linux-watch.o): New rule.
3202 (mips_linux_watch_h): New variable.
3203 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3204 srv_tgtobj.
3205 * linux-mips-low.c: Include mips-linux-watch.h.
3206 (struct arch_process_info, struct arch_lwp_info): New.
3207 (update_watch_registers_callback): New function.
3208 (mips_linux_new_process, mips_linux_new_thread) New functions.
3209 (mips_linux_prepare_to_resume, mips_insert_point): New
3210 functions.
3211 (mips_remove_point, mips_stopped_by_watchpoint): New
3212 functions.
3213 (rsp_bp_type_to_target_hw_bp_type): New function.
3214 (mips_stopped_data_address): New function.
3215 (the_low_target): Add watchpoint support functions.
3216
3217 2013-07-27 Yao Qi <yao@codesourcery.com>
3218
3219 * i386-low.c: Include break-common.h.
3220 (enum target_hw_bp_type): Remove.
3221
3222 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
3223
3224 * Makefile.in (SFILES): /common/target-common.c.
3225 (OBS): Add target-common.o.
3226 (server_h): Add $(srcdir)/../common/target-common.h.
3227 (target-common.o): New target.
3228 * server.c (queue_stop_reply_callback): Free
3229 status string after use.
3230 * target.c (target_waitstatus_to_string): Remove.
3231 * target.h: Include target-common.h.
3232 (resume_kind): Likewise.
3233 (target_waitkind): Likewise.
3234 (target_waitstatus): Likewise.
3235 (TARGET_WNOHANG): Likewise.
3236
3237 2013-07-04 Yao Qi <yao@codesourcery.com>
3238
3239 * Makefile.in (host_alias): Use @host_noncanonical@.
3240 (target_alias): Use @target_noncanonical@.
3241 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3242 ACX_NONCANONICAL_HOST.
3243 * configure: Regenerated.
3244
3245 Revert:
3246 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3247
3248 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3249 * configure: Rebuild.
3250 * Makefile.in (version_host, version_target): Get from configure.
3251 (version.c): Use $(version_host) and $(version_target).
3252
3253 2013-07-03 Pedro Alves <palves@redhat.com>
3254
3255 * Makefile.in (config.status): Depend on development.sh.
3256 * acinclude.m4: Include libmcheck.m4.
3257 * configure: Regenerate.
3258
3259 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3260
3261 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3262 attribute inside the parentheses.
3263 (winapi_DebugSetProcessKillOnExit): Ditto.
3264 (winapi_DebugBreakProcess): Ditto.
3265 (winapi_GenerateConsoleCtrlEvent): Ditto.
3266
3267 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3268
3269 * notif.h (notif_event): Add a dummy member to avoid compiler
3270 errors.
3271
3272 2013-07-01 Pedro Alves <palves@redhat.com>
3273
3274 * hostio.c (HOSTIO_PATH_MAX): Define.
3275 (require_filename, handle_open, handle_unlink, handle_readlink):
3276 Use it.
3277
3278 2013-07-01 Pedro Alves <palves@redhat.com>
3279
3280 * server.h: Include "pathmax.h".
3281 * linux-low.c: Don't include sys/param.h.
3282 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3283 MAXPATHLEN.
3284 * win32-low.c: Don't include sys/param.h.
3285 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3286
3287 2013-07-01 Pedro Alves <palves@redhat.com>
3288
3289 * event-loop.c: Don't check HAVE_UNISTD_H before including
3290 <unistd.h>.
3291 * gdbreplay.c: Likewise.
3292 * remote-utils.c: Likewise.
3293 * server.c: Likewise.
3294 * configure.ac: Don't check for unistd.h.
3295 * configure: Regenerate.
3296
3297 2013-06-28 Tom Tromey <tromey@redhat.com>
3298
3299 * Makefile.in (version.c): Use version.in, not
3300 common/version.in.
3301
3302 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3303
3304 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3305 * configure: Rebuild.
3306 * Makefile.in (version_host, version_target): Get from configure.
3307 (version.c): Use $(version_host) and $(version_target).
3308
3309 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3310
3311 Fix trace-status to output user name without trailing colon.
3312 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3313
3314 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3315
3316 Fix trace-status to output proper start-time and stop-time.
3317 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3318 output start time and stop time in hex as gdb expects.
3319
3320 2013-06-26 Pedro Alves <pedro@codesourcery.com>
3321
3322 * tracepoint.c (build_traceframe_info_xml): Output trace state
3323 variables present in the trace buffer.
3324
3325 2013-06-24 Tom Tromey <tromey@redhat.com>
3326
3327 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3328 create-version.sh.
3329 (version.o): Remove.
3330 * gdbreplay.c: Include version.h.
3331 (version, host_name): Don't declare.
3332 * server.h: Include version.h.
3333 (version, host_name): Don't declare.
3334
3335 2013-06-12 Pedro Alves <palves@redhat.com>
3336
3337 * linux-x86-low.c (linux_is_elf64): Delete global.
3338 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3339 with local linux_pid_exe_is_elf_64_file use.
3340
3341 2013-06-11 Pedro Alves <palves@redhat.com>
3342
3343 * linux-low.c (regset_disabled, disable_regset): New functions.
3344 (regsets_fetch_inferior_registers)
3345 (regsets_store_inferior_registers): Use them.
3346 (initialize_regsets_info); Don't allocate the disabled_regsets
3347 array here.
3348 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3349 comment.
3350
3351 2013-06-11 Pedro Alves <palves@redhat.com>
3352
3353 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3354 xmalloc.
3355
3356 2013-06-11 Pedro Alves <palves@redhat.com>
3357
3358 * linux-x86-low.c (initialize_low_arch): Call
3359 init_registers_x32_avx_linux.
3360
3361 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3362
3363 Fix compatibility with Android Bionic.
3364 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3365 it is not empty.
3366
3367 2013-06-07 Pedro Alves <palves@redhat.com>
3368
3369 PR server/14823
3370 * Makefile.in (OBS): Add tdesc.o.
3371 (IPA_OBJS): Add tdesc-ipa.o.
3372 (tdesc-ipa.o): New rule.
3373 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3374 interface.
3375 * linux-low.c (new_inferior): Delete.
3376 (disabled_regsets, num_regsets): Delete.
3377 (linux_add_process): Adjust to set the new per-process
3378 new_inferior flag.
3379 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3380 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3381 was a stop. When calling arch_setup, switch the current inferior
3382 to the thread that got an event.
3383 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3384 (regsets_fetch_inferior_registers)
3385 (regsets_store_inferior_registers): New regsets_info parameter.
3386 Adjust to use it.
3387 (linux_register_in_regsets): New regs_info parameter. Adjust to
3388 use it.
3389 (register_addr, fetch_register, store_register): New usrregs_info
3390 parameter. Adjust to use it.
3391 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3392 parameter regs_info. Adjust to use it.
3393 (linux_fetch_registers): Get the current inferior's regs_info, and
3394 adjust to use it.
3395 (linux_store_registers): Ditto.
3396 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3397 (initialize_low): Don't initialize the target_regsets here. Call
3398 initialize_low_arch.
3399 * linux-low.h (target_regsets): Delete declaration.
3400 (struct regsets_info): New.
3401 (struct usrregs_info): New.
3402 (struct regs_info): New.
3403 (struct process_info_private) <new_inferior>: New field.
3404 (struct linux_target_ops): Delete the num_regs, regmap, and
3405 regset_bitmap fields. New field regs_info.
3406 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3407 * i387-fp.c (num_xmm_registers): Delete.
3408 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3409 calls to new interface.
3410 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3411 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3412 Infer the number of xmm registers from the regcache's target
3413 description.
3414 * i387-fp.h (num_xmm_registers): Delete.
3415 * inferiors.c (add_thread): Don't install the thread's regcache
3416 here.
3417 * proc-service.c (gregset_info): Fetch the current inferior's
3418 regs_info. Adjust to use it.
3419 * regcache.c: Include tdesc.h.
3420 (register_bytes, reg_defs, num_registers)
3421 (gdbserver_expedite_regs): Delete.
3422 (get_thread_regcache): If the thread doesn't have a regcache yet,
3423 create one, instead of aborting gdbserver.
3424 (regcache_invalidate_one): Rename to ...
3425 (regcache_invalidate_thread): ... this.
3426 (regcache_invalidate_one): New.
3427 (regcache_invalidate): Only invalidate registers of the current
3428 process.
3429 (init_register_cache): Add target_desc parameter, and use it.
3430 (new_register_cache): Ditto. Assert the target description has a
3431 non zero registers_size.
3432 (regcache_cpy): Add assertions. Adjust.
3433 (realloc_register_cache, set_register_cache): Delete.
3434 (registers_to_string, registers_from_string): Adjust.
3435 (find_register_by_name, find_regno, find_register_by_number)
3436 (register_cache_size): Add target_desc parameter, and use it.
3437 (free_register_cache_thread, free_register_cache_thread_one)
3438 (regcache_release, register_cache_size): New.
3439 (register_size): Add target_desc parameter, and use it.
3440 (register_data, supply_register, supply_register_zeroed)
3441 (supply_regblock, supply_register_by_name, collect_register)
3442 (collect_register_as_string, collect_register_by_name): Adjust.
3443 * regcache.h (struct target_desc): Forward declare.
3444 (struct regcache) <tdesc>: New field.
3445 (init_register_cache, new_register_cache): Add target_desc
3446 parameter.
3447 (regcache_invalidate_thread): Declare.
3448 (regcache_invalidate_one): Delete declaration.
3449 (regcache_release): Declare.
3450 (find_register_by_number, register_cache_size, register_size)
3451 (find_regno): Add target_desc parameter.
3452 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3453 declarations.
3454 * remote-utils.c: Include tdesc.h.
3455 (outreg, prepare_resume_reply): Adjust.
3456 * server.c: Include tdesc.h.
3457 (gdbserver_xmltarget): Delete declaration.
3458 (get_features_xml, process_serial_event): Adjust.
3459 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3460 declare.
3461 (struct process_info) <tdesc>: New field.
3462 (ipa_tdesc): Declare.
3463 * tdesc.c: New file.
3464 * tdesc.h: New file.
3465 * tracepoint.c: Include tdesc.h.
3466 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3467 (get_context_regcache): Adjust to pass ipa_tdesc down.
3468 (do_action_at_tracepoint): Adjust to get the register cache size
3469 from the context regcache's description.
3470 (traceframe_walk_blocks): Adjust to get the register cache size
3471 from the current trace frame's description.
3472 (traceframe_get_pc): Adjust to get current trace frame's
3473 description and pass it down.
3474 (gdb_collect): Adjust to get the register cache size from the
3475 IPA's description.
3476 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3477 (gdbserver_xmltarget): Delete.
3478 (initialize_low_tracepoint): Set the ipa's target description.
3479 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3480 (initialize_low_tracepoint): Set the ipa's target description.
3481 * linux-x86-low.c: Include tdesc.h.
3482 [__x86_64__] (is_64bit_tdesc): New.
3483 (ps_get_thread_area, x86_get_thread_area): Use it.
3484 (i386_cannot_store_register): Rename to ...
3485 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3486 (i386_cannot_fetch_register): Rename to ...
3487 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3488 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3489 to new interface.
3490 (target_regsets): Rename to ...
3491 (x86_regsets): ... this.
3492 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3493 interface.
3494 (x86_siginfo_fixup): Use is_64bit_tdesc.
3495 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3496 (tdesc_x32_avx_linux, tdesc_x32_linux)
3497 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3498 Declare.
3499 (x86_linux_update_xmltarget): Delete.
3500 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3501 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3502 (AMD64_LINUX_USER64_CS): New.
3503 (x86_linux_read_description): New, based on
3504 x86_linux_update_xmltarget.
3505 (same_process_callback): New.
3506 (x86_arch_setup_process_callback): New.
3507 (x86_linux_update_xmltarget): New.
3508 (x86_regsets_info): New.
3509 (amd64_linux_regs_info): New.
3510 (i386_linux_usrregs_info): New.
3511 (i386_linux_regs_info): New.
3512 (x86_linux_regs_info): New.
3513 (x86_arch_setup): Reimplement.
3514 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3515 (x86_emit_ops): Ditto.
3516 (the_low_target): Adjust. Install x86_linux_regs_info,
3517 x86_cannot_fetch_register, and x86_cannot_store_register.
3518 (initialize_low_arch): New.
3519 * linux-ia64-low.c (tdesc_ia64): Declare.
3520 (ia64_fetch_register): Adjust.
3521 (ia64_usrregs_info, regs_info): New globals.
3522 (ia64_regs_info): New function.
3523 (the_low_target): Adjust.
3524 (initialize_low_arch): New function.
3525 * linux-sparc-low.c (tdesc_sparc64): Declare.
3526 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3527 Adjust.
3528 (sparc_arch_setup): New function.
3529 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3530 (the_low_target): Adjust.
3531 (initialize_low_arch): New function.
3532 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3533 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3534 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3535 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3536 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3537 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3538 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3539 (tdesc_powerpc_isa205_vsx64l): Declare.
3540 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3541 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3542 (ppc_set_pc, ppc_get_hwcap): Adjust.
3543 (ppc_usrregs_info): Forward declare.
3544 (!__powerpc64__) ppc_regmap_adjusted: New global.
3545 (ppc_arch_setup): Adjust to the current process'es target
3546 description.
3547 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3548 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3549 (ppc_store_evrregset): Adjust.
3550 (target_regsets): Rename to ...
3551 (ppc_regsets): ... this, and make static.
3552 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3553 (ppc_regs_info): New function.
3554 (the_low_target): Adjust.
3555 (initialize_low_arch): New function.
3556 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3557 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3558 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3559 (tdesc_s390x_linux64v2): Declare.
3560 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3561 (s390_fill_gregset, s390_store_last_break): Adjust.
3562 (target_regsets): Rename to ...
3563 (s390_regsets): ... this, and make static.
3564 (s390_get_pc, s390_set_pc): Adjust.
3565 (s390_get_hwcap): New target_desc parameter, and use it.
3566 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3567 (s390_arch_setup): Adjust to set the current process'es target
3568 description. Don't adjust the regmap.
3569 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3570 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3571 (regs_info_3264): New globals.
3572 (s390_regs_info): New function.
3573 (the_low_target): Adjust.
3574 (initialize_low_arch): New function.
3575 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3576 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3577 [__mips64] (init_registers_mips_linux)
3578 (init_registers_mips_dsp_linux): Delete defines.
3579 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3580 (have_dsp): New global.
3581 (mips_read_description): New, based on mips_arch_setup.
3582 (mips_arch_setup): Reimplement.
3583 (get_usrregs_info): New function.
3584 (mips_cannot_fetch_register, mips_cannot_store_register)
3585 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3586 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3587 (target_regsets): Rename to ...
3588 (mips_regsets): ... this, and make static.
3589 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3590 (dsp_regs_info, regs_info): New globals.
3591 (mips_regs_info): New function.
3592 (the_low_target): Adjust.
3593 (initialize_low_arch): New function.
3594 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3595 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3596 Declare.
3597 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3598 (arm_read_description): New, with bits factored from
3599 arm_arch_setup.
3600 (arm_arch_setup): Reimplement.
3601 (target_regsets): Rename to ...
3602 (arm_regsets): ... this, and make static.
3603 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3604 (arm_regs_info): New function.
3605 (the_low_target): Adjust.
3606 (initialize_low_arch): New function.
3607 * linux-m68k-low.c (tdesc_m68k): Declare.
3608 (target_regsets): Rename to ...
3609 (m68k_regsets): ... this, and make static.
3610 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3611 (m68k_regs_info): New function.
3612 (m68k_arch_setup): New function.
3613 (the_low_target): Adjust.
3614 (initialize_low_arch): New function.
3615 * linux-sh-low.c (tdesc_sharch): Declare.
3616 (target_regsets): Rename to ...
3617 (sh_regsets): ... this, and make static.
3618 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3619 (sh_regs_info, sh_arch_setup): New functions.
3620 (the_low_target): Adjust.
3621 (initialize_low_arch): New function.
3622 * linux-bfin-low.c (tdesc_bfin): Declare.
3623 (bfin_arch_setup): New function.
3624 (bfin_usrregs_info, regs_info): New globals.
3625 (bfin_regs_info): New function.
3626 (the_low_target): Adjust.
3627 (initialize_low_arch): New function.
3628 * linux-cris-low.c (tdesc_cris): Declare.
3629 (cris_arch_setup): New function.
3630 (cris_usrregs_info, regs_info): New globals.
3631 (cris_regs_info): New function.
3632 (the_low_target): Adjust.
3633 (initialize_low_arch): New function.
3634 * linux-cris-low.c (tdesc_crisv32): Declare.
3635 (cris_arch_setup): New function.
3636 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3637 (cris_regs_info): New function.
3638 (the_low_target): Adjust.
3639 (initialize_low_arch): New function.
3640 * linux-m32r-low.c (tdesc_m32r): Declare.
3641 (m32r_arch_setup): New function.
3642 (m32r_usrregs_info, regs_info): New globals.
3643 (m32r_regs_info): Adjust.
3644 (initialize_low_arch): New function.
3645 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3646 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3647 (tic6x_usrregs_info): Forward declare.
3648 (tic6x_read_description): New function, based on ...
3649 (tic6x_arch_setup): ... this. Reimplement.
3650 (target_regsets): Rename to ...
3651 (tic6x_regsets): ... this, and make static.
3652 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3653 (tic6x_regs_info): New function.
3654 (the_low_target): Adjust.
3655 (initialize_low_arch): New function.
3656 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3657 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3658 (target_regsets): Rename to ...
3659 (xtensa_regsets): ... this, and make static.
3660 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3661 globals.
3662 (xtensa_arch_setup, xtensa_regs_info): New functions.
3663 (the_low_target): Adjust.
3664 (initialize_low_arch): New function.
3665 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3666 (nios2_arch_setup): Set the current process'es tdesc.
3667 (target_regsets): Rename to ...
3668 (nios2_regsets): ... this.
3669 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3670 (nios2_regs_info): New function.
3671 (the_low_target): Adjust.
3672 (initialize_low_arch): New function.
3673 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3674 (aarch64_arch_setup): Set the current process'es tdesc.
3675 (target_regsets): Rename to ...
3676 (aarch64_regsets): ... this.
3677 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3678 (aarch64_regs_info): New function.
3679 (the_low_target): Adjust.
3680 (initialize_low_arch): New function.
3681 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3682 globals.
3683 (target_regsets): Rename to ...
3684 (tile_regsets): ... this.
3685 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3686 (tile_regs_info): New function.
3687 (tile_arch_setup): Set the current process'es tdesc.
3688 (the_low_target): Adjust.
3689 (initialize_low_arch): New function.
3690 * spu-low.c (tdesc_spu): Declare.
3691 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3692 * win32-arm-low.c (tdesc_arm): Declare.
3693 (arm_arch_setup): New function.
3694 (the_low_target): Install arm_arch_setup instead of
3695 init_registers_arm.
3696 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3697 (init_windows_x86): Rename to ...
3698 (i386_arch_setup): ... this. Set `win32_tdesc'.
3699 (the_low_target): Adjust.
3700 * win32-low.c (win32_tdesc): New global.
3701 (child_add_thread): Don't create the thread cache here.
3702 (do_initial_child_stuff): Set the new process'es tdesc.
3703 * win32-low.h (struct target_desc): Forward declare.
3704 (win32_tdesc): Declare.
3705 * lynx-i386-low.c (tdesc_i386): Declare global.
3706 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3707 * lynx-low.c (lynx_tdesc): New global.
3708 (lynx_add_process): Set the new process'es tdesc.
3709 * lynx-low.h (struct target_desc): Forward declare.
3710 (lynx_tdesc): Declare global.
3711 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3712 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3713 * nto-low.c (nto_tdesc): New global.
3714 (do_attach): Set the new process'es tdesc.
3715 * nto-low.h (struct target_desc): Forward declare.
3716 (nto_tdesc): Declare.
3717 * nto-x86-low.c (tdesc_i386): Declare.
3718 (nto_x86_arch_setup): Set `nto_tdesc'.
3719
3720 2013-06-04 Gary Benson <gbenson@redhat.com>
3721
3722 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3723 to qSupported response when appropriate.
3724 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3725 with nonzero-length annex.
3726 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3727 arguments supplied in annex.
3728
3729 2013-05-31 Doug Evans <dje@google.com>
3730
3731 PR server/15594
3732 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3733 64 bits in 64-cross-32 environment.
3734
3735 2013-05-28 Pedro Alves <palves@redhat.com>
3736
3737 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3738 (aarch64-without-fpu.c): Delete rule.
3739 * configure.srv (aarch64*-*-linux*): Remove references to
3740 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3741 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3742 declaration.
3743
3744 2013-05-24 Pedro Alves <palves@redhat.com>
3745
3746 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3747 instead of strchr/decode_address. Error if the range isn't split
3748 with a ','. Don't assume there's be a ':' in the action.
3749
3750 2013-05-23 Yao Qi <yao@codesourcery.com>
3751 Pedro Alves <palves@redhat.com>
3752
3753 * linux-low.c (lwp_in_step_range): New function.
3754 (linux_wait_1): If the thread was range stepping and stopped
3755 outside the stepping range, report the stop to GDB. Otherwise,
3756 continue stepping. Add range stepping debug output.
3757 (linux_set_resume_request): Copy the step range from the resume
3758 request to the lwp.
3759 (linux_supports_range_stepping): New.
3760 (linux_target_ops) <supports_range_stepping>: Set to
3761 linux_supports_range_stepping.
3762 * linux-low.h (struct linux_target_ops)
3763 <supports_range_stepping>: New field.
3764 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3765 * linux-x86-low.c (x86_supports_range_stepping): New.
3766 (the_low_target) <supports_range_stepping>: Set to
3767 x86_supports_range_stepping.
3768 * server.c (handle_v_cont): Handle 'r' action.
3769 (handle_v_requests): Append ";r" if the target supports range
3770 stepping.
3771 * target.h (struct thread_resume) <step_range_start,
3772 step_range_end>: New fields.
3773 (struct target_ops) <supports_range_stepping>:
3774 New field.
3775 (target_supports_range_stepping): New macro.
3776
3777 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3778
3779 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3780 confusion in comment.
3781
3782 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3783
3784 * lynx-low.c (struct process_info_private): New type.
3785 (lynx_add_process): New function.
3786 (lynx_create_inferior, lynx_attach): Replace calls to
3787 add_process by calls to lynx_add_process.
3788 (lynx_resume): If PTID is null, then try using
3789 current_process()->private->last_wait_event_ptid.
3790 Add comments.
3791 (lynx_clear_inferiors): Delete. The contents of that function
3792 has been inlined in lynx_mourn;
3793 (lynx_wait_1): Save the ptid in the process's private data.
3794 (lynx_mourn): Free the process' private data. Replace call
3795 to lynx_clear_inferiors by call to clear_inferiors.
3796
3797 2013-05-17 Yao Qi <yao@codesourcery.com>
3798
3799 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3800 the right place.
3801
3802 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
3803
3804 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3805 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3806 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3807 PT_TEXT_END_ADDR guards. Update comments.
3808 (linux_target_op) <read_offsets>: Conditionally define to
3809 linux_read_offsets if the target is UCLIBC and if it defines
3810 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3811
3812 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3813 Andrew Jenner <andrew@codesourcery.com>
3814
3815 * Makefile.in (SFILES): Add linux-nios2-low.c.
3816 (clean): Add action to delete nios2-linux.c.
3817 (nios2-linux.c): New rule.
3818 * configure.srv: Add nios2*-*-linux*.
3819 * linux-nios2-low.c: New.
3820
3821 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3822
3823 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3824
3825 2013-04-25 Hui Zhu <hui@codesourcery.com>
3826
3827 PR gdb/15186
3828 * ax.c (ax_printf): Add fflush.
3829
3830 2013-04-22 Tom Tromey <tromey@redhat.com>
3831
3832 * Makefile.in (SFILES): Add filestuff.c.
3833 (OBS): Add filestuff.o.
3834 (filestuff.o): New target.
3835 * config.in, configure: Rebuild.
3836 * configure.ac: Check for fdwalk, pipe2.
3837
3838 2013-04-17 Pedro Alves <palves@redhat.com>
3839
3840 * configure.ac (USE_THREAD_DB): Delete variable.
3841 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3842 Don't AC_SUBST USE_THREAD_DB.
3843 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3844 * config.in, configure: Regenerate.
3845
3846 2013-04-16 Pedro Alves <palves@redhat.com>
3847
3848 * linux-low.h (struct lwp_info) <thread_known>: Move under
3849 the USE_THREAD_DB #ifdef.
3850
3851 2013-04-16 Pedro Alves <palves@redhat.com>
3852
3853 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3854 (linux-low.o): Delete rule.
3855 * linux-low.h: Always include "gdb_thread_db.h" instead of
3856 conditionally including thread_db.h.
3857 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3858 HAVE_THREAD_DB_H.
3859
3860 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3861
3862 * Makefile.in (install-only): Fix make install regression.
3863
3864 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3865
3866 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3867 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3868 installation.
3869 * gdbserver.1: Remove.
3870
3871 2013-03-22 Pedro Alves <palves@redhat.com>
3872
3873 * linux-low.c (handle_extended_wait): Don't call
3874 linux_enable_event_reporting.
3875
3876 2013-03-15 Tony Theodore <tonyt@logyst.com>
3877
3878 PR build/9098:
3879 * Makefile.in (SHELL): Use @SHELL@.
3880
3881 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3882
3883 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3884 compiler warning.
3885
3886 2013-03-13 Joel Brobecker <brobecker@adacore.com>
3887
3888 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3889 Remove extraneous NULL element.
3890
3891 2013-03-13 Yao Qi <yao@codesourcery.com>
3892
3893 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3894 'V' block in trace frame.
3895
3896 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3897
3898 * target.h (struct target_ops): Add btrace ops.
3899 (target_supports_btrace): New macro.
3900 (target_enable_btrace): New macro.
3901 (target_disable_btrace): New macro.
3902 (target_read_btrace): New macro.
3903 * gdbthread.h (struct thread_info): Add btrace field.
3904 * server.c: Include btrace-common.h.
3905 (handle_btrace_general_set): New function.
3906 (handle_btrace_enable): New function.
3907 (handle_btrace_disable): New function.
3908 (handle_general_set): Call handle_btrace_general_set.
3909 (handle_qxfer_btrace): New function.
3910 (struct qxfer qxfer_packets[]): Add btrace entry.
3911 * inferiors.c (remove_thread): Disable btrace.
3912 * linux-low: Include linux-btrace.h.
3913 (linux_low_enable_btrace): New function.
3914 (linux_low_read_btrace): New function.
3915 (linux_target_ops): Add btrace ops.
3916 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3917 Add srv_linux_btrace=yes.
3918 (x86_64-*-linux*): Add linux-btrace.o.
3919 Add srv_linux_btrace=yes.
3920 * configure.ac: Define HAVE_LINUX_BTRACE.
3921 * config.in: Regenerated.
3922 * configure: Regenerated.
3923
3924 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3925
3926 * server.c (handle_qxfer): Preserve error message if -3 is
3927 returned.
3928 (qxfer): Document the -3 return value.
3929
3930 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3931
3932 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3933 (linux_btrace_h): New variable.
3934 (linux-btrace.o): New rule.
3935
3936 2013-03-08 Stan Shebs <stan@codesourcery.com>
3937 Hafiz Abid Qadeer <abidh@codesourcery.com>
3938
3939 * tracepoint.c (trace_buffer_size): New global.
3940 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3941 (init_trace_buffer): Change to one-argument function. Allocate
3942 trace buffer memory.
3943 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3944 handle QTBuffer:size packet.
3945 (cmd_bigqtbuffer_size): New function.
3946 (initialize_tracepoint): Call init_trace_buffer with
3947 DEFAULT_TRACE_BUFFER_SIZE.
3948 * server.c (handle_query): Add QTBuffer:size in the
3949 supported packets.
3950
3951 2013-03-07 Yao Qi <yao@codesourcery.com>
3952
3953 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3954 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3955 of -1.
3956 (cmd_qtsp): Adjust condition. Do post increment.
3957 Set cur_action and cur_step_action back to 0.
3958
3959 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3960
3961 PR server/15236
3962 * linux-low.c (linux_write_memory): Return early success if LEN is
3963 zero.
3964
3965 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
3966
3967 * configure.srv: Add x86_64-*-cygwin* as target.
3968
3969 2013-02-28 Tom Tromey <tromey@redhat.com>
3970
3971 * configure.ac: Invoke AC_SYS_LARGEFILE.
3972 * configure, config.in: Rebuild.
3973
3974 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
3975
3976 * win32-low.c: Throughout, fix format strings and casts of
3977 printf-like functions to avoid type related warnings on all
3978 platforms.
3979 (get_child_debug_event): Print dwDebugEventCode as hex since
3980 that's how it's usually documented.
3981
3982 2013-02-28 Yao Qi <yao@codesourcery.com>
3983
3984 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3985 pulongest.
3986
3987 2013-02-27 Jiong Wang <jiwang@tilera.com>
3988
3989 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3990 (reg-tilegx32.c): New rule.
3991 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3992 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3993 different register info initializer according to elf class.
3994 (init_registers_tilgx32): New function. The tilegx32 register info
3995 initializer.
3996 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3997 (tile_store_gregset): Likewise.
3998
3999 2013-02-27 Yao Qi <yao@codesourcery.com>
4000
4001 * server.c (process_point_options): Print debug message when
4002 debug_threads is true.
4003
4004 2013-02-26 Yao Qi <yao@codesourcery.com>
4005
4006 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4007
4008 2013-02-19 Pedro Alves <palves@redhat.com>
4009 Kai Tietz <ktietz@redhat.com>
4010
4011 PR gdb/15161
4012
4013 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4014 instead of strtoul to extract address from packet.
4015 (process_serial_event) <'z'>: Likewise.
4016
4017 2013-02-18 Yao Qi <yao@codesourcery.com>
4018
4019 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4020
4021 2013-02-14 Pedro Alves <palves@redhat.com>
4022
4023 Plug memory leak.
4024
4025 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4026 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4027
4028 2013-02-14 Pedro Alves <palves@redhat.com>
4029
4030 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4031
4032 2013-02-14 Pedro Alves <palves@redhat.com>
4033
4034 * tracepoint.c (save_string): Delete.
4035 (add_tracepoint_action): Use savestring instead of save_string.
4036
4037 2013-02-12 Pedro Alves <palves@redhat.com>
4038
4039 * linux-xtensa-low.c: Ditto.
4040 * xtensa-xtregs.c: Ditto.
4041
4042 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4043
4044 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4045 thread_db.
4046
4047 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4048
4049 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4050 aarch64_num_wp_regs and aarch64_num_bp_regs to
4051 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4052
4053 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4054
4055 * linux-aarch64-low.c (ps_get_thread_area): Replace
4056 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4057
4058 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4059 Marcus Shawcroft <marcus.shawcroft@arm.com>
4060 Nigel Stephens <nigel.stephens@arm.com>
4061 Yufeng Zhang <yufeng.zhang@arm.com>
4062
4063 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4064 (aarch64.c, aarch64-without-fpu.c): New targets.
4065 * configure.srv (aarch64*-*-linux*): New.
4066 * linux-aarch64-low.c: New file.
4067
4068 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4069
4070 * linux-low.c (handle_extended_wait, linux_create_inferior)
4071 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4072 (dequeue_one_deferred_signal, linux_resume_one_thread)
4073 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4074 (linux_tracefork_grandchild, linux_test_for_tracefork)
4075 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4076 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4077 where the argument is 0.
4078
4079 2013-01-25 Yao Qi <yao@codesourcery.com>
4080
4081 * event-loop.c: Include "queue.h".
4082 (gdb_event_p): New typedef.
4083 (struct gdb_event) <next_event>: Remove.
4084 (event_queue): Change to QUEUE(gdb_event_p).
4085 (async_queue_event): Remove.
4086 (gdb_event_xfree): New.
4087 (initialize_event_loop): New.
4088 (process_event): Use API from QUEUE.
4089 (wait_for_event): Likewise.
4090 * server.c (main): Call initialize_event_loop.
4091 * server.h (initialize_event_loop): Declare.
4092
4093 2013-01-18 Yao Qi <yao@codesourcery.com>
4094
4095 * ax.h (struct eval_agent_expr_context): New.
4096 (gdb_eval_agent_expr): Update declaration.
4097 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4098 TFRAME. Add new argument CTX.
4099 * server.h (struct eval_agent_expr_context): Declare.
4100 (agent_mem_read, agent_tsv_read): Update declaration.
4101 (agent_mem_read_string): Likewise.
4102 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4103 (add_traceframe_block): Add new argument TPOINT.
4104 Increase TPOINT->traceframe_usage.
4105 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4106 eval_tracepoint_agent_expr.
4107 (condition_true_at_tracepoint): Likewise.
4108 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4109 (agent_mem_read_string, agent_tsv_read): Likewise.
4110
4111 2013-01-16 Yao Qi <yao@codesourcery.com>
4112
4113 * linux-low.c (linux_resume_one_lwp): Don't check
4114 'lwp->bp_reinsert != 0'.
4115
4116 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4117 Pedro Alves <palves@redhat.com>
4118
4119 * lynx-low.c (ptrace_request_to_str): Define a temporary
4120 macro and use it to simplify this function's implementation.
4121
4122 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4123
4124 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4125 sets errno.
4126
4127 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4128
4129 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4130
4131 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4132
4133 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4134
4135 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4136
4137 * lynx-low.c (lynx_resume): Use the resume_info parameter
4138 to determine the ptid for the lynx_ptrace call, unless
4139 it is equal to minus_one_ptid, in which case we use the
4140 ptid of the current_inferior.
4141 (lynx_wait_1): After having received a thread create/exit
4142 event, resume the inferior's execution using the signaling
4143 thread's ptid, rather than the old ptid.
4144
4145 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4146
4147 * lynx-low.c (lynx_resume): Delete variable ret.
4148
4149 2013-01-01 Joel Brobecker <brobecker@adacore.com>
4150
4151 * gdbreplay.c (gdbreplay_version): Update copyright year.
4152 * server.c (gdbserver_version): Likewise.
4153
4154 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4155
4156 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4157 new thread.
4158
4159 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4160
4161 * lynx-low.c (ptrace_request_to_str): Add handling for
4162 PTRACE_GETTRACESIG.
4163
4164 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4165
4166 * lynx-low.c (lynx_attach): Delete variable new_process.
4167
4168 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4169
4170 * lynx-low.c (lynx_create_inferior): Delete variable
4171 new_process.
4172
4173 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4174
4175 * lynx-low.c (ptrace_request_to_str): Do not handle
4176 PTRACE_GETTHREADLIST if this macro does not exist.
4177
4178 2012-12-15 Yao Qi <yao@codesourcery.com>
4179
4180 * Makefile.in (OBS): Add notif.o.
4181 * notif.c, notif.h: New.
4182 * server.c: Include "notif.h".
4183 (struct vstop_notif) <next>: Remove.
4184 <base>: New field.
4185 (queue_stop_reply): Update.
4186 (push_event, send_next_stop_reply): Remove.
4187 (discard_queued_stop_replies): Update.
4188 (notif_stop): New variable.
4189 (handle_v_stopped): Remove.
4190 (handle_v_requests): Don't call handle_v_stopped. Call
4191 handle_ack_notif instead.
4192 (queue_stop_reply_callback): Call notif_event_enque instead
4193 of queue_stop_reply.
4194 (handle_status): Don't call send_next_stop_reply, call
4195 notif_write_event instead.
4196 (kill_inferior_callback): Likewise.
4197 (detach_or_kill_inferior_callback): Likewise.
4198 (main): Call initialize_notif.
4199 (process_serial_event): Call QUEUE_is_empty.
4200 (handle_target_event): Call notif_push instead of push event.
4201 * server.h (push_event): Remove declaration.
4202
4203 2012-12-10 Tom Tromey <tromey@redhat.com>
4204
4205 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4206 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4207 macros.
4208 (.c.o): Rewrite.
4209 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4210 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4211 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4212 (amd64-linux-ipa.o, ax.o): Rewrite.
4213 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4214 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4215 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4216 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4217 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4218 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4219 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4220 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4221 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4222 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4223 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4224 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4225 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4226 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4227 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4228 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4229 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4230 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4231 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4232 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4233 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4234 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4235 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4236 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4237 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4238 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4239 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4240 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4241 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4242 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4243 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4244 (reg-tilegx.o): Remove.
4245 (all_object_files): New macro.
4246 Include .deps files.
4247 * aclocal.m4, configure: Rebuild.
4248 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4249 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4250 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4251
4252 2012-12-05 Tom Tromey <tromey@redhat.com>
4253
4254 PR gdb/14917:
4255 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4256
4257 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
4258
4259 * configure.ac: Check for linux/perf_event.h.
4260 * config.in: Regenerated.
4261 * configure: Regenerated.
4262
4263 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4264
4265 * hostio.c (handle_readlink): Decrease buffer size
4266 parameter passed to readlink by one byte.
4267
4268 2012-11-26 Yao Qi <yao@codesourcery.com>
4269
4270 * configure.ac (build_warnings): Append '-Wempty-body'.
4271 * configure: Regenerated.
4272 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4273 body.
4274
4275 2012-11-15 Pierre Muller <muller@sourceware.org>
4276
4277 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4278 * config.in: Regenerate.
4279 * configure: Regenerate.
4280 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4281 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4282 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4283 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4284 header.
4285 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4286 instead of <sys/wait.h> header.
4287 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4288
4289 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
4290
4291 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4292 (various make rules): Remove -DGDBSERVER
4293
4294 2012-11-09 Yao Qi <yao@codesourcery.com>
4295
4296 * spu-low.c (current_ptid): Move it to ..
4297 * gdbthread.h: ... here. New.
4298 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4299 * server.c (myresume, process_serial_event): Likewise.
4300 * thread-db.c (thread_db_find_new_threads): Likewise.
4301 * tracepoint.c (run_inferior_command): Likewise.
4302
4303 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
4304
4305 * server.c (handle_search_memory_1): Include access length in
4306 warning message.
4307
4308 2012-09-05 Michael Brandt <michael.brandt@axis.com>
4309
4310 * linux-crisv32-low.c: Fix compile errors.
4311
4312 2012-09-04 Yao Qi <yao@codesourcery.com>
4313
4314 * tracepoint.c (cmd_qtsv): Adjust debug message.
4315 Don't check CUR_TPOINT.
4316
4317 2012-08-28 Yao Qi <yao@codesourcery.com>
4318
4319 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4320 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4321 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4322 Remove declarations of xmalloc, xreallloc, xstrdup and
4323 freeargv.
4324 * Makefile.in (libiberty_h): New.
4325 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4326 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4327
4328 2012-08-23 Yao Qi <yao@codesourcery.com>
4329
4330 * server.h: Remove declaration of 'xsnprintf'.
4331
4332 2012-08-22 Keith Seitz <keiths@redhat.com>
4333
4334 * server.h: Include build-gnulib-gbserver/config.h.
4335 * gdbreplay.c: Likewise.
4336
4337 2012-08-08 Doug Evans <dje@google.com>
4338
4339 * Makefile.in (SFILES): Add gdb_vecs.c.
4340 (OBS): Add gdb_vecs.o.
4341 (gdb_vecs_h, host_defs_h): New variables.
4342 (thread-db.o): Add $(gdb_vecs_h) dependency.
4343 (gdb_vecs.o): New rule.
4344 * thread-db.c: #include "gdb_vecs.h".
4345 (thread_db_load_search): Use a vector to iterate over path elements.
4346 Handle text appearing after "$pdir".
4347
4348 * configure.ac: Add check for strstr.
4349 * config.in: Regenerate.
4350 * configure: Regenerate.
4351
4352 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4353
4354 * hostio.c (handle_pread): If pread fails, fall back to attempting
4355 lseek/read.
4356 (handle_pwrite): Likewise for pwrite.
4357
4358 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4359
4360 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4361 between unsupported TYPE and unimplementable ADDR/LEN combination.
4362 (arm_insert_point): Act on new return value.
4363
4364 2012-07-31 Pedro Alves <palves@redhat.com>
4365
4366 * server.c (process_point_options): Only skip tokens if we find
4367 one that is unrecognized. Don't treat 'X' specially while
4368 skipping unrecognized tokens.
4369
4370 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4371
4372 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4373 to 4-byte-align HW breakpoint addresses for Thumb.
4374
4375 2012-07-27 Yao Qi <yao@codesourcery.com>
4376
4377 PR remote/14161.
4378
4379 * server.h: Declare gdb_agent_about_to_close.
4380 * target.c (kill_inferior): Include "agent.h".
4381 New. Send command 'kill'.
4382 * target.h (kill_inferior): Removed macro.
4383 * tracepoint.c (gdb_agent_about_to_close): New.
4384 (gdb_agent_helper_thread): Handle command 'close'.
4385 Wait endlessly until the inferior stops.
4386 Install gdb_agent_remove_socket to atexit hook.
4387 (agent_socket_name): New static variable.
4388 (gdb_agent_socket_init): Replace local variable 'name' with
4389 'agent_socket_name'.
4390 (gdb_agent_remove_socket): New.
4391
4392 2012-07-27 Yao Qi <yao@codesourcery.com>
4393
4394 * server.c (process_point_options): Stop at 'X' when parsing.
4395
4396 2012-07-19 Michael Eager <eager@eagercon.com>
4397
4398 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
4399 to hw_execute.
4400 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4401 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4402 hardware breakpoint.
4403
4404 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4405
4406 * gdbserver/linux-low.c (initialize_low): Call
4407 linux_ptrace_init_warnings.
4408
4409 2012-07-02 Doug Evans <dje@google.com>
4410
4411 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4412 pointer to int.
4413
4414 2012-07-02 Stan Shebs <stan@codesourcery.com>
4415
4416 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4417 (ax.o): Add it to build rule.
4418 (ax-ipa.o): Ditto.
4419 (OBS): Add format.o.
4420 (IPA_OBS): Add format.o.
4421 * server.c (handle_query): Claim support for breakpoint commands.
4422 (process_point_options): Add command case.
4423 (process_serial_event): Leave running if there are printfs in
4424 effect.
4425 * mem-break.h (any_persistent_commands): Declare.
4426 (add_breakpoint_commands): Declare.
4427 (gdb_no_commands_at_breakpoint): Declare.
4428 (run_breakpoint_commands): Declare.
4429 * mem-break.c (struct point_command_list): New struct.
4430 (struct breakpoint): New field command_list.
4431 (any_persistent_commands): New function.
4432 (add_commands_to_breakpoint): New function.
4433 (add_breakpoint_commands): New function.
4434 (gdb_no_commands_at_breakpoint): New function.
4435 (run_breakpoint_commands): New function.
4436 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4437 locally.
4438 * ax.c: Include format.h.
4439 (ax_printf): New function.
4440 (gdb_eval_agent_expr): Add printf opcode.
4441
4442 2012-06-13 Yao Qi <yao@codesourcery.com>
4443
4444 * server.c (start_inferior): Remove duplicated writes to fields
4445 'last_resume_kind' and 'last_status' of 'current_inferior'.
4446
4447 2012-06-12 Yao Qi <yao@codesourcery.com>
4448 Pedro Alves <palves@redhat.com>
4449
4450 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4451 comment.
4452 * server.c (handle_v_cont): Extend comment.
4453
4454 2012-06-11 Yao Qi <yao@codesourcery.com>
4455
4456 * linux-low.c (linux_attach): Add 'static'.
4457
4458 2012-06-06 Yao Qi <yao@codesourcery.com>
4459
4460 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4461
4462 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4463
4464 Fix gcc -flto compilation warning.
4465 * server.c (main): Make variable multi_mode and attach volatile.
4466
4467 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4468
4469 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4470 if the platform doesn't know about it.
4471
4472 2012-05-30 Jeff Kenton <jkenton@tilera.com>
4473
4474 * Makefile.in (SFILES): Add linux-tile-low.c.
4475 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4476 * configure.srv: Handle tilegx-*-linux*.
4477 * linux-tile-low.c: New file.
4478
4479 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4480
4481 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4482
4483 2012-05-24 Pedro Alves <palves@redhat.com>
4484
4485 PR gdb/7205
4486
4487 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4488
4489 2012-05-24 Pedro Alves <palves@redhat.com>
4490
4491 PR gdb/7205
4492
4493 Replace target_signal with gdb_signal throughout.
4494
4495 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4496
4497 * linux-low.c (linux_store_registers): Avoid the copying sequence
4498 when no data has been retrieved by ptrace.
4499
4500 2012-05-22 Will Deacon <will.deacon@arm.com>
4501
4502 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4503 Include asm/ptrace.h.
4504 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4505 already defined.
4506
4507 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4508
4509 * linux-low.c (linux_store_registers): Don't re-retrieve data
4510 with ptrace that has already been obtained from /proc. Always
4511 copy any data retrieved with ptrace to the buffer supplied.
4512
4513 2012-05-11 Yao Qi <yao@codesourcery.com>
4514 Pedro Alves <palves@redhat.com>
4515
4516 * linux-low.c (enum stopping_threads_kind): New.
4517 (stopping_threads): Change type to `enum stopping_threads_kind'.
4518 (handle_extended_wait): If stopping and suspending threads, leave
4519 the new_lwp suspended too.
4520 (linux_wait_for_event): Adjust.
4521 (stop_all_lwps): Set `stopping_threads' to
4522 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4523 whether we're suspending threads or just stopping them. Assert no
4524 recursion happens.
4525
4526 2012-04-29 Yao Qi <yao@codesourcery.com>
4527
4528 * server.h: Move some code to ...
4529 * gdbthread.h: ... here. New.
4530 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4531 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4532 (nto-low.o, win32-low.o): Likewise.
4533 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4534 * regcache.c, remote-utils.c, server.c: Likewise.
4535 * target.c, tracepoint.c, win32-low.c: Likewise.
4536
4537 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4538
4539 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4540 (PTRACE_ARG4_TYPE): Likewise.
4541 (PTRACE_XFER_TYPE): Likewise.
4542 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4543 ptrace to PTRACE_ARG3_TYPE.
4544 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4545 (PTRACE_ARG4_TYPE): Likewise.
4546 (PTRACE_XFER_TYPE): Likewise.
4547 (linux_detach_one_lwp): Cast fourth argument of
4548 ptrace to long then PTRACE_ARG4_TYPE.
4549 (regsets_fetch_inferior_registers): Cast third argument of
4550 ptrace to long then PTRACE_ARG3_TYPE.
4551 (regsets_store_inferior_registers): Likewise.
4552
4553 2012-04-20 Pedro Alves <palves@redhat.com>
4554
4555 * configure: Regenerate.
4556
4557 2012-04-19 Pedro Alves <palves@redhat.com>
4558
4559 * Makefile.in (GNULIB_BUILDDIR): New.
4560 (LIBGNU, INCGNU, GNULIB_H): Adjust.
4561 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4562 (all, install-only, uninstall, clean-info, all-lib, clean): No
4563 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4564 (maintainer-clean realclean distclean): Use subdir_do.
4565 (subdir_do): New.
4566 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
4567 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
4568 * acinclude.m4: Include acx_configure_dir.m4.
4569 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4570 calls. Call AC_PROG_RANLIB. Configure gnulib using
4571 ACX_CONFIGURE_DIR.
4572 (GNULIB): New.
4573 (GNULIB_STDINT_H): Adjust.
4574 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4575 * gdbreplay.c: Include build-gnulib/config.h.
4576 * server.h: Likewise.
4577 * aclocal.m4: Regenerate.
4578 * config.in: Regenerate.
4579 * configure: Regenerate.
4580
4581 2012-04-19 Pedro Alves <palves@redhat.com>
4582
4583 * Makefile.in (LIBGNU, INCGNU): Adjust.
4584 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4585 (all, install-only, uninstall, clean-info, all-lib, clean)
4586 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4587 * configure.ac: Adjust AC_OUTPUT output.
4588 * aclocal.m4: Regenerate.
4589 * configure: Regenerate.
4590
4591 2012-04-19 Pedro Alves <palves@redhat.com>
4592
4593 * Makefile.in (generated_files): New.
4594 (server_h): Remove the explicit dependency on config.h, and depend
4595 on $generated_files.
4596
4597 2012-04-19 Pedro Alves <palves@redhat.com>
4598
4599 * Makefile.in (INCGNU): Add -Ignulib.
4600
4601 2012-04-19 Pedro Alves <palves@redhat.com>
4602
4603 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4604 (INCGNU): ... this, and spell out -I here.
4605 (GNULIB_LIB): Rename to ...
4606 (LIBGNU): ... this.
4607 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4608
4609 2012-04-19 Pedro Alves <palves@redhat.com>
4610
4611 * config.in: Regenerate.
4612
4613 2012-04-19 Pedro Alves <palves@redhat.com>
4614
4615 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4616 * server.h (memmem): Remove declaration.
4617 * config.in: Regenerate.
4618 * configure: Regenerate.
4619
4620 2012-04-19 Yao Qi <yao@codesourcery.com>
4621
4622 * Makefile.in (SFILES): Add common/vec.c.
4623 (OBS): Add vec.o.
4624 (vec.o): New rule.
4625
4626 2012-04-19 Yao Qi <yao@codesourcery.com>
4627
4628 * remote-utils.c (prepare_resume_reply): Replace with macro
4629 target_core_of_thread.
4630 * server.c (handle_qxfer_threads_proper): Likewise.
4631 * target.h (traget_core_of_thread): New macro.
4632
4633 2012-04-18 Pedro Alves <palves@redhat.com>
4634
4635 * aclocal.m4: Regenerate.
4636 * configure: Regenerate.
4637
4638 2012-04-16 Yao Qi <yao@codesourcery.com>
4639
4640 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4641 duplicated on address.
4642
4643 2012-04-16 Yao Qi <yao@codesourcery.com>
4644
4645 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4646 (struct tracepoint_action_ops) <send>: New field.
4647 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4648 (agent_expr_send, x_tracepoint_action_send): New.
4649 (l_tracepoint_action_send): New.
4650 (cmd_qtdp): Download and install tracepoint
4651 according to `use_agent'.
4652 (run_inferior_command): Add one more parameter `len'.
4653 Update callers.
4654 (tracepoint_send_agent): New.
4655 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4656
4657 2012-04-16 Yao Qi <yao@codesourcery.com>
4658
4659 * tracepoint.c (download_tracepoints): Moved to ...
4660 (cmd_qtstart): ... here.
4661
4662 2012-04-14 Yao Qi <yao@codesourcery.com>
4663
4664 * tracepoint.c: Include inttypes.h.
4665 (struct collect_memory_action): Use sized types.
4666 (struct tracepoint): Likewise.
4667 (cmd_qtdp, stop_tracing): Update print specifiers.
4668 (cmd_qtp, response_tracepoint): Likewise.
4669 (collect_data_at_tracepoint): Likewise.
4670 (collect_data_at_step): Likewise.
4671
4672 2012-04-14 Yao Qi <yao@codesourcery.com>
4673
4674 Import gnulib module inttypes.
4675 * aclocal.m4, config.in, configure: Regenerated.
4676
4677 2012-04-14 Yao Qi <yao@codesourcery.com>
4678
4679 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4680 Makefile and config.status at last.
4681
4682 2012-04-13 Yao Qi <yao@codesourcery.com>
4683
4684 * tracepoint.c: Include stdint.h unconditionally.
4685
4686 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4687
4688 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4689 on BFD_HAVE_SYS_PROCFS_TYPE.
4690 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4691 * configure: Regenerate.
4692 * config.in: Likewise.
4693
4694 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4695
4696 * Makefile.in (clean): Also remove x32.c x32-linux.c
4697 x32-avx.c x32-avx-linux.c.
4698 (x32.o): New target.
4699 (x32.c): Likewise.
4700 (x32-linux.o): Likewise.
4701 (x32-linux.c): Likewise.
4702 (x32-avx.o): Likewise.
4703 (x32-avx.c): Likewise.
4704 (x32-avx-linux.o): Likewise.
4705 (x32-avx-linux.c): Likewise.
4706
4707 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4708 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4709 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4710 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4711 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4712 i386/x32-avx-linux.xml.
4713
4714 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4715 (init_registers_x32_avx_linux): Likwise.
4716 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4717 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4718
4719 2012-04-13 Pedro Alves <palves@redhat.com>
4720
4721 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4722 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4723 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4724 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4725 the sub-make.
4726
4727 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4728
4729 * linux-x86-low.c (compat_x32_clock_t): New.
4730 (compat_x32_siginfo_t): Likewise.
4731 (compat_x32_siginfo_from_siginfo): Likewise.
4732 (siginfo_from_compat_x32_siginfo): Likewise.
4733 (linux_is_elf64): Likewise.
4734 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4735 and siginfo_from_compat_x32_siginfo for x32.
4736 (x86_arch_setup): Set linux_is_elf64.
4737
4738 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4739
4740 PR gdb/13969
4741 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4742 e_machine field.
4743 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4744 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4745 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4746 compatible with process.
4747
4748 2012-04-12 Yao Qi <yao@codesourcery.com>
4749
4750 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4751 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4752 (install-only, install-info, clean): Handle sub dir gnulib.
4753 (all-lib, am--refresh): New targets.
4754 (memmem.o): Remove target.
4755 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4756 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4757 (AC_REPLACE_FUNCS): Remove memmem.
4758 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4759 (AC_OUTPUT): Generate Makefile in gnulib/.
4760 * aclocal.m4, config.in, configure: Regenerated.
4761
4762 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4763
4764 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4765
4766 2012-04-05 Pedro Alves <palves@redhat.com>
4767
4768 -Werror=strict-aliasing
4769
4770 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4771 pointer.
4772
4773 2012-04-04 Pedro Alves <palves@redhat.com>
4774
4775 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4776 (sparc_store_gregset_from_stack, sparc_store_gregset)
4777 (sparc_breakpoint_at): Fix formatting.
4778
4779 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4780
4781 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4782 are available.
4783 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4784 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4785 * config.in: Regenerate.
4786 * configure: Likewise.
4787
4788 2012-03-29 Pedro Alves <palves@redhat.com>
4789
4790 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4791 Correct ptrace arguments.
4792
4793 2012-03-28 Pedro Alves <palves@redhat.com>
4794
4795 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4796 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4797 (IA64_FR1_REGNUM): New defines.
4798 (ia64_fetch_register): New.
4799 (the_low_target): Install it.
4800 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4801 field.
4802 * linux-low.c (linux_fetch_registers): Try the
4803 the_low_target.fetch_register hook first.
4804
4805 * linux-arm-low.c (the_low_target): Adjust.
4806 * linux-bfin-low.c (the_low_target): Adjust.
4807 * linux-cris-low.c (the_low_target): Adjust.
4808 * linux-crisv32-low.c (the_low_target): Adjust.
4809 * linux-m32r-low.c (the_low_target): Adjust.
4810 * linux-m68k-low.c (the_low_target): Adjust.
4811 * linux-mips-low.c (the_low_target): Adjust.
4812 * linux-ppc-low.c (the_low_target): Adjust.
4813 * linux-s390-low.c (the_low_target): Adjust.
4814 * linux-sh-low.c (the_low_target): Adjust.
4815 * linux-sparc-low.c (the_low_target): Adjust.
4816 * linux-tic6x-low.c (the_low_target): Adjust.
4817 * linux-x86-low.c (the_low_target): Adjust.
4818 * linux-xtensa-low.c (the_low_target): Adjust.
4819
4820 2012-03-26 Pedro Alves <palves@redhat.com>
4821
4822 * server.c (handle_qxfer_libraries): Don't bail early if
4823 the_target->qxfer_libraries_svr4 is not NULL.
4824
4825 2012-03-26 Pedro Alves <palves@redhat.com>
4826
4827 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4828
4829 2012-03-23 Pedro Alves <palves@redhat.com>
4830
4831 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4832 "library-list-svr4" element's start tag when the the DSO list is
4833 empty.
4834
4835 2012-03-23 Pedro Alves <palves@redhat.com>
4836
4837 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4838 a variable whose type size is the same as the inferior's pointer
4839 size.
4840
4841 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4842
4843 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4844 struct siginfo.
4845 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4846 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4847 * linux-low.h: Include <signal.h>.
4848 (struct siginfo): Remove forward declaration.
4849 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4850 struct siginfo.
4851
4852 2012-03-21 Mike Frysinger <vapier@gentoo.org>
4853
4854 * .gitignore: Ignore more files.
4855
4856 2012-03-19 Pedro Alves <palves@redhat.com>
4857 Jan Kratochvil <jan.kratochvil@redhat.com>
4858
4859 * server.c (cont_thread, general_thread): Add describing comments.
4860 (start_inferior): Clear `cont_thread'.
4861 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4862 of a process.
4863
4864 2012-03-15 Yao Qi <yao@codesourcery.com>
4865
4866 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4867 handling to ...
4868 (cmd_qtdp): ... here.
4869
4870 2012-03-15 Yao Qi <yao@codesourcery.com>
4871
4872 * tracepoint.c (struct tracepoint_action_ops): New.
4873 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4874 (m_tracepoint_action_download): New.
4875 (r_tracepoint_action_download): New.
4876 (x_tracepoint_action_download): New.
4877 (l_tracepoint_action_download): New.
4878 (add_tracepoint_action): Install `action->ops' according type.
4879 (download_tracepoint_1): Move code `download' function pointer
4880 of various tracepoint_action_ops.
4881
4882 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4883
4884 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4885 linux_ptrace_attach_warnings.
4886
4887 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4888
4889 * Makefile.in (linux-ptrace.o): New.
4890 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4891 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4892 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4893 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4894 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4895 of these targets.
4896 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4897
4898 2012-03-08 Yao Qi <yao@codesourcery.com>
4899 Pedro Alves <palves@redhat.com>
4900
4901 Fix PR server/13392.
4902 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4903 offset of JMP insn.
4904 * tracepoint.c (remove_tracepoint): New.
4905 (cmd_qtdp): Call remove_tracepoint when failed to install.
4906
4907 2012-03-07 Pedro Alves <palves@redhat.com>
4908
4909 * linux-low.c (get_detach_signal): New.
4910 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4911 Pass on pending signals to PTRACE_DETACH. Check the result of the
4912 ptrace call.
4913 * server.c (program_signals, program_signals_p): New.
4914 (handle_general_set): Handle QProgramSignals.
4915 * server.h (program_signals, program_signals_p): Declare.
4916
4917 2012-03-05 Pedro Alves <palves@redhat.com>
4918 Jan Kratochvil <jan.kratochvil@redhat.com>
4919
4920 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4921 New comment why.
4922
4923 2012-03-03 Yao Qi <yao@codesourcery.com>
4924
4925 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4926 agent_look_up_symbols.
4927
4928 2012-03-03 Yao Qi <yao@codesourcery.com>
4929
4930 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4931 (linux-x86-low.o): Likewise.
4932 * server.h: Remove in_process_agent_loaded.
4933 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4934 common/agent.c.
4935 Update callers.
4936
4937 2012-03-03 Yao Qi <yao@codesourcery.com>
4938
4939 * tracepoint.c (gdb_agent_capability): New global.
4940 (in_process_agent_loaded_ust): Renamed to
4941 `in_process_agent_supports_ust'.
4942 Update callers.
4943 (in_process_agent_supports_ust): Call agent_capability_check.
4944 (clear_installed_tracepoints): Assert that agent supports
4945 agent.
4946
4947 2012-03-03 Yao Qi <yao@codesourcery.com>
4948
4949 * linux-low.c (linux_supports_agent): New.
4950 (linux_target_ops): Initialize field `supports_agent' with
4951 linux_supports_agent.
4952 * target.h (struct target_ops) <supports_agent>: New.
4953 (target_supports_agent): New macro.
4954 * server.c (handle_general_set): Handle packet 'QAgent'.
4955 (handle_query): Send `QAgent+'.
4956 * Makefile.in (server.o): Depends on agent.h.
4957
4958 2012-03-03 Yao Qi <yao@codesourcery.com>
4959
4960 * Makefile.in (OBS): Add agent.o.
4961 Add new rule for agent.o.
4962 Track dependence of tracepoint.c on agent.h.
4963 * tracepoint.c (run_inferior_command_1):
4964 (run_inferior_command): Call agent_run_command.
4965 (gdb_ust_connect_sync_socket): Deleted. Move it to
4966 common/agent.c.
4967 (resume_thread, stop_thread): Likewise.
4968 (gdb_ust_socket_init): Renamed to ...
4969 (gdb_agent_socket_init): ... New.
4970 (gdb_ust_thread): Renamed to ...
4971 (gdb_agent_helper_thread): ... New.
4972 (gdb_ust_init): Move some code to ...
4973 (gdb_agent_init): ... here. New.
4974 [HAVE_UST]: Call gdb_ust_init.
4975 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4976 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4977 * config.in, configure: Regenerated.
4978
4979 2012-03-02 Pedro Alves <palves@redhat.com>
4980
4981 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4982 * linux-low.c (struct simple_pid_list): New.
4983 (stopped_pids): New a struct simple_pid_list pointer.
4984 (add_to_pid_list, pull_pid_from_list): New.
4985 (handle_extended_wait): Don't assume the first signal new children
4986 report is SIGSTOP. Adjust call to pull_pid_from_list.
4987 (linux_wait_for_lwp): Adjust.
4988
4989 2012-03-02 Yao Qi <yao@codesourcery.com>
4990
4991 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4992 debug log.
4993
4994 2012-03-02 Yao Qi <yao@codesourcery.com>
4995
4996 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4997 `stop_pc' and `tpoint'. Update caller.
4998
4999 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5000
5001 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5002 * linux-low.c (use_linux_regsets): New macro.
5003 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5004 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5005 (linux_register_in_regsets): New function.
5006 (usr_fetch_inferior_registers): Skip registers covered by
5007 regsets.
5008 (usr_store_inferior_registers): Likewise.
5009 (usr_fetch_inferior_registers): New macro.
5010 (usr_store_inferior_registers): Likewise.
5011 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5012 (linux_store_registers): Likewise.
5013 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5014 prototype.
5015 (init_registers_mips64_dsp_linux): Likewise.
5016 (init_registers_mips_linux): New macro.
5017 (init_registers_mips_dsp_linux): Likewise.
5018 (mips_dsp_num_regs): Likewise.
5019 (DSP_BASE, DSP_CONTROL): New fallback macros.
5020 (mips_base_regs): New macro.
5021 (mips_regmap): Use it. Fix the size.
5022 (mips_dsp_regmap): New variable.
5023 (mips_dsp_regset_bitmap): Likewise.
5024 (mips_arch_setup): New function.
5025 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5026 than mips_regmap.
5027 (mips_cannot_store_register): Likewise.
5028 (the_low_target): Update .arch_setup, .num_regs and .regmap
5029 initializers. Add .regset_bitmap initializer.
5030 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5031 initializer.
5032 * linux-bfin-low.c (the_low_target): Likewise.
5033 * linux-cris-low.c (the_low_target): Likewise.
5034 * linux-crisv32-low.c (the_low_target): Likewise.
5035 * linux-ia64-low.c (the_low_target): Likewise.
5036 * linux-m32r-low.c (the_low_target): Likewise.
5037 * linux-m68k-low.c (the_low_target): Likewise.
5038 * linux-ppc-low.c (the_low_target): Likewise.
5039 * linux-s390-low.c (the_low_target): Likewise.
5040 * linux-sh-low.c (the_low_target): Likewise.
5041 * linux-sparc-low.c (the_low_target): Likewise.
5042 * linux-tic6x-low.c (the_low_target): Likewise.
5043 * linux-x86-low.c (the_low_target): Likewise.
5044 * linux-xtensa-low.c (the_low_target): Likewise.
5045 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5046 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5047 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5048 srv_xmlfiles.
5049 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5050 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5051
5052 2012-02-29 Yao Qi <yao@codesourcery.com>
5053 Pedro Alves <palves@redhat.com>
5054
5055 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5056 `step_over_finished' is true.
5057
5058 2012-02-27 Pedro Alves <palves@redhat.com>
5059
5060 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5061 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5062
5063 2012-02-27 Pedro Alves <palves@redhat.com>
5064
5065 PR server/9684
5066 * linux-low.c (pid_is_stopped): New.
5067 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5068
5069 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
5070
5071 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5072 of conditions.
5073
5074 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5075
5076 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5077
5078 2012-02-24 Luis Machado <lgustavo@codesourcery>
5079
5080 * server.c (handle_query): Advertise support for target-side
5081 breakpoint condition evaluation.
5082 (process_point_options): New function.
5083 (process_serial_event): When inserting a breakpoint, check for
5084 a target-side condition that should be evaluated.
5085
5086 * mem-break.c: Include regcache.h and ax.h.
5087 (point_cond_list_t): New data structure.
5088 (breakpoint) <cond_list>: New field.
5089 (find_gdb_breakpoint_at): Make non-static.
5090 (delete_gdb_breakpoint_at): Clear any target-side
5091 conditions.
5092 (clear_gdb_breakpoint_conditions): New function.
5093 (add_condition_to_breakpoint): Likewise.
5094 (add_breakpoint_condition): Likewise.
5095 (gdb_condition_true_at_breakpoint): Likewise.
5096 (gdb_breakpoint_here): Return result directly instead
5097 of going through a local variable.
5098
5099 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5100 (clear_gdb_breakpoint_conditions): Likewise.
5101 (add_breakpoint_condition): Likewise.
5102 (gdb_condition_true_at_breakpoint): Likewise.
5103
5104 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5105 (need_step_over_p): Take target-side breakpoint condition into
5106 consideration.
5107
5108 2012-02-24 Luis Machado <lgustavo@codesourcery>
5109
5110 * server.h: Include tracepoint.h.
5111 (agent_mem_read, agent_get_trace_state_variable_value,
5112 agent_set_trace_state_variable_value,
5113 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5114 get_set_tsv_func_addr): New prototypes.
5115
5116 * ax.h: New include file.
5117 * ax.c: New source file.
5118
5119 * tracepoint.c: Include ax.h.
5120 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5121 agent_expr, eval_result_type): Move to ax.h.
5122 (parse_agent_expr): Rename to ...
5123 (gdb_parse_agent_expr): ... this, make it non-static and move
5124 to ax.h.
5125 (unparse_agent_expr) Rename to ...
5126 (gdb_unparse_agent_expr): ... this, make it non-static and move
5127 to ax.h.
5128 (eval_agent_expr): Rename to ...
5129 (eval_tracepoint_agent_expr): ... this.
5130 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5131 forward declarations.
5132 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5133 (agent_get_trace_state_variable_value): New function.
5134 (agent_set_trace_state_variable_value): New function.
5135 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5136 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5137 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5138 (condition_true_at_tracepoint): Likewise.
5139 (parse_agent_expr): Rename to ...
5140 (gdb_parse_agent_expr): ... this and move to ax.c.
5141 (unparse_agent_expr): Rename to ...
5142 (gdb_unparse_agent_expr): ... this and move to ax.c.
5143 (gdb_agent_op_name): Move to ax.c.
5144 (eval_agent_expr): Rename to ...
5145 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5146 and move to ax.c.
5147 (eval_tracepoint_agent_expr): New function.
5148 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
5149 non-static.
5150 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5151 ax.c.
5152 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5153 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5154 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5155 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5156 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5157 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5158 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5159 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5160 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5161 (compile_bytecodes): Remove forward declaration.
5162 (is_goto_target): Move to ax.c.
5163 (compile_bytecodes): Move to ax.c and call
5164 agent_get_trace_state_variable_value (...) and
5165 agent_set_trace_state_variable_value (...).
5166
5167 * Makefile.in: Update ax.c and IPA dependencies.
5168
5169 2012-02-24 Pedro Alves <palves@redhat.com>
5170
5171 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5172 (cmd_bigqtbuffer_circular): ... this. Only handle
5173 'QTBuffer:circular:'.
5174 (handle_tracepoint_general_set): Adjust.
5175
5176 2012-02-16 Yao Qi <yao@codesourcery.com>
5177
5178 * inferiors.c: Move code to ...
5179 * dll.c: .... here. New.
5180 * server.h: Declare clear_dlls.
5181 * Makefile.in (SFILES): Add dll.c.
5182 (OBS): Add dll.o
5183 (dll.o): New rule.
5184
5185 2012-02-11 Yao Qi <yao@codesourcery.com>
5186
5187 * server.c: (handle_monitor_command): Add a new parameter
5188 `own_buf'.
5189 (handle_query): Update caller.
5190
5191 2012-02-09 Joel Brobecker <brobecker@adacore.com>
5192
5193 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5194 * configure, config.in: Regenerate.
5195 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5196 is not defined.
5197
5198 2012-02-02 Pedro Alves <palves@redhat.com>
5199
5200 Try SIGKILL first, then PTRACE_KILL.
5201 * linux-low.c (linux_kill_one_lwp): New.
5202 (linux_kill_one_lwp): Rename to ...
5203 (kill_one_lwp_callback): ... this. Use the new
5204 linux_kill_one_lwp.
5205
5206 2012-02-02 Pedro Alves <palves@redhat.com>
5207
5208 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5209 inferior.
5210
5211 2012-01-27 Pedro Alves <palves@redhat.com>
5212
5213 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5214 (elf_64_file_p): Make static.
5215 (linux_pid_exe_is_elf_64_file): New.
5216 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5217 Delete declarations.
5218 (linux_pid_exe_is_elf_64_file): Declare.
5219 * linux-x86-low.c (x86_arch_setup): Use
5220 linux_pid_exe_is_elf_64_file.
5221
5222 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5223
5224 * linux-low.c (linux_wait_for_event_1): Rename to ...
5225 (linux_wait_for_event): ... here and merge it with former
5226 linux_wait_for_event - new variable wait_ptid, use it.
5227 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5228
5229 2012-01-23 Pedro Alves <palves@redhat.com>
5230
5231 * server.c (main): Avoid yet another case of infinite loop while
5232 detaching/killing after a longjmp.
5233
5234 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5235
5236 Code cleanup.
5237 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5238
5239 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5240
5241 * hostio.c (handle_readlink): New function.
5242 (handle_vFile): Call it to handle "vFile:readlink" packets.
5243
5244 2012-01-20 Pedro Alves <palves@redhat.com>
5245 Ulrich Weigand <ulrich.weigand@linaro.org>
5246
5247 * server.c (handle_v_requests): Only support vAttach and vRun to
5248 start multiple processes when in extended protocol mode.
5249
5250 2012-01-17 Pedro Alves <palves@redhat.com>
5251
5252 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5253 memalign plus mprotect to allocate the scratch buffer.
5254
5255 2012-01-13 Pedro Alves <palves@redhat.com>
5256
5257 * server.c (attach_inferior): Clear `cont_thread'.
5258
5259 2012-01-13 Pedro Alves <palves@redhat.com>
5260
5261 * server.c (main): Avoid infinite loop while detaching/killing
5262 after a longjmp.
5263
5264 2012-01-09 Doug Evans <dje@google.com>
5265
5266 * server.c (start_inferior): Set last_ptid in --wrapper case.
5267
5268 2012-01-06 Yao Qi <yao@codesourcery.com>
5269
5270 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5271 defined.
5272 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5273
5274 2012-01-04 Yao Qi <yao@codesourcery.com>
5275
5276 * tracepoint.c (cmd_qtdp): Print debug message
5277 for static tracepoint.
5278
5279 2012-01-04 Yao Qi <yao@codesourcery.com>
5280
5281 * tracepoint.c (trace_vdebug): Differentiate debug message
5282 between gdbserver and IPA.
5283
5284 2012-01-03 Yao Qi <yao@codesourcery.com>
5285
5286 * tracepoint.c (tracepoint_was_hit): Don't collect for
5287 static tracepoint.
5288
5289 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5290
5291 * terminal.h: Reformat copyright header.
5292
5293 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5294
5295 * server.c (gdbserver_version): Update copyright year.
5296 * gdbreplay.c (gdbreplay_version): Likewise.
5297
5298 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5299
5300 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5301
5302 Revert:
5303 2011-12-18 Hui Zhu <teawater@gmail.com>
5304 * linux-low.c (linux_create_inferior): Save return value to ret.
5305
5306 2011-12-18 Hui Zhu <teawater@gmail.com>
5307
5308 * linux-low.c (linux_create_inferior): Save return value to ret.
5309
5310 2011-12-16 Doug Evans <dje@google.com>
5311
5312 * linux-low.c (linux_create_inferior): If stdio connection,
5313 redirect stdin from /dev/null, stdout to stderr.
5314 * remote-utils.c (remote_is_stdio): New static global.
5315 (remote_connection_is_stdio): New function.
5316 (remote_prepare): Handle stdio connection.
5317 (remote_open): Ditto.
5318 (remote_close): Don't close stdin for stdio connections.
5319 (read_prim,write_prim): New functions. Replace all calls to
5320 read/write to these.
5321 * server.c (main): Watch for "-" argument. Move call to
5322 remote_prepare before start_inferior.
5323 * server.h (STDIO_CONNECTION_NAME): New macro.
5324 (remote_connection_is_stdio): Declare.
5325
5326 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5327 in debugging output.
5328
5329 2011-12-15 Yao Qi <yao@codesourcery.com>
5330
5331 * tracepoint.c: Include sys/syscall.h.
5332 (gdb_ust_thread): Remove preprocessor conditional.
5333
5334 2011-12-14 Pedro Alves <pedro@codesourcery.com>
5335
5336 * linux-low.c (linux_detach_one_lwp): Call
5337 the_low_target.prepare_to_resume before detaching.
5338
5339 2011-12-14 Yao Qi <yao@codesourcery.com>
5340
5341 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5342 of write.
5343
5344 2011-12-14 Yao Qi <yao@codesourcery.com>
5345
5346 * i386-low.c (i386_low_stopped_data_address): Initialize local
5347 variable `control'.
5348
5349 2011-12-13 Pedro Alves <pedro@codesourcery.com>
5350
5351 PR remote/13492
5352
5353 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5354 DR_CONTROL unless necessary. Extend comments.
5355 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5356 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5357
5358 2011-12-13 Yao Qi <yao@codesourcery.com>
5359
5360 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5361 macros.
5362 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5363
5364 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5365
5366 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5367 Print new debug message for such case.
5368
5369 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5370
5371 Fix overlapping memcpy.
5372 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5373 the read_inferior_memory transfer.
5374 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5375 write_inferior_memory transfer.
5376 (set_fast_tracepoint_jump): New variable buf. Use it for the
5377 read_inferior_memory and write_inferior_memory transfers.
5378 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5379 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5380 Use it for the write_inferior_memory transfer.
5381 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5382 buffers.
5383
5384 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5385
5386 * linux-low.c (fetch_register, store_register): Make code
5387 consistent, fix formatting.
5388
5389 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5390
5391 * linux-low.c (usr_store_inferior_registers): Factor out code
5392 to handle individual registers into...
5393 (store_register): ... this new function.
5394
5395 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5396
5397 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5398 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5399 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5400 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5401 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5402 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5403 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5404 (srv_xmlfiles): Add new XML files.
5405
5406 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5407 and <sys/uio.h>.
5408 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5409 (init_registers_s390_linux32v1): Add prototype.
5410 (init_registers_s390_linux32v2): Likewise.
5411 (init_registers_s390_linux64v1): Likewise.
5412 (init_registers_s390_linux64v2): Likewise.
5413 (init_registers_s390x_linux64v1): Likewise.
5414 (init_registers_s390x_linux64v2): Likewise.
5415 (s390_num_regs): Increment to 52.
5416 (s390_regmap): Add orig_r2 register.
5417 (s390_num_regs_3264): Increment to 68.
5418 (s390_regmap_3264): Add orig_r2 register.
5419 (s390_collect_ptrace_register): Handle orig_r2 register.
5420 (s390_supply_ptrace_register): Likewise.
5421 (s390_fill_last_break): New function.
5422 (s390_store_last_break): Likewise.
5423 (s390_fill_system_call): New function.
5424 (s390_store_system_call): Likewise.
5425 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5426 register sets.
5427 (s390_check_regset): New function.
5428 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5429 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5430 Update target_regsets for available register sets.
5431
5432 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5433 Jan Kratochvil <jan.kratochvil@redhat.com>
5434
5435 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5436 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5437 New.
5438 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5439 * linux-low.h (struct process_info_private): New member r_debug.
5440 * server.c (handle_qxfer_libraries): Call
5441 the_target->qxfer_libraries_svr4.
5442 (handle_qxfer_libraries_svr4): New function.
5443 (qxfer_packets): New entry "libraries-svr4".
5444 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5445 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5446 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5447 PACKET_qXfer_libraries_svr4.
5448
5449 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5450
5451 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5452 PSW address/mask between 8-byte and 16-byte formats.
5453 (s390_supply_ptrace_register): Likewise.
5454 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5455 basic addressing mode bit.
5456
5457 2011-11-24 Stan Shebs <stan@codesourcery.com>
5458
5459 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5460
5461 2011-11-17 Stan Shebs <stan@codesourcery.com>
5462
5463 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5464 (tracing_start_time): New global.
5465 (tracing_stop_time): New global.
5466 (tracing_user_name): New global.
5467 (tracing_notes): New global.
5468 (tracing_stop_note): New global.
5469 (cmd_qtstart): Set traceframe_usage, start_time.
5470 (stop_tracing): Set stop_time.
5471 (cmd_qtstatus): Report additional status.
5472 (cmd_qtp): New function.
5473 (handle_tracepoint_query): Call it.
5474 (cmd_qtnotes): New function.
5475 (handle_tracepoint_general_set): Call it.
5476 (get_timestamp): Rename from tsv_get_timestamp.
5477
5478 2011-11-14 Stan Shebs <stan@codesourcery.com>
5479 Kwok Cheung Yeung <kcy@codesourcery.com>
5480
5481 * linux-x86-low.c (small_jump_insn): New.
5482 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5483 trampoline and error message, build a trampoline and issue a small
5484 jump instruction to it.
5485 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5486 trampoline and error message.
5487 (x86_get_min_fast_tracepoint_insn_len): New.
5488 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5489 * linux-low.h (struct linux_target_ops): Add arguments to
5490 install_fast_tracepoint_jump_pad operation, add new operation.
5491 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5492 arguments.
5493 (linux_get_min_fast_tracepoint_insn_len): New function.
5494 (linux_target_op): Add new operation.
5495 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5496 (gdb_trampoline_buffer_end): Ditto.
5497 (gdb_trampoline_buffer_error): Ditto.
5498 (struct ipa_sym_addresses): Add fields for new IPA variables.
5499 (symbol_list): Add entries for new IPA variables.
5500 (struct tracepoint): Add fields to hold the address range of the
5501 trampoline used by the tracepoint.
5502 (trampoline_buffer_head): New static variable.
5503 (trampoline_buffer_tail): Ditto.
5504 (claim_trampoline_space): New function.
5505 (have_fast_tracepoint_trampoline_buffer): New function.
5506 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5507 structure.
5508 (install_fast_tracepoint): Ditto, also add error buffer argument.
5509 (cmd_qtminftpilen): New function.
5510 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5511 (fast_tracepoint_from_trampoline_address): New function.
5512 (fast_tracepoint_collecting): Handle trampoline as part of jump
5513 pad space.
5514 (set_trampoline_buffer_space): New function.
5515 (initialize_tracepoint): Initialize new IPA variables.
5516 * target.h (struct target_ops): Add arguments to
5517 install_fast_tracepoint_jump_pad operation, add new
5518 get_min_fast_tracepoint_insn_len operation.
5519 (target_get_min_fast_tracepoint_insn_len): New.
5520 (install_fast_tracepoint_jump_pad): Add arguments.
5521 * server.h (IPA_BUFSIZ): Define.
5522 * linux-i386-ipa.c: Include extra header files.
5523 (initialize_fast_tracepoint_trampoline_buffer): New function.
5524 (initialize_low_tracepoint): Call it.
5525 * server.h (set_trampoline_buffer_space): Declare.
5526 (claim_trampoline_space): Ditto.
5527 (have_fast_tracepoint_trampoline_buffer): Ditto.
5528
5529 2011-11-14 Yao Qi <yao@codesourcery.com>
5530
5531 * server.c (handle_query): Handle InstallInTrace for qSupported.
5532 * tracepoint.c (add_tracepoint): Sort list.
5533 (install_tracepoint, download_tracepoint): New.
5534 (cmd_qtdp): Call them to install and download tracepoints.
5535 (sort_tracepoints): Removed.
5536 (cmd_qtstart): Update.
5537
5538 2011-11-14 Yao Qi <yao@codesourcery.com>
5539
5540 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5541 * mem-break.h: Declare.
5542 * tracepoint.c (cmd_qtstart): Move some code to ...
5543 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5544 New.
5545 (download_tracepoints): Move some code to ...
5546 (download_tracepoint_1): ... here. New.
5547
5548 2011-11-08 Yao Qi <yao@codesourcery.com>
5549
5550 * remote-utils.c (relocate_instruction): A comment fix.
5551
5552 2011-11-07 Joel Brobecker <brobecker@adacore.com>
5553
5554 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5555 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5556 dr_status_mirror and dr_control_mirror from debug_reg_state.
5557 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5558 (i386_initial_stuff): Remove use of deleted globals.
5559 (i386_get_thread_context, i386_set_thread_context,
5560 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5561 from debug_reg_state.
5562
5563 2011-11-05 Yao Qi <yao@codesourcery.com>
5564
5565 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5566 address as TPOINT's.
5567
5568 2011-11-02 Stan Shebs <stan@codesourcery.com>
5569
5570 * tracepoint.c (agent_mem_read_string): New function.
5571 (eval_agent_expr): Call it for tracenz.
5572 * server.c (handle_query): Report support for tracenz.
5573
5574 2011-11-02 Yao Qi <yao@codesourcery.com>
5575
5576 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5577
5578 2011-11-02 Yao Qi <yao@codesourcery.com>
5579
5580 * target.h: Fix a typo in comment.
5581
5582 2011-10-31 Pedro Alves <pedro@codesourcery.com>
5583
5584 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5585 clobber the breakpoints' shadows with fast tracepoint jumps.
5586 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5587 * target.c (write_inferior_memory): Also pass MYADDR down to
5588 check_mem_write.
5589
5590 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5591
5592 * configure.ac: Check support for personality routine.
5593 * configure: Regenerate.
5594 * config.in: Likewise.
5595 * linux-low.c: Include <sys/personality.h>.
5596 Define ADDR_NO_RANDOMIZE if necessary.
5597 (linux_create_inferior): Disable address space randomization when
5598 forking inferior, if requested.
5599 (linux_supports_disable_randomization): New function.
5600 (linux_target_ops): Install it.
5601 * server.h (disable_randomization): Declare.
5602 * server.c (disable_randomization): New global variable.
5603 (handle_general_set): Handle QDisableRandomization.
5604 (handle_query): Likewise for qSupported.
5605 (main): Support --disable-randomization and --no-disable-randomization
5606 command line arguments.
5607 * target.h (struct target_ops): Add supports_disable_randomization.
5608 (target_supports_disable_randomization): New macro.
5609
5610 2011-09-29 Mike Frysinger <vapier@gentoo.org>
5611
5612 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5613 ifdef check.
5614 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5615 [!PT_GETDSBT] (target_loadmap): New definition.
5616 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5617 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5618 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5619 and PT_GETDSBT to LINUX_LOADMAP.
5620 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5621 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5622
5623 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5624
5625 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5626 (arm_linux_hwbp_cap): New static variable.
5627 (arm_linux_get_hwbp_cap): Replace by ...
5628 (arm_linux_init_hwbp_cap): ... this new function.
5629 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5630 (arm_linux_get_hw_watchpoint_count): Likewise.
5631 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5632 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5633 (arm_prepare_to_resume): Use perror_with_name instead of error.
5634
5635 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5636
5637 * linux-arm-low.c: Include <signal.h>.
5638 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5639 (struct arm_linux_hwbp_cap): New data type.
5640 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5641 (struct arm_linux_hw_breakpoint): New data type.
5642 (MAX_BPTS, MAX_WPTS): Define.
5643 (struct arch_process_info, struct arch_lwp_info): New data types.
5644 (arm_linux_get_hwbp_cap): New function.
5645 (arm_linux_get_hw_breakpoint_count): Likewise.
5646 (arm_linux_get_hw_watchpoint_count): Likewise.
5647 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5648 (arm_hwbp_control_initialize): Likewise.
5649 (arm_hwbp_control_is_enabled): Likewise.
5650 (arm_hwbp_control_is_initialized): Likewise.
5651 (arm_hwbp_control_disable): Likewise.
5652 (arm_linux_hw_breakpoint_equal): Likewise.
5653 (arm_linux_hw_point_initialize): Likewise.
5654 (struct update_registers_data): New data structure.
5655 (update_registers_callback: New function.
5656 (arm_insert_point): Likewise.
5657 (arm_remove_point): Likewise.
5658 (arm_stopped_by_watchpoint): Likewise.
5659 (arm_stopped_data_address): Likewise.
5660 (arm_new_process): Likewise.
5661 (arm_new_thread): Likewise.
5662 (arm_prepare_to_resume): Likewise.
5663 (the_low_target): Register arm_insert_point, arm_remove_point,
5664 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5665 arm_new_thread, and arm_prepare_to_resume.
5666
5667 2011-09-15 Stan Shebs <stan@codesourcery.com>
5668
5669 * server.h (struct emit_ops): Add compare-goto fields.
5670 * tracepoint.c (gdb_agent_op_sizes): New table.
5671 (emit_eq_goto): New function.
5672 (emit_ne_goto): New function.
5673 (emit_lt_goto): New function.
5674 (emit_le_goto): New function.
5675 (emit_gt_goto): New function.
5676 (emit_ge_goto): New function.
5677 (is_goto_target): New function.
5678 (compile_bytecodes): Recognize special cases of compare-goto
5679 combinations and call specialized emitters for them.
5680 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5681 (amd64_emit_ne_goto): New function.
5682 (amd64_emit_lt_goto): New function.
5683 (amd64_emit_le_goto): New function.
5684 (amd64_emit_gt_goto): New function.
5685 (amd64_emit_ge_goto): New function.
5686 (amd64_emit_ops): Add the new functions.
5687 (i386_emit_eq_goto): New function.
5688 (i386_emit_ne_goto): New function.
5689 (i386_emit_lt_goto): New function.
5690 (i386_emit_le_goto): New function.
5691 (i386_emit_gt_goto): New function.
5692 (i386_emit_ge_goto): New function.
5693 (i386_emit_ops): Add the new functions.
5694
5695 2011-09-08 Stan Shebs <stan@codesourcery.com>
5696
5697 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5698 (i386_emit_epilogue): Restore %ebx.
5699
5700 2011-08-31 Jie Zhang <jzhang918@gmail.com>
5701
5702 * server.c (step_thread): Remove definition.
5703 (process_serial_event): Don't handle Hs.
5704 * server.h (step_thread): Remove declaration.
5705 * target.c (set_desired_inferior): Remove use of step_thread.
5706
5707 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5708
5709 * linux-low.c: Include linux-procfs.h.
5710 (linux_attach_lwp_1): Update comments.
5711 (linux_attach): Scan for existing threads when attaching to a
5712 process that is the tgid.
5713 * Makefile.in: Update dependencies.
5714
5715 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5716
5717 * configure.srv: Add linux-procfs.o dependencies.
5718
5719 2011-08-14 Yao Qi <yao@codesourcery.com>
5720
5721 * target.h (struct target_ops): Fix indent.
5722 * win32-low.c (win32_target_ops): Fix comment.
5723
5724 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
5725 Yao Qi <yao@codesourcery.com>
5726
5727 * Makefile.in (clean): Remove tic6x-*.c files.
5728 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5729 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5730 (tic6x-c64xp-linux.c): Likewise.
5731 * configure.srv: Add support for tic6x-*-uclinux.
5732 * linux-tic6x-low.c: New.
5733 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5734
5735 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
5736 Yao Qi <yao@codesourcery.com>
5737
5738 * target.h (struct target_ops): Add read_loadmap.
5739 * linux-low.c (struct target_loadseg): New type.
5740 (struct target_loadmap): New type.
5741 (linux_read_loadmap): New function.
5742 (linux_target_ops): Add linux_read_loadmap.
5743 * server.c (handle_query): Support qXfer:fdpic:read packet.
5744 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5745 to NULL.
5746
5747 2011-08-05 Eli Zaretskii <eliz@gnu.org>
5748
5749 * win32-low.c: Include <stdint.h>.
5750
5751 2011-07-22 Pedro Alves <pedro@codesourcery.com>
5752
5753 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5754 to the inferior here.
5755 (i386_remove_aligned_watchpoint): Ditto.
5756 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5757 fit part of the watchpoint in the debug registers.
5758 (i386_update_inferior_debug_regs): New.
5759 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5760 registers, and only update the inferior on success.
5761 (i386_low_remove_watchpoint): Ditto.
5762
5763 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5764
5765 * linux-low.c (compare_ints, unique, list_threads, show_process,
5766 linux_core_of_thread): Delete.
5767 (linux_target_ops): Change linux_core_of_thread to
5768 linux_common_core_of_thread.
5769 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5770 * utils.c (malloc_failure): Change type of argument.
5771 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5772 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5773 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5774 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5775 (IPA_OBJS): Add common-utils-ipa.o.
5776 (ptid_h, linux_osdata_h): New macros.
5777 (server_h): Add common/common-utils.h, common/xml-utils.h,
5778 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5779 common/ptid.h.
5780 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5781 ptid.o, buffer.o): New rules.
5782 (linux-low.o): Add common/linux-osdata.h as a dependency.
5783 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5784 * configure.ac: Add AC_HEADER_DIRENT check.
5785 * config.in: Regenerate.
5786 * configure: Regenerate.
5787 * remote-utils.c (xml_escape_text): Delete.
5788 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5789 buffer_xml_printf): Move to common/buffer.c.
5790 * server.c (main): Remove call to initialize_inferiors.
5791 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5792 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5793 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5794 internal_error, gdb_assert, gdb_assert_fail): Delete.
5795 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5796 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5797 common/buffer.h.
5798 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5799 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5800 initialize_inferiors): Delete.
5801
5802 2011-07-20 Pedro Alves <pedro@codesourcery.com>
5803
5804 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5805 symbol error.
5806
5807 2011-05-31 Pedro Alves <pedro@codesourcery.com>
5808
5809 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5810 assertion.
5811 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5812
5813 2011-05-26 Yao Qi <yao@codesourcery.com>
5814
5815 * Makefile.in (thread-db.o): Track dependence to
5816 common/gdb_thread_db.h.
5817 * thread-db.c: include gdb_thread_db.h from right place.
5818
5819 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5820
5821 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5822 __FILE__ and __LINE__ to internal_error.
5823
5824 2011-05-13 Doug Evans <dje@google.com>
5825
5826 * thread-db.c (try_thread_db_load_from_sdir): New function.
5827 (try_thread_db_load_from_dir): New function.
5828 (thread_db_load_search): Handle $sdir, ignore $pdir.
5829 Remove trying of system directories if search of
5830 libthread-db-search-path fails, that is now done via $sdir.
5831
5832 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5833
5834 * server.c (handle_query): Add EnableDisableTracepoints to the list
5835 of supported features.
5836 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
5837 tracepoints.
5838 (cmd_qtenable_disable): New.
5839 (cmd_qtstart): Install tracepoints even if disabled.
5840 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5841 receiving a QTEnable or QTDisable packet.
5842 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5843 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5844 tracepoints.
5845 (gdb_probe): Skip data collection if static tracepoint is disabled.
5846
5847 2011-05-10 Doug Evans <dje@google.com>
5848
5849 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5850
5851 2011-05-04 Doug Evans <dje@google.com>
5852
5853 * linux-low.c (linux_join): Skip process lookup.
5854 * spu-low.c (spu_join): Ditto.
5855 * server.c (join_inferiors_callback): Delete.
5856 (process_serial_event): For 'D' packet (detach) call join_inferior
5857 directly.
5858
5859 2011-05-04 Joseph Myers <joseph@codesourcery.com>
5860
5861 * README: Don't mention xscale*-*-linux*.
5862 * configure.srv (xscale*-*-linux*): Don't handle target.
5863
5864 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5865
5866 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5867 casting pointers.
5868 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5869 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5870 (i386_emit_void_call_2): Likewise.
5871
5872 2011-04-26 Yao Qi <yao@codesourcery.com>
5873
5874 * linux-low.c: Move common macros to linux-ptrace.h.
5875 Include linux-ptrace.h.
5876 * Makefile.in (linux_ptrace_h): New.
5877 (linux-low.o): Depends on linux-ptrace.h.
5878
5879 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5880
5881 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5882 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5883 (remote_prepare): New function with most of the TCP code from ...
5884 (remote_open): ... here. Detect PORT here unconditionally. Move also
5885 setting transport_is_reliable.
5886 * server.c (run_once): New variable.
5887 (gdbserver_usage): Document it.
5888 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5889 the first run if RUN_ONCE.
5890 * server.h (run_once, remote_prepare): New declarations.
5891
5892 2011-04-19 Tom Tromey <tromey@redhat.com>
5893
5894 * win32-low.c (handle_load_dll): Remove duplicate "the".
5895
5896 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5897
5898 Remove support for old Cygwin 1.5 versions.
5899 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5900 function to avoid warning.
5901 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5902 warning.
5903
5904 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5905
5906 * gdbserver/server.h (Macro _): Define it if not available.
5907
5908 2011-03-14 Michael Snyder <msnyder@vmware.com>
5909
5910 * hostio.c (handle_close): Remove unnecessary null test.
5911
5912 2011-03-10 Joel Brobecker <brobecker@adacore.com>
5913
5914 * Makefile.in (maintainer-clean realclean distclean): Remove
5915 "make ... subdir_do" command.
5916
5917 2011-03-10 Michael Snyder <msnyder@vmware.com>
5918
5919 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5920
5921 * server.c (handle_v_run): Free alloced buffer on early return.
5922
5923 2011-03-09 Yao Qi <yao@codesourcery.com>
5924
5925 Revert:
5926 2011-03-04 Yao Qi <yao@codesourcery.com>
5927
5928 * Makefile.in: Remove GNU make feature --directory.
5929
5930 2011-03-05 Yao Qi <yao@codesourcery.com>
5931
5932 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5933 (subdir_do): New make target. Copied from gdb/Makefile.
5934 (maintainer-clean, realclean, distclean, clean): Call corresponding
5935 make targets in common/Makefile.
5936
5937 2011-02-11 Yao Qi <yao@codesourcery.com>
5938
5939 * configure.ac: Call AC_PROG_RANLIB.
5940 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5941 * configure: Regenerate.
5942
5943 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5944
5945 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5946
5947 2011-03-06 Yao Qi <yao@codesourcery.com>
5948
5949 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5950
5951 2011-03-05 Yao Qi <yao@codesourcery.com>
5952
5953 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5954 (subdir_do): New make target. Copied from gdb/Makefile.
5955 (maintainer-clean, realclean, distclean, clean): Call corresponding
5956 make targets in common/Makefile.
5957
5958 2011-03-04 Yao Qi <yao@codesourcery.com>
5959
5960 * Makefile.in: Remove GNU make feature --directory.
5961
5962 2011-03-04 Michael Snyder <msnyder@vmware.com>
5963
5964 * server.c (queue_stop_reply): Call xmalloc not malloc.
5965
5966 2011-03-02 Michael Snyder <msnyder@vmware.com>
5967
5968 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5969
5970 2011-02-28 Michael Snyder <msnyder@vmware.com>
5971
5972 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5973 (cmd_qtframe): Ditto.
5974 (cmd_qtbuffer): Ditto.
5975 (cmd_bigqtbuffer): Ditto.
5976
5977 * utils.c (decimal2str): Initialize 'width' to nine, then
5978 don't mess with it.
5979
5980 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5981
5982 * hostio.c (require_data): Free *data, not data.
5983
5984 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5985
5986 * hostio.c (require_data): Use free, not xfree.
5987
5988 2011-02-27 Michael Snyder <msnyder@vmware.com>
5989
5990 * server.c (handle_query): Discard unused value.
5991
5992 * hostio.c (require_data): Free malloc memory before returning
5993 error.
5994
5995 2011-02-26 Michael Snyder <msnyder@vmware.com>
5996
5997 * linux-low.c (list_threads): Call closedir for dirent.
5998
5999 2011-02-27 Michael Snyder <msnyder@vmware.com>
6000
6001 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6002 a case statement falls through.
6003
6004 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6005
6006 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6007 in comparison.
6008
6009 2011-02-26 Michael Snyder <msnyder@vmware.com>
6010
6011 * utils.c (decimal2str): Eliminate dead code and dead param.
6012 (pulongest): Drop dead param from call to decimal2str.
6013 (plongest): Ditto.
6014
6015 2011-02-24 Joel Brobecker <brobecker@adacore.com>
6016
6017 Revert the following patch (not approved yet):
6018 2011-02-21 Hui Zhu <teawater@gmail.com>
6019 * tracepoint.c (tp_printf): New function.
6020 (eval_agent_expr): Handle gdb_agent_op_printf.
6021
6022 2011-02-21 Hui Zhu <teawater@gmail.com>
6023
6024 * tracepoint.c (tp_printf): New function.
6025 (eval_agent_expr): Handle gdb_agent_op_printf.
6026
6027 2011-02-18 Tom Tromey <tromey@redhat.com>
6028
6029 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6030 (tracepoint.o): Likewise.
6031 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6032 (gdb_agent_op_names): Likewise.
6033
6034 2011-02-18 Tom Tromey <tromey@redhat.com>
6035
6036 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6037 gdb_agent_op_rot>: New constants.
6038 (gdb_agent_op_names): Add pick and roll.
6039 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6040 cases.
6041
6042 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6043
6044 * aclocal.m4: Regenerated with aclocal-1.11.1.
6045
6046 2011-02-14 Pedro Alves <pedro@codesourcery.com>
6047
6048 * server.c (handle_qxfer_traceframe_info): New.
6049 (qxfer_packets): Register "traceframe-info".
6050 (handle_query): Report support for qXfer:traceframe-info:read+.
6051 * tracepoint.c (match_blocktype): New.
6052 (traceframe_find_block_type): Rename to ...
6053 (traceframe_walk_blocks): ... this. Add callback filter argument,
6054 and use it.
6055 (traceframe_find_block_type): New, reimplemented on top of
6056 traceframe_walk_blocks.
6057 (build_traceframe_info_xml): New.
6058 (traceframe_read_info): New.
6059 * server.h (traceframe_read_info): Declare.
6060
6061 2011-02-11 Yao Qi <yao@codesourcery.com>
6062
6063 * configure.ac: Call AC_PROG_RANLIB.
6064 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6065 * configure: Regenerate.
6066
6067 2011-02-07 Pedro Alves <pedro@codesourcery.com>
6068
6069 * server.c (gdb_read_memory): Change return semantics to allow
6070 partial transfers.
6071 (handle_search_memory_1): Adjust.
6072 (process_serial_event) <'m' packet>: Handle partial transfers.
6073 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6074
6075 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6076
6077 * regcache.c (init_register_cache): Initialize
6078 regcache->register_status.
6079 (free_register_cache): Release regcache->register_status.
6080 (regcache_cpy): Copy register_status.
6081 (registers_to_string): Print 'x's for unavailable registers.
6082 (supply_register): Mark the register's status valid or
6083 unavailable, depending on whether a buffer was passed in or not.
6084 (supply_register_zeroed): New.
6085 (supply_regblock): Mark the registers' status valid or
6086 unavailable, depending on whether a buffer was passed in or not.
6087 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6088 (struct regcache): New `register_status' field.
6089 (supply_register_zeroed): Declare.
6090 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6091 supply_register_zeroed, rather than passing a NULL buffer to
6092 supply_register.
6093 * tracepoint.c (fetch_traceframe_registers): Update comment.
6094
6095 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6096
6097 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6098 buffer explicit.
6099
6100 2011-01-25 Pedro Alves <pedro@codesourcery.com>
6101
6102 * server.h (decode_xfer_write): Change prototype.
6103 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6104 and don't extract the annex here.
6105 * server.c (decode_xfer_read): Remove `annex' parameter,
6106 and don't extract the annex here.
6107 (decode_xfer): New.
6108 (struct qxfer): New.
6109 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6110 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6111 (handle_qxfer_statictrace): New functions, abstracted out from
6112 handle_query, and made to use the struct qxfer interface.
6113 (handle_threads_qxfer_proper): Rename to ...
6114 (handle_qxfer_threads_proper): ... this.
6115 (handle_threads_qxfer): Rename to ...
6116 (handle_qxfer_threads): ... this. Adjust.
6117 (qxfer_packets): New array.
6118 (handle_qxfer): New function.
6119 (handle_query): Use handle_qxfer.
6120
6121 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6122
6123 * gdbreplay.c: Shorten lines of >= 80 columns.
6124 * linux-low.c: Ditto.
6125 * linux-ppc-low.c: Ditto.
6126 * linux-s390-low.c: Ditto.
6127 * linux-sparc-low.c: Ditto.
6128 * linux-x86-low.c: Ditto.
6129 * linux-xtensa-low.c: Ditto.
6130 * mem-break.c: Ditto.
6131 * nto-low.c: Ditto.
6132 * regcache.h: Ditto.
6133 * remote-utils.c: Ditto.
6134 * server.c: Ditto.
6135 * server.h: Ditto.
6136 * thread-db.c: Ditto.
6137 * tracepoint.c: Ditto.
6138 * utils.c: Ditto.
6139 * win32-low.h: Ditto.
6140
6141 2011-01-05 Joel Brobecker <brobecker@adacore.com>
6142
6143 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6144 update.
6145
6146 2011-01-01 Joel Brobecker <brobecker@adacore.com>
6147
6148 * server.c (gdbserver_version): Update copyright year in version
6149 output.
6150 * gdbreplay.c (gdbreplay_version): Ditto.
6151
6152 2010-12-29 Jie Zhang <jie.zhang@analog.com>
6153
6154 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6155 * linux-bfin-low.c: New file.
6156 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6157 PT_DATA_ADDR for BFIN targets.
6158 * Makefile.in (SFILES): Add linux-bfin-low.c.
6159 (clean): Remove reg-bfin.c.
6160 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6161 * README: Mention supported Blackfin targets.
6162
6163 2010-12-23 Mike Frysinger <vapier@gentoo.org>
6164
6165 * .gitignore: New file.
6166
6167 2010-11-16 Mike Frysinger <vapier@gentoo.org>
6168
6169 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6170
6171 2010-10-22 Jie Zhang <jie@codesourcery.com>
6172
6173 * Makefile.in: Add FLAGS_TO_PASS variable.
6174 (install): Remove dependency of install-only and recursively
6175 invoke make for install-only.
6176
6177 2010-10-04 Doug Evans <dje@google.com>
6178
6179 * Makefile.in (uninstall): Use $(DESTDIR).
6180
6181 2010-09-24 Pedro Alves <pedro@codesourcery.com>
6182
6183 PR gdb/11842
6184
6185 * linux-x86-low.c (compat_siginfo_from_siginfo)
6186 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6187 si_code is < 0. Check for si_code == SI_TIMER before checking for
6188 si_code < 0.
6189
6190 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6191
6192 * lynx-i386-low.c: New file.
6193 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6194
6195 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6196
6197 * lynx-low.c (ptrace_request_to_str): Remove handling for
6198 request values that have been removed in LynxOS 5.x.
6199
6200 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6201
6202 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6203 <ptrace.h>
6204
6205 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6206
6207 * configure.ac: Add --enable-inprocess-agent option.
6208 * configure: Rebuilt.
6209
6210 2010-09-06 Yao Qi <yao@codesourcery.com>
6211
6212 * linux-low.c (linux_kill): Remove unused variable.
6213 (linux_stabilize_threads): Likewise.
6214 * server.c (start_inferior): Likewise.
6215 (queue_stop_reply_callback): Likewise.
6216 * tracepoint.c (do_action_at_tracepoint): Likewise.
6217
6218 2010-09-06 Yao Qi <yao@codesourcery.com>
6219
6220 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6221 on return.
6222
6223 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6224
6225 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6226
6227 2010-09-06 Pedro Alves <pedro@codesourcery.com>
6228
6229 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6230 "$(IPA_DEPFILES)".
6231
6232 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6233
6234 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6235 gdbserver/lynx-ppc-low.c: New files.
6236 * Makefile.in (lynx_low_h): New variable.
6237 (lynx-low.o, lynx-ppc-low.o): New rules.
6238 * configure.ac: On LynxOS, link with -lnetinet.
6239 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6240 * configure: regenerate.
6241
6242 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6243
6244 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6245 * configure.ac: Add check for vasprintf and vsnprintf.
6246 * configure, config.in: Regenerate.
6247 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6248
6249 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6250
6251 * gdbreplay.c: Move include of alloca.h up, next to include of
6252 malloc.h.
6253 * server.h: Add include of malloc.h.
6254 * mem-break.c: Remove include of malloc.h.
6255 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6256
6257 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6258
6259 * Makefile.in (memmem.o): Build with -Wno-error.
6260
6261 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6262
6263 * utils.c (xsnprintf): Make non-static.
6264 * server.h: Add xsnprintf declaration.
6265 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6266 replace calls to snprintf by calls to xsnprintf throughout.
6267
6268 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6269
6270 * configure.ac: Add configure check for alloca.
6271 * configure, config.in: Regenerate.
6272 * server.h: Include alloca.h if it exists.
6273 * gdbreplay.c: Include alloca.h if it exists.
6274
6275 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6276
6277 * linux-low.c (__SIGRTMIN): Define if not already defined.
6278 (linux_create_inferior): Check for __ANDROID__ rather than
6279 __SIGRTMIN.
6280 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6281 are already deferred.
6282 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6283 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6284 stopped and already has a pending signal to report.
6285 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6286 a pending signal to report or is moving out of a jump pad.
6287 (linux_init_signals): Check for __ANDROID__ rather than
6288 __SIGRTMIN.
6289
6290 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6291
6292 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6293 debug_threads check. Avoid a linear search when not doing debug
6294 output.
6295
6296 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6297
6298 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6299 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6300 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6301 (process_event): Change local fd's type to gdb_fildes_t.
6302 (create_file_handler): Adjust prototype.
6303 (delete_file_handler): Adjust prototype.
6304 (handle_file_event): Adjust prototype. Use pfildes.
6305 (create_file_event): Adjsut prototype.
6306 * remote-utils.c (remote_desc, listen_desc): Change type to
6307 gdb_fildes_t.
6308 * server.h: New gdb_fildes_t typedef.
6309 [USE_WIN32API]: Include winsock2.h.
6310 (delete_file_handler, add_file_handler): Adjust prototypes.
6311 (pfildes): Declare.
6312 * utils.c (pfildes): New.
6313
6314 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6315
6316 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6317 * configure: Regenerate.
6318
6319 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6320
6321 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6322 (linux_done_accessing_memory): ... this.
6323 (linux_target_ops): Adjust.
6324 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6325 * nto-low.c (nto_target_ops): Adjust comment.
6326 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6327 * spu-low.c (spu_target_ops): Adjust comment.
6328 * target.h (target_ops): Rename unprepare_to_access_memory field
6329 to done_accessing_memory.
6330 (unprepare_to_access_memory): Rename to ...
6331 (done_accessing_memory): ... this.
6332
6333 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6334
6335 * linux-low.c (linux_prepare_to_access_memory): New.
6336 (linux_unprepare_to_access_memory): New.
6337 (linux_target_ops): Install them.
6338 * server.c (read_memory): Rename to ...
6339 (gdb_read_memory): ... this. Use
6340 prepare_to_access_memory/prepare_to_access_memory.
6341 (write_memory): Rename to ...
6342 (gdb_write_memory): ... this. Use
6343 prepare_to_access_memory/prepare_to_access_memory.
6344 (handle_search_memory_1): Adjust.
6345 (process_serial_event): Adjust.
6346 * target.h (struct target_ops): New fields
6347 prepare_to_access_memory and unprepare_to_access_memory.
6348 (prepare_to_access_memory, unprepare_to_access_memory): New.
6349 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6350 prepare_to_access_memory/prepare_to_access_memory.
6351 * nto-low.c (nto_target_ops): Adjust.
6352 * spu-low.c (spu_target_ops): Adjust.
6353 * win32-low.c (win32_target_ops): Adjust.
6354
6355 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6356
6357 * Makefile.in (WARN_CFLAGS): Get it from configure.
6358 (WERROR_CFLAGS): New.
6359 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6360 * configure.ac: Introduce --enable-werror, which adds -Werror to
6361 the compiler command line. Enabled by default. Disable with
6362 --disable-werror. Add -Wdeclaration-after-statement
6363 Wpointer-arith and -Wformat-nonliteral to warning flags.
6364 * configure: Regenerate.
6365
6366 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6367
6368 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6369
6370 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6371
6372 * gdbreplay.c (remote_error): New.
6373 (gdbchar): New.
6374 (expect): Use gdbchar. Check for error reading from GDB.
6375 Clarify sync error output.
6376 (play): Check for errors writing to GDB.
6377 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6378 * remote-utils.c (getpkt): Check for errors writing to the remote
6379 descriptor.
6380
6381 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6382
6383 * linux-low.c (linux_wait_1): Move non-debugging code out of
6384 `debug_threads' control.
6385
6386 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6387
6388 * linux-low.c (linux_wait_1): Don't set last_status here.
6389 * server.c (push_event, queue_stop_reply_callback): Assert we're
6390 not pushing a TARGET_WAITKIND_IGNORE event.
6391 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6392 (myresume, handle_target_event): Set the thread's last_resume_kind
6393 and last_status from the target returned status.
6394
6395 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6396
6397 PR threads/10729
6398
6399 * linux-x86-low.c (update_debug_registers_callback): New.
6400 (i386_dr_low_set_addr): Use it.
6401 (i386_dr_low_get_addr): New.
6402 (i386_dr_low_set_control): Use update_debug_registers_callback.
6403 (i386_dr_low_get_control): New.
6404 (i386_dr_low_get_status): Adjust.
6405 * linux-low.c (linux_stop_lwp): New.
6406 * linux-low.h (linux_stop_lwp): Declare.
6407
6408 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6409 argument instead of a i386_debug_reg_state.
6410 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6411 a i386_debug_reg_state.
6412 (i386_insert_aligned_watchpoint): Adjust.
6413 (i386_remove_aligned_watchpoint): Adjust.
6414 (i386_low_stopped_data_address): Read the debug registers from the
6415 inferior instead of from the mirrors.
6416 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6417 (i386_dr_low_get_addr): Declare.
6418 (i386_dr_low_get_control): Declare.
6419 (i386_dr_low_get_status): Change prototype.
6420
6421 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6422 (i386_dr_low_get_addr): New.
6423 (i386_dr_low_get_control): New.
6424 (i386_dr_low_get_status): Adjust prototype. Return
6425 dr_status_mirror.
6426 (i386_initial_stuff): Clear dr_status_mirror and
6427 dr_control_mirror.
6428 (i386_get_thread_context): Adjust.
6429 (i386_set_thread_context): Adjust.
6430 (i386_thread_added): Adjust.
6431
6432 2010-08-24 Pedro Alves <pedro@codesourcery.com>
6433
6434 * linux-low.h (linux_thread_area): Delete declaration.
6435
6436 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6437
6438 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6439 after its termination.
6440
6441 2010-08-09 Pedro Alves <pedro@codesourcery.com>
6442
6443 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6444 (gdb_wants_all_stopped): Delete.
6445 (linux_wait_1): Don't call them.
6446 * server.c (handle_v_cont): Tag all threads as want-stopped.
6447 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6448 stopped as "client-wants-stopped".
6449
6450 2010-07-31 Pedro Alves <pedro@codesourcery.com>
6451
6452 * Makefile.in (signals_h): New.
6453 (server_h): Depend on it.
6454 (server.o): Don't depend on $(signals_def).
6455 (signals.o): Depend on $(signals_def).
6456
6457 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6458
6459 * Makefile.in (signals_def): New.
6460 (server_h): Append include/gdb/signals.h and signals_def.
6461 (server.o): Append signals_def.
6462
6463 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6464
6465 * server.c (handle_target_event): Use target_signal_to_host for
6466 resume_info.sig initialization.
6467 * target.h (struct thread_resume) <sig>: New comment.
6468
6469 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6470
6471 * server.c (handle_query): strcpy() the returned string from paddress()
6472 instead of sprintf().
6473 * utils.c (paddress): Return phex_nz().
6474
6475 2010-07-07 Joel Brobecker <brobecker@adacore.com>
6476
6477 * server.c (handle_v_cont): Call mourn_inferior if process
6478 just exited.
6479 (myresume): Likewise.
6480
6481 2010-07-01 Pedro Alves <pedro@codesourcery.com>
6482
6483 Static tracepoints, and integration with UST.
6484
6485 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6486 * mem-break.c (uninsert_all_breakpoints)
6487 (reinsert_all_breakpoints): New.
6488 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6489 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6490 (gdb_agent_ust_loaded, helper_thread_id)
6491 (gdb_agent_helper_thread_id): New macros.
6492 (struct ipa_sym_addresses): Add addr_ust_loaded,
6493 addr_helper_thread_id, addr_cmd_buf.
6494 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6495 (in_process_agent_loaded_ust): New.
6496 (write_e_ust_not_loaded): New.
6497 (maybe_write_ipa_ust_not_loaded): New.
6498 (struct collect_static_trace_data_action): New.
6499 (enum tracepoint_type) <static_tracepoint>: New.
6500 (struct tracepoint) <handle>: Mention static tracepoints.
6501 (struct static_tracepoint_ctx): New.
6502 (CMD_BUF_SIZE): New.
6503 (add_tracepoint_action): Handle static tracepoint actions.
6504 (unprobe_marker_at): New.
6505 (clear_installed_tracepoints): Handle static tracepoints.
6506 (cmd_qtdp): Handle static tracepoints.
6507 (probe_marker_at): New.
6508 (cmd_qtstart): Handle static tracepoints.
6509 (response_tracepoint): Handle static tracepoints.
6510 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6511 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6512 (get_context_regcache): Handle static tracepoints.
6513 (do_action_at_tracepoint): Handle static tracepoint actions.
6514 (traceframe_find_block_type): Handle static trace data blocks.
6515 (traceframe_read_sdata): New.
6516 (download_tracepoints): Download static tracepoint actions.
6517 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6518 (GDB_PROBE_NAME): New.
6519 (ust_ops): New.
6520 (GET_UST_SYM): New.
6521 (USTF): New.
6522 (dlsym_ust): New.
6523 (ust_marker_to_static_tracepoint): New.
6524 (gdb_probe): New.
6525 (collect_ust_data_at_tracepoint): New.
6526 (gdb_ust_probe): New.
6527 (UNIX_PATH_MAX, SOCK_DIR): New.
6528 (gdb_ust_connect_sync_socket): New.
6529 (resume_thread, stop_thread): New.
6530 (run_inferior_command): New.
6531 (init_named_socket): New.
6532 (gdb_ust_socket_init): New.
6533 (cstr_to_hexstr): New.
6534 (next_st): New.
6535 (first_marker, next_marker): New.
6536 (response_ust_marker): New.
6537 (cmd_qtfstm, cmd_qtsstm): New.
6538 (unprobe_marker_at, probe_marker_at): New.
6539 (cmd_qtstmat, gdb_ust_thread): New.
6540 (gdb_ust_init): New.
6541 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6542 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6543 (ST_REGENTRY): New.
6544 (x86_64_st_collect_regmap): New.
6545 (X86_64_NUM_ST_COLLECT_GREGS): New.
6546 (AMD64_RIP_REGNUM): New.
6547 (supply_static_tracepoint_registers): New.
6548 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6549 (ST_REGENTRY): New.
6550 (i386_st_collect_regmap): New.
6551 (i386_NUM_ST_COLLECT_GREGS): New.
6552 (supply_static_tracepoint_registers): New.
6553 * server.c (handle_query): Handle qXfer:statictrace:read.
6554 <qSupported>: Report support for StaticTracepoints, and
6555 qXfer:statictrace:read features.
6556 * server.h (traceframe_read_sdata)
6557 (supply_static_tracepoint_registers): Declare.
6558 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6559 (unpack_varlen_hex): Include in IPA build.
6560 * Makefile.in (ustlibs, ustinc): New.
6561 (IPA_OBJS): Add remote-utils-ipa.o.
6562 ($(IPA_LIB)): Link -ldl and -lpthread.
6563 (UST_CFLAGS): New.
6564 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6565 * config.in, configure: Regenerate.
6566
6567 2010-06-20 Ian Lance Taylor <iant@google.com>
6568 Pedro Alves <pedro@codesourcery.com>
6569
6570 * linux-x86-low.c (always_true): Delete.
6571 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6572 trying to fool the compiler with always_true.
6573
6574 2010-06-20 Pedro Alves <pedro@codesourcery.com>
6575
6576 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6577 conditions in gdbserver.
6578
6579 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6580
6581 * spu-low.c (spu_read_memory): Wrap around local store limit.
6582 (spu_write_memory): Likewise.
6583
6584 2010-06-15 Pedro Alves <pedro@codesourcery.com>
6585
6586 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6587 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6588 LONGEST uses.
6589 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6590 uses.
6591 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6592 uses with LONGEST uses.
6593
6594 2010-06-14 Stan Shebs <stan@codesourcery.com>
6595 Pedro Alves <pedro@codesourcery.com>
6596
6597 Bytecode compiler.
6598
6599 * linux-x86-low.c: Include limits.h.
6600 (add_insns): New.
6601 (always_true): New.
6602 (EMIT_ASM): New.
6603 (EMIT_ASM32): New.
6604 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6605 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6606 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6607 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6608 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6609 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6610 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6611 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6612 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6613 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6614 (amd64_emit_void_call_2): New.
6615 (amd64_emit_ops): New.
6616 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6617 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6618 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6619 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6620 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6621 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6622 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6623 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6624 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6625 (i386_emit_stack_adjust, i386_emit_int_call_1)
6626 (i386_emit_void_call_2): New.
6627 (i386_emit_ops): New.
6628 (x86_emit_ops): New.
6629 (the_low_target): Install x86_emit_ops.
6630 * server.h (struct emit_ops): New.
6631 (get_raw_reg_func_addr): Declare.
6632 (current_insn_ptr, emit_error): Declare.
6633 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6634 (set_trace_state_variable_value): New defines.
6635 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6636 addr_get_trace_state_variable_value and
6637 addr_set_trace_state_variable_value.
6638 (symbol_list): New fields for get_raw_reg,
6639 get_trace_state_variable_value and set_trace_state_variable_value.
6640 (condfn): New typedef.
6641 (struct tracepoint): New field `compiled_cond'.
6642 (do_action_at_tracepoint): Clear compiled_cond.
6643 (get_trace_state_variable_value, set_trace_state_variable_value):
6644 Export in the IPA.
6645 (condition_true_at_tracepoint): If there's a compiled condition,
6646 run that.
6647 (current_insn_ptr, emit_error): New globals.
6648 (struct bytecode_address): New.
6649 (get_raw_reg_func_addr): New.
6650 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6651 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6652 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6653 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6654 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6655 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6656 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6657 (compile_tracepoint_condition, compile_bytecodes): New.
6658 * target.h (emit_ops): Forward declare.
6659 (struct target_ops): New field emit_ops.
6660 (target_emit_ops): New.
6661 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6662 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6663 * linux-low.c (linux_emit_ops): New.
6664 (linux_target_ops): Install it.
6665 * linux-low.h (struct linux_target_ops): New field emit_ops.
6666
6667 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6668
6669 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6670 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6671
6672 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6673 Stan Shebs <stan@codesourcery.com>
6674
6675 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6676 (all): Depend on $(extra_libraries).
6677 (install-only): Install the IPA.
6678 (IPA_OBJS, IPA_LIB): New.
6679 (clean): Remove the IPA lib.
6680 (IPAGENT_CFLAGS): New.
6681 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6682 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6683 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6684 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6685 * configure.ac: Check for atomic builtins support in the compiler.
6686 (IPA_DEPFILES, extra_libraries): Define.
6687 * configure.srv (ipa_obj): Add description.
6688 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6689 (i[34567]86-*-linux*): Set ipa_obj.
6690 (x86_64-*-linux*): Set ipa_obj.
6691 * linux-low.c (stabilizing_threads): New.
6692 (supports_fast_tracepoints): New.
6693 (linux_detach): Stabilize threads before detaching.
6694 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6695 the lwp is either not stabilizing, or is moving out of a jump pad.
6696 (linux_fast_tracepoint_collecting): New.
6697 (maybe_move_out_of_jump_pad): New.
6698 (enqueue_one_deferred_signal): New.
6699 (dequeue_one_deferred_signal): New.
6700 (linux_wait_for_event_1): If moving out of a jump pad, defer
6701 pending signals to later.
6702 (linux_stabilize_threads): New.
6703 (linux_wait_1): Check if threads need moving out of jump pads, and
6704 do it if so.
6705 (stuck_in_jump_pad_callback): New.
6706 (move_out_of_jump_pad_callback): New.
6707 (lwp_running): New.
6708 (linux_resume_one_lwp): Handle moving out of jump pads.
6709 (linux_set_resume_request): Dequeue deferred signals.
6710 (need_step_over_p): Also step over fast tracepoint jumps.
6711 (start_step_over): Also uninsert fast tracepoint jumps.
6712 (finish_step_over): Also reinsert fast tracepoint jumps.
6713 (linux_install_fast_tracepoint_jump): New.
6714 (linux_target_ops): Install linux_stabilize_threads and
6715 linux_install_fast_tracepoint_jump_pad.
6716 * linux-low.h (linux_target_ops) <get_thread_area,
6717 install_fast_tracepoint_jump_pad>: New fields.
6718 (struct lwp_info) <collecting_fast_tracepoint,
6719 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6720 (linux_get_thread_area): Declare.
6721 * linux-x86-low.c (jump_insn): New.
6722 (x86_get_thread_area): New.
6723 (append_insns): New.
6724 (push_opcode): New.
6725 (amd64_install_fast_tracepoint_jump_pad): New.
6726 (i386_install_fast_tracepoint_jump_pad): New.
6727 (x86_install_fast_tracepoint_jump_pad): New.
6728 (the_low_target): Install x86_get_thread_area and
6729 x86_install_fast_tracepoint_jump_pad.
6730 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6731 (struct fast_tracepoint_jump): New.
6732 (fast_tracepoint_jump_insn): New.
6733 (fast_tracepoint_jump_shadow): New.
6734 (find_fast_tracepoint_jump_at): New.
6735 (fast_tracepoint_jump_here): New.
6736 (delete_fast_tracepoint_jump): New.
6737 (set_fast_tracepoint_jump): New.
6738 (uninsert_fast_tracepoint_jumps_at): New.
6739 (reinsert_fast_tracepoint_jumps_at): New.
6740 (set_breakpoint_at): Use write_inferior_memory.
6741 (uninsert_raw_breakpoint): Use write_inferior_memory.
6742 (check_mem_read): Mask out fast tracepoint jumps.
6743 (check_mem_write): Mask out fast tracepoint jumps.
6744 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6745 (set_fast_tracepoint_jump): Declare.
6746 (delete_fast_tracepoint_jump)
6747 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6748 (reinsert_fast_tracepoint_jumps_at): Declare.
6749 * regcache.c: Don't compile many functions when building the
6750 in-process agent library.
6751 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6752 the register buffer in the heap.
6753 (free_register_cache): If the register buffer isn't owned by the
6754 regcache, don't free it.
6755 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6756 pre-existing register caches.
6757 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6758 type.
6759 (convert_ascii_to_int): : Constify `from' parameter type.
6760 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6761 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6762 the needed buffer in-place.
6763 (relocate_instruction): New.
6764 * server.c (handle_query) <qSymbols>: If the target supports
6765 tracepoints, give it a chance of looking up symbols. Report
6766 support for fast tracepoints.
6767 (handle_status): Stabilize threads.
6768 (process_serial_event): Adjust.
6769 * server.h (struct fast_tracepoint_jump): Forward declare.
6770 (struct process_info) <fast_tracepoint_jumps>: New field.
6771 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6772 (decode_X_packet, decode_M_packet): Adjust.
6773 (relocate_instruction): Declare.
6774 (in_process_agent_loaded): Declare.
6775 (tracepoint_look_up_symbols): Declare.
6776 (struct fast_tpoint_collect_status): Declare.
6777 (fast_tracepoint_collecting): Declare.
6778 (force_unlock_trace_buffer): Declare.
6779 (handle_tracepoint_bkpts): Declare.
6780 (initialize_low_tracepoint)
6781 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6782 * target.h (struct target_ops) <stabilize_threads,
6783 install_fast_tracepoint_jump_pad>: New fields.
6784 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6785 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6786 [HAVE_STDINT_H]: Include stdint.h.
6787 (trace_debug_1): Rename to ...
6788 (trace_vdebug): ... this.
6789 (trace_debug): Rename to ...
6790 (trace_debug_1): ... this. Add `level' parameter.
6791 (trace_debug): New.
6792 (ATTR_USED, ATTR_NOINLINE): New.
6793 (IP_AGENT_EXPORT): New.
6794 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6795 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6796 (about_to_request_buffer_space, trace_buffer_is_full)
6797 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6798 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6799 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6800 (traceframe_write_count, traceframes_created)
6801 (trace_state_variables)
6802 New renaming defines.
6803 (struct ipa_sym_addresses): New.
6804 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6805 (symbol_list): New.
6806 (ipa_sym_addrs): New.
6807 (all_tracepoint_symbols_looked_up): New.
6808 (in_process_agent_loaded): New.
6809 (write_e_ipa_not_loaded): New.
6810 (maybe_write_ipa_not_loaded): New.
6811 (tracepoint_look_up_symbols): New.
6812 (debug_threads) [IN_PROCESS_AGENT]: New.
6813 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6814 (UNKNOWN_SIDE_EFFECTS): New.
6815 (stop_tracing): New.
6816 (flush_trace_buffer): New.
6817 (stop_tracing_bkpt): New.
6818 (flush_trace_buffer_bkpt): New.
6819 (read_inferior_integer): New.
6820 (read_inferior_uinteger): New.
6821 (read_inferior_data_pointer): New.
6822 (write_inferior_data_pointer): New.
6823 (write_inferior_integer): New.
6824 (write_inferior_uinteger): New.
6825 (struct collect_static_trace_data_action): Delete.
6826 (enum tracepoint_type): New.
6827 (struct tracepoint) <type>: New field `type'.
6828 <actions_str, step_actions, step_actions_str>: Only include in
6829 GDBserver.
6830 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6831 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6832 (tracepoints): Use IP_AGENT_EXPORT.
6833 (last_tracepoint): Don't include in the IPA.
6834 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6835 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6836 (alloced_trace_state_variables): New.
6837 (trace_state_variables): Use IP_AGENT_EXPORT.
6838 (traceframe_t): Delete unused variable.
6839 (circular_trace_buffer): Don't include in the IPA.
6840 (trace_buffer_start): Delete.
6841 (struct trace_buffer_control): New.
6842 (trace_buffer_free): Delete.
6843 (struct ipa_trace_buffer_control): New.
6844 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6845 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6846 New.
6847 (trace_buffer_ctrl): New.
6848 (TRACE_BUFFER_CTRL_CURR): New.
6849 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6850 Reimplement as macros.
6851 (trace_buffer_wrap): Delete.
6852 (traceframe_write_count, traceframe_read_count)
6853 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6854 (struct tracepoint_hit_ctx) <type>: New field.
6855 (struct fast_tracepoint_ctx): New.
6856 (memory_barrier): New.
6857 (cmpxchg): New.
6858 (record_tracepoint_error): Update atomically in the IPA.
6859 (clear_inferior_trace_buffer): New.
6860 (about_to_request_buffer_space): New.
6861 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6862 updating the same buffer.
6863 (add_tracepoint): Default the tracepoint's type to trap
6864 tracepoint, and orig_size to -1.
6865 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6866 internal variables.
6867 (create_trace_state_variable): New parameter `gdb'. Handle it.
6868 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6869 (cmd_qtdp): Handle fast tracepoints.
6870 (cmd_qtdv): Adjust.
6871 (max_jump_pad_size): New.
6872 (gdb_jump_pad_head): New.
6873 (get_jump_space_head): New.
6874 (claim_jump_space): New.
6875 (sort_tracepoints): New.
6876 (MAX_JUMP_SIZE): New.
6877 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6878 IPA.
6879 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6880 support. Upload fast traceframes, and delete internal IPA
6881 breakpoints.
6882 (stop_tracing_handler): New.
6883 (flush_trace_buffer_handler): New.
6884 (cmd_qtstop): Upload fast tracepoints.
6885 (response_tracepoint): Handle fast tracepoints.
6886 (tracepoint_finished_step): Upload fast traceframes. Set the
6887 tracepoint hit context's tracepoint type.
6888 (handle_tracepoint_bkpts): New.
6889 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6890 type. Add comment about fast tracepoints.
6891 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6892 non-existing action_str field.
6893 (get_context_regcache): Handle fast tracepoints.
6894 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6895 to the regcache.
6896 (fast_tracepoint_from_jump_pad_address): New.
6897 (fast_tracepoint_from_ipa_tpoint_address): New.
6898 (collecting_t): New.
6899 (force_unlock_trace_buffer): New.
6900 (fast_tracepoint_collecting): New.
6901 (collecting): New.
6902 (gdb_collect): New.
6903 (write_inferior_data_ptr): New.
6904 (target_tp_heap): New.
6905 (target_malloc): New.
6906 (download_agent_expr): New.
6907 (UALIGN): New.
6908 (download_tracepoints): New.
6909 (download_trace_state_variables): New.
6910 (upload_fast_traceframes): New.
6911 (IPA_FIRST_TRACEFRAME): New.
6912 (IPA_NEXT_TRACEFRAME_1): New.
6913 (IPA_NEXT_TRACEFRAME): New.
6914 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6915 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6916 (gdb_jump_pad_buffer_end): New.
6917 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6918 (initialize_tracepoint): Adjust.
6919 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6920 buffer. Initialize the low module.
6921 * utils.c (PREFIX, TOOLNAME): New.
6922 (malloc_failure): Use PREFIX.
6923 (error): In the IPA, an error causes an exit.
6924 (fatal, warning): Use PREFIX.
6925 (internal_error): Use TOOLNAME.
6926 (NUMCELLS): Increase to 10.
6927 * configure, config.in: Regenerate.
6928
6929 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6930
6931 * server.c (handle_query) <qSupported>: Do two passes over the
6932 qSupported string to avoid nesting strtok.
6933
6934 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6935
6936 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6937 (CDEPS): New.
6938 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6939 -Wl,--dynamic-list.
6940 * configure: Regenerate.
6941 * proc-service.list: New.
6942
6943 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6944
6945 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6946 New comment.
6947
6948 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6949
6950 * gdbreplay.c (remote_open): Check error return from socket() call by
6951 its equality to -1 not by it being negative.
6952 * remote-utils.c (remote_open): Likewise.
6953
6954 2010-05-23 Pedro Alves <pedro@codesourcery.com>
6955
6956 * config.h: Regenerate.
6957
6958 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6959
6960 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6961 doesn't provide PTRACE_GET_THREAD_AREA.
6962
6963 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6964
6965 * linux-m68k-low.c: Include <asm/ptrace.h>
6966 (ps_get_thread_area): Implement.
6967
6968 2010-05-03 Doug Evans <dje@google.com>
6969
6970 * event-loop.c (struct callback_event): New struct.
6971 (callback_list): New global.
6972 (append_callback_event, delete_callback_event): New functions.
6973 (process_callback): New function.
6974 (start_event_loop): Call it.
6975 * remote-utils.c (NOT_SCHEDULED): Define.
6976 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6977 moved out of readchar.
6978 (readchar): Rewrite. Call reschedule before returning.
6979 (reset_readchar): New function.
6980 (remote_close): Call it.
6981 (process_remaining, reschedule): New functions.
6982 * server.h (callback_handler_func): New typedef.
6983 (append_callback_event, delete_callback_event): Declare.
6984
6985 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6986
6987 * proc-service.c (ps_pglobal_lookup): Use
6988 thread_db_look_up_one_symbol.
6989 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6990 parameter. Use it instead of all_symbols_looked_up.
6991 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6992 field.
6993 (all_symbols_looked_up): Don't declare.
6994 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6995 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6996 field.
6997 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6998 Set all_symbols_looked_up here.
6999 (thread_db_look_up_one_symbol): New.
7000 (thread_db_get_tls_address): Adjust.
7001 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7002 thread_db object on the heap, and tentatively set it in the
7003 process structure.
7004 (thread_db_init): Don't set all_symbols_looked_up here.
7005 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7006
7007 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7008
7009 * linux-low.c (linux_kill, linux_detach): Adjust.
7010 (status_pending_p_callback): Remove redundant statement. Check
7011 for !TARGET_WAITIKIND_IGNORE, instead of
7012 TARGET_WAITKIND_STOPPED.
7013 (handle_tracepoints): Make sure LWP is locked. Adjust.
7014 (linux_wait_for_event_1): Adjust.
7015 (linux_cancel_breakpoints): New.
7016 (unsuspend_one_lwp): New.
7017 (unsuspend_all_lwps): New.
7018 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7019 (send_sigstop_callback): Change return type to int, add new
7020 `except' parameter and handle it.
7021 (suspend_and_send_sigstop_callback): New.
7022 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7023 pass them down. If SUSPEND, also increment the lwp's suspend
7024 count.
7025 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7026 (need_step_over_p): Don't consider suspended LWPs.
7027 (start_step_over): Adjust.
7028 (proceed_one_lwp): Change return type to int, add new `except'
7029 parameter and handle it.
7030 (unsuspend_and_proceed_one_lwp): New.
7031 (proceed_all_lwps): Use find_inferior instead of
7032 for_each_inferior.
7033 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7034 also decrement the suspend count of LWPs. Pass `except' down,
7035 instead of hacking its suspend count.
7036 (linux_pause_all): Add `freeze' parameter. Adjust.
7037 (linux_unpause_all): New.
7038 (linux_target_ops): Install linux_unpause_all.
7039 * server.c (handle_status): Adjust.
7040 * target.h (struct target_ops): New fields `unpause_all' and
7041 `cancel_breakpoints'. Add new parameter to `pause_all'.
7042 (pause_all): Add new `freeze' parameter.
7043 (unpause_all): New.
7044 (cancel_breakpoints): New.
7045 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7046 cancel breakpoints.
7047 (cmd_qtstart): Pause threads.
7048 (stop_tracing): Pause threads, and cancel breakpoints.
7049 * win32-low.c (win32_target_ops): Adjust.
7050
7051 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7052
7053 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7054 the inferior right away from here...
7055 (linux_wait_1): ... to here, and adjust to check the thread's
7056 last_resume_kind instead of the lwp's step or stop_expected flags.
7057
7058 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7059
7060 * README: Use consistent `GDB' and `GDBserver' spellings.
7061
7062 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7063
7064 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7065 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7066 (linux_detach_one_lwp): Assume the lwp is stopped.
7067 (any_thread_of): Delete.
7068 (linux_detach): Stop all lwps here. Don't blindly delete all
7069 breakpoints.
7070 (delete_lwp_callback): New.
7071 (linux_mourn): Delete all lwps of the process that is gone.
7072 (linux_wait_1): Don't delete the last lwp of the process here.
7073 * mem-break.h (mark_breakpoints_out): Declare.
7074 * mem-break.c (mark_breakpoints_out): New.
7075 (free_all_breakpoints): Use it.
7076 * server.c (handle_target_event): If the process is gone, mark
7077 breakpoints out.
7078 * thread-db.c (struct thread_db) <create_bp>: New field.
7079 (thread_db_enable_reporting): Fix prototype. Store a thread event
7080 breakpoint reference in the thread_db struct.
7081 (thread_db_load_search): Clear the thread_db object.
7082 (try_thread_db_load_1): Ditto.
7083 (switch_to_process): New.
7084 (disable_thread_event_reporting): Use it.
7085 (remove_thread_event_breakpoints): New.
7086 (thread_db_detach, thread_db_mourn): Use it.
7087
7088 2010-05-01 Pedro Alves <pedro@codesourcery.com>
7089
7090 * linux-low.c (linux_enable_event_reporting): New.
7091 (linux_wait_for_event_1, handle_extended_wait): Use it.
7092
7093 2010-04-30 Pedro Alves <pedro@codesourcery.com>
7094
7095 * linux-low.c (linux_kill_one_lwp, linux_kill)
7096 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7097 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7098 SIGSTOP even if the LWP is stopped.
7099 (send_sigstop_callback): New.
7100 (stop_all_lwps): Use send_sigstop_callback instead.
7101 (linux_resume_one_thread): Adjust.
7102 (proceed_one_lwp): Still proceed an LWP that the client has
7103 requested to stop, if we haven't reported it as stopped yet. Make
7104 sure that LWPs the client want stopped, have a pending SIGSTOP.
7105
7106 2010-04-26 Doug Evans <dje@google.com>
7107
7108 * server.c (handle_general_set): Make static.
7109
7110 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7111 Print received char after testing for error/eof instead of before.
7112 (input_interrupt): Tweak comment.
7113
7114 2010-04-23 Doug Evans <dje@google.com>
7115
7116 * server.c (start_inferior): Print inferior argv if --debug.
7117
7118 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7119
7120 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7121 * nto-x86-low.c: Include server.h
7122
7123 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7124
7125 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7126 be consistent with other sources of this directory.
7127 (init_registers_amd64): Correct name of source file of this function
7128 in the comment.
7129
7130 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7131
7132 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7133 64-bit executables.
7134
7135 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7136
7137 * win32-i386-low.c: Add 64-bit support.
7138 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7139 (init_registers_amd64): Declare.
7140 (mappings): Add 64-bit version of array.
7141 (init_windows_x86): New function.
7142 (the_low_target): Change init_arch field to init_windows_x86.
7143
7144 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7145
7146 * win32-low.c: Adapt to support also 64-bit architecture.
7147 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7148 (get_image_name): Use SIZE_T type for local variable `done'.
7149 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7150 (toolhelp_get_dll_name): Idem.
7151 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7152 Use uintptr_t typecast to avoid warning.
7153 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7154 (handle_exception): Use phex_nz to avoid warning.
7155 (win32_wait): Remove unused local variable `process'.
7156
7157 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7158
7159 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7160 `amd64-avx.o'.
7161
7162 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7163
7164 * configure.ac: Use `ws2_32' library for srv_mingw.
7165 * configure: Regenerate.
7166 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7167 * remote-utils.c: Likewise.
7168
7169 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7170
7171 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7172 if __x86_64__ is defined.
7173
7174 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7175
7176 * configure: Regenerate.
7177
7178 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7179
7180 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7181 * target.h (target_ops): New get_tib_address field.
7182 * win32-low.h (win32_thread_info): Add thread_local_base field.
7183 * win32-low.c (child_add_thread): Add tlb argument.
7184 Set thread_local_base field to TLB.
7185 (get_child_debug_event): Adapt to child_add_thread change.
7186 (win32_get_tib_address): New function.
7187 (win32_target_ops): Set get_tib_address field to
7188 win32_get_tib_address.
7189 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7190
7191 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7192
7193 * linux-low.c (linux_mourn): Also remove the process.
7194 * server.c (handle_target_event): Don't remove the process here.
7195 * nto-low.c (nto_mourn): New.
7196 (nto_target_ops): Install it.
7197 * spu-low.c (spu_mourn): New.
7198 (spu_target_ops): Install it.
7199 * win32-low.c (win32_mourn): New.
7200 (win32_target_ops): Install it.
7201
7202 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7203
7204 * server.h (buffer_xml_printf): Remove redundant `;'.
7205
7206 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7207
7208 * regcache.c (set_register_cache): Invalidate regcaches before
7209 changing the register cache layout.
7210 (regcache_invalidate_one): Allow a NULL regcache.
7211 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7212 regcaches before changing the register cache layout or the target
7213 regsets.
7214
7215 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7216
7217 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7218 variable warning on Linux/x86-64.
7219
7220 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7221
7222 GDBserver disconnected tracing support.
7223
7224 * linux-low.c (linux_remove_process): Delete.
7225 (add_lwp): Don't set last_resume_kind here.
7226 (linux_kill): Use `mourn'.
7227 (linux_detach): Use `thread_db_detach', and `mourn'.
7228 (linux_mourn): New.
7229 (linux_attach_lwp_1): Adjust comment.
7230 (linux_attach): last_resume_kind moved the thread_info; adjust.
7231 (status_pending_p_callback): Adjust.
7232 (linux_wait_for_event_1): Adjust.
7233 (count_events_callback, select_singlestep_lwp_callback)
7234 (select_event_lwp_callback, cancel_breakpoints_callback)
7235 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7236 (proceed_one_lwp): Adjust.
7237 (linux_async): Add debug output.
7238 (linux_thread_stopped): New.
7239 (linux_pause_all): New.
7240 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7241 linux_pause_all.
7242 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7243 (thread_db_free): Delete declaration.
7244 (thread_db_detach, thread_db_mourn): Declare.
7245 * thread-db.c (thread_db_init): Use thread_db_mourn.
7246 (thread_db_free): Delete, split in two.
7247 (disable_thread_event_reporting): New.
7248 (thread_db_detach): New.
7249 (thread_db_mourn): New.
7250
7251 * server.h (struct thread_info) <last_resume_kind>: New field.
7252 <attached>: Add comment.
7253 <gdb_detached>: New field.
7254 (handler_func): Change return type to int.
7255 (handle_serial_event, handle_target_event): Ditto.
7256 (gdb_connected): Declare.
7257 (tracing): Delete.
7258 (disconnected_tracing): Declare.
7259 (stop_tracing): Declare.
7260
7261 * server.c (handle_query) <qSupported>: Report support for
7262 disconnected tracing.
7263 (queue_stop_reply_callback): Account for running threads.
7264 (gdb_wants_thread_stopped): New.
7265 (gdb_wants_all_threads_stopped): New.
7266 (gdb_reattached_process): New.
7267 (handle_status): Clear the `gdb_detached' flag of all processes.
7268 In all-stop, stop all threads.
7269 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7270 (process_serial_event): If the remote connection breaks, or if an
7271 exit was forced with "monitor exit", force an event loop exit.
7272 Handle disconnected tracing on detach.
7273 (handle_serial_event): Adjust.
7274 (handle_target_event): If GDB isn't connected, forward events back
7275 to the inferior, unless the last process exited, in which case,
7276 exit gdbserver. Adjust interface.
7277
7278 * remote-utils.c (remote_open): Don't block in accept. Instead
7279 register an event loop source on the listen socket file
7280 descriptor. Refactor bits into ...
7281 (listen_desc): ... this new global.
7282 (gdb_connected): ... this new function.
7283 (enable_async_notification): ... this new function.
7284 (handle_accept_event): ... this new function.
7285 (remote_close): Clear remote_desc.
7286
7287 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7288
7289 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7290 New fields.
7291 (mourn_inferior): Define.
7292 (target_process_qsupported): Avoid the dangling else problem.
7293 (thread_stopped): Define.
7294 (pause_all): Define.
7295 (target_waitstatus_to_string): Declare.
7296 * target.c (target_waitstatus_to_string): New.
7297
7298 * tracepoint.c (tracing): Make extern.
7299 (disconnected_tracing): New.
7300 (stop_tracing): Make extern. Handle tracing stops due to GDB
7301 disconnecting.
7302 (cmd_qtdisconnected): New.
7303 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7304 (handle_tracepoint_general_set): Handle QTDisconnected.
7305
7306 * event-loop.c (event_handler_func): Change return type to int.
7307 (process_event): Bail out if the event handler wants the event
7308 loop to stop.
7309 (handle_file_event): Ditto.
7310 (start_event_loop): Bail out if the event handler wants the event
7311 loop to stop.
7312
7313 * nto-low.c (nto_target_ops): Adjust.
7314 * spu-low.c (spu_wait): Don't remove the process here.
7315 (spu_target_ops): Adjust.
7316 * win32-low.c (win32_wait): Don't remove the process here.
7317 (win32_target_ops): Adjust.
7318
7319 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7320
7321 * regcache.c (realloc_register_cache): Invalidate inferior's
7322 regcache before recreating it.
7323
7324 2010-04-09 Pedro Alves <pedro@codesourcery.com>
7325
7326 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7327
7328 2010-04-09 Stan Shebs <stan@codesourcery.com>
7329 Pedro Alves <pedro@codesourcery.com>
7330
7331 * server.h (LONGEST): New.
7332 (struct thread_info) <while_stepping>: New field.
7333 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7334 Declare.
7335 (initialize_tracepoint, handle_tracepoint_general_set)
7336 (handle_tracepoint_query, tracepoint_finished_step)
7337 (tracepoint_was_hit, release_while_stepping_state_list):
7338 (current_traceframe): Declare.
7339 * server.c (handle_general_set): Handle tracepoint packets.
7340 (read_memory): New.
7341 (write_memory): New.
7342 (handle_search_memory_1): Use read_memory.
7343 (handle_query): Report support for conditional tracepoints, trace
7344 state variables, and tracepoint sources. Handle tracepoint
7345 queries.
7346 (main): Initialize the tracepoints module.
7347 (process_serial_event): Handle traceframe reads/writes.
7348
7349 * linux-low.c (handle_tracepoints): New.
7350 (linux_wait_1): Call it.
7351 (linux_resume_one_lwp): Handle while-stepping.
7352 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7353 (linux_target_ops): Install them.
7354 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7355 New field.
7356 * linux-x86-low.c (x86_supports_tracepoints): New.
7357 (the_low_target). Install it.
7358
7359 * mem-break.h (delete_breakpoint): Declare.
7360 * mem-break.c (delete_breakpoint): Make external.
7361
7362 * target.h (struct target_ops): Add `supports_tracepoints',
7363 `read_pc', and `write_pc' fields.
7364 (target_supports_tracepoints): Define.
7365 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7366 (phex_nz): New.
7367
7368 * regcache.h (struct regcache) <registers_owned>: New field.
7369 (init_register_cache, regcache_cpy): Declare.
7370 (regcache_read_pc, regcache_write_pc): Declare.
7371 (register_cache_size): Declare.
7372 (supply_regblock): Declare.
7373 * regcache.c (init_register_cache): New.
7374 (new_register_cache): Use it.
7375 (regcache_cpy): New.
7376 (register_cache_size): New.
7377 (supply_regblock): New.
7378 (regcache_read_pc, regcache_write_pc): New.
7379
7380 * tracepoint.c: New.
7381
7382 * Makefile.in (OBS): Add tracepoint.o.
7383 (tracepoint.o): New rule.
7384
7385 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7386
7387 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7388 (i386-mmx.o): New.
7389 (i386-mmx.c): Likewise.
7390 (i386-mmx-linux.o): Likewise.
7391 (i386-mmx-linux.c): Likewise.
7392
7393 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7394 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7395 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7396 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7397
7398 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7399 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7400 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7401
7402 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7403
7404 * Makefile.in (clean): Updated.
7405 (i386-avx.o): New.
7406 (i386-avx.c): Likewise.
7407 (i386-avx-linux.o): Likewise.
7408 (i386-avx-linux.c): Likewise.
7409 (amd64-avx.o): Likewise.
7410 (amd64-avx.c): Likewise.
7411 (amd64-avx-linux.o): Likewise.
7412 (amd64-avx-linux.c): Likewise.
7413
7414 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7415 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7416 (srv_amd64_regobj): Add amd64-avx.o.
7417 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7418 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7419 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7420 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7421 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7422 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7423 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7424
7425 * i387-fp.c: Include "i386-xstate.h".
7426 (i387_xsave): New.
7427 (i387_cache_to_xsave): Likewise.
7428 (i387_xsave_to_cache): Likewise.
7429 (x86_xcr0): Likewise.
7430
7431 * i387-fp.h (i387_cache_to_xsave): Likewise.
7432 (i387_xsave_to_cache): Likewise.
7433 (x86_xcr0): Likewise.
7434
7435 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7436 * linux-crisv32-low.c (target_regsets): Likewise.
7437 * linux-m68k-low.c (target_regsets): Likewise.
7438 * linux-mips-low.c (target_regsets): Likewise.
7439 * linux-ppc-low.c (target_regsets): Likewise.
7440 * linux-s390-low.c (target_regsets): Likewise.
7441 * linux-sh-low.c (target_regsets): Likewise.
7442 * linux-sparc-low.c (target_regsets): Likewise.
7443 * linux-xtensa-low.c (target_regsets): Likewise.
7444
7445 * linux-low.c: Include <sys/uio.h>.
7446 (regsets_fetch_inferior_registers): Support nt_type.
7447 (regsets_store_inferior_registers): Likewise.
7448 (linux_process_qsupported): New.
7449 (linux_target_ops): Add linux_process_qsupported.
7450
7451 * linux-low.h (regset_info): Add nt_type.
7452 (linux_target_ops): Add process_qsupported.
7453
7454 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7455 and <sys/uio.h>.
7456 (init_registers_i386_avx_linux): New.
7457 (init_registers_amd64_avx_linux): Likewise.
7458 (xmltarget_i386_linux_no_xml): Likewise.
7459 (xmltarget_amd64_linux_no_xml): Likewise.
7460 (PTRACE_GETREGSET): Likewise.
7461 (PTRACE_SETREGSET): Likewise.
7462 (x86_fill_xstateregset): Likewise.
7463 (x86_store_xstateregset): Likewise.
7464 (use_xml): Likewise.
7465 (x86_linux_update_xmltarget): Likewise.
7466 (x86_linux_process_qsupported): Likewise.
7467 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7468 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7469 init_registers_i386_linux here. Call
7470 x86_linux_update_xmltarget.
7471 (the_low_target): Add x86_linux_process_qsupported.
7472
7473 * server.c (handle_query): Call target_process_qsupported.
7474
7475 * target.h (target_ops): Add process_qsupported.
7476 (target_process_qsupported): New.
7477
7478 2010-04-03 Pedro Alves <pedro@codesourcery.com>
7479
7480 * inferiors.c (add_thread): Set last_status kind to
7481 TARGET_WAITKIND_IGNORE.
7482 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7483 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7484 (linux_wait_1): Move `thread' local definition to block that uses
7485 it. Don't NULL initialize `event_child'.
7486 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7487 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7488 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7489
7490 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7491
7492 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7493 an extended waitstatus, or by a watchpoint.
7494 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7495 thread was stepping or has been stopped by a watchpoint.
7496
7497 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7498
7499 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7500 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7501 of another, then delete the previous, and validate all
7502 breakpoints.
7503 (validate_inserted_breakpoint): New.
7504 (delete_disabled_breakpoints): New.
7505 (validate_breakpoints): New.
7506 (check_mem_read): Validate breakpoints before trusting their
7507 shadow. Delete disabled breakpoints.
7508 (check_mem_write): Validate breakpoints before trusting they
7509 should be inserted. Delete disabled breakpoints.
7510 * mem-break.h (validate_breakpoints):
7511 * server.c (handle_query): Validate breakpoints when we see a
7512 qSymbol query.
7513
7514 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7515
7516 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7517 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7518 if we could tell there's a GDB breakpoint at stop_pc.
7519 (need_step_over_p): Don't do a step over if we find a GDB
7520 breakpoint at the resume PC.
7521
7522 * mem-break.c (struct raw_breakpoint): New.
7523 (enum bkpt_type): New type `gdb_breakpoint'.
7524 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7525 fields. New field `raw'.
7526 (find_raw_breakpoint_at): New.
7527 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7528 breakpoint instead.
7529 (set_breakpoint_at): Adjust.
7530 (delete_raw_breakpoint): New.
7531 (release_breakpoint): New.
7532 (delete_breakpoint): Rename to...
7533 (delete_breakpoint_1): ... this. Add proc parameter. Use
7534 release_breakpoint. Return ENOENT.
7535 (delete_breakpoint): Reimplement.
7536 (find_breakpoint_at): Delete.
7537 (find_gdb_breakpoint_at): New.
7538 (delete_breakpoint_at): Delete.
7539 (set_gdb_breakpoint_at): New.
7540 (delete_gdb_breakpoint_at): New.
7541 (gdb_breakpoint_here): New.
7542 (set_reinsert_breakpoint): Use release_breakpoint.
7543 (uninsert_breakpoint): Rename to ...
7544 (uninsert_raw_breakpoint): ... this.
7545 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7546 (reinsert_raw_breakpoint): Change parameter type to
7547 raw_breakpoint.
7548 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7549 instead.
7550 (check_breakpoints): Adjust. Use release_breakpoint.
7551 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7552 (breakpoint_inserted_here): Ditto.
7553 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7554 Don't trust the breakpoint's shadow if it is not inserted.
7555 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7556 (delete_all_breakpoints): Adjust.
7557 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7558 use delete_breakpoint_1.
7559
7560 * mem-break.h (breakpoints_supported): Delete declaration.
7561 (set_gdb_breakpoint_at): Declare.
7562 (gdb_breakpoint_here): Declare.
7563 (delete_breakpoint_at): Delete.
7564 (delete_gdb_breakpoint_at): Declare.
7565
7566 * server.h (struct raw_breakpoint): Forward declare.
7567 (struct process_info): New field `raw_breakpoints'.
7568
7569 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7570 breakpoints.
7571
7572 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7573
7574 * linux-low.c (status_pending_p_callback): Fix comment.
7575 (linux_wait_for_event_1): Move most of the internal breakpoint
7576 handling from here...
7577 (linux_wait_1): ... to here.
7578 (count_events_callback): New.
7579 (select_singlestep_lwp_callback): New.
7580 (select_event_lwp_callback): New.
7581 (cancel_breakpoints_callback): New.
7582 (select_event_lwp): New.
7583 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7584 priority to all LWPs that have had events that should be reported
7585 to the client. Cancel breakpoints when about to reporting the
7586 event to the client, not while stopping lwps. No longer cancel
7587 finished single-steps here.
7588 (cancel_finished_single_step): Delete.
7589 (cancel_finished_single_steps): Delete.
7590
7591 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7592
7593 * mem-break.c (enum bkpt_type): New.
7594 (struct breakpoint): New field `type'.
7595 (set_breakpoint_at): Change return type to struct breakpoint
7596 pointer. Set type to `other_breakpoint' by default.
7597 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7598 in the breakpoint list.
7599 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7600 (reinsert_breakpoint): Rename to ...
7601 (reinsert_raw_breakpoint): ... this.
7602 (reinsert_breakpoints_at): Adjust.
7603 * mem-break.h (struct breakpoint): Declare.
7604 (set_breakpoint_at): Change return type to struct breakpoint
7605 pointer.
7606
7607 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7608
7609 * server.c (handle_query): Assign, not compare.
7610
7611 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7612
7613 Teach linux gdbserver to step-over-breakpoints.
7614
7615 * linux-low.c (can_hardware_single_step): New.
7616 (supports_breakpoints): New.
7617 (handle_extended_wait): If stopping threads, read the stop pc of
7618 the new cloned LWP.
7619 (get_pc): New.
7620 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7621 low target doesn't support retrieving the PC.
7622 (add_lwp): Set last_resume_kind to resume_continue.
7623 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7624 (linux_attach): Don't clear stop_expected. Set the lwp's
7625 last_resume_kind to resume_stop.
7626 (linux_detach_one_lwp): Don't check for removed breakpoints.
7627 (check_removed_breakpoint): Delete.
7628 (status_pending_p): Rename to ...
7629 (status_pending_p_callback): ... this. Don't check for removed
7630 breakpoints. Don't consider threads that are stopped from GDB's
7631 perspective.
7632 (linux_wait_for_lwp): Always read the stop_pc here.
7633 (cancel_breakpoint): New.
7634 (step_over_bkpt): New global.
7635 (linux_wait_for_event_1): Implement stepping over breakpoints.
7636 (gdb_wants_lwp_stopped): New.
7637 (gdb_wants_all_stopped): New.
7638 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7639 single-step traps here. Store the thread's last reported target
7640 wait status.
7641 (send_sigstop): Don't clear stop_expected. Always set it,
7642 instead.
7643 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7644 (cancel_finished_single_step): New.
7645 (cancel_finished_single_steps): New.
7646 (wait_for_sigstop): Don't cancel finished single-step traps here.
7647 (linux_resume_one_lwp): Don't check for removed breakpoints.
7648 Don't set `step' on non-hardware step archs.
7649 (linux_set_resume_request): Ignore resume_stop requests if already
7650 stopping or stopped. Set the lwp's last_resume_kind.
7651 (resume_status_pending_p): Don't check for removed breakpoints.
7652 (need_step_over_p): New.
7653 (start_step_over): New.
7654 (finish_step_over): New.
7655 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7656 requests. Clear the thread's last reported target waitstatus.
7657 Don't use the `suspended' flag. Don't consider pending breakpoints.
7658 (linux_resume): Start a step-over if necessary.
7659 (proceed_one_lwp): New.
7660 (proceed_all_lwps): New.
7661 (unstop_all_lwps): New.
7662 * linux-low.h (struct lwp_info): Rewrite comment for the
7663 `suspended' flag. Add the `stop_pc' field. Delete the
7664 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7665 Add `'last_resume_kind' and `need_step_over' fields.
7666 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7667 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7668 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7669 (set_raw_breakpoint_at): New.
7670 (set_breakpoint_at): Rewrite to use it.
7671 (reinsert_breakpoint_handler): Delete.
7672 (set_reinsert_breakpoint): New.
7673 (reinsert_breakpoint_by_bp): Delete.
7674 (delete_reinsert_breakpoints): New.
7675 (uninsert_breakpoint): Rewrite.
7676 (uninsert_breakpoints_at): New.
7677 (reinsert_breakpoint): Rewrite.
7678 (reinsert_breakpoints_at): New.
7679 (check_breakpoints): Rewrite.
7680 (breakpoint_here): New.
7681 (breakpoint_inserted_here): New.
7682 (check_mem_read): Adjust.
7683 * mem-break.h (breakpoints_supported, breakpoint_here)
7684 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7685 (reinsert_breakpoint_by_bp): Delete declaration.
7686 (delete_reinsert_breakpoints): Declare.
7687 (reinsert_breakpoint): Delete declaration.
7688 (reinsert_breakpoints_at): Declare.
7689 (uninsert_breakpoint): Delete declaration.
7690 (uninsert_breakpoints_at): Declare.
7691 (check_breakpoints): Adjust prototype.
7692 * server.h: Adjust include order.
7693 (struct thread_info): Declare here. Add a `last_status' field.
7694
7695 2010-03-23 Michael Snyder <msnyder@vmware.com>
7696
7697 * server.c (crc32): New function.
7698 (handle_query): Add handling for 'qCRC:' request.
7699
7700 2010-03-23 Pedro Alves <pedro@codesourcery.com>
7701
7702 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7703 lwp had been stopped by a watchpoint.
7704
7705 2010-03-16 Pedro Alves <pedro@codesourcery.com>
7706
7707 * server.h (internal_error): Declare.
7708 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7709 * utils.c (internal_error): New function.
7710
7711 2010-03-15 Andreas Schwab <schwab@redhat.com>
7712
7713 * configure.srv: Fix typo setting srv_regobj.
7714
7715 2010-03-15 Pedro Alves <pedro@codesourcery.com>
7716
7717 * linux-low.c (fetch_register): Avoid passing a non string literal
7718 format to `error'.
7719 (usr_store_inferior_registers): Ditto.
7720
7721 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7722
7723 * linux-low.c (linux_write_memory): Bail out early if peeking
7724 memory failed.
7725
7726 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7727
7728 * linux-low.h (struct lwp_info): New fields
7729 `stopped_by_watchpoint' and `stopped_data_address'.
7730 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7731 here, and cache them in the lwp object.
7732 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7733 directly.
7734 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7735 field.
7736 (linux_stopped_by_watchpoint): Rewrite.
7737 (linux_stopped_data_address): Rewrite.
7738
7739 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
7740
7741 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7742 switching the current inferior, not before.
7743
7744 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7745
7746 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7747 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7748 i386-linux.c and amd64-linux.c.
7749 (reg-i386.o): Removed.
7750 (reg-i386.c): Likewise.
7751 (reg-i386-linux.o): Likewise.
7752 (reg-i386-linux.c): Likewise.
7753 (reg-x86-64.o): Likewise.
7754 (reg-x86-64.c): Likewise.
7755 (reg-x86-64-linux.o): Likewise.
7756 (reg-x86-64-linux.c): Likewise.
7757 (i386.o): New.
7758 (i386.c): Likewise.
7759 (i386-linux.o): Likewise.
7760 (i386-linux.c): Likewise.
7761 (amd64.o): Likewise.
7762 (amd64.c): Likewise.
7763 (amd64-linux.o): Likewise.
7764 (amd64-linux.c): Likewise.
7765
7766 * configure.srv (srv_i386_regobj): New.
7767 (srv_i386_linux_regobj): Likewise.
7768 (srv_amd64_regobj): Likewise.
7769 (srv_amd64_linux_regobj): Likewise.
7770 (srv_i386_32bit_xmlfiles): Likewise.
7771 (srv_i386_64bit_xmlfiles): Likewise.
7772 (srv_i386_xmlfiles): Likewise.
7773 (srv_amd64_xmlfiles): Likewise.
7774 (srv_i386_linux_xmlfiles): Likewise.
7775 (srv_amd64_linux_xmlfiles): Likewise.
7776 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7777 srv_xmlfiles to $srv_i386_xmlfiles.
7778 (i[34567]86-*-mingw32ce*): Likewise.
7779 (i[34567]86-*-mingw*): Likewise.
7780 (i[34567]86-*-nto*): Likewise.
7781 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7782 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7783 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7784 (x86_64-*-linux*): Likewise.
7785
7786 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7787 (init_registers_amd64_linux): New.
7788 (x86_arch_setup): Replace init_registers_x86_64_linux with
7789 init_registers_amd64_linux.
7790
7791 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7792
7793 * configure.ac: Check for libdl. If it is not available link against
7794 static libthread_db.
7795 * configure: Regenerate.
7796
7797 2010-02-22 Pedro Alves <pedro@codesourcery.com>
7798
7799 PR9605
7800
7801 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7802 handing a read watchpoint.
7803 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7804
7805 2010-02-12 Doug Evans <dje@google.com>
7806
7807 * linux-low.c (linux_supports_tracefork_flag): Document.
7808 (linux_look_up_symbols): Add comment.
7809
7810 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7811
7812 * regcache.c (supply_register): Clear regcache if buf is NULL.
7813
7814 2010-02-02 Nicolas Roche <roche@sourceware.org>
7815 Joel Brobecker <brobecker@adacore.com>
7816
7817 * inferiors.c (find_inferior): Add function documentation.
7818 (unloaded_dll): Handle the case where the unloaded dll has not
7819 been previously registered in the dll list.
7820
7821 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7822
7823 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7824 (thumb2_breakpoint): New.
7825 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7826
7827 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7828
7829 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7830 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7831 breakpoints.
7832
7833 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7834
7835 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7836
7837 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7838
7839 * linux-s390-low.c (s390_collect_ptrace_register)
7840 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7841
7842 2010-01-21 Doug Evans <dje@google.com>
7843
7844 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7845 (PTRACE_ARG4_TYPE): New macro.
7846 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7847 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7848 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7849 (usr_store_inferior_registers): Ditto.
7850 (linux_read_memory, linux_write_memory): Ditto.
7851 (linux_test_for_tracefork): Ditto.
7852
7853 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7854 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7855
7856 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7857
7858 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7859 target.
7860
7861 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7862
7863 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7864 prototype to take a regcache. Adjust.
7865
7866 2010-01-20 Pedro Alves <pedro@codesourcery.com>
7867
7868 * regcache.h (struct thread_info): Forward declare.
7869 (struct regcache): New.
7870 (new_register_cache): Adjust prototype.
7871 (get_thread_regcache): Declare.
7872 (free_register_cache): Adjust prototype.
7873 (registers_to_string, registers_from_string): Ditto.
7874 (supply_register, supply_register_by_name, collect_register)
7875 (collect_register_as_string, collect_register_by_name): Ditto.
7876 * regcache.c (struct inferior_regcache_data): Delete.
7877 (get_regcache): Rename to ...
7878 (get_thread_regcache): ... this. Adjust. Switch inferior before
7879 fetching registers.
7880 (regcache_invalidate_one): Adjust.
7881 (regcache_invalidate): Fix prototype.
7882 (new_register_cache): Return the new register cache.
7883 (free_register_cache): Change prototype.
7884 (realloc_register_cache): Adjust.
7885 (registers_to_string): Change prototype to take a regcache. Adjust.
7886 (registers_from_string): Ditto.
7887 (register_data): Ditto.
7888 (supply_register): Ditto.
7889 (supply_register_by_name): Ditto.
7890 (collect_register): Ditto.
7891 (collect_register_as_string): Ditto.
7892 (collect_register_by_name): Ditto.
7893 * server.c (process_serial_event): Adjust.
7894 * linux-low.h (regset_fill_func, regset_store_func): Change
7895 prototype.
7896 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7897 Change prototype.
7898 * linux-low.c (get_stop_pc): Adjust.
7899 (check_removed_breakpoint): Adjust.
7900 (linux_wait_for_event): Adjust.
7901 (linux_resume_one_lwp): Adjust.
7902 (fetch_register): Add regcache parameter. Adjust.
7903 (usr_store_inferior_registers): Ditto.
7904 (regsets_fetch_inferior_registers): Ditto.
7905 (regsets_store_inferior_registers): Ditto.
7906 (linux_fetch_registers, linux_store_registers): Ditto.
7907 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7908 regcache. Adjust.
7909 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7910 Ditto.
7911 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7912 prototype to take a regcache.
7913 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7914 * remote-utils.c (convert_ascii_to_int, outreg)
7915 (prepare_resume_reply): Change prototype to take a regcache.
7916 Adjust.
7917 * target.h (struct target_ops) <fetch_registers, store_registers>:
7918 Change prototype to take a regcache.
7919 (fetch_inferior_registers, store_inferior_registers): Change
7920 prototype to take a regcache. Adjust.
7921 * proc-service.c (ps_lgetregs): Adjust.
7922 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7923 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7924 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7925 take a regcache. Adjust.
7926 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7927 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7928 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7929 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7930 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7931 (cris_cannot_fetch_register):
7932 (cris_breakpoint_at): Change prototype to take a regcache.
7933 Adjust.
7934 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7935 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7936 to take a regcache. Adjust.
7937 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7938 Adjust.
7939 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7940 take a regcache. Adjust.
7941 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7942 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7943 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7944 * linux-mips-low.c (mips_get_pc):
7945 (mips_set_pc): Change prototype to take a regcache. Adjust.
7946 (mips_reinsert_addr): Adjust.
7947 (mips_collect_register): Change prototype to take a regcache.
7948 Adjust.
7949 (mips_supply_register):
7950 (mips_collect_register_32bit, mips_supply_register_32bit)
7951 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7952 (mips_store_fpregset): Ditto.
7953 * linux-ppc-low.c (ppc_supply_ptrace_register)
7954 (ppc_supply_ptrace_register): Ditto.
7955 (parse_spufs_run): Adjust.
7956 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7957 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7958 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7959 take a regcache. Adjust.
7960 * linux-s390-low.c (s390_collect_ptrace_register)
7961 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7962 (s390_set_pc): Change prototype to take a regcache. Adjust.
7963 (s390_arch_setup): Adjust.
7964 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7965 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7966 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7967 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7968 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7969 regcache. Adjust.
7970 (sparc_breakpoint_at): Adjust.
7971 * linux-xtensa-low.c (xtensa_fill_gregset):
7972 (xtensa_store_gregset):
7973 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7974 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7975 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7976 prototype to take a regcache. Adjust.
7977 * win32-arm-low.c (arm_fetch_inferior_register)
7978 (arm_store_inferior_register): Change prototype to take a
7979 regcache. Adjust.
7980 * win32-i386-low.c (i386_fetch_inferior_register)
7981 (i386_store_inferior_register): Change prototype to take a
7982 regcache. Adjust.
7983 * win32-low.c (child_fetch_inferior_registers)
7984 (child_store_inferior_registers): Change prototype to take a
7985 regcache. Adjust.
7986 (win32_wait): Adjust.
7987 (win32_fetch_inferior_registers): Change prototype to take a
7988 regcache. Adjust.
7989 (win32_store_inferior_registers): Adjust.
7990 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7991 store_inferior_register>: Change prototype to take a regcache.
7992
7993 2010-01-20 Doug Evans <dje@google.com>
7994
7995 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7996 #ifdef.
7997 (linux_wait_for_event1, linux_init_signals): Ditto.
7998 (W_STOPCODE): Provide definition if missing.
7999
8000 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8001
8002 * linux-low.c (linux_core_of_thread): New.
8003 (compare_ints, show_process, list_threads): New.
8004 (linux_qxfer_osdata): Report threads and cores.
8005 (linux_target_op): Register linux_core_of_thread.
8006 * remote-utils.c (prepare_resume_reply): Report the core.
8007 (buffer_xml_printf): Support %d specifier.
8008 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8009 New.
8010 (handle_query): Handle qXfer:threads. Announce availability
8011 thereof.
8012 * target.h (struct target_ops): New field core_of_thread.
8013
8014 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8015
8016 * Makefile.in (clean): Remove new generated files.
8017 (reg-s390.o, reg-s390.c): Remove rules.
8018 (reg-s390x.o, reg-s390x.c): Likewise.
8019 (s390-linux32.o, s390-linux32.c): Add rules.
8020 (s390-linux64.o, s390-linux64.c): Likewise.
8021 (s390x-linux64.o, s390x-linux64.c): Likewise.
8022 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8023 * linux-s390-low.c: Include <elf.h>.
8024 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8025 (init_registers_s390): Remove prototype.
8026 (init_registers_s390x): Likewise.
8027 (init_registers_s390_linux32): Add prototype.
8028 (init_registers_s390_linux64): Likewise.
8029 (init_registers_s390x_linux64): Likewise.
8030 (s390_num_regs_3264): New define.
8031 (s390_regmap_3264): New global variable.
8032 (s390_cannot_fetch_register): Remove obsolete check.
8033 (s390_cannot_store_register): Likewise.
8034 (s390_collect_ptrace_register): Handle upper/lower register halves.
8035 (s390_supply_ptrace_register): Likewise.
8036 (s390_fill_gregset): Update to register number changes.
8037 (s390_get_hwcap): New routine.
8038 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8039 Install appropriate regmap and register set.
8040
8041 2010-01-01 Joel Brobecker <brobecker@adacore.com>
8042
8043 * server.c (gdbserver_version): Update copyright year to 2010.
8044 * gdbreplay.c (gdbreplay_version): Likewise.
8045
8046 2009-12-28 Doug Evans <dje@google.com>
8047
8048 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8049 elf/external.h. Include <elf.h> instead but only if necessary.
8050
8051 2009-12-28 Pedro Alves <pedro@codesourcery.com>
8052
8053 * linux-low.c (linux_remove_process): Remove `detaching'
8054 parameter. Don't release/detach from thread_db here.
8055 (linux_kill): Release/detach from thread_db here, ...
8056 (linux_detach): ... and here, before actually detaching.
8057 (linux_wait_1): ... and here, when a process exits.
8058 * thread-db.c (any_thread_of): New.
8059 (thread_db_free): Switch the current inferior to a thread of the
8060 passed in process.
8061
8062 2009-12-21 Doug Evans <dje@google.com>
8063
8064 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8065
8066 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8067 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8068 warning ifndef __NR_tkill. Move setting of errno there too.
8069 Delete unnecessary resetting of errno after syscall.
8070 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8071
8072 * configure.ac: Check for dladdr.
8073 * config.in: Regenerate.
8074 * configure: Regenerate.
8075 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8076 (try_thread_db_load): Update.
8077
8078 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8079
8080 2009-12-18 Doug Evans <dje@google.com>
8081
8082 * event-loop.c: Include unistd.h if it exists.
8083
8084 * linux-low.c (my_waitpid): Move definition away from being in
8085 between linux_tracefork_child/linux_test_for_tracefork.
8086
8087 * gdb_proc_service.h (psaddr_t): Fix type.
8088 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8089 signature to match glibc.
8090
8091 2009-12-16 Doug Evans <dje@google.com>
8092
8093 * linux-low.c (linux_read_memory): Fix argument to read.
8094
8095 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8096
8097 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8098 events, don't leave current_inferior pointing at null.
8099
8100 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8101
8102 * win32-low.c (LOG): Delete.
8103 (OUTMSG): Output to stderr.
8104 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8105 on compile time LOG macro.
8106 (win32_wait): Fix debug output.
8107
8108 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8109
8110 * win32-low.c (win32_add_one_solib): If the dll name is
8111 "ntdll.dll", prepend the system directory to the dll path.
8112
8113 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8114
8115 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8116
8117 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
8118 Vladimir Prus <vladimir@codesourcery.com>
8119
8120 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8121 * configure.ac: Check for __mcoldfire__ and set
8122 gdb_cv_m68k_is_coldfire.
8123 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8124 reg-cf.o and reg-m68k.o.
8125 * configure: Regenerated.
8126
8127 2009-11-16 Pedro Alves <pedro@codesourcery.com>
8128
8129 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8130 Pass it to thread_db_free.
8131 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8132 proper `detaching' argument to linux_remove_process.
8133 * linux-low.h (thread_db_free): Add `detaching' parameter.
8134 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8135 to thread_db_free.
8136 (thread_db_free): Add `detaching' parameter. Only
8137 call td_ta_clear_event if detaching from process.
8138
8139 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8140
8141 * thread-db.c (thread_db_free): Fix typo.
8142
8143 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8144
8145 PR gdb/10838
8146 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8147
8148 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8149
8150 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8151 with an i686 compiler.
8152 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8153 needed.
8154 * configure: Rebuilt.
8155
8156 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8157
8158 PR gdb/10783
8159
8160 * server.c (handle_search_memory_1): Correct read_addr initialization
8161 in loop for searching subsequent chunks.
8162
8163 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8164
8165 * configure.ac: New --with-libthread-db option.
8166 * thread-db.c: Allow direct dependence on libthread_db.
8167 (thread_db_free): Adjust.
8168 * config.in: Regenerate.
8169 * configure: Likewise.
8170
8171 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8172
8173 PR gdb/10757
8174 * thread-db.c (attach_thread): New function.
8175 (maybe_attach_thread): Return success/failure.
8176 (find_new_threads_callback): Adjust.
8177 (thread_db_find_new_threads): Loop until no new threads.
8178
8179 2009-10-13 Pedro Alves <pedro@codesourcery.com>
8180
8181 * proc-service.c (ps_lgetregs): Formatting.
8182
8183 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8184
8185 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8186 * configure.ac: Adjust.
8187 * linux-low.h (struct process_info_private): Move members to struct
8188 thread_db.
8189 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8190 * linux-low.c (linux_remove_process): Adjust.
8191 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8192 * server.c (handle_query): Move code ...
8193 (handle_monitor_command): ... here. New function.
8194 * target.h (struct target_ops): New member.
8195 * thread-db.c (struct thread_db): New.
8196 (libthread_db_search_path): New variable.
8197 (thread_db_create_event, thread_db_enable_reporting)
8198 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8199 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8200 (try_thread_db_load_1, dladdr_to_soname): New functions.
8201 (try_thread_db_load, thread_db_load_search): New functions.
8202 (thread_db_init): Search for libthread_db.
8203 (thread_db_free): New function.
8204 (thread_db_handle_monitor_command): Likewise.
8205 * config.in: Regenerate.
8206 * configure: Regenerate.
8207
8208 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8209
8210 * spu-low.c (spu_kill): Wait for inferior to terminate.
8211 Call clear_inferiors.
8212 (spu_detach): Call clear_inferiors.
8213
8214 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8215
8216 * aclocal.m4: Regenerate.
8217 * config.in: Likewise.
8218 * configure: Likewise.
8219
8220 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8221
8222 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8223 (parse_spufs_run): New function.
8224 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8225 (ppc_breakpoint_at): Handle SPU breakpoints.
8226
8227 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8228
8229 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8230 (SPUFS_MAGIC): Define.
8231 (spu_enumerate_spu_ids): New function.
8232 (linux_qxfer_spu): New function.
8233 (linux_target_ops): Install linux_qxfer_spu.
8234
8235 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8236
8237 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8238 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8239 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8240 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8241 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8242 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8243 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8244 (init_registers_powerpc_cell32l): Add prototype.
8245 (init_registers_powerpc_cell64l): Likewise.
8246 (ppc_arch_setup): Detect Cell/B.E. architecture.
8247
8248 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8249
8250 * Makefile.in (datarootdir): New variable.
8251
8252 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8253
8254 * linux-low.c (linux_write_memory): Update debugging output.
8255 * Makefile.in (clean): Add new descriptions.
8256 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8257 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8258 * configure.srv: Add new files for arm*-*-linux*.
8259 * linux-arm-low.c: Add new declarations.
8260 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8261 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8262 (HWCAP_VFPv3D16): New.
8263 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8264 instead of __IWMMXT__.
8265 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8266 (arm_arch_setup): New.
8267 (target_regsets): Remove #ifdef. Add VFP regset.
8268 (the_low_target): Use arm_arch_setup.
8269
8270 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8271
8272 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8273 the main thread again.
8274
8275 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8276
8277 Adding Neutrino gdbserver.
8278 * configure: Regenerated.
8279 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8280 * configure.srv (i[34567]86-*-nto*): New target.
8281 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8282 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8283 (nto_comctrl) [__QNX__]: New function.
8284 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8285
8286 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
8287
8288 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8289 srv_tgtobj.
8290
8291 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8292 Pedro Alves <pedro@codesourcery.com>
8293
8294 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8295 don't support CONTEXT_EXTENDED_REGISTERS.
8296 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8297 (the_low_target): Install them.
8298 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8299 failing with ERROR_PIPE_NOT_CONNECTED.
8300
8301 2009-06-30 Doug Evans <dje@google.com>
8302 Pierre Muller <muller@ics.u-strasbg.fr>
8303
8304 Add h/w watchpoint support to x86-linux, win32-i386.
8305 * Makefile.in (SFILES): Add i386-low.c
8306 (i386_low_h): Define.
8307 (i386-low.o): Add dependencies.
8308 (linux-x86-low.o): Add i386-low.h dependency.
8309 (win32-i386-low.o): Ditto.
8310 * i386-low.c: New file.
8311 * i386-low.h: New file.
8312 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8313 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8314 * linux-low.c (linux_add_process): Initialize arch_private.
8315 (linux_remove_process): Free arch_private.
8316 (add_lwp): Initialize arch_private.
8317 (delete_lwp): Free arch_private.
8318 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8319 provided.
8320 * linux-low.h (process_info_private): New member arch_private.
8321 (lwp_info): New member arch_private.
8322 (linux_target_ops): New members new_process, new_thread,
8323 prepare_to_resume.
8324 (ptid_of): New macro.
8325 * linux-x86-low.c: Include stddef.h, i386-low.h.
8326 (arch_process_info): New struct.
8327 (arch_lwp_info): New struct.
8328 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8329 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8330 (i386_dr_low_get_status): New function.
8331 (x86_insert_point, x86_remove_point): New functions.
8332 (x86_stopped_by_watchpoint): New function.
8333 (x86_stopped_data_address): New function.
8334 (x86_linux_new_process, x86_linux_new_thread): New functions.
8335 (x86_linux_prepare_to_resume): New function.
8336 (the_low_target): Add entries for insert_point, remove_point,
8337 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8338 prepare_to_resume.
8339 * server.c (debug_hw_points): New global.
8340 (monitor_show_help): Document set debug-hw-points.
8341 (handle_query): Process "set debug-hw-points".
8342 * server.h (debug_hw_points): Declare.
8343 (paddress): Declare.
8344 * utils.c (NUMCELLS, CELLSIZE): New macros.
8345 (get_sell, xsnprintf, paddress): New functions.
8346 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8347 remove_point, stopped_by_watchpoint, stopped_data_address.
8348 * win32-i386-low.c: Include i386-low.h.
8349 (debug_reg_state): Replaces dr.
8350 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8351 (i386_dr_low_get_status): New function.
8352 (i386_insert_point, i386_remove_point): New functions.
8353 (i386_stopped_by_watchpoint): New function.
8354 (i386_stopped_data_address): New function.
8355 (i386_initial_stuff): Update.
8356 (get_thread_context,set_thread_context,i386_thread_added): Update.
8357 (the_low_target): Add entries for insert_point,
8358 remove_point, stopped_by_watchpoint, stopped_data_address.
8359 * win32-low.c (win32_insert_watchpoint): New function.
8360 (win32_remove_watchpoint): New function.
8361 (win32_stopped_by_watchpoint): New function.
8362 (win32_stopped_data_address): New function.
8363 (win32_target_ops): Add entries for insert_watchpoint,
8364 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8365 * win32-low.h (win32_target_ops): New members insert_point,
8366 remove_point, stopped_by_watchpoint, stopped_data_address.
8367
8368 2009-06-25 Pedro Alves <pedro@codesourcery.com>
8369
8370 * server.c (process_serial_event): Re-return unsupported, not
8371 error, if the type isn't recognized. Re-allow supporting only
8372 insert or remove packets. Also call require_running for
8373 breakpoints. Add missing break statement to default case. Tidy.
8374 * target.h (struct target_ops): Rename insert_watchpoint to
8375 insert_point, and remove_watchpoint to remove_point.
8376
8377 * linux-low.h (struct linux_target_ops): Likewise.
8378 * linux-low.c (linux_insert_watchpoint): Rename to ...
8379 (linux_insert_point): ... this. Adjust.
8380 (linux_remove_watchpoint): Rename to ...
8381 (linux_remove_point): ... this. Adjust.
8382 (linux_target_ops): Adjust.
8383 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8384 (cris_insert_point): ... this.
8385 (cris_remove_watchpoint): Rename to ...
8386 (cris_remove_point): ... this.
8387 (the_low_target): Adjust.
8388
8389 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8390
8391 * server.c (handle_v_kill): Pass signal_pid to
8392 kill_inferior if multi_process is zero.
8393
8394 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8395
8396 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8397 * target.h (target_ops): Comment for *_watchpoint to make it clear
8398 the functions can get types '0' and '1'.
8399
8400 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8401
8402 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8403 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8404 * regcache.c (get_regcache): Likewise.
8405 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8406 * win32-low.c (child_fetch_inferior_registers): Remove check for
8407 regno 0.
8408
8409 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8410 Pedro Alves <pedro@codesourcery.com>
8411
8412 * target.h (struct target_ops) <supports_multi_process>: New
8413 callback.
8414 (target_supports_multi_process): New.
8415 * server.c (handle_query): Even if GDB reports support, only
8416 enable multi-process if the target also supports it. Report
8417 multi-process support only if the target backend supports it.
8418 * linux-low.c (linux_supports_multi_process): New function.
8419 (linux_target_ops): Install it as target_supports_multi_process
8420 callback.
8421
8422 2009-05-24 Doug Evans <dje@google.com>
8423
8424 Global renaming of find_thread_pid to find_thread_ptid.
8425 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8426 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8427 All callers updated.
8428
8429 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8430 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8431 directly.
8432
8433 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8434 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8435 (linux_resume_one_lwp): Ditto.
8436
8437 2009-05-23 Doug Evans <dje@google.com>
8438
8439 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8440 from struct inferior_list_entry * to struct lwp_info *.
8441 All callers updated.
8442
8443 2009-05-13 Doug Evans <dje@google.com>
8444
8445 * linux-x86-low.c: Don't include assert.h.
8446 (x86_siginfo_fixup): Use fatal, not assert.
8447 (x86_arch_setup): Fix comment.
8448
8449 2009-05-12 Doug Evans <dje@google.com>
8450
8451 Biarch support for i386/amd64 gdbserver.
8452 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8453 Add linux-x86-low.c.
8454 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8455 (linux-x86-low.o): Add.
8456 * linux-x86-64-low.c: Delete.
8457 * linux-i386-low.c: Delete.
8458 * linux-x86-low.c: New file.
8459 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8460 linux-x86-low.o.
8461 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8462 linux-x86-low.o.
8463 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8464 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8465 (linux_child_pid_to_exec_file): New function.
8466 (elf_64_header_p, elf_64_file_p): New functions.
8467 (siginfo_fixup): New function.
8468 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8469 give target a chance to convert layout.
8470 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8471 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8472
8473 2009-05-07 Doug Evans <dje@google.com>
8474
8475 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8476 (regsets_store_inferior_registers): Ditto.
8477
8478 2009-05-06 Pedro Alves <pedro@codesourcery.com>
8479
8480 PR server/10048
8481
8482 * linux-low.c (must_set_ptrace_flags): Delete.
8483 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8484 of the global.
8485 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8486 `lwp->must_set_ptrace_flags' instead.
8487 (linux_wait_for_event_1): Set ptrace options here.
8488 (linux_wait_1): ... not here.
8489
8490 2009-04-30 Doug Evans <dje@google.com>
8491
8492 * inferiors.c (started_inferior_callback): New function.
8493 (attached_inferior_callback): New function.
8494 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8495 * server.c (print_started_pid, print_attached_pid): New functions.
8496 (detach_or_kill_for_exit): New function.
8497 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8498 * server.h (have_started_inferiors_p): Declare.
8499 (have_attached_inferiors_p): Declare.
8500
8501 * inferiors.c (remove_process): Fix memory leak, free process.
8502 * linux-low.c (linux_remove_process): New function.
8503 (linux_kill): Call it instead of remove_process.
8504 (linux_detach, linux_wait_1): Ditto.
8505
8506 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8507
8508 * configure.srv: Add x86 Windows CE target.
8509
8510 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8511
8512 * inferiors.c (get_thread_process): Make global.
8513 * server.h (get_thread_process): Add prototype.
8514 * thread-db.c (find_one_thread): Use get_thread_process
8515 instead of current_process.
8516 (thread_db_get_tls_address): Do not crash if called when
8517 thread layer is not yet initialized.
8518
8519 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8520
8521 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8522 * spu-low.c (current_tid): Rename to ...
8523 (current_ptid): ... this.
8524 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8525 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8526 ptid_get_lwp (current_ptid) instead of current_tid.
8527 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8528 instead of current_tid. Use find_process_pid to verify pid
8529 argument is valid. Pass proper argument to remove_process.
8530 (spu_thread_alive): Compare current_ptid instead of current_tid.
8531 (spu_resume): Likewise.
8532
8533 2009-04-02 Pedro Alves <pedro@codesourcery.com>
8534
8535 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8536 variable.
8537
8538 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8539
8540 Implement the multiprocess extensions, and add linux multiprocess
8541 support.
8542
8543 * server.h (ULONGEST): Declare.
8544 (struct ptid, ptid_t): New.
8545 (minus_one_ptid, null_ptid): Declare.
8546 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8547 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8548 (struct inferior_list_entry): Change `id' type from unsigned from
8549 to ptid_t.
8550 (struct sym_cache, struct breakpoint, struct
8551 process_info_private): Forward declare.
8552 (struct process_info): Declare.
8553 (current_process): Declare.
8554 (all_processes): Declare.
8555 (initialize_inferiors): Declare.
8556 (add_thread): Adjust to use ptid_t.
8557 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8558 (add_process, remove_process, find_thread_pid): Declare.
8559 (find_inferior_id): Adjust to use ptid_t.
8560 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8561 (multi_process): Declare.
8562 (push_event): Adjust to use ptid_t.
8563 (read_ptid, write_ptid): Declare.
8564 (prepare_resume_reply): Adjust to use ptid_t.
8565 (clear_symbol_cache): Declare.
8566 * inferiors.c (all_processes): New.
8567 (null_ptid, minus_one_ptid): New.
8568 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8569 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8570 (add_thread): Change unsigned long to ptid. Remove gdb_id
8571 parameter. Adjust.
8572 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8573 (gdb_id_to_thread): Rename to ...
8574 (find_thread_pid): ... this. Change unsigned long to ptid.
8575 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8576 (loaded_dll, pull_pid_from_list): Adjust.
8577 (add_process, remove_process, find_process_pid)
8578 (get_thread_process, current_process, initialize_inferiors): New.
8579 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8580 (struct target_waitstatus) <related_pid>: Ditto.
8581 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8582 return type to int.
8583 (struct target_ops) <join>: Add `pid' argument.
8584 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8585 (struct target_ops) <wait>: Add `ptid' field. Change return type
8586 to ptid.
8587 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8588 (mywait): Add `ptid' argument. Change return type to ptid_t.
8589 (target_pid_to_str): Declare.
8590 * target.c (set_desired_inferior): Adjust to use ptids.
8591 (mywait): Add new `ptid' argument. Adjust.
8592 (target_pid_to_str): New.
8593 * mem-break.h (free_all_breakpoints): Declare.
8594 * mem-break.c (breakpoints): Delelete.
8595 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8596 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8597 to use per-process breakpoint list.
8598 (free_all_breakpoints): New.
8599 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8600 (symbol_cache, all_symbols_looked_up): Delete.
8601 (hexchars): New.
8602 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8603 read_ptid): New.
8604 (prepare_resume_reply): Change ptid argument's type from unsigned
8605 long to ptid_t. Adjust. Implement W;process and X;process.
8606 (free_sym_cache, clear_symbol_cache): New.
8607 (look_up_one_symbol): Adjust to per-process symbol cache. *
8608 * server.c (cont_thread, general_thread, step_thread): Change type
8609 to ptid_t.
8610 (attached): Delete.
8611 (multi_process): New.
8612 (last_ptid): Change type to ptid_t.
8613 (struct vstop_notif) <ptid>: Change type to ptid_t.
8614 (queue_stop_reply, push_event): Change `ptid' argument's type to
8615 ptid_t.
8616 (discard_queued_stop_replies): Add `pid' argument.
8617 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8618 changes. Don't reference the `attached' global.
8619 (attach_inferior): Adjust to mywait interface changes.
8620 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8621 features. Handle and report "multiprocess+". Handle
8622 "qAttached:PID".
8623 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8624 changes.
8625 (handle_v_kill): New.
8626 (handle_v_stopped): Adjust to use target_pid_to_str.
8627 (handle_v_requests): Allow multiple attaches and runs when
8628 multiprocess extensions are in effect. Handle "vKill".
8629 (myresume): Adjust to use ptids.
8630 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8631 (handle_status): Adjust to discard_queued_stop_replies interface
8632 change.
8633 (first_thread_of, kill_inferior_callback)
8634 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8635 (main): Call initialize_inferiors. Adjust to use ptids, killing
8636 and detaching from all inferiors. Handle multiprocess packet
8637 variants.
8638 * linux-low.h: Include gdb_proc_service.h.
8639 (struct process_info_private): New.
8640 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8641 <lwpid_of>: Use ptid_get_lwp.
8642 (get_lwp_thread): Adjust.
8643 (struct lwp_info): Add `dead' member.
8644 (find_lwp_pid): Declare.
8645 * linux-low.c (thread_db_active): Delete.
8646 (new_inferior): Adjust comment.
8647 (inferior_pid): Delete.
8648 (linux_add_process): New.
8649 (handle_extended_wait): Adjust.
8650 (add_lwp): Change unsigned long to ptid.
8651 (linux_create_inferior): Add process to processes table. Adjust
8652 to use ptids. Don't set new_inferior here.
8653 (linux_attach_lwp): Rename to ...
8654 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8655 it. Adjust to use ptids.
8656 (linux_attach_lwp): New.
8657 (linux_attach): Add process to processes table. Don't set
8658 new_inferior here.
8659 (struct counter): New.
8660 (second_thread_of_pid_p, last_thread_of_process_p): New.
8661 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8662 multiple processes.
8663 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8664 processes. Remove process from process table.
8665 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8666 to multiple processes.
8667 (any_thread_of): New.
8668 (linux_detach): Add `pid' argument, and handle it. Remove process
8669 from processes table.
8670 (linux_join): Add `pid' argument. Handle it.
8671 (linux_thread_alive): Change unsighed long argument to ptid_t.
8672 Consider dead lwps as not being alive.
8673 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8674 threads we're not interested in.
8675 (same_lwp, find_lwp_pid): New.
8676 (linux_wait_for_lwp): Change `pid' argument's type from int to
8677 ptid_t. Adjust.
8678 (linux_wait_for_event): Rename to ...
8679 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8680 from int to ptid_t. Adjust.
8681 (linux_wait_for_event): New.
8682 (linux_wait_1): Add `ptid' argument. Change return type to
8683 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8684 that exit from the process table.
8685 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8686 Adjust.
8687 (mark_lwp_dead): New.
8688 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8689 stopping all threads, mark its main lwp as dead.
8690 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8691 ptids.
8692 (fetch_register, usr_store_inferior_registers)
8693 (regsets_fetch_inferior_registers)
8694 (regsets_store_inferior_registers, linux_read_memory)
8695 (linux_write_memory): Inline `inferior_pid'.
8696 (linux_look_up_symbols): Adjust to use per-process
8697 `thread_db_active'.
8698 (linux_request_interrupt): Adjust to use ptids.
8699 (linux_read_auxv): Inline `inferior_pid'.
8700 (initialize_low): Don't reference thread_db_active.
8701 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8702 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8703 (ps_getpid): Return the pid of the current inferior.
8704 * thread-db.c (proc_handle, thread_agent): Delete.
8705 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8706 per-process data.
8707 (find_one_thread): Change argument type to ptid_t. Adjust to
8708 per-process data.
8709 (maybe_attach_thread): Adjust to per-process data and ptids.
8710 (thread_db_find_new_threads): Ditto.
8711 (thread_db_init): Ditto.
8712 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8713 processes table. Adjust to use ptids.
8714 (spu_kill, spu_detach): Adjust interface. Remove process from
8715 processes table.
8716 (spu_join, spu_thread_alive): Adjust interface.
8717 (spu_wait): Adjust interface. Remove process from processes
8718 table. Adjust to use ptids.
8719 * win32-low.c (current_inferior_tid): Delete.
8720 (current_inferior_ptid): New.
8721 (debug_event_ptid): New.
8722 (thread_rec): Take a ptid. Adjust.
8723 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8724 (child_delete_thread): Ditto.
8725 (do_initial_child_stuff): Add `attached' argument. Add process to
8726 processes table.
8727 (child_fetch_inferior_registers, child_store_inferior_registers):
8728 Adjust.
8729 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8730 (win32_attach): Pass 1 to do_initial_child_stuff.
8731 (win32_kill): Adjust interface. Remove process from processes
8732 table.
8733 (win32_detach): Ditto.
8734 (win32_join): Adjust interface.
8735 (win32_thread_alive): Take a ptid.
8736 (win32_resume): Adjust to use ptids.
8737 (get_child_debug_event): Ditto.
8738 (win32_wait): Adjust interface. Remove exiting process from
8739 processes table.
8740
8741 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8742
8743 Non-stop mode support.
8744
8745 * server.h (non_stop): Declare.
8746 (gdb_client_data, handler_func): Declare.
8747 (delete_file_handler, add_file_handler, start_event_loop):
8748 Declare.
8749 (handle_serial_event, handle_target_event, push_event)
8750 (putpkt_notif): Declare.
8751 * target.h (enum resume_kind): New.
8752 (struct thread_resume): Replace `step' field by `kind' field.
8753 (TARGET_WNOHANG): Define.
8754 (struct target_ops) <wait>: Add `options' argument.
8755 <supports_non_stop, async, start_non_stop>: New fields.
8756 (target_supports_non_stop, target_async): New.
8757 (start_non_stop): Declare.
8758 (mywait): Add `options' argument.
8759 * target.c (mywait): Add `options' argument. Print child exit
8760 notifications here.
8761 (start_non_stop): New.
8762 * server.c (non_stop, own_buf, mem_buf): New globals.
8763 (struct vstop_notif): New.
8764 (notif_queue): New global.
8765 (queue_stop_reply, push_event, discard_queued_stop_replies)
8766 (send_next_stop_reply): New.
8767 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8768 interface changes.
8769 (attach_inferior): In non-stop mode, don't wait for the target
8770 here.
8771 (handle_general_set): Handle QNonStop.
8772 (handle_query): When handling qC, return the current general
8773 thread, instead of the first thread of the list.
8774 (handle_query): If the backend supports non-stop mode, include
8775 QNonStop+ in the qSupported query response.
8776 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8777 and non-stop mode.
8778 (handle_v_attach, handle_v_run): Handle non-stop mode.
8779 (handle_v_stopped): New.
8780 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8781 (myresume): Adjust to use resume_kind. Handle non-stop.
8782 (queue_stop_reply_callback): New.
8783 (handle_status): Handle non-stop mode.
8784 (main): Clear non_stop flag on reconnection. Use the event-loop.
8785 Refactor serial protocol handling from here ...
8786 (process_serial_event): ... to this new function. When GDB
8787 selects any thread, select one here. In non-stop mode, wait until
8788 GDB acks all pending events before exiting.
8789 (handle_serial_event, handle_target_event): New.
8790 * remote-utils.c (remote_open): Install remote_desc in the event
8791 loop.
8792 (remote_close): Remove remote_desc from the event loop.
8793 (putpkt_binary): Rename to...
8794 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8795 (putpkt_binary): New as wrapper around putpkt_binary_1.
8796 (putpkt_notif): New.
8797 (prepare_resume_reply): In non-stop mode, don't change the
8798 general_thread.
8799 * event-loop.c: New.
8800 * Makefile.in (OBJ): Add event-loop.o.
8801 (event-loop.o): New rule.
8802
8803 * linux-low.h (pid_of): Moved here.
8804 (lwpid_of): New.
8805 (get_lwp_thread): Use lwpid_of.
8806 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8807 * linux-low.c (pid_of): Delete.
8808 (inferior_pid): Use lwpid_of.
8809 (linux_event_pipe): New.
8810 (target_is_async_p): New.
8811 (delete_lwp): New.
8812 (handle_extended_wait): Use lwpid_of.
8813 (add_lwp): Don't set lwpid field.
8814 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8815 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8816 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8817 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8818 first. Adjust to linux_wait_for_event interface changes. Use
8819 lwpid_of.
8820 (linux_detach): Don't delete the main lwp here.
8821 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8822 (status_pending_p): Don't consider explicitly suspended lwps.
8823 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8824 pointer. Add OPTIONS argument. Change return type to int. Use
8825 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8826 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8827 pointer. Add status pointer argument. Return a pid instead of a
8828 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8829 changes. In non-stop mode, don't switch to a random thread.
8830 (linux_wait): Rename to...
8831 (linux_wait_1): ... this. Add target_options argument, and handle
8832 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8833 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8834 clean exit and signal exit code. Don't stop all threads in
8835 non-stop mode. In all-stop mode, only stop all threads when
8836 reporting a stop to GDB. Handle explicit thread stop requests.
8837 (async_file_flush, async_file_mark): New.
8838 (linux_wait): New.
8839 (send_sigstop): Use lwpid_of.
8840 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8841 interface changes. In non-stop mode, don't switch to a random
8842 thread.
8843 (linux_resume_one_lwp): Use lwpid_of.
8844 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8845 (linux_resume_one_thread): ... this. Handle resume_stop. In
8846 non-stop mode, don't look for pending flag in all threads.
8847 (resume_status_pending_p): Don't consider explicitly suspended
8848 threads.
8849 (my_waitpid): Reimplement. Emulate __WALL.
8850 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8851 Use lwpid_of.
8852 (sigchld_handler, linux_supports_non_stop, linux_async)
8853 (linux_start_non_stop): New.
8854 (linux_target_ops): Register linux_supports_non_stop, linux_async
8855 and linux_start_non_stop.
8856 (initialize_low): Install SIGCHLD handler.
8857 * thread-db.c (thread_db_create_event, find_one_thread)
8858 (thread_db_get_tls_address): Use lwpid_of.
8859 * win32-low.c (win32_detach): Adjust to use resume_kind.
8860 (win32_wait): Add `options' argument.
8861 * spu-low.c (spu_resume): Adjust to use resume_kind.
8862 (spu_wait): Add `options' argument.
8863
8864 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8865
8866 Decouple target code from remote protocol.
8867
8868 * target.h (enum target_waitkind): New.
8869 (struct target_waitstatus): New.
8870 (struct target_ops) <wait>: Return an unsigned long. Take a
8871 target_waitstatus pointer instead of a char pointer.
8872 (mywait): Likewise.
8873 * target.c (mywait): Change prototype to return an unsigned long.
8874 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8875 * server.h (thread_from_wait, old_thread_from_wait): Delete
8876 declarations.
8877 (prepare_resume_reply): Change prototype to take a
8878 target_waitstatus.
8879 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8880 (last_status, last_ptid): New.
8881 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8882 pid instead of a signal.
8883 (attach_inferior): Remove "status" and "signal" parameters.
8884 Adjust.
8885 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8886 not as an address.
8887 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8888 (handle_v_requests, myresume): Remove "status" and "signal"
8889 parameters. Adjust.
8890 (handle_status): New.
8891 (main): Delete local `status'. Adjust.
8892 * remote-utils.c: Include target.h.
8893 (prepare_resume_reply): Change prototype to take a
8894 target_waitstatus. Adjust.
8895
8896 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8897 interface.
8898 * spu-low.c (spu_wait): Adjust.
8899 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8900 Delete.
8901 (win32_wait): Adjust.
8902
8903 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8904
8905 * target.h (struct thread_resume): Delete leave_stopped member.
8906 (struct target_ops): Add a `n' argument to the `resume' callback.
8907 * server.c (start_inferior): Adjust.
8908 (handle_v_cont, myresume): Adjust.
8909 * linux-low.c (check_removed_breakpoint): Adjust to resume
8910 interface change, and to removed leave_stopped field.
8911 (resume_ptr): Delete.
8912 (struct thread_resume_array): New.
8913 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8914 resume interface change.
8915 (linux_continue_one_thread, linux_queue_one_thread)
8916 (resume_status_pending_p): Check if the resume field is NULL
8917 instead of checking the leave_stopped member.
8918 (linux_resume): Adjust to the target resume interface change.
8919 * spu-low.c (spu_resume): Adjust to the target resume interface
8920 change.
8921 * win32-low.c (win32_detach, win32_resume): Ditto.
8922
8923 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8924
8925 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8926 flag.
8927 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8928 pending.
8929 (linux_continue_one_thread): Only preserve the stepping flag if
8930 there's a pending breakpoint.
8931
8932 2009-03-31 Pedro Alves <pedro@codesourcery.com>
8933
8934 * server.c (main): After the inferior having exited, call
8935 remote_close before exiting gdbserver.
8936
8937 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8938
8939 Fix size of FPSCR in Power 7 processors.
8940 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8941 (PPC_FEATURE_HAS_DFP): New #define.
8942 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8943 size of the FPSCR.
8944
8945 2009-03-23 Pedro Alves <pedro@codesourcery.com>
8946
8947 * server.c (handle_query) Whitespace and formatting.
8948
8949 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8950
8951 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8952 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8953 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8954 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8955 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8956 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8957 Makefile.in, configure.ac: Fix whitespace throughout.
8958 * configure: Regenerate.
8959
8960 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8961
8962 * inferiors.c (find_inferior): Make it safe for the callback
8963 function to delete the currently iterated inferior.
8964
8965 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8966
8967 * Makefile.in (linuw_low_h): Move higher.
8968 (thread-db.o): Depend on $(linux_low_h).
8969
8970 2009-03-17 Pedro Alves <pedro@codesourcery.com>
8971
8972 Rename "process" to "lwp" throughout.
8973
8974 * linux-low.c (all_processes): Rename to...
8975 (all_lwps): ... this.
8976 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8977 (add_process): Rename to ...
8978 (add_lwp): ... this. Adjust.
8979 (linux_create_inferior): Adjust.
8980 (linux_attach_lwp): Adjust.
8981 (linux_attach): Adjust.
8982 (linux_kill_one_process): Rename to ...
8983 (linux_kill_one_lwp): ... this. Adjust.
8984 (linux_kill): Adjust.
8985 (linux_detach_one_process): Rename to ...
8986 (linux_detach_one_lwp): ... this. Adjust.
8987 (linux_detach): Adjust.
8988 (check_removed_breakpoint): Adjust.
8989 (status_pending_p): Adjust.
8990 (linux_wait_for_process): Rename to ...
8991 (linux_wait_for_lwp): ... this. Adjust.
8992 (linux_wait_for_event): Adjust.
8993 (send_sigstop): Adjust.
8994 (wait_for_sigstop): Adjust.
8995 (stop_all_processes): Rename to ...
8996 (stop_all_lwps): ... this.
8997 (linux_resume_one_process): Rename to ...
8998 (linux_resume_one_lwp): ... this. Adjust.
8999 (linux_set_resume_request, linux_continue_one_thread)
9000 (linux_queue_one_thread, resume_status_pending_p)
9001 (usr_store_inferior_registers, regsets_store_inferior_registers)
9002 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9003 Adjust.
9004 * linux-low.h (get_process): Rename to ...
9005 (get_lwp): ... this. Adjust.
9006 (get_thread_process): Rename to ...
9007 (get_thread_lwp): ... this. Adjust.
9008 (get_process_thread): Rename to ...
9009 (get_lwp_thread): ... this. Adjust.
9010 (struct process_info): Rename to ...
9011 (struct lwp_info): ... this.
9012 (all_processes): Rename to ...
9013 (all_lwps): ... this.
9014 * proc-service.c (ps_lgetregs): Adjust.
9015 * thread-db.c (thread_db_create_event, find_one_thread)
9016 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9017
9018 2009-03-14 Pedro Alves <pedro@codesourcery.com>
9019
9020 * server.c (handle_query): Handle "qAttached".
9021
9022 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9023
9024 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9025 GPLv3, update license URL.
9026
9027 2009-03-01 Doug Evans <dje@google.com>
9028
9029 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
9030 (server_h): Add gdb_signals.h.
9031 (signals.o): Update.
9032 * server.h (target_signal_from_host,target_signal_to_host_p)
9033 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9034
9035 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9036
9037 * remote-utils.c (getpkt): Also generate remote-debug
9038 information if noack_mode is set.
9039
9040 2009-02-06 Pedro Alves <pedro@codesourcery.com>
9041
9042 * server.c (handle_query): Report qXfer:siginfo:read and
9043 qXfer:siginfo:write as supported and handle them.
9044 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9045 * linux-low.c (linux_xfer_siginfo): New.
9046 (linux_target_ops): Set it.
9047
9048 2009-01-26 Pedro Alves <pedro@codesourcery.com>
9049
9050 * server.c (gdbserver_usage): Mention --remote-debug.
9051 (main): Accept '--remote-debug' switch.
9052
9053 2009-01-18 Doug Evans <dje@google.com>
9054
9055 * regcache.c (new_register_cache): No need to check result of xcalloc.
9056 * server.c (handle_search_memory): Back out calls to xmalloc,
9057 result is checked and error is returned to user upon failure.
9058 (handle_query): Ditto. Add more checks for result of malloc.
9059 (handle_v_cont): Check result of malloc, report error back to
9060 user upon failure.
9061 (handle_v_run): Ditto. Call freeargv.
9062 * server.h (freeargv): Declare.
9063 * utils.c (freeargv): New fn.
9064
9065 2009-01-15 Doug Evans <dje@google.com>
9066
9067 * gdbreplay.c (perror_with_name): Make arg const char *.
9068 * server.h (target_signal_to_name): Make return type const char *.
9069 * thread-db.c (thread_db_err_str): Make return type const char *.
9070 * utils.c (perror_with_name): Make arg const char *.
9071
9072 2009-01-14 Pedro Alves <pedro@codesourcery.com>
9073
9074 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9075 when handling a EXIT_PROCESS_DEBUG_EVENT.
9076
9077 2009-01-06 Joel Brobecker <brobecker@adacore.com>
9078
9079 * gdbreplay.c (gdbreplay_version): Update copyright year.
9080 * server.c (gdbserver_version): Likewise.
9081
9082 2009-01-05 Doug Evans <dje@google.com>
9083
9084 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
9085 (handle_extended_wait): Improve comment.
9086
9087 2008-12-13 Doug Evans <dje@google.com>
9088
9089 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9090 * server.h (ATTR_MALLOC): New macro.
9091 (xmalloc,xcalloc,xstrdup): Declare.
9092 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9093 * inferiors.c: Ditto.
9094 * linux-low.c: Ditto.
9095 * mem-break.c: Ditto.
9096 * regcache.c: Ditto.
9097 * remote-utils.c: Ditto.
9098 * server.c: Ditto.
9099 * target.c: Ditto.
9100 * win32-low.c: Ditto.
9101
9102 2008-12-12 Doug Evans <dje@google.com>
9103
9104 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9105 in debugging printf.
9106
9107 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9108
9109 2008-12-09 Doug Evans <dje@google.com>
9110
9111 * linux-low.h (struct process_info): Delete member tid, unused.
9112 * thread-db.c (find_one_thread): Update.
9113 (maybe_attach_thread): Update.
9114
9115 2008-12-02 Pedro Alves <pedro@codesourcery.com>
9116
9117 * target.h (struct target_ops): Add qxfer_osdata member.
9118 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9119 and dirent.h.
9120 (linux_qxfer_osdata): New functions.
9121 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9122 callback.
9123 * server.c (handle_query): Handle "qXfer:osdata:read:".
9124 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9125 (buffer_xml_printf): New functions.
9126 * server.h (struct buffer): New.
9127 (buffer_grow_str, buffer_grow_str0): New macros.
9128 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9129 (buffer_xml_printf): Declare.
9130
9131 2008-11-24 Doug Evans <dje@google.com>
9132
9133 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9134
9135 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9136
9137 * server.c (handle_v_run): Always use the supplied argument list.
9138
9139 2008-11-19 Bob Wilson <bob.wilson@acm.org>
9140
9141 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9142 (xtensa_regmap_table): Add entry for scompare1.
9143
9144 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9145
9146 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9147 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9148 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9149 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9150 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9151 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9152 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9153 XML target descriptions.
9154 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9155 when inferior is running on an ISA 2.05 or later processor. Add
9156 special case to return offset for full 64-bit slot of FPSCR when
9157 in 32-bits.
9158
9159 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9160
9161 * Makefile.in (SFILES, clean): Added sparc64 files.
9162 (reg-sparc64.o, reg-sparc64.c): New.
9163 * configure.srv (sparc*-*-linux*): New configuration.
9164 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9165 syscall arguments for SPARC.
9166 (regsets_store_inferior_registers): Likewise.
9167 * linux-sparc-low.c: New file.
9168
9169 2008-10-21 Doug Evans <dje@google.com>
9170
9171 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9172 (READLINE_DIR,READLINE_DEP): Delete.
9173 (INTERNAL_CFLAGS): Update.
9174 (LINTFLAGS): Update.
9175
9176 2008-10-10 Pedro Alves <pedro@codesourcery.com>
9177
9178 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9179 whole argv from the last run, not just argv[0].
9180
9181 2008-09-08 Pedro Alves <pedro@codesourcery.com>
9182
9183 * regcache.c (new_register_cache): Return NULL if the register
9184 cache size isn't known yet.
9185 (free_register_cache): Avoid dereferencing a NULL regcache.
9186
9187 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9188
9189 * configure.srv: Merge MIPS and MIPS64.
9190
9191 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9192
9193 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9194
9195 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
9196
9197 * Makefile.in: Add required vsx dependencies.
9198
9199 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9200 Declare init_registers_powerpc_vsx32l.
9201 Declare init_registers_powerpc_vsx64l.
9202 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9203 (ppc_arch_setup): Check for VSX in hwcap.
9204 (ppc_fill_vsxregset): New function.
9205 (ppc_store_vsxregset): New function.
9206 Add new VSX entry in regset_info target_regsets.
9207
9208 * configure.srv: Add new VSX dependencies.
9209
9210 2008-08-12 Pedro Alves <pedro@codesourcery.com>
9211
9212 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9213 (remote_open): Set or clear transport_is_reliable.
9214 (putpkt_binary): Don't expect acks in noack mode.
9215 (getpkt): Don't send ack/nac in noack mode.
9216 * server.c (handle_general_set): Handle QStartNoAckMode.
9217 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9218 qSupported.
9219 (main): Reset noack_mode on every connection.
9220 * server.h (noack_mode): Declare.
9221
9222 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9223
9224 * Makefile.in (GDBREPLAY_OBS): New variable.
9225 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9226
9227 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9228 Daniel Jacobowitz <dan@codesourcery.com>
9229
9230 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9231 (usr_store_inferior_registers): Likewise.
9232 (regsets_store_inferior_registers): Likewise.
9233
9234 2008-07-31 Rolf Jansen <rj@surtec.com>
9235 Pedro Alves <pedro@codesourcery.com>
9236
9237 * configure.ac: Check for memmem declaration.
9238 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9239 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9240 (disable_packet_qfThreadInfo): Unconditionally compile.
9241 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9242 * configure, config.in: Regenerate.
9243
9244 2008-07-28 Doug Kwan <dougkwan@google.com>
9245
9246 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9247 (linux_write_memory): Remove declaration of errno.
9248
9249 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9250
9251 * linux-low.c (handle_extended_wait): Do not use "status"
9252 variable uninitialized.
9253
9254 2008-07-07 Pedro Alves <pedro@codesourcery.com>
9255
9256 * server.c (handle_v_attach): Inhibit reporting dll changes.
9257
9258 2008-06-27 Pedro Alves <pedro@codesourcery.com>
9259
9260 * remote-utils.c (prepare_resume_reply): If requested, don't
9261 output "thread:TID" in the T stop reply.
9262
9263 * server.c (disable_packet_vCont, disable_packet_Tthread)
9264 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9265 (handle_query): If requested, disable support for qC, qfThreadInfo
9266 and qsThreadInfo.
9267 (handle_v_requests): If requested, disable support for vCont.
9268 (gdbserver_show_disableable): New.
9269 (main): Handle --disable-packet and --disable-packet=LIST.
9270
9271 * server.h (disable_packet_vCont, disable_packet_Tthread)
9272 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9273
9274 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9275
9276 * server.c (gdbserver_usage): Mention --version.
9277
9278 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9279
9280 * Makefile.in (gdbreplay.o): New rule.
9281
9282 2008-06-06 Joseph Myers <joseph@codesourcery.com>
9283
9284 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9285 message, not gdbserver.
9286
9287 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
9288 Nathan Sidwell <nathan@codesourcery.com>
9289 Joseph Myers <joseph@codesourcery.com>
9290
9291 * acinclude.m4: Include ../../config/acx.m4.
9292 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9293 * configure, config.in: Regenerate.
9294 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9295 * server.c (gdbserver_version): Print PKGVERSION.
9296 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9297 (main): Adjust gdbserver_usage calls.
9298 * gdbreplay.c (version, host_name): Add declarations.
9299 (gdbreplay_version, gdbreplay_usage): New.
9300 (main): Accept --version and --help options.
9301
9302 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9303
9304 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9305 (arm_breakpoint_at): Handle Thumb.
9306 (the_low_target): Add comment.
9307
9308 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9309
9310 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9311
9312 2008-05-09 Doug Evans <dje@google.com>
9313
9314 * server.h (decode_search_memory_packet): Declare.
9315 * remote-utils.c (decode_search_memory_packet): New fn.
9316 * server.c (handle_search_memory_1): New fn.
9317 (handle_search_memory): New fn.
9318 (handle_query): Process qSearch:memory packets.
9319
9320 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9321
9322 * regcache.c (registers_length): Remove.
9323 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9324 full register packet.
9325 * regcache.h (registers_length): Remove prototype.
9326 * server.h (PBUFSIZ): Define to 16384.
9327
9328 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9329
9330 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9331 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9332 powerpc-64l.o, and powerpc-altivec64l.o.
9333 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9334 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9335 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9336 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9337 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9338 to srv_xmlfiles.
9339
9340 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9341 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9342 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9343 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9344 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9345 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9346 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9347 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9348 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9349 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9350 (clean): Update.
9351
9352 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9353 (init_registers_powerpc_32l): ... this new prototype.
9354 (init_registers_powerpc_32): Remove, replace by ...
9355 (init_registers_powerpc_altivec32l): ... this new prototype.
9356 (init_registers_powerpc_e500): Remove, replace by ...
9357 (init_registers_powerpc_e500l): ... this new prototype.
9358 (init_registers_ppc64): Remove, replace by ...
9359 (init_registers_powerpc_64l): ... this new prototype.
9360 (init_registers_powerpc_64): Remove, replace by ...
9361 (init_registers_powerpc_altivec64l): ... this new prototype.
9362 (ppc_num_regs): Set to 73.
9363 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9364 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9365 (ppc_cannot_store_register): Handle orig_r3 and trap.
9366 (ppc_arch_setup): Update init_registers_... calls.
9367 (ppc_fill_gregset): Handle orig_r3 and trap.
9368
9369 * inferiors.c (clear_inferiors): Reset current_inferior.
9370
9371 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
9372
9373 * acinclude.m4: Add override.m4.
9374 * configure: Regenerate.
9375
9376 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9377
9378 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9379 initial call to init_register_ppc64.
9380
9381 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9382
9383 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9384 single powerpc*-*-linux* case.
9385 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9386
9387 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9388
9389 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
9390 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
9391 from reg_xmlfiles.
9392 * linux-ppc-low.c: Include <elf.h>.
9393 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9394 (ppc_hwcap): New global variable.
9395 (ppc_regmap): Remove __SPE__ #ifdef sections.
9396 (ppc_regmap_e500): New global variable.
9397 (ppc_cannot_store_register): Update __SPE__ special case.
9398 (ppc_get_hwcap): New function.
9399 (ppc_arch_setup): Use it to determine whether inferior supports
9400 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9401 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9402 Do not access registers if target does not support AltiVec.
9403 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9404 Do not access registers if target does not support SPE.
9405 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9406
9407 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9408
9409 * linux-low.c (disabled_regsets, num_regsets): New.
9410 (use_regsets_p): Delete.
9411 (linux_wait_for_process): Clear disabled_regsets.
9412 (regsets_fetch_inferior_registers): Check and set it.
9413 (regsets_store_inferior_registers): Likewise.
9414 (linux_fetch_registers, linux_store_registers): Do not use
9415 use_regsets_p.
9416 (initialize_low): Allocate disabled_regsets.
9417
9418 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9419
9420 * Makefile.in (LIBOBJS): New.
9421 (OBS): Use LIBOBJS.
9422 (memmem.o): New rule.
9423 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9424 * configure: Regenerated.
9425
9426 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9427
9428 * server.c (handle_query): Never return "unsupported" for
9429 qXfer:features:read queries.
9430
9431 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9432
9433 * server.c (get_features_xml): Fix inverted condition.
9434 (handle_query): Always support qXfer:feature:read.
9435
9436 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9437
9438 * server.c (wrapper_argv): New.
9439 (start_inferior): Handle wrapper_argv. If set, expect an extra
9440 trap.
9441 (gdbserver_usage): Document --wrapper.
9442 (main): Parse --wrapper.
9443
9444 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9445
9446 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9447 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9448 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9449 (ppc_set_pc): Likewise.
9450 (ppc_arch_setup): New function.
9451 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9452 of collect_register.
9453 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
9454
9455 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9456
9457 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9458 instead of linux-ppc64-low.o.
9459 * linux-ppc64-low.c: Remove file.
9460 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9461 (linux-ppc64-low.o): Remove rule.
9462
9463 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9464 (init_registers_powerpc_64): Likewise.
9465 (ppc_regmap): Conditionally define depending on __powerpc64__.
9466 (ppc_cannot_store_register): Do not special-case "fpscr" when
9467 compiled on __powerpc64__.
9468 (ppc_collect_ptrace_register): New function.
9469 (ppc_supply_ptrace_register): New function.
9470 (ppc_breakpoint): Change type to "unsigned int".
9471 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9472 (the_low_target): Conditionally provide initializers for the
9473 arch_setup member depending on __powerpc64__. Install
9474 collect_ptrace_register and supply_ptrace_register members.
9475
9476 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9477
9478 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9479 * server.c (gdbserver_xmltarget): Define.
9480 (get_features_xml): Use it to replace "target.xml" and arch_string.
9481
9482 * configure.srv: Remove srv_xmltarget. Add XML files that were
9483 mentioned there to srv_xmlfiles instead. Remove conditional tests
9484 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9485 srv_xmlfiles and srv_regobj to include all possible choices.
9486 * configure.ac (srv_xmltarget): Remove.
9487 (srv_xmlfiles): Do not add "target.xml".
9488 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9489 checks for supplementary target information.
9490 * configure: Regenerate.
9491 * Makefile.in (XML_TARGET): Remove.
9492 (target.xml): Remove rule.
9493 (clean): Do not clean up target.xml.
9494 (.PRECIOUS): Do not mention target.xml.
9495
9496 * target.h (struct target_ops): Remove arch_string member.
9497 * linux-low.c (linux_arch_string): Remove.
9498 (linux_target_ops): Remove arch_string initializer.
9499 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9500 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9501 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9502 * spu-low.c (spu_arch_string): Remove.
9503 (spu_target_ops): Remove arch_string initializer.
9504 * win32-low.c (win32_arch_string): Remove.
9505 (win32_target_ops): Remove arch_string initializer.
9506 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9507 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9508 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9509
9510 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9511
9512 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9513 by collect_ptrace_register and supply_ptrace_register hooks.
9514 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9515 instead of checking for the_low_target.left_pad_xfer.
9516 (usr_store_inferior_registers): Use collect_ptrace_register callback
9517 instead of checking for the_low_target.left_pad_xfer.
9518
9519 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9520 (s390_supply_ptrace_register): Likewise.
9521 (s390_fill_gregset): Call s390_collect_ptrace_register.
9522 (the_low_target): Update.
9523
9524 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9525 (ppc_supply_ptrace_register): Likewise.
9526 (the_low_target): Update.
9527
9528 * linux-i386-low.c (the_low_target): Update.
9529 * linux-x86-64-low.c (the_low_target): Update.
9530
9531 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9532
9533 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9534 reg-s390.o and reg-s390x.o.
9535
9536 * linux-low.c (new_inferior): New global variable.
9537 (linux_create_inferior, linux_attach): Set it.
9538 (linux_wait_for_process): Call the_low_target.arch_setup after the
9539 target has stopped for the first time.
9540 (initialize_low): Do not call the_low_target.arch_setup.
9541
9542 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9543 (s390_set_pc): Likewise.
9544 (s390_arch_setup): New function.
9545 (the_low_target): Use s390_arch_setup as arch_setup routine.
9546
9547 * regcache.c (realloc_register_cache): New function.
9548 (set_register_cache): Call it for each existing regcache.
9549
9550 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9551
9552 * server.h (init_registers): Remove prototype.
9553
9554 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9555 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9556 instead of init_registers ().
9557 * linux-arm-low.c (init_registers_arm): Add prototype.
9558 (init_registers_arm_with_iwmmxt): Likewise.
9559 (the_low_target): Add initializer for arch_setup field.
9560 * linux-cris-low.c (init_registers_cris): Add prototype.
9561 (the_low_target): Add initializer for arch_setup field.
9562 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9563 (the_low_target): Add initializer for arch_setup field.
9564 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9565 (the_low_target): Add initializer for arch_setup field.
9566 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9567 (the_low_target): Add initializer for arch_setup field.
9568 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9569 (the_low_target): Add initializer for arch_setup field.
9570 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9571 (the_low_target): Add initializer for arch_setup field.
9572 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9573 (init_registers_mips64_linux): Likewise.
9574 (the_low_target): Add initializer for arch_setup field.
9575 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9576 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9577 (the_low_target): Add initializer for arch_setup field.
9578 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9579 (init_registers_powerpc_64): Likewise.
9580 (the_low_target): Add initializer for arch_setup field.
9581 * linux-s390-low.c (init_registers_s390): Add prototype.
9582 (init_registers_s390x): Likewise.
9583 (the_low_target): Add initializer for arch_setup field.
9584 * linux-sh-low.c (init_registers_sh): Add prototype.
9585 (the_low_target): Add initializer for arch_setup field.
9586 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9587 (the_low_target): Add initializer for arch_setup field.
9588 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9589 (the_low_target): Add initializer for arch_setup field.
9590
9591 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9592 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9593 instead of init_registers ().
9594 * win32-arm-low.c (init_registers_arm): Add prototype.
9595 (the_low_target): Add initializer for arch_setup field.
9596 * win32-i386-low.c (init_registers_i386): Add prototype.
9597 (the_low_target): Add initializer for arch_setup field.
9598
9599 * spu-low.c (init_registers_spu): Add prototype.
9600 (initialize_low): Call initialie_registers_spu () instead of
9601 initialize_registers ().
9602
9603 2008-02-19 Pedro Alves <pedro@codesourcery.com>
9604
9605 * server.c (handle_v_requests): When handling the vRun and vAttach
9606 packets, if already debugging a process, don't kill it. Return an
9607 error instead.
9608
9609 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9610
9611 * server.c (handle_query): Correct length check.
9612
9613 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9614
9615 * win32-low.c (do_initial_child_stuff): Add process handle
9616 parameter. Set current_process_handle and current_process_id from the
9617 parameters. Clear globals.
9618 (win32_create_inferior): Don't set current_process_handle and
9619 current_process_id here. Instead pass them on the call to
9620 do_initial_child_stuff.
9621 (win32_attach): Likewise.
9622 (win32_clear_inferiors): New.
9623 (win32_kill): Don't close the current process handle or the
9624 current thread handle here. Instead call win32_clear_inferiors.
9625 (win32_detach): Don't open a new handle to the process. Call
9626 win32_clear_inferiors.
9627 (win32_join): Don't rely on current_process_handle; open a new
9628 handle using the process id.
9629 (win32_wait): Call win32_clear_inferiors when the inferior process
9630 has exited.
9631
9632 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9633
9634 * server.c (monitor_show_help): Add "exit".
9635
9636 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9637
9638 * Makefile.in (SFILES): Add linux-xtensa-low.c.
9639 (clean): Add reg-xtensa.c.
9640 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
9641 * configure.srv (xtensa*-*-linux*) New target.
9642 * linux-xtensa-low.c: New.
9643 * xtensa-xtregs.c: New.
9644
9645 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9646
9647 * hostio.c: Don't include errno.h.
9648 (errno_to_fileio_errno): Move to hostio-errno.
9649 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9650 error number outputting to the target->hostio_last_error callback.
9651 (hostio_packet_error): Use FILEIO_EINVAL directly.
9652 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9653 calls to hostio_error.
9654 * hostio-errno.c: New.
9655 * server.h (hostio_last_error_from_errno): Declare.
9656 * target.h (target_ops): Add hostio_last_error member.
9657 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9658 as hostio_last_error handler.
9659 * spu-low.c (spu_target_ops): Likewise.
9660 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9661 (wince_hostio_last_error): New functions.
9662 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9663 as hostio_last_error handler.
9664 (win32_target_ops) [!_WIN32_WCE]: Register
9665 hostio_last_error_from_errno as hostio_last_error handler.
9666 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9667 (hostio-errno.o): New rule.
9668 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9669 * configure.srv (srv_hostio_err_objs): New variable. Default to
9670 hostio-errno.o.
9671 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9672 * configure: Regenerate.
9673
9674 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9675
9676 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9677 (linux_kill, linux_detach): Clean up the process list.
9678 * remote-utils.c (remote_open): Improve port number parsing.
9679 (putpkt_binary, input_interrupt): Only send interrupts if the target
9680 is running.
9681 * server.c (extended_protocol): Make static.
9682 (attached): Define earlier.
9683 (exit_requested, response_needed, program_argv): New variables.
9684 (target_running): New.
9685 (start_inferior): Clear attached here.
9686 (attach_inferior): Set attached here.
9687 (require_running): Define.
9688 (handle_query): Use require_running and target_running. Implement
9689 "monitor exit".
9690 (handle_v_attach, handle_v_run): New.
9691 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9692 (gdbserver_usage): Update.
9693 (main): Redo argument parsing. Handle --debug and --multi. Handle
9694 --attach along with other options or after the port. Save
9695 program_argv. Support no initial program. Resynchronize
9696 communication with GDB after an error. Handle "monitor exit".
9697 Use require_running and target_running. Always allow the extended
9698 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9699 restart in extended mode.
9700 * README: Refer to the GDB manual. Update --attach usage.
9701
9702 2007-12-20 Andreas Schwab <schwab@suse.de>
9703
9704 * linux-low.c (STACK_SIZE): Define.
9705 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9706 (linux_test_for_tracefork): Likewise.
9707
9708 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9709
9710 * linux-low.c (linux_wait_for_event): Update messages. Do not
9711 reinsert auto-delete breakpoints.
9712 * mem-break.c (struct breakpoint): Change return type of handler to
9713 int.
9714 (set_breakpoint_at): Update handler type.
9715 (reinsert_breakpoint_handler): Return 1 instead of calling
9716 delete_breakpoint.
9717 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9718 setting a new one.
9719 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9720 * mem-break.h (set_breakpoint_at): Update handler type.
9721 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9722 * win32-low.c (auto_delete_breakpoint): New.
9723 (get_child_debug_event): Use it.
9724
9725 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9726
9727 * configure.ac: Check for pread and pwrite.
9728 * hostio.c (handle_pread): Fall back to lseek and read.
9729 (handle_pwrite): Fall back to lseek and write.
9730 * config.in, configure: Regenerated.
9731
9732 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9733
9734 * server.c (myresume): Add own_buf argument.
9735 (main): Update calls.
9736
9737 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9738
9739 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9740 * remote-utils.c (remote_open): Do not call disable_async_io.
9741 (block_async_io): Delete.
9742 (unblock_async_io): Make static.
9743 (initialize_async_io): New.
9744 * server.c (handle_v_cont): Handle async I/O here.
9745 (myresume): Likewise. Move other common resume tasks here...
9746 (main): ... from here. Call initialize_async_io. Disable async
9747 I/O before the main loop.
9748 * server.h (initialize_async_io): Declare.
9749 (block_async_io, unblock_async_io): Delete prototypes.
9750 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9751
9752 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9753
9754 * remote-utils.c (readchar): Allow binary data in received messages.
9755
9756 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9757
9758 * win32-low.c (attaching): New global.
9759 (win32_create_inferior): Clear the `attaching' global.
9760 (win32_attach): Set the `attaching' global.
9761 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9762 attaching. Only set a breakpoint at the entry point if not
9763 attaching.
9764
9765 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9766
9767 * server.c (main): Don't report dll events on the initial
9768 connection on attaches.
9769
9770 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9771
9772 * server.c (main): Relax numerical bases supported for the pid of
9773 the --attach command line argument.
9774
9775 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9776
9777 * win32-low.c (win32_attach): Call OpenProcess before
9778 DebugActiveProcess, not after. Add last error output to error
9779 call.
9780
9781 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9782
9783 * win32-low.c (win32_get_thread_context)
9784 (win32_set_thread_context): New functions.
9785 (thread_rec): Use win32_get_thread_context.
9786 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9787 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9788 field.
9789
9790 2007-12-03 Leo Zayas
9791 Pedro Alves <pedro_alves@portugalmail.pt>
9792
9793 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9794 global variables.
9795 (child_add_thread): Minor cleanup.
9796 (child_continue): Resume artificially suspended threads before
9797 calling ContinueDebugEvent.
9798 (suspend_one_thread): New.
9799 (fake_breakpoint_event): New.
9800 (get_child_debug_event): Change return type to int. Check here if
9801 gdb sent an interrupt request. If a soft interrupt was requested,
9802 fake a breakpoint event. Return 0 if there is no event to handle,
9803 and 1 otherwise.
9804 (win32_wait): Don't check here if gdb sent an interrupt request.
9805 Ensure there is a valid event to handle.
9806 (win32_request_interrupt): Add soft interruption method as last
9807 resort.
9808
9809 2007-12-03 Leo Zayas
9810 Pedro Alves <pedro_alves@portugalmail.pt>
9811
9812 * win32-low.h (win32_thread_info): Add descriptions to the
9813 structure members. Replace `suspend_count' counter by a
9814 `suspended' flag.
9815 * win32-low.c (thread_rec): Update condition of when to get the
9816 context from the inferior. Rely on ContextFlags being set if it
9817 has already been retrieved. Only suspend the inferior thread if
9818 we haven't already. Warn if that fails.
9819 (continue_one_thread): s/suspend_count/suspended/. Only call
9820 ResumeThread once. Warn if that fails.
9821
9822 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9823
9824 * win32-low.c (win32_wait): Don't read from the inferior when it
9825 has already exited.
9826
9827 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9828
9829 * Makefile.in (win32_low_h): New variable.
9830 (win32-low.o): Add dependency on $(win32_low_h).
9831 (win32-arm-low.o, win32-i386-low.o): New rules.
9832
9833 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9834
9835 * hostio.c: Correct copyright year.
9836
9837 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9838
9839 * Makefile.in (OBS): Add hostio.o.
9840 (hostio.o): New rule.
9841 * server.h (handle_vFile): Declare.
9842 * hostio.c: New file.
9843 * server.c (handle_v_requests): Take packet_len and new_packet_len
9844 for binary packets. Call handle_vFile.
9845 (main): Update call to handle_v_requests.
9846
9847 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9848
9849 * linux-low.c: Include <sched.h>.
9850
9851 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9852
9853 * linux-low.c (linux_tracefork_grandchild): New.
9854 (linux_tracefork_child): Use clone.
9855 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9856
9857 2007-10-31 Joel Brobecker <brobecker@adacore.com>
9858
9859 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9860
9861 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9862
9863 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9864
9865 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9866
9867 * inferiors.c (change_inferior_id): Delete.
9868 (add_pid_to_list, pull_pid_from_list): New.
9869 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9870 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9871 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9872 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9873 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9874 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9875 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9876 (using_threads): Always set to 1.
9877 (handle_extended_wait): New.
9878 (add_process): Do not set TID.
9879 (linux_create_inferior): Set must_set_ptrace_flags.
9880 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9881 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9882 (linux_thread_alive): Rename TID argument to LWPID.
9883 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9884 (linux_wait_for_event): Do not use TID or check using_threads. Update
9885 call to dead_thread_notify. Call handle_extended_wait.
9886 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9887 (send_sigstop): Delete sigstop_sent.
9888 (wait_for_sigstop): Avoid TID.
9889 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9890 (linux_test_for_tracefork): New.
9891 (linux_lookup_signals): Use thread_db_active and
9892 linux_supports_tracefork_flag.
9893 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9894 * linux-low.h (get_process_thread): Avoid TID.
9895 (struct process_ifo): Move thread_known and tid to the end. Remove
9896 sigstop_sent.
9897 (linux_attach_lwp, thread_db_init): Update prototypes.
9898 * server.h (change_inferior_id): Delete prototype.
9899 (add_pid_to_list, pull_pid_from_list): New prototypes.
9900 * thread-db.c (thread_db_use_events): New.
9901 (find_first_thread): Rename to...
9902 (find_one_thread): ...this. Update callers and messages. Do not
9903 call fatal. Check thread_db_use_events. Do not call
9904 change_inferior_id or new_thread_notify.
9905 (maybe_attach_thread): Update. Do not call new_thread_notify.
9906 (thread_db_init): Set thread_db_use_events. Check use_events.
9907 * utils.c (fatal, warning): Correct message prefix.
9908
9909 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9910
9911 * Makefile.in (clean): Remove new files.
9912 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9913 (powerpc-64.o, powerpc-64.c): New rules.
9914 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9915 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9916 with SPE.
9917 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9918 SPE targets.
9919 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9920 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9921 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9922 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9923 (target_regsets): Add AltiVec and SPE register sets.
9924 * configure.ac: Check for AltiVec and SPE.
9925 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9926 (ppc_fill_vrregset, ppc_store_vrregset): New.
9927 (target_regsets): Add AltiVec register set.
9928 * configure: Regenerated.
9929
9930 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9931
9932 * linux-low.c (O_LARGEFILE): Define.
9933 (linux_read_memory): Use /proc/PID/mem.
9934 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9935 * configure, config.in: Regenerated.
9936
9937 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9938
9939 * linux-low.c (linux_wait_for_event): Do not pass signals while
9940 single-stepping.
9941
9942 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9943
9944 * win32-low.c (create_process): New.
9945 (win32_create_inferior): Use create_process instead of
9946 CreateProcess. If create_process failed retry appending an ".exe"
9947 suffix. Store the GetLastError result immediatelly after
9948 create_process calls and use it on the call to error.
9949
9950 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9951
9952 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9953
9954 2007-08-23 Joel Brobecker <brobecker@adacore.com>
9955
9956 * configure.ac: Switch license to GPLv3.
9957
9958 2007-08-01 Michael Snyder <msnyder@access-company.com>
9959
9960 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9961
9962 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9963
9964 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9965 typedef.
9966 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9967 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9968 CloseToolhelp32Snapshot.
9969 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9970 CloseToolhelp32Snapshot.
9971
9972 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
9973
9974 * server.c (main): Check for inferior exit before main loop.
9975
9976 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9977
9978 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9979 instead of on tmp_desc.
9980
9981 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9982 Daniel Jacobowitz <dan@codesourcery.com>
9983
9984 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9985 (add_thread): Minor cleanups.
9986 (clear_inferiors): Move lower in the file. Clear the DLL
9987 list.
9988 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9989 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9990 (xml_escape_text): New.
9991 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9992 for qSupported.
9993 (handle_v_cont): Report errors.
9994 (gdbserver_version): Update.
9995 (main): Correct size of own_buf. Do not report initial DLL events.
9996 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9997 (unloaded_dll, xml_escape_text): New.
9998 * win32-low.c (enum target_waitkind): Update comments.
9999 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10000 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10001 (win32_EnumProcessModules, win32_GetModuleInformation)
10002 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10003 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10004 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10005 (win32_Module32First, win32_Module32Next, load_toolhelp)
10006 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10007 (get_child_debug_event): Handle DLL events.
10008 (win32_wait): Likewise.
10009
10010 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10011
10012 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10013 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10014
10015 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10016
10017 * win32-low.c (handle_output_debug_string): Ignore event if not
10018 waiting.
10019
10020 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10021
10022 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10023
10024 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10025
10026 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10027
10028 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10029
10030 * inferiors.c (change_inferior_id): Add comment.
10031 * linux-low.c (check_removed_breakpoint): Add an early
10032 prototype. Improve debug output.
10033 (linux_attach): Doc update.
10034 (linux_detach_one_process, linux_detach): Clean up before releasing
10035 each process.
10036 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10037 * linux-low.h (struct process_info): Doc improvement.
10038 * mem-break.c (delete_all_breakpoints): New.
10039 * mem-break.h (delete_all_breakpoints): New prototype.
10040 * thread-db.c (find_first_thread): New.
10041 (thread_db_create_event): Call it instead of
10042 thread_db_find_new_threads. Clean up unused variables.
10043 (maybe_attach_thread): Remove first thread handling.
10044 (thread_db_find_new_threads): Use find_first_thread.
10045 (thread_db_get_tls_address): Likewise.
10046
10047 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10048
10049 * thread-db.c (thread_db_find_new_threads): Add prototype.
10050 (thread_db_create_event): Check for the main thread before adding
10051 a new thread.
10052 (maybe_attach_thread): Only enable event reporting if TID == 0.
10053 (thread_db_get_tls_address): Check for new threads.
10054
10055 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10056
10057 * linux-low.c (linux_create_inferior): Try execv before execvp.
10058 * spu-low.c (spu_create_inferior): Likewise.
10059
10060 2007-06-13 Mike Frysinger <vapier@gentoo.org>
10061
10062 * linux-low.c (linux_create_inferior): Change execv to execvp.
10063 * spu-low.c (spu_create_inferior): Likewies.
10064
10065 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10066
10067 * Makefile.in (clean): Clean new files instead of deleted ones.
10068 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10069 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10070 rules.
10071 * configure.srv: Specify XML files and new regformats for MIPS and
10072 MIPS64 GNU/Linux.
10073 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10074 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10075 an entry for the restart register.
10076 (mips_cannot_fetch_register, mips_cannot_store_register)
10077 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10078 register names to match the XML descriptions.
10079 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10080 restart register instead of $0.
10081
10082 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10083 Markus Deuling <deuling@de.ibm.com>
10084
10085 * remote-utils.c (decode_xfer_write): New function.
10086 * server.h (decode_xfer_write): Add prototype.
10087 * server.c (handle_query): Add PACKET_LEN argument. Support
10088 qXfer:spu:read and qXfer:spu:write packets.
10089 (main): Pass packet_len to handle_query.
10090 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10091 * target.h (target_ops): Add qxfer_spu.
10092
10093 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10094
10095 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10096 accessing non-seekable spufs files.
10097
10098 2007-05-16 Markus Deuling <deuling@de.ibm.com>
10099
10100 * server.c (handle_query): Add reply for qC packet.
10101
10102 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10103 Leo Zayas <lerele@champenstudios@com>
10104
10105 * server.h (check_remote_input_interrupt_request): New function.
10106 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10107 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10108 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10109 (check_remote_input_interrupt_request): New function.
10110 * server.h (check_remote_input_interrupt_request): Declare.
10111 * win32-low.c (winapi_DebugBreakProcess,
10112 winapi_GenerateConsoleCtrlEvent): New typedefs.
10113 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10114 to 250 ms.
10115 (win32_wait): Check for remote interrupt request
10116 with check_remote_input_interrupt_request.
10117 (win32_request_interrupt): New function.
10118 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10119
10120 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10121
10122 * win32-low.c (debug_registers_changed,
10123 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10124 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10125 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10126 (thread_rec): Get context using the low target.
10127 (child_add_thread): Call thread_added on the low target,
10128 which does the same thing.
10129 (regptr): Delete.
10130 (do_initial_child_stuff): Remove debug registers references.
10131 Set context using the low target. Resume threads after
10132 setting the contexts.
10133 (child_continue): Remove dead variable. Remove debug
10134 registers references.
10135 (child_fetch_inferior_registers): Go through the low target.
10136 (do_child_store_inferior_registers): Remove.
10137 (child_store_inferior_registers): Go through the low target.
10138 (win32_resume): Remove debug registers references.
10139 Set context using the low target.
10140 (handle_exception): Change return type to void. Don't record
10141 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10142 first chance exception.
10143 (get_child_debug_event): Change return type to void. Remove
10144 goto loop. Always return after waiting for debug event.
10145 (win32_wait): Convert to switch statement. Handle spurious
10146 events.
10147
10148 * win32-i386-low.c (debug_registers_changed,
10149 debug_registers_used): New.
10150 (initial_stuff): Rename to ...
10151 (i386_initial_stuff): ... this. Clear debug registers
10152 state variables.
10153 (store_debug_registers): Delete.
10154 (i386_get_thread_context): New.
10155 (load_debug_registers): Delete.
10156 (i386_set_thread_context): New.
10157 (i386_thread_added): New.
10158 (single_step): Rename to ...
10159 (i386_single_step): ... this.
10160 (do_fetch_inferior_registers): Rename to ...
10161 (i386_fetch_inferior_register): ... this.
10162 (i386_store_inferior_register): New.
10163 (the_low_target): Adapt to new interface.
10164
10165 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10166 (arm_get_thread_context): New.
10167 (arm_set_thread_context): New.
10168 (regptr): New.
10169 (do_fetch_inferior_registers): Rename to ...
10170 (arm_fetch_inferior_register): ... this.
10171 (arm_store_inferior_register): New.
10172 (arm_wince_breakpoint): Reimplement as unsigned long.
10173 (arm_wince_breakpoint_len): Define.
10174 (the_low_target): Adapt to new interface.
10175
10176 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10177 load_debug_registers. Add get_thread_context, set_thread_context,
10178 thread_added and store_inferior_register. Rename
10179 fetch_inferior_registers to fetch_inferior_register.
10180 (regptr): Remove declaration.
10181
10182 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10183
10184 * linux-low.c (linux_detach): Change return type to int. Return 0.
10185 * spu-low.c (spu_detach): Likewise.
10186
10187 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10188
10189 * target.h (target_ops): Change return type of detach to int.
10190 Add join.
10191 (join_inferior): New.
10192 * server.c (main): Don't skip detach support on mingw32.
10193 If the inferior doesn't support detaching return error.
10194 Call join_inferior instead of using waitpid.
10195 * linux-low.c (linux_join): New.
10196 (linux_target_op): Add linux_join.
10197 * spu-low.c (spu_join): New.
10198 (spu_target_ops): Add spu_join.
10199 * win32-low.c (win32_detach): Adapt to new interface.
10200 Reopen current_process_handle before detaching. Issue a child
10201 resume before detaching.
10202 (win32_join): New.
10203 (win32_target_op): Add win32_join.
10204
10205 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10206
10207 * win32-low.c (win32-attach): Fix return value.
10208 * target.h (target_ops): Describe ATTACH return values.
10209
10210 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10211
10212 * win32-low.c (GETPROCADDRESS): Define.
10213 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10214 (winapi_DebugSetProcessKillOnExit): Likewise.
10215 (win32_create_inferior): Force usage of ansi CreateProcessA.
10216 (win32_attach): Use GETPROCADDRESS.
10217 (win32_detach): Likewise.
10218
10219 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10220
10221 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10222
10223 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10224
10225 * win32-low.c: Commit leftover changes from 2007-03-29.
10226
10227 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10228
10229 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10230 fields short instead of int. Add explicit padding.
10231 (i387_cache_to_fsave): Remove unnecessary casts.
10232 (i387_fsave_to_cache): Doc fix.
10233 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10234
10235 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10236
10237 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10238 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10239
10240 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10241
10242 * configure.srv (arm*-*-mingw32ce*): Move near the other
10243 arm targets.
10244
10245 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10246
10247 * configure.ac: Add errno checking.
10248 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10249 sys/file.h and malloc.h.
10250 (AC_CHECK_DECLS): Add perror.
10251 (srv_mingwce): Handle.
10252 * configure.srv (i[34567]86-*-cygwin*): Add
10253 win32-i386-low.o to srv_tgtobj.
10254 (i[34567]86-*-mingw*): Likewise.
10255 (arm*-*-mingw32ce*): Add case.
10256 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10257 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10258 [__MINGW32CE__] (strerror): New function.
10259 [__MINGW32CE__] (errno): Define to GetLastError.
10260 [__MINGW32CE__] (COUNTOF): New macro.
10261 (remote_open): Remove extra close call.
10262 * mem-break.c (delete_breakpoint_at): New function.
10263 * mem-break.h (delete_breakpoint_at): Declare.
10264 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10265 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10266 [USE_WIN32API] (read, write): Add char* casts.
10267 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10268 * server.h: Include wincecompat.h on Windows CE.
10269 [HAVE_ERRNO_H]: Check.
10270 (perror): Declare if not declared.
10271 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10272 (perror_with_name): Remove errno declaration.
10273 * wincecompat.h: New.
10274 * wincecompat.c: New.
10275 * win32-low.h: New.
10276 * win32-arm-low.c: New.
10277 * win32-i386-low.c: New.
10278 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10279 (OUTMSG2): Make it safe.
10280 (_T): New macro.
10281 (COUNTOF): New macro.
10282 (NUM_REGS): Get it from the low target.
10283 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10284 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10285 (thread_rec): Let low target handle debug registers.
10286 (child_add_thread): Likewise.
10287 (child_init_thread_list): Likewise.
10288 (continue_one_thread): Likewise.
10289 (regptr): New.
10290 (do_child_fetch_inferior_registers): Move to ...
10291 * win32-i386-low.c: ... here, and rename to ...
10292 (do_fetch_inferior_registers): ... this.
10293 * win32-low.c (child_fetch_inferior_registers):
10294 Go through the low target.
10295 (do_child_store_inferior_registers): Use regptr.
10296 (strwinerror): New function.
10297 (win32_create_inferior): Handle Windows CE.
10298 Use strwinerror instead of strerror on Windows error
10299 codes. Add program to the error output.
10300 Don't close the main thread handle on Windows CE.
10301 (win32_attach): Use coredll.dll on Windows CE.
10302 (win32_kill): Close current process and current
10303 thread handles.
10304 (win32_detach): Use coredll.dll on Windows CE.
10305 (win32_resume): Let low target handle debug registers, and
10306 step request.
10307 (handle_exception): Add/Remove initial breakpoint. Avoid
10308 non-existant WSTOPSIG on Windows CE.
10309 (win32_read_inferior_memory): Cast to remove warning.
10310 (win32_arch_string): Go through the low target.
10311 (initialize_low): Call set_breakpoint_data with the low
10312 target's breakpoint.
10313 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10314 FOP_REGNUM, mappings): Move to ...
10315 * win32-i386-low.c: ... here.
10316 * win32-low.c (win32_thread_info): Move to ...
10317 * win32-low.h: ... here.
10318 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10319 win32-arm-low.c and wincecompat.c.
10320 (all:): Add $EXEEXT.
10321 (install-only:): Likewise.
10322 (gdbserver:): Likewise.
10323 (gdbreplay:): Likewise.
10324 * config.in: Regenerate.
10325 * configure: Regenerate.
10326
10327 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10328
10329 * win32-low.c: Rename typedef thread_info to
10330 win32_thread_info throughout.
10331
10332 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10333
10334 * win32-i386-low.c: Rename to ...
10335 * win32-low.c: ... this.
10336 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10337 * Makefile.in: Likewise.
10338
10339 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10340
10341 * remote-utils.c (monitor_output): Constify msg parameter.
10342 * server.h (monitor_output): Likewise.
10343 * win32-i386-low.c (handle_output_debug_string): New.
10344 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10345 handle_output_debug_string.
10346 (get_child_debug_event): Likewise.
10347
10348 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10349
10350 * server.c (main): Correct strtoul check.
10351
10352 2007-03-27 Jon Ringle <jon@ringle.org>
10353
10354 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10355
10356 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10357
10358 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10359
10360 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10361
10362 * terminal.h: Check HAVE_SGTTY_H.
10363
10364 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
10365
10366 * remote-utils.c (remote_open): Print out the assigned port number.
10367
10368 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10369
10370 * remote-utils.c (monitor_output): New function.
10371 * server.c (debug_threads): Define here.
10372 (monitor_show_help): New function.
10373 (handle_query): Handle qRcmd.
10374 (main): Do not handle 'd' packet.
10375 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10376 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10377 of debug_threads.
10378
10379 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10380
10381 * Makefile.in (EXEEXT): New.
10382 (clean): Use $(EXEEXT).
10383
10384 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10385
10386 * target.h (target_ops): Rename send_signal to request_interrupt,
10387 and remove enum target_signal parameter.
10388 * linux-low.c (linux_request_interrupt): Rename from
10389 linux_send_signal, and always send SIGINT.
10390 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10391 and always send SIGINT.
10392 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10393 of send_signal.
10394 (input_interrupt): Likewise.
10395
10396 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10397
10398 * server.c (get_features_xml): Check if target implemented
10399 arch_string.
10400 * win32-i386-low.c (win32_arch_string): New.
10401 (win32_target_ops): Add win32_arch_string as arch_string member.
10402
10403 2007-02-22 Markus Deuling <deuling@de.ibm.com>
10404
10405 * spu-low.c (spu_arch_string): New.
10406 (spu_target_ops): Add spu_arch_string.
10407
10408 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10409
10410 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10411 * configure.ac: Do not check for terminal.h.
10412 * configure, config.in: Regenerated.
10413
10414 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10415
10416 * Makefile.in (OBS): Add $(XML_BUILTIN).
10417 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10418 (clean): Update.
10419 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10420 (arm-with-iwmmxt.c): New.
10421 * config.in, configure: Regenerate.
10422 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10423 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10424 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10425 (arm*-*-linux*): Add iWMMXt and regset support.
10426 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10427 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10428 (arm_store_wmmxregset, target_regsets): New.
10429 * server.c (get_features_xml): Take annex argument. Check builtin
10430 XML documents.
10431 (handle_query): Handle multiple annexes.
10432
10433 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10434
10435 * remote-utils.c [USE_WIN32API] (read, write): Define.
10436 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10437 write.
10438
10439 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10440
10441 * linux-i386-low.c (the_low_target): Set arch_string.
10442 * linux-x86-64-low.c (the_low_target): Likewise.
10443 * linux-low.c (linux_arch_string): New.
10444 (linux_target_ops): Add it.
10445 * linux-low.h (struct linux_target_ops): Add arch_string.
10446 * server.c (write_qxfer_response): Use const void * for DATA.
10447 (get_features_xml): New.
10448 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10449 * target.h (struct target_ops): Add arch_string method.
10450
10451 2007-01-03 Denis Pilat <denis.pilat@st.com>
10452 Daniel Jacobowitz <dan@codesourcery.com>
10453
10454 * linux-low.c (linux_kill): Handle being called with no threads.
10455 * win32-i386-low.c (win32_kill): Likewise.
10456 (get_child_debug_event): Clear current_process_handle.
10457
10458 2006-12-30 Denis PILAT <denis.pilat@st.com>
10459 Daniel Jacobowitz <dan@codesourcery.com>
10460
10461 * remote-utils.c (remote_open): Check the type of specified
10462 serial port devices before opening them.
10463 * server.c (main): Kill the inferior if an error occurs during
10464 the first remote_open.
10465
10466 2006-12-05 Markus Deuling <deuling@de.ibm.com>
10467
10468 * README: Update supported targets.
10469
10470 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10471
10472 * Makefile.in (clean): Remove reg-mips64.c.
10473 (reg-mips64.c, reg-mips64.o): New rules.
10474 * configure.srv: Handle mips64. Include regset support for mips.
10475 * linux-mips-low.c (union mips_register): New.
10476 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10477 (mips_breakpoint, mips_breakpoint_at): Use int.
10478 (mips_collect_register, mips_supply_register)
10479 (mips_collect_register_32bit, mips_supply_register_32bit)
10480 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10481 (mips_store_fpregset, target_regsets): New.
10482 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10483
10484 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10485
10486 * configure.srv: Add target "spu*-*-*".
10487 * Makefile.in (clean): Remove reg-spu.c.
10488 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10489 * spu-low.c: New file.
10490
10491 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10492
10493 * configure.ac: Correct td_thr_tls_get_addr test.
10494 * configure: Regenerated.
10495
10496 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10497
10498 * linux-low.c (linux_wait_for_event): Reformat. Use the
10499 pass_signals array.
10500 * remote-utils.c (decode_address_to_semicolon): New.
10501 * server.c (pass_signals, handle_general_set): New.
10502 (handle_query): Mention QPassSignals for qSupported.
10503 (main): Call handle_general_set.
10504 * server.h (pass_signals, decode_address_to_semicolon): New.
10505
10506 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10507
10508 * server.c (handle_query): Correct error handling for read_auxv.
10509
10510 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10511
10512 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10513 and srv_linux_thread_db to yes.
10514 * linux-s390-low.c (s390_fill_gregset): New function.
10515 (target_regsets): Define data structure.
10516
10517 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10518
10519 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10520 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10521 * config.in, configure: Regenerated.
10522 * inferiors.c (gdb_id_to_thread): New function.
10523 (gdb_id_to_thread_id): Use it.
10524 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10525 * linux-low.h (struct process_info): Add th member.
10526 (thread_db_get_tls_address): New prototype.
10527 * remote-utils.c (decode_address): Make non-static.
10528 * server.c (handle_query): Handle qGetTLSAddr.
10529 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10530 * target.h (struct target_ops): Add get_tls_address.
10531 * thread-db.c (maybe_attach_thread): Save the thread handle.
10532 (thread_db_get_tls_address): New.
10533
10534 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10535
10536 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10537 (linux_resume_one_process): Take a siginfo_t *. Update all
10538 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10539 (struct pending_signals): Add a siginfo_t.
10540 (linux_wait_for_process): Always set last_status.
10541 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10542 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10543 * linux-low.h (struct process_info): Add last_status.
10544
10545 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10546
10547 * remote-utils.c (try_rle): New function.
10548 (putpkt_binary): Use it.
10549
10550 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10551
10552 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10553 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10554 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10555 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10556 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10557 point registers.
10558
10559 2006-08-08 Richard Sandiford <richard@codesourcery.com>
10560
10561 * server.c (terminal_fd): New variable.
10562 (old_foreground_pgrp): Likewise.
10563 (restore_old_foreground_pgrp): New function.
10564 (start_inferior): Record the terminal file descriptor in terminal_fd
10565 and its original foreground group in old_foreground_pgrp. Register
10566 restore_old_foreground_pgrp with atexit().
10567
10568 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10569
10570 * server.c (handle_query): Correct qPart to qXfer.
10571
10572 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10573
10574 * configure.ac: Check for more headers which are missing on
10575 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10576 * configure.srv: Add Cygwin and mingw32.
10577 * remote-utils.c: Don't include headers unconditionally which
10578 are missing on mingw32. Include <winsock.h> for mingw32.
10579 (remote_open): Adjust for mingw32 support. Flush
10580 standard error after writing to it.
10581 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10582 (unblock_async_io, enable_async_io, disable_async_io)
10583 (readchar, getpkt): Update for Winsock support.
10584 (prepare_resume_reply): Expect a protocol signal number.
10585 * server.c: Disable <sys/wait.h> on mingw32.
10586 (start_inferior): Adjust for mingw32 support. Flush
10587 standard error after writing to it.
10588 (attach_inferior): Likewise. Use protocol signal
10589 numbers.
10590 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10591 and names.
10592 * win32-i386-low.c: New file.
10593 * Makefile.in (XM_CLIBS): Set.
10594 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10595 (win32-i386-low.o): New dependency rule.
10596 * linux-low.c (linux_wait): Use target signal numbers.
10597 * target.h (struct target_ops): Doc fix.
10598 * server.h (target_signal_to_name): New prototype.
10599 * gdbreplay.c: Don't include headers unconditionally which
10600 are missing on mingw32. Include <winsock.h> for mingw32.
10601 (remote_close, remote_open): Adjust for Winsock support.
10602 * configure, config.in: Regenerated.
10603
10604 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10605
10606 * server.c (decode_xfer_read, write_qxfer_response): New.
10607 (handle_query): Take a packet length argument. Handle
10608 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10609 the qSupported response.
10610 (main): Update call to handle_query.
10611
10612 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10613
10614 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10615 (putpkt_binary): Renamed from putpkt and adjusted for binary
10616 data.
10617 (putpkt): New wrapper for putpkt_binary.
10618 (readchar): Don't mask off the high bit.
10619 (decode_X_packet): New function.
10620 * server.c (main): Call putpkt_binary if a handler sets the packet
10621 length. Save the length of the incoming packet. Handle 'X'.
10622 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10623
10624 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10625
10626 * server.c (handle_query): Handle qSupported.
10627
10628 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10629
10630 * remote-utils.c (all_symbols_looked_up): New variable.
10631 (look_up_one_symbol): Check it.
10632 * server.h (look_up_one_symbol): New declaration.
10633 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10634
10635 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10636
10637 * Makefile.in (linux-arm-low.o): Update dependencies.
10638 * linux-arm-low.c: Include "gdb_proc_service.h".
10639 (PTRACE_GET_THREAD_AREA): Define.
10640 (ps_get_thread_area): New function.
10641
10642 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10643
10644 * configure.srv (m68k*-*-uclinux*): New target.
10645 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10646 (linux_resume_one_process): Remove extraneous cast.
10647 (linux_read_offsets): New.
10648 (linux_target_op): Add linux_read_offsets on mmuless systems.
10649 * server.c (handle_query): Add qOffsets logic.
10650 * target.h (struct target_ops): Add read_offsets.
10651
10652 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10653
10654 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10655 (PTRACE_GET_THREAD_AREA): Define.
10656 (ps_get_thread_area): New function.
10657 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10658 (linux-x86-64-low.o): Update.
10659
10660 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10661
10662 * configure.ac: Remove checks for prfpregset_t.
10663 * gdb_proc_service.h: New file.
10664 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10665 new "gdb_proc_service.h".
10666 * proc-service.c: Likewise.
10667 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10668 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10669 * Makefile.in (gdb_proc_service_h): Updated.
10670 * configure, config.in: Regenerated.
10671
10672 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10673
10674 * remote-utils.c (prepare_resume_reply): Move declaration
10675 of gdb_id_from_wait to the top of the block.
10676
10677 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10678
10679 * linux-low.c (regsets_store_inferior_registers): Read the regset
10680 from the target before filling it.
10681
10682 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10683
10684 * server.c (attach_inferior): Return SIGTRAP for a successful
10685 attach.
10686
10687 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10688
10689 * Makefile.in (OBS): Add version.o.
10690 (STAGESTUFF): Delete.
10691 (version.o): Add dependencies.
10692 (version.c): Replace rule.
10693 (clean): Remove version.c.
10694 * server.c (gdbserver_version): New.
10695 (gdbserver_usage): Use printf.
10696 (main): Handle --version and --help.
10697 * server.h (version, host_name): Add declarations.
10698
10699 2005-12-23 Eli Zaretskii <eliz@gnu.org>
10700
10701 * linux-arm-low.c:
10702 * linux-arm-low.c:
10703 * inferiors.c:
10704 * i387-fp.h:
10705 * i387-fp.c:
10706 * gdbreplay.c:
10707 * regcache.c:
10708 * proc-service.c:
10709 * mem-break.h:
10710 * mem-break.c:
10711 * linux-x86-64-low.c:
10712 * linux-sh-low.c:
10713 * linux-s390-low.c:
10714 * linux-ppc64-low.c:
10715 * linux-ppc-low.c:
10716 * linux-mips-low.c:
10717 * linux-m68k-low.c:
10718 * linux-m32r-low.c:
10719 * linux-low.h:
10720 * linux-low.c:
10721 * linux-ia64-low.c:
10722 * linux-i386-low.c:
10723 * linux-crisv32-low.c:
10724 * thread-db.c:
10725 * terminal.h:
10726 * target.h:
10727 * target.c:
10728 * server.h:
10729 * server.c:
10730 * remote-utils.c:
10731 * regcache.h:
10732 * utils.c:
10733 * Makefile.in:
10734 * configure.ac:
10735 * gdbserver.1: Add (C) after Copyright. Update the FSF
10736 address.
10737
10738 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10739
10740 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10741 (arm_breakpoint_at): Recognize both breakpoints.
10742 (the_low_target): Use the correct breakpoint instruction.
10743
10744 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10745
10746 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10747 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10748 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10749 (the_low_target): Update.
10750
10751 2005-10-25 Andreas Schwab <schwab@suse.de>
10752
10753 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10754
10755 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10756 (ia64_num_regs): Reduce to 462.
10757
10758 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10759
10760 * acinclude.m4: Correct quoting.
10761 * aclocal.m4: Regenerated.
10762
10763 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10764 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10765 (thread_db_init): Call thread_db_err_str.
10766 * configure.ac: Check for TD_VERSION.
10767 * config.in, configure: Regenerated.
10768
10769 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10770
10771 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10772
10773 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10774
10775 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10776 is not available. Define HAVE_PTRACE_GETREGS if it is.
10777 * config.in, configure: Regenerated.
10778 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10779 * linux-i386-low.c, linux-m68k-low.c: Update to use
10780 HAVE_PTRACE_GETREGS.
10781 * linux-low.c (regsets_fetch_inferior_registers)
10782 (regsets_store_inferior_registers): Only return 0 if we processed
10783 GENERAL_REGS.
10784 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10785 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10786
10787 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10788
10789 * inferiors.c (struct thread_info): Add gdb_id.
10790 (add_thread): Add gdb_id argument.
10791 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10792 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10793 calls to add_thread.
10794 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10795 * server.c (handle_query): Use thread_to_gdb_id.
10796 (handle_v_cont, main): Use gdb_id_to_thread_id.
10797 * server.h (add_thread): Update prototype.
10798 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10799 prototypes.
10800
10801 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10802
10803 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10804 left-padded registers.
10805 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10806 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10807
10808 2005-07-01 Steve Ellcey <sje@cup.hp.com>
10809
10810 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10811 * configure: Regenerate.
10812 * config.in: Regenerate.
10813 * server.h (NEED_DECLARATION_STRERROR):
10814 Replace with !HAVE_DECL_STRERROR.
10815
10816 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10817
10818 * linux-low.c (linux_wait, linux_send_signal): Don't test
10819 an unsigned long variable for > 0 if it could be MAX_ULONG.
10820 * server.c (myresume): Likewise.
10821 * target.c (set_desired_inferior): Likewise.
10822
10823 2005-06-13 Mark Kettenis <kettenis@gnu.org>
10824
10825 * configure.ac: Simplify and improve check for socklen_t.
10826 * configure, config.in: Regenerate.
10827
10828 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10829
10830 * acconfig.h: Remove.
10831 * configure.ac: Add a test for socklen_t. Use three-argument
10832 AC_DEFINE throughout.
10833 * config.in: Regenerated using autoheader 2.59.
10834 * configure: Regenerated.
10835
10836 * gdbreplay.c (socklen_t): Provide a default.
10837 (remote_open): Use socklen_t.
10838 * remote-utils.c (socklen_t): Provide a default.
10839 (remote_open): Use socklen_t.
10840 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10841 unsigned char.
10842
10843 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10844 char for buffers.
10845 * linux-low.c (linux_read_memory, linux_write_memory)
10846 (linux_read_auxv): Likewise.
10847 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10848 (check_mem_write): Likewise.
10849 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10850 Likewise.
10851 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10852 (registers_from_string, register_data): Likewise.
10853 * server.c (handle_query, main): Likewise.
10854 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10855 (decode_M_packet): Likewise.
10856 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10857 * target.h (struct target_ops): Update read_memory, write_memory,
10858 and read_auxv.
10859 (read_inferior_memory, write_inferior_memory): Update.
10860 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10861 to unsigned char *.
10862 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10863 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10864 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10865 linux-s390-low.c, linux-sh-low.c: Update for changes in
10866 read_inferior_memory and the_low_target->breakpoint.
10867
10868 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10869
10870 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10871 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10872 * configure.srv: Add powerpc64-*-linux*.
10873 * linux-ppc64-low.c: New file.
10874
10875 2005-05-23 Orjan Friberg <orjanf@axis.com>
10876
10877 * linux-cris-low.c: New file with support for CRIS.
10878 * linux-crisv32-low.c: Ditto for CRISv32.
10879 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10880 (clean): Add reg-cris.c and reg-crisv32.c.
10881 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
10882 reg-crisv32.o, and reg-crisv32.c to make rules.
10883 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10884 recognized targets.
10885
10886 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10887
10888 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10889 of sizeof (PTRACE_XFER_TYPE).
10890 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10891
10892 2005-05-12 Orjan Friberg <orjanf@axis.com>
10893
10894 * target.h (struct target_ops): Add insert_watchpoint,
10895 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10896 pointers for hardware watchpoint support.
10897 * linux-low.h (struct linux_target_ops): Ditto.
10898 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10899 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10900 to linux_target_ops.
10901 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10902 reply packet.
10903 * server.c (main): Recognize 'Z' and 'z' packets.
10904
10905 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10906
10907 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10908 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10909 (the_low_target): Add new members.
10910
10911 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10912
10913 * proc-service.c (ps_lgetregs): Search all_processes instead of
10914 all_threads.
10915
10916 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10917
10918 * server.c (start_inferior): Change return type to int.
10919 (attach_inferior): Change sigptr to int *.
10920 (handle_v_cont, handle_v_requests): Change signal to int *.
10921 (main): Change signal to int.
10922
10923 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
10924
10925 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10926 * configure.srv: Add m32r*-*-linux*.
10927 * linux-m32r-low.c: New file.
10928
10929 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10930
10931 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10932
10933 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10934
10935 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10936 Take unsigned long arguments for PIDs.
10937 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10938 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10939 (wait_for_sigstop, linux_resume_one_process)
10940 (regsets_fetch_inferior_registers, linux_send_signal)
10941 (linux_read_auxv): Likewise. Update the types of variables holding
10942 PIDs. Update format string specifiers.
10943 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10944 * remote-utils.c (prepare_resume_reply): Likewise.
10945 * server.c (cont_thread, general_thread, step_thread)
10946 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10947 unsigned long.
10948 (handle_query): Update format specifiers.
10949 (handle_v_cont, main): Use strtoul for thread IDs.
10950 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10951 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10952 (general_thread, step_thread, thread_from_wait)
10953 (old_thread_from_wait): Update.
10954 * target.h (struct thread_resume): Use unsigned long for THREAD.
10955 (struct target_ops): Use unsigned long for arguments to attach and
10956 thread_alive.
10957
10958 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10959
10960 * acinclude.m4: Include bfd/bfd.m4 directly.
10961 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10962 <agriffis@toolchain.org>.
10963 * aclocal.m4, configure: Regenerated.
10964
10965 2005-01-07 Andrew Cagney <cagney@gnu.org>
10966
10967 * configure.ac: Rename configure.in, require autoconf 2.59.
10968 * configure: Re-generate.
10969
10970 2004-12-08 Daniel Jacobowitz <dan@debian.org>
10971
10972 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10973 LIBS when finished.
10974 * aclocal.m4: Regenerated.
10975 * configure: Regenerated.
10976
10977 2004-11-21 Andreas Schwab <schwab@suse.de>
10978
10979 * linux-m68k-low.c (m68k_num_gregs): Define.
10980 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10981 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10982 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10983 (m68k_breakpoint_at): New. Add to the_low_target.
10984
10985 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10986 srv_linux_thread_db to yes.
10987
10988 2004-10-20 Joel Brobecker <brobecker@gnat.com>
10989
10990 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10991 (ARCH_SET_FS): Likewise.
10992 (ARCH_GET_FS): Likewise.
10993 (ARCH_GET_GS): Likewise.
10994
10995 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10996
10997 * linux-i386-low.c (ps_get_thread_area): New.
10998 * linux-x86-64-low.c (ps_get_thread_area): New.
10999 * linux-low.c: Include <sys/syscall.h>.
11000 (linux_kill_one_process): Don't kill the first thread here.
11001 (linux_kill): Kill the first thread here.
11002 (kill_lwp): New function.
11003 (send_sigstop, linux_send_signal): Use it.
11004 * proc-service.c: Clean up #ifdefs.
11005 (fpregset_info): Delete.
11006 (ps_lgetregs): Update and enable implementation.
11007 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11008 implementations.
11009 * remote-utils.c (struct sym_cache, symbol_cache): New.
11010 (input_interrupt): Print a clearer message.
11011 (async_io_enabled): New variable.
11012 (enable_async_io, disable_async_io): Use it. Update comments.
11013 (look_up_one_symbol): Use the symbol cache.
11014 * thread-db.c (thread_db_look_up_symbols): New function.
11015 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11016
11017 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11018
11019 * configure.in: Test for -rdynamic.
11020 * configure: Regenerated.
11021 * Makefile (INTERNAL_LDFLAGS): New.
11022 (gdbserver, gdbreplay): Use it.
11023
11024 2004-09-02 Andrew Cagney <cagney@gnu.org>
11025
11026 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11027
11028 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
11029
11030 * linux-low.c (linux_wait): Clear all_processes list also.
11031
11032 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11033
11034 * linux-low.c: Include <errno.h>. Remove extern declaration of
11035 errno.
11036
11037 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11038
11039 * gdbreplay.c, server.h, utils.c: Update copyright years.
11040
11041 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11042
11043 * server.c (main): Print child status or termination signal from
11044 variable 'signal', not 'sig'.
11045
11046 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11047
11048 * linux-low.c (linux_read_memory): Change return type to
11049 int. Check for and return error from ptrace().
11050 * target.c (read_inferior_memory): Change return type to int. Pass
11051 back return status from the_target->read_memory().
11052 * target.h (struct target_ops): Adapt *read_memory() prototype.
11053 Update comment.
11054 (read_inferior_memory): Adapt prototype.
11055 * server.c (main): Return an error packet if
11056 read_inferior_memory() returns an error.
11057
11058 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
11059
11060 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11061 Unify with other clean targets.
11062
11063 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11064
11065 * server.c (handle_v_cont): Call set_desired_inferior.
11066
11067 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11068
11069 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11070
11071 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11072
11073 * linux-low.c (linux_wait): Unblock async I/O.
11074 (linux_resume): Block and enable async I/O.
11075 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11076 * server.h (block_async_io, unblock_async_io): Add prototypes.
11077
11078 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11079
11080 * remote-utils.c (remote_open): Print a status notice after
11081 opening a TCP port.
11082 * server.c (attach_inferior): Print a status notice after
11083 attaching.
11084
11085 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11086
11087 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11088
11089 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
11090
11091 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11092 error packet.
11093 * server.c, target.h: Update copyright years.
11094
11095 2004-02-25 Roland McGrath <roland@redhat.com>
11096
11097 * target.h (struct target_ops): New member `read_auxv'.
11098 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11099 * linux-low.c (linux_read_auxv): New function.
11100 (linux_target_ops): Initialize `read_auxv' member to that.
11101
11102 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11103
11104 Committed by Jim Blandy <jimb@redhat.com>.
11105
11106 * linux-s390-low.c (s390_num_regs): Update.
11107 (s390_regmap): Remove control registers. Use __s390x__ predefine
11108 instead of GPR_SIZE to distiguish s390 and s390x targets.
11109
11110 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
11111
11112 * linux-low.c: Update copyright year.
11113 (check_removed_breakpoint): Clear pending_is_breakpoint.
11114 (linux_set_resume_request, linux_queue_one_thread)
11115 (resume_status_pending_p): New functions.
11116 (linux_continue_one_thread): Use process->resume.
11117 (linux_resume): Only resume threads if there are no pending events.
11118 * linux-low.h (struct process_info): Add resume request
11119 pointer.
11120
11121 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
11122
11123 * regcache.c (new_register_cache): Clear the allocated register
11124 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11125
11126 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
11127
11128 * linux-low.c (linux_resume): Take a struct thread_resume *
11129 argument.
11130 (linux_wait): Update call.
11131 (resume_ptr): New static variable.
11132 (linux_continue_one_thread): Renamed from
11133 linux_continue_one_process. Use resume_ptr.
11134 (linux_resume): Use linux_continue_one_thread.
11135 * server.c (handle_v_cont, handle_v_requests): New functions.
11136 (myresume): New function.
11137 (main): Handle 'v' case.
11138 * target.h (struct thread_resume): New type.
11139 (struct target_ops): Change argument of "resume" to struct
11140 thread_resume *.
11141 (myresume): Delete macro.
11142
11143 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11144
11145 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11146 (uninstall): Support DESTDIR.
11147
11148 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11149
11150 * configure.srv: Add xscale*linux copy of arm*linux entry.
11151
11152 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
11153
11154 * linux-arm-low.c (arm_reinsert_addr): New function.
11155 (the_low_target): Add arm_reinsert_addr.
11156
11157 2003-07-08 Mark Kettenis <kettenis@gnu.org>
11158
11159 * mem-break.c: Remove whitespace at end of file.
11160
11161 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11162
11163 * configure.in: Check whether we need to prototype strerror.
11164 * server.h: Optionally prototype strerror.
11165 * gdbreplay.c (perror_with_name): Use strerror.
11166 * linux-low.c (linux_attach_lwp): Use strerror.
11167 * utils.c (perror_with_name): Use strerror.
11168 * config.in, configure: Regenerated.
11169
11170 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11171
11172 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11173 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11174
11175 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
11176
11177 * Makefile.in (SFILES): Update.
11178 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11179 low-sun3.c: Remove files.
11180
11181 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
11182
11183 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11184 (linux_detach_one_process, linux_detach): New functions.
11185 (linux_target_ops): Add linux_detach.
11186 * server.c (main): Handle 'D' packet.
11187 * target.h (struct target_ops): Add "detach" member.
11188 (detach_inferior): Define.
11189
11190 2003-06-13 Mark Kettenis <kettenis@gnu.org>
11191
11192 From Kelley Cook <kelleycook@wideopenwest.com>:
11193 * configure.srv: Accept i[34567]86 variants.
11194
11195 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
11196
11197 * linux-low.c (linux_wait_for_event): Correct comment typos.
11198 (linux_resume_one_process): Call check_removed_breakpoint.
11199 (linux_send_signal): New function.
11200 (linux_target_ops): Add linux_send_signal.
11201 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11202 of kill.
11203 * target.h (struct target_ops): Add send_signal.
11204
11205 2003-05-29 Jim Blandy <jimb@redhat.com>
11206
11207 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11208 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11209 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11210 away part of the register's value.
11211
11212 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
11213
11214 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11215 (linux_wait_for_event, linux_init_signals): Likewise.
11216
11217 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
11218
11219 * configure.in: Check for stdlib.h.
11220 * configure: Regenerated.
11221 * config.in: Regenerated.
11222
11223 2003-01-04 Andreas Schwab <schwab@suse.de>
11224
11225 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11226
11227 2003-01-02 Andrew Cagney <ac131313@redhat.com>
11228
11229 * Makefile.in: Remove obsolete code.
11230
11231 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
11232
11233 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11234 defined(PT_FPR0_HI).
11235
11236 2002-11-17 Stuart Hughes <seh@zee2.com>
11237
11238 * linux-arm-low.c (arm_num_regs): Increase.
11239 (arm_regmap): Include status register.
11240
11241 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
11242
11243 * linux-low.c (register_addr): Remove incorrect -1 check.
11244
11245 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
11246
11247 * linux-low.c (linux_create_inferior): Call setpgid. Return
11248 the new PID.
11249 (unstopped_p, linux_signal_pid): Remove.
11250 (linux_target_ops): Remove linux_signal_pid.
11251 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11252 global instead of target method.
11253 * target.h (struct target_ops): Remove signal_pid. Update comment
11254 for create_inferior.
11255 * server.c (signal_pid): New variable.
11256 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
11257 gdbserver. Set the child to be the foreground process group.
11258 (attach_inferior): Set signal_pid.
11259
11260 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
11261
11262 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11263
11264 2002-08-20 Jim Blandy <jimb@redhat.com>
11265
11266 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11267 default for this.
11268
11269 2002-08-01 Andrew Cagney <cagney@redhat.com>
11270
11271 * Makefile.in: Make chill references obsolete.
11272
11273 2002-07-24 Kevin Buettner <kevinb@redhat.com>
11274
11275 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11276 * configure: Regenerate.
11277 * config.in: Regenerate.
11278
11279 2002-07-09 David O'Brien <obrien@FreeBSD.org>
11280
11281 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11282 (perror_with_name, remote_close, remote_open, expect, play): Static.
11283
11284 2002-07-04 Michal Ludvig <mludvig@suse.cz>
11285
11286 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
11287 byte offsets instead of an array of indexes.
11288 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11289
11290 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
11291
11292 * regcache.c: Add comment.
11293
11294 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
11295
11296 * thread-db.c: New file.
11297 * proc-service.c: New file.
11298 * acinclude.m4: New file.
11299 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11300 proc-service.o, and thread-db.o.
11301 (linux-low.o): Add USE_THREAD_DB.
11302 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11303 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11304 * aclocal.m4: Regenerated.
11305 * config.in: Regenerated.
11306 * configure: Regenerated.
11307 * configure.in: Check for proc_service.h, sys/procfs.h,
11308 thread_db.h, and linux/elf.h headrs.
11309 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11310 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11311 Check for -lthread_db and thread support.
11312 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11313 PowerPC, and SuperH.
11314 * i387-fp.c: Constify arguments.
11315 * i387-fp.h: Likewise.
11316 * inferiors.c: (struct thread_info): Renamed from
11317 `struct inferior_info'. Remove PID member. Use generic inferior
11318 list header. All uses updated.
11319 (inferiors, signal_pid): Removed.
11320 (all_threads): New variable.
11321 (get_thread): Define.
11322 (add_inferior_to_list): New function.
11323 (for_each_inferior): New function.
11324 (change_inferior_id): New function.
11325 (add_inferior): Removed.
11326 (remove_inferior): New function.
11327 (add_thread): New function.
11328 (free_one_thread): New function.
11329 (remove_thread): New function.
11330 (clear_inferiors): Use for_each_inferior and free_one_thread.
11331 (find_inferior): New function.
11332 (find_inferior_id): New function.
11333 (inferior_target_data): Update argument type.
11334 (set_inferior_target_data): Likewise.
11335 (inferior_regcache_data): Likewise.
11336 (set_inferior_regcache_data): Likewise.
11337 * linux-low.c (linux_bp_reinsert): Remove.
11338 (all_processes, stopping_threads, using_thrads)
11339 (struct pending_signals, debug_threads, pid_of): New.
11340 (inferior_pid): Replace with macro.
11341 (struct inferior_linux_data): Remove.
11342 (get_stop_pc, add_process): New functions.
11343 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11344 Use add_process and add_thread.
11345 (linux_attach_lwp): New function, based on old linux_attach. Use
11346 add_process and add_thread. Set stop_expected for new threads.
11347 (linux_attach): New function.
11348 (linux_kill_one_process): New function.
11349 (linux_kill): Kill all LWPs.
11350 (linux_thread_alive): Use find_inferior_id.
11351 (check_removed_breakpoints, status_pending_p): New functions.
11352 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11353 Update. Use WNOHANG. Wait for cloned processes also. Update process
11354 struct for the found process.
11355 (linux_wait_for_event): New function.
11356 (linux_wait): Use it. Support LWPs.
11357 (send_sigstop, wait_for_sigstop, stop_all_processes)
11358 (linux_resume_one_process, linux_continue_one_process): New functions.
11359 (linux_resume): Support LWPs.
11360 (REGISTER_RAW_SIZE): Remove.
11361 (fetch_register): Use register_size instead. Call supply_register.
11362 (usr_store_inferior_registers): Likewise. Call collect_register.
11363 Fix recursive case.
11364 (regsets_fetch_inferior_registers): Improve error message.
11365 (regsets_store_inferior_registers): Add debugging.
11366 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11367 (unstopped_p, linux_signal_pid): New functions.
11368 (linux_target_ops): Add linux_signal_pid.
11369 (linux_init_signals): New function.
11370 (initialize_low): Call it. Initialize using_threads.
11371 * regcache.c (inferior_regcache_data): Add valid
11372 flag.
11373 (get_regcache): Fetch registers lazily. Add fetch argument
11374 and update all callers.
11375 (regcache_invalidate_one, regcache_invalidate): New
11376 functions.
11377 (new_register_cache): Renamed from create_register_cache.
11378 Return the new regcache.
11379 (free_register_cache): Change argument to a void *.
11380 (registers_to_string, registers_from_string): Call get_regcache
11381 with fetch flag set.
11382 (register_data): Make static. Pass fetch flag to get_regcache.
11383 (supply_register): Call get_regcache with fetch flag clear.
11384 (collect_register): Call get_regcache with fetch flag set.
11385 (collect_register_as_string): New function.
11386 * regcache.h: Update.
11387 * remote-utils.c (putpkt): Flush after debug output and use
11388 stderr.
11389 Handle input interrupts while waiting for an ACK.
11390 (input_interrupt): Use signal_pid method.
11391 (getpkt): Flush after debug output and use stderr.
11392 (outreg): Use collect_register_as_string.
11393 (new_thread_notify, dead_thread_notify): New functions.
11394 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11395 and general_thread.
11396 (look_up_one_symbol): Flush after debug output.
11397 * server.c (step_thread, server_waiting): New variables.
11398 (start_inferior): Don't use signal_pid. Update call to mywait.
11399 (attach_inferior): Update call to mywait.
11400 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11401 (main): Don't fetch/store registers explicitly. Use
11402 set_desired_inferior. Support proposed ``Hs'' packet. Update
11403 calls to mywait.
11404 * server.h: Update.
11405 (struct inferior_list, struct_inferior_list_entry): New.
11406 * target.c (set_desired_inferior): New.
11407 (write_inferior_memory): Constify.
11408 (mywait): New function.
11409 * target.h: Update.
11410 (struct target_ops): New signal_pid method.
11411 (mywait): Removed macro, added prototype.
11412
11413 * linux-low.h (regset_func): Removed.
11414 (regset_fill_func, regset_store_func): New.
11415 (enum regset_type): New.
11416 (struct regset_info): Add type field. Use new operation types.
11417 (struct linux_target_ops): stop_pc renamed to get_pc.
11418 Add decr_pc_after_break and breakpoint_at.
11419 (get_process, get_thread_proess, get_process_thread)
11420 (strut process_info, all_processes, linux_attach_lwp)
11421 (thread_db_init): New.
11422
11423 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11424 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11425 (the_low_target): Add new members.
11426 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11427 (i386_store_fpxregset): Constify.
11428 (target_regsets): Add new kind identifier.
11429 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11430 (i386_set_pc): Add debugging.
11431 (i386_breakpoint_at): New function.
11432 (the_low_target): Add new members.
11433 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11434 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11435 (mips_breakpoint_at): New.
11436 (the_low_target): Add new members.
11437 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11438 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11439 (the_low_target): Add new members.
11440 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11441 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11442 (the_low_target): Add new members.
11443 * linux-x86-64-low.c (target_regsets): Add new kind
11444 identifier.
11445
11446 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
11447
11448 From Martin Pool <mbp@samba.org>:
11449 * server.c (gdbserver_usage): New function.
11450 (main): Call it.
11451
11452 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
11453
11454 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11455 stop_at -> stop_pc.
11456
11457 2002-05-04 Andrew Cagney <ac131313@redhat.com>
11458
11459 * Makefile.in: Remove obsolete code.
11460
11461 2002-04-24 Michal Ludvig <mludvig@suse.cz>
11462
11463 * linux-low.c (regsets_fetch_inferior_registers),
11464 (regsets_store_inferior_registers): Removed cast to int from
11465 ptrace() calls.
11466 * regcache.h: Added declaration of struct inferior_info.
11467
11468 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11469
11470 * inferiors.c (struct inferior_info): Add regcache_data.
11471 (add_inferior): Call create_register_cache.
11472 (clear_inferiors): Call free_register_cache.
11473 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11474 * regcache.c (struct inferior_regcache_data): New.
11475 (registers): Remove.
11476 (get_regcache): New function.
11477 (create_register_cache, free_register_cache): New functions.
11478 (set_register_cache): Don't initialize the register cache here.
11479 (registers_to_string, registers_from_string, register_data): Call
11480 get_regcache.
11481 * regcache.h: Add prototypes.
11482 * server.h: Likewise.
11483
11484 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11485
11486 * mem-break.c: New file.
11487 * mem-break.h: New file.
11488 * Makefile.in: Add mem-break.o rule; update server.h
11489 dependencies.
11490 * inferiors.c (struct inferior_info): Add target_data
11491 member.
11492 (clear_inferiors): Free target_data member if set.
11493 (inferior_target_data, set_inferior_target_data): New functions.
11494 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11495 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11496 * linux-low.c (linux_bp_reinsert): New variable.
11497 (struct inferior_linux_data): New.
11498 (linux_create_inferior): Use set_inferior_target_data.
11499 (linux_attach): Likewise. Call add_inferior.
11500 (linux_wait_for_one_inferior): New function.
11501 (linux_wait): Call it.
11502 (linux_write_memory): Add const.
11503 (initialize_low): Call set_breakpoint_data.
11504 * linux-low.h (struct linux_target_ops): Add breakpoint
11505 handling members.
11506 * server.c (attach_inferior): Remove extra add_inferior
11507 call.
11508 * server.h: Include mem-break.h. Update inferior.c
11509 prototypes.
11510 * target.c (read_inferior_memory)
11511 (write_inferior_memory): New functions.
11512 * target.h (read_inferior_memory)
11513 (write_inferior_memory): Change macros to prototypes.
11514 (struct target_ops): Update comments. Add const to write_memory
11515 definition.
11516
11517 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
11518
11519 * linux-low.c (usr_store_inferior_registers): Support
11520 registers which are allowed to fail to store.
11521 * linux-low.h (linux_target_ops): Likewise.
11522 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11523 (ppc_cannot_store_register): FPSCR may not be storable.
11524
11525 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11526
11527 * server.h: Include <string.h> if HAVE_STRING_H.
11528 * ChangeLog: Correct paths in last ChangeLog entry.
11529
11530 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11531
11532 * linux-low.h: Remove obsolete prototypes.
11533 (struct linux_target_ops): New.
11534 (extern the_low_target): New.
11535 * linux-low.c (num_regs, regmap): Remove declarations.
11536 (register_addr): Use the_low_target explicitly.
11537 (fetch_register): Likewise.
11538 (usr_fetch_inferior_registers): Likewise.
11539 (usr_store_inferior_registers): Likewise.
11540 * linux-arm-low.c (num_regs): Remove.
11541 (arm_num_regs): Define.
11542 (arm_regmap): Renamed from regmap, made static.
11543 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11544 made static.
11545 (arm_cannot_store_register): Renamed from cannot_store_register,
11546 made static.
11547 (the_low_target): New.
11548 * linux-i386-low.c (num_regs): Remove.
11549 (i386_num_regs): Define.
11550 (i386_regmap): Renamed from regmap, made static.
11551 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11552 made static.
11553 (i386_cannot_store_register): Renamed from cannot_store_register,
11554 made static.
11555 (the_low_target): New.
11556 * linux-ia64-low.c (num_regs): Remove.
11557 (ia64_num_regs): Define.
11558 (ia64_regmap): Renamed from regmap, made static.
11559 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11560 made static.
11561 (ia64_cannot_store_register): Renamed from cannot_store_register,
11562 made static.
11563 (the_low_target): New.
11564 * linux-m68k-low.c (num_regs): Remove.
11565 (m68k_num_regs): Define.
11566 (m68k_regmap): Renamed from regmap, made static.
11567 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11568 made static.
11569 (m68k_cannot_store_register): Renamed from cannot_store_register,
11570 made static.
11571 (the_low_target): New.
11572 * linux-mips-low.c (num_regs): Remove.
11573 (mips_num_regs): Define.
11574 (mips_regmap): Renamed from regmap, made static.
11575 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11576 made static.
11577 (mips_cannot_store_register): Renamed from cannot_store_register,
11578 made static.
11579 (the_low_target): New.
11580 * linux-ppc-low.c (num_regs): Remove.
11581 (ppc_num_regs): Define.
11582 (ppc_regmap): Renamed from regmap, made static.
11583 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11584 made static.
11585 (ppc_cannot_store_register): Renamed from cannot_store_register,
11586 made static.
11587 (the_low_target): New.
11588 * linux-s390-low.c (num_regs): Remove.
11589 (s390_num_regs): Define.
11590 (s390_regmap): Renamed from regmap, made static.
11591 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11592 made static.
11593 (s390_cannot_store_register): Renamed from cannot_store_register,
11594 made static.
11595 (the_low_target): New.
11596 * linux-sh-low.c (num_regs): Remove.
11597 (sh_num_regs): Define.
11598 (sh_regmap): Renamed from regmap, made static.
11599 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11600 made static.
11601 (sh_cannot_store_register): Renamed from cannot_store_register,
11602 made static.
11603 (the_low_target): New.
11604 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11605 (the_low_target): New.
11606
11607 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11608
11609 * Makefile.in: Add stamp-h target.
11610 * configure.in: Create stamp-h.
11611 * configure: Regenerated.
11612
11613 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11614
11615 * inferiors.c: New file.
11616 * target.c: New file.
11617 * target.h: New file.
11618 * Makefile.in: Add target.o and inferiors.o. Update
11619 dependencies.
11620 * linux-low.c (inferior_pid): New static variable,
11621 moved from server.c.
11622 (linux_create_inferior): Renamed from create_inferior.
11623 Call add_inferior. Return 0 on success instead of a PID.
11624 (linux_attach): Renamed from myattach.
11625 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11626 (linux_thread_alive): Renamed from mythread_alive.
11627 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11628 child dies.
11629 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11630 (regsets_store_inferior_registers): Correct error message.
11631 Add missing ``return 0''.
11632 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11633 (linux_store_registers): Renamed from store_inferior_registers.
11634 (linux_read_memory): Renamed from read_inferior_memory.
11635 (linux_write_memory): Renamed from write_inferior_memory.
11636 (linux_target_ops): New structure.
11637 (initialize_low): Call set_target_ops ().
11638 * remote-utils.c (unhexify): New function.
11639 (hexify): New function.
11640 (input_interrupt): Send signals to ``signal_pid''.
11641 * server.c (inferior_pid): Remove.
11642 (start_inferior): Update create_inferior call.
11643 (attach_inferior): Call add_inferior.
11644 (handle_query): New function.
11645 (main): Call handle_query for `q' packets.
11646 * server.h: Include "target.h". Remove obsolete prototypes.
11647 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11648
11649 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11650
11651 * Makefile.in: Add WARN_CFLAGS. Update configury
11652 dependencies.
11653 * configure.in: Check for <string.h>
11654 * configure: Regenerate.
11655 * config.in: Regenerate.
11656 * gdbreplay.c: Include needed system headers.
11657 (remote_open): Remove strchr prototype.
11658 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11659 * regcache.c (supply_register): Change buf argument to const void *.
11660 (supply_register_by_name): Likewise.
11661 (collect_register): Change buf argument to void *.
11662 (collect_register_by_name): Likewise.
11663 * regcache.h: Add missing prototypes.
11664 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11665 * server.c (handle_query): New function.
11666 (attached): New static variable, moved out of main.
11667 (main): Quiet longjmp clobber warnings.
11668 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11669 * utils.c (error): Remove NORETURN.
11670 (fatal): Likewise.
This page took 0.28942 seconds and 5 git commands to generate.