Use arm target description and regs_info for 32-bit file on aarch64 GDBserver
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-08-04 Yao Qi <yao.qi@linaro.org>
2
3 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5 arm-with-neon.xml to srv_xmlfiles.
6 * linux-aarch64-low.c: Include linux-aarch32-low.h.
7 (is_64bit_tdesc): New function.
8 (aarch64_linux_read_description): New function.
9 (aarch64_arch_setup): Call aarch64_linux_read_description.
10 (regs_info): Rename to regs_info_aarch64.
11 (aarch64_regs_info): Return right regs_info.
12 (initialize_low_arch): Call initialize_low_arch_aarch32.
13
14 2015-08-04 Yao Qi <yao.qi@linaro.org>
15
16 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
17 * linux-aarch32-low.c: New file.
18 * linux-aarch32-low.h: New file.
19 * linux-arm-low.c (arm_fill_gregset): Move it to
20 linux-aarch32-low.c.
21 (arm_store_gregset): Likewise.
22 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
23 (arm_store_vfpregset): Call arm_store_vfpregset_num.
24 (arm_arch_setup): Check if PTRACE_GETREGSET works.
25 (regs_info): Rename to regs_info_arm.
26 (arm_regs_info): Return regs_info_aarch32 if
27 have_ptrace_getregset is 1 and target description is
28 arm_with_neon or arm_with_vfpv3.
29 (initialize_low_arch): Don't call init_registers_arm_with_neon.
30 Call initialize_low_arch_aarch32 instead.
31
32 2015-08-04 Yao Qi <yao.qi@linaro.org>
33
34 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
35 * linux-low.c: ... here.
36 * linux-low.h (have_ptrace_getregset): Declare it.
37
38 2015-08-04 Pedro Alves <palves@redhat.com>
39
40 * thread-db.c (struct thread_db): Use new typedefs.
41 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
42 CHK calls.
43 (disable_thread_event_reporting): Cast result of dlsym to
44 destination function pointer type.
45 (thread_db_mourn): Use td_ta_delete_ftype.
46
47 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
48
49 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
50 arch variant.
51 (CDX_BREAKPOINT): Define for R2.
52 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
53 (the_low_target): Add comments.
54
55 2015-07-30 Yao Qi <yao.qi@linaro.org>
56
57 * linux-arm-low.c (arm_hwcap): Remove it.
58 (arm_read_description): New local variable arm_hwcap. Don't
59 set arm_hwcap to zero.
60
61 2015-07-30 Yao Qi <yao.qi@linaro.org>
62
63 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
64 Use regcache->tdesc instead.
65 (arm_store_wmmxregset): Likewise.
66 (arm_fill_vfpregset): Likewise.
67 (arm_store_vfpregset): Likewise.
68
69 2015-07-30 Yao Qi <yao.qi@linaro.org>
70
71 * linux-arm-low.c: Include arch/arm.h.
72 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
73 (arm_store_gregset): Likewise.
74
75 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
76
77 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
78 ptrace's 4th parameter.
79
80 2015-07-27 Yao Qi <yao.qi@linaro.org>
81
82 * configure.srv (case aarch64*-*-linux*): Don't set
83 srv_linux_usrregs.
84
85 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
86
87 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
88 sys/ptrace.h.
89 * linux-arm-low.c: Likewise.
90 * linux-cris-low.c: Likewise.
91 * linux-crisv32-low.c: Likewise.
92 * linux-low.c: Likewise.
93 * linux-m68k-low.c: Likewise.
94 * linux-mips-low.c: Likewise.
95 * linux-nios2-low.c: Likewise.
96 * linux-s390-low.c: Likewise.
97 * linux-sparc-low.c: Likewise.
98 * linux-tic6x-low.c: Likewise.
99 * linux-tile-low.c: Likewise.
100 * linux-x86-low.c: Likewise.
101
102 2015-07-24 Pedro Alves <palves@redhat.com>
103
104 * config.in: Regenerate.
105 * configure: Regenerate.
106
107 2015-07-24 Pedro Alves <palves@redhat.com>
108
109 * acinclude.m4: Include ../ptrace.m4.
110 * configure.ac: Call GDB_AC_PTRACE.
111 * config.in, configure: Regenerate.
112
113 2015-07-24 Yao Qi <yao.qi@linaro.org>
114
115 * linux-low.c (linux_create_inferior): Remove setting to
116 proc->priv->new_inferior.
117 (linux_attach): Likewise.
118 (linux_low_filter_event): Likewise.
119 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
120
121 2015-07-24 Yao Qi <yao.qi@linaro.org>
122
123 * linux-low.c (linux_arch_setup): New function.
124 (linux_low_filter_event): If proc->tdesc is NULL and
125 proc->attached is true, call the_low_target.arch_setup.
126 Otherwise, keep status pending, and return.
127 (linux_resume_one_lwp_throw): Don't call get_pc if
128 thread->while_stepping isn't NULL. Don't call
129 get_thread_regcache if proc->tdesc is NULL.
130 (need_step_over_p): Return 0 if proc->tdesc is NULL.
131 (linux_target_ops): Install arch_setup.
132 * server.c (start_inferior): Call the_target->arch_setup.
133 * target.h (struct target_ops) <arch_setup>: New field.
134 (target_arch_setup): New marco.
135 * lynx-low.c (lynx_target_ops): Update.
136 * nto-low.c (nto_target_ops): Update.
137 * spu-low.c (spu_target_ops): Update.
138 * win32-low.c (win32_target_ops): Update.
139
140 2015-07-24 Yao Qi <yao.qi@linaro.org>
141
142 * linux-low.c (linux_add_process): Don't set
143 proc->priv->new_inferior.
144 (linux_create_inferior): Set proc->priv->new_inferior to 1.
145 (linux_attach): Likewise.
146
147 2015-07-24 Yao Qi <yao.qi@linaro.org>
148
149 * server.c (start_inferior): Code refactor.
150
151 2015-07-24 Yao Qi <yao.qi@linaro.org>
152
153 * server.c (process_serial_event): Set general_thread.
154
155 2015-07-21 Yao Qi <yao.qi@linaro.org>
156
157 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
158 aarch64_linux_get_debug_reg_capacity.
159
160 2015-07-17 Yao Qi <yao.qi@linaro.org>
161
162 * Makefile.in (aarch64-linux-hw-point.o): New rule.
163 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
164 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
165 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
166 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
167 (AARCH64_HWP_ALIGNMENT): Likewise.
168 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
169 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
170 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
171 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
172 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
173 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
174 (struct aarch64_debug_reg_state): Likewise.
175 (struct arch_lwp_info): Likewise.
176 (aarch64_align_watchpoint): Likewise.
177 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
178 (aarch64_watchpoint_length): Likewise.
179 (aarch64_point_encode_ctrl_reg): Likewise
180 (aarch64_point_is_aligned): Likewise.
181 (aarch64_align_watchpoint): Likewise.
182 (aarch64_linux_set_debug_regs):
183 (aarch64_dr_state_insert_one_point): Likewise.
184 (aarch64_dr_state_remove_one_point): Likewise.
185 (aarch64_handle_breakpoint): Likewise.
186 (aarch64_handle_aligned_watchpoint): Likewise.
187 (aarch64_handle_unaligned_watchpoint): Likewise.
188 (aarch64_handle_watchpoint): Likewise.
189
190 2015-07-17 Yao Qi <yao.qi@linaro.org>
191
192 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
193 and don't aarch64_get_debug_reg_state. All callers update.
194 (aarch64_handle_aligned_watchpoint): Likewise.
195 (aarch64_handle_unaligned_watchpoint): Likewise.
196 (aarch64_handle_watchpoint): Likewise.
197 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
198 (aarch64_remove_point): Likewise.
199
200 2015-07-17 Yao Qi <yao.qi@linaro.org>
201
202 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
203 debug_printf.
204 (aarch64_handle_unaligned_watchpoint): Likewise.
205
206 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
207
208 Revert the previous 3 commits:
209 Move gdb_regex* to common/
210 Move linux_find_memory_regions_full & co.
211 gdbserver build-id attribute generator
212
213 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
214 Jan Kratochvil <jan.kratochvil@redhat.com>
215
216 gdbserver build-id attribute generator.
217 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
218 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
219 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
220 (find_phdr): New.
221 (get_dynamic): Use find_pdhr to traverse program headers.
222 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
223 (compare_mapping_entry_range, struct find_memory_region_callback_data)
224 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
225 (get_hex_build_id): New.
226 (linux_qxfer_libraries_svr4): Add optional build-id attribute
227 to reply XML document.
228
229 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
230 Jan Kratochvil <jan.kratochvil@redhat.com>
231
232 * target.c: Include target/target-utils.h and fcntl.h.
233 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
234 (target_fileio_read_stralloc): New functions.
235
236 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
237
238 * Makefile.in (OBS): Add gdb_regex.o.
239 (gdb_regex.o): New.
240 * config.in: Rebuilt.
241 * configure: Rebuilt.
242
243 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
244 Jan Kratochvil <jan.kratochvil@redhat.com>
245
246 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
247 * Makefile.in (OBS): Add target-utils.o.
248 (linux-maps.o, target-utils.o): New.
249 * configure.srv (srv_linux_obj): Add linux-maps.o.
250
251 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
252
253 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
254 function, return 1.
255 (the_low_target): Install it.
256
257 2015-07-14 Pedro Alves <palves@redhat.com>
258
259 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
260 Instead, ignore ECHILD, and throw an error for other errnos.
261
262 2015-07-10 Pedro Alves <palves@redhat.com>
263
264 * event-loop.c (struct callback_event) <data>: Change type to
265 gdb_client_data instance instead of gdb_client_data pointer.
266 (append_callback_event): Adjust.
267
268 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
269
270 * linux-aarch64-low.c: Add comments for each linux_target_ops
271 method. Remove comments already covered in target_ops and
272 linux_target_ops definitions.
273 (the_low_target): Add comments for each unimplemented method.
274
275 2015-07-09 Yao Qi <yao.qi@linaro.org>
276
277 * linux-aarch64-low.c (aarch64_regmap): Remove.
278 (aarch64_usrregs_info): Remove.
279 (regs_info): Set field usrregs to NULL.
280
281 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
282
283 * linux-low.c: Include "rsp-low.h"
284 (linux_low_encode_pt_config, linux_low_encode_raw): New.
285 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
286 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
287 (handle_btrace_enable_pt): New.
288 (handle_btrace_general_set): Support "pt".
289 (handle_btrace_conf_general_set): Support "pt:size".
290
291 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
292
293 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
294 Z_PACKET_SW_BP.
295
296 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
297
298 * linux-aarch64-low.c: Remove comment about endianness.
299 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
300 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
301 memcmp.
302
303 2015-06-24 Gary Benson <gbenson@redhat.com>
304
305 * linux-i386-ipa.c (stdint.h): Do not include.
306 * lynx-i386-low.c (stdint.h): Likewise.
307 * lynx-ppc-low.c (stdint.h): Likewise.
308 * mem-break.c (stdint.h): Likewise.
309 * thread-db.c (stdint.h): Likewise.
310 * tracepoint.c (stdint.h): Likewise.
311 * win32-low.c (stdint.h): Likewise.
312
313 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
314
315 * server.c (write_qxfer_response): Update call to
316 remote_escape_output.
317
318 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
319 Jan Kratochvil <jan.kratochvil@redhat.com>
320
321 Merge multiple hex conversions.
322 * gdbreplay.c (tohex): Rename to 'fromhex'.
323 (logchar): Use fromhex.
324
325 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
326
327 * server.c (handle_qxfer_libraries): Set `version' attribute for
328 <library-list>.
329
330 2015-06-10 Gary Benson <gbenson@redhat.com>
331
332 * target.h (struct target_ops) <multifs_open>: New field.
333 <multifs_unlink>: Likewise.
334 <multifs_readlink>: Likewise.
335 * linux-low.c (nat/linux-namespaces.h): New include.
336 (linux_target_ops): Initialize the_target->multifs_open,
337 the_target->multifs_unlink and the_target->multifs_readlink.
338 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
339 * hostio.c (hostio_fs_pid): New static variable.
340 (hostio_handle_new_gdb_connection): New function.
341 (handle_setfs): Likewise.
342 (handle_open): Use the_target->multifs_open as appropriate.
343 (handle_unlink): Use the_target->multifs_unlink as appropriate.
344 (handle_readlink): Use the_target->multifs_readlink as
345 appropriate.
346 (handle_vFile): Handle vFile:setfs packets.
347 * server.c (handle_query): Call hostio_handle_new_gdb_connection
348 after target_handle_new_gdb_connection.
349
350 2015-06-10 Gary Benson <gbenson@redhat.com>
351
352 * configure.ac (AC_CHECK_FUNCS): Add setns.
353 * config.in: Regenerate.
354 * configure: Likewise.
355 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
356 (linux-namespaces.o): New rule.
357 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
358
359 2015-06-09 Gary Benson <gbenson@redhat.com>
360
361 * hostio.c (handle_open): Process mode argument with
362 fileio_to_host_mode.
363
364 2015-06-01 Yao Qi <yao.qi@linaro.org>
365
366 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
367 * linux-x86-low.c: Likewise.
368
369 2015-05-28 Don Breazeal <donb@codesourcery.com>
370
371 * linux-low.c (handle_extended_wait): Initialize
372 thread_info.last_resume_kind for new fork children.
373
374 2015-05-15 Pedro Alves <palves@redhat.com>
375
376 * target.h (target_handle_new_gdb_connection): Rewrite using if
377 wrapped in do/while.
378
379 2015-05-14 Joel Brobecker <brobecker@adacore.com>
380
381 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
382 * configure, config.in: Regenerate.
383 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
384 Declare typedef.
385
386 2015-05-12 Don Breazeal <donb@codesourcery.com>
387
388 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
389 PTRACE_EVENT_VFORK_DONE.
390 (linux_low_ptrace_options, extended_event_reported): Add vfork
391 events.
392 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
393 and "vforkdone" for RSP 'T' Stop Reply Packet.
394 * server.h (report_vfork_events): Declare
395 global variable.
396
397 2015-05-12 Don Breazeal <donb@codesourcery.com>
398
399 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
400 (the_low_target) <new_fork>: Initialize new member.
401 * linux-arm-low.c (arm_new_fork): New function.
402 (the_low_target) <new_fork>: Initialize new member.
403 * linux-low.c (handle_extended_wait): Call new target function
404 new_fork.
405 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
406 * linux-mips-low.c (mips_add_watchpoint): New function
407 extracted from mips_insert_point.
408 (the_low_target) <new_fork>: Initialize new member.
409 (mips_linux_new_fork): New function.
410 (mips_insert_point): Call mips_add_watchpoint.
411 * linux-x86-low.c (x86_linux_new_fork): New function.
412 (the_low_target) <new_fork>: Initialize new member.
413
414 2015-05-12 Don Breazeal <donb@codesourcery.com>
415
416 * linux-low.c (handle_extended_wait): Implement return value,
417 rename argument 'event_child' to 'event_lwp', handle
418 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
419 (linux_low_ptrace_options): New function.
420 (linux_low_filter_event): Call linux_low_ptrace_options,
421 use different argument fo linux_enable_event_reporting,
422 use return value from handle_extended_wait.
423 (extended_event_reported): New function.
424 (linux_wait_1): Call extended_event_reported and set
425 status to report fork events.
426 (linux_write_memory): Add pid to debug message.
427 (reset_lwp_ptrace_options_callback): New function.
428 (linux_handle_new_gdb_connection): New function.
429 (linux_target_ops): Initialize new structure member.
430 * linux-low.h (struct lwp_info) <waitstatus>: New member.
431 * lynx-low.c: Initialize new structure member.
432 * remote-utils.c (prepare_resume_reply): Implement stop reason
433 "fork" for "T" stop message.
434 * server.c (handle_query): Call handle_new_gdb_connection.
435 * server.h (report_fork_events): Declare global flag.
436 * target.h (struct target_ops) <handle_new_gdb_connection>:
437 New member.
438 (target_handle_new_gdb_connection): New macro.
439 * win32-low.c: Initialize new structure member.
440
441 2015-05-12 Don Breazeal <donb@codesourcery.com>
442
443 * mem-break.c (APPEND_TO_LIST): Define macro.
444 (clone_agent_expr): New function.
445 (clone_one_breakpoint): New function.
446 (clone_all_breakpoints): New function.
447 * mem-break.h: Declare new functions.
448
449 2015-05-12 Don Breazeal <donb@codesourcery.com>
450
451 * linux-low.c (linux_supports_fork_events): New function.
452 (linux_supports_vfork_events): New function.
453 (linux_target_ops): Initialize new structure members.
454 (initialize_low): Call linux_check_ptrace_features.
455 * lynx-low.c (lynx_target_ops): Initialize new structure
456 members.
457 * server.c (report_fork_events, report_vfork_events):
458 New global flags.
459 (handle_query): Add new features to qSupported packet and
460 response.
461 (captured_main): Initialize new global variables.
462 * target.h (struct target_ops) <supports_fork_events>:
463 New member.
464 <supports_vfork_events>: New member.
465 (target_supports_fork_events): New macro.
466 (target_supports_vfork_events): New macro.
467 * win32-low.c (win32_target_ops): Initialize new structure
468 members.
469
470 2015-05-12 Gary Benson <gbenson@redhat.com>
471
472 * server.c (handle_qxfer_exec_file): Use current process
473 if annex is empty.
474
475 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
476
477 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
478 Remove HAVE_PTRACE_GETREGS conditionals.
479 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
480 instead of PTRACE_GETREGS and PTRACE_SETREGS.
481
482 2015-05-08 Yao Qi <yao.qi@linaro.org>
483
484 * linux-low.c (linux_supports_conditional_breakpoints): New
485 function.
486 (linux_target_ops): Install new target method.
487 * lynx-low.c (lynx_target_ops): Install NULL hook for
488 supports_conditional_breakpoints.
489 * nto-low.c (nto_target_ops): Likewise.
490 * spu-low.c (spu_target_ops): Likewise.
491 * win32-low.c (win32_target_ops): Likewise.
492 * server.c (handle_query): Check
493 target_supports_conditional_breakpoints.
494 * target.h (struct target_ops) <supports_conditional_breakpoints>:
495 New field.
496 (target_supports_conditional_breakpoints): New macro.
497
498 2015-05-06 Pedro Alves <palves@redhat.com>
499
500 PR server/18081
501 * server.c (start_inferior): If the process exits, mourn it.
502
503 2015-04-21 Gary Benson <gbenson@redhat.com>
504
505 * hostio.c (fileio_open_flags_to_host): Factored out to
506 fileio_to_host_openflags in common/fileio.c. Single use
507 updated.
508
509 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
510
511 * linux-xtensa-low.c (xtensa_fill_gregset)
512 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
513 XCHAL_HAVE_LOOP.
514
515 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
516
517 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
518 (regs_info): Replace usrregs pointer with NULL.
519
520 2015-04-17 Gary Benson <gbenson@redhat.com>
521
522 * target.h (struct target_ops) <pid_to_exec_file>: New field.
523 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
524 * server.c (handle_qxfer_exec_file): New function.
525 (qxfer_packets): Add exec-file entry.
526 (handle_query): Report qXfer:exec-file:read as supported packet.
527
528 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
529
530 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
531
532 2015-04-09 Gary Benson <gbenson@redhat.com>
533
534 * hostio-errno.c (errno_to_fileio_error): Remove function.
535 Update caller to use remote_fileio_to_fio_error.
536
537 2015-04-09 Yao Qi <yao.qi@linaro.org>
538
539 * linux-low.c (linux_insert_point): Call
540 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
541 (linux_remove_point): Call remove_memory_breakpoint if type is
542 raw_bkpt_type_sw.
543 * linux-x86-low.c (x86_insert_point): Don't call
544 insert_memory_breakpoint.
545 (x86_remove_point): Don't call remove_memory_breakpoint.
546
547 2015-04-01 Pedro Alves <palves@redhat.com>
548 Cleber Rosa <crosa@redhat.com>
549
550 * server.c (gdbserver_usage): Reorganize and extend the usage
551 message.
552
553 2015-03-24 Pedro Alves <palves@redhat.com>
554
555 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
556 output. Also dump TRAP_TRACE.
557 (linux_low_filter_event): In debug output, distinguish a
558 resume_stop SIGSTOP from a delayed SIGSTOP.
559
560 2015-03-24 Gary Benson <gbenson@redhat.com>
561
562 * linux-x86-low.c (x86_linux_new_thread): Moved to
563 nat/x86-linux.c.
564 (x86_linux_prepare_to_resume): Likewise.
565
566 2015-03-24 Gary Benson <gbenson@redhat.com>
567
568 * Makefile.in (x86-linux-dregs.o): New rule.
569 * configure.srv: Add x86-linux-dregs.o to relevant targets.
570 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
571 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
572 (x86_linux_dr_get): Likewise.
573 (x86_linux_dr_set): Likewise.
574 (update_debug_registers_callback): Likewise.
575 (x86_linux_dr_set_addr): Likewise.
576 (x86_linux_dr_get_addr): Likewise.
577 (x86_linux_dr_set_control): Likewise.
578 (x86_linux_dr_get_control): Likewise.
579 (x86_linux_dr_get_status): Likewise.
580 (x86_linux_update_debug_registers): Likewise.
581
582 2015-03-24 Gary Benson <gbenson@redhat.com>
583
584 * linux-x86-low.c (x86_linux_update_debug_registers):
585 New function, factored out from...
586 (x86_linux_prepare_to_resume): ...this.
587
588 2015-03-24 Gary Benson <gbenson@redhat.com>
589
590 * linux-x86-low.c (x86_linux_dr_get): Update comments.
591 (x86_linux_dr_set): Likewise.
592 (update_debug_registers_callback): Likewise.
593 (x86_linux_dr_set_addr): Likewise.
594 (x86_linux_dr_get_addr): Likewise.
595 (x86_linux_dr_set_control): Likewise.
596 (x86_linux_dr_get_control): Likewise.
597 (x86_linux_dr_get_status): Likewise.
598 (x86_linux_prepare_to_resume): Likewise.
599
600 2015-03-24 Gary Benson <gbenson@redhat.com>
601
602 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
603 Use perror_with_name. Pass string through gettext.
604 (x86_linux_dr_set): Likewise.
605
606 2015-03-24 Gary Benson <gbenson@redhat.com>
607
608 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
609 (x86_linux_dr_set_addr): ...this.
610 (x86_dr_low_get_addr): Rename to...
611 (x86_linux_dr_get_addr): ...this.
612 (x86_dr_low_set_control): Rename to...
613 (x86_linux_dr_set_control): ...this.
614 (x86_dr_low_get_control): Rename to...
615 (x86_linux_dr_get_control): ...this.
616 (x86_dr_low_get_status): Rename to...
617 (x86_linux_dr_get_status): ...this.
618 (x86_dr_low): Update with new function names.
619
620 2015-03-24 Gary Benson <gbenson@redhat.com>
621
622 * Makefile.in (x86-linux.o): New rule.
623 * configure.srv: Add x86-linux.o to relevant targets.
624 * linux-low.c (lwp_set_arch_private_info): New function.
625 (lwp_arch_private_info): Likewise.
626 * linux-x86-low.c: Include nat/x86-linux.h.
627 (arch_lwp_info): Removed structure.
628 (update_debug_registers_callback):
629 Use lwp_set_debug_registers_changed.
630 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
631 and lwp_set_debug_registers_changed.
632 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
633
634 2015-03-24 Gary Benson <gbenson@redhat.com>
635
636 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
637 * linux-arm-low.c (arm_new_thread): Likewise.
638 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
639 * linux-mips-low.c (mips_linux_new_thread): Likewise.
640 * linux-x86-low.c (x86_linux_new_thread): Likewise.
641 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
642
643 2015-03-24 Gary Benson <gbenson@redhat.com>
644
645 * linux-low.c (ptid_of_lwp): New function.
646 (lwp_is_stopped): Likewise.
647 (lwp_stop_reason): Likewise.
648 * linux-x86-low.c (update_debug_registers_callback):
649 Use lwp_is_stopped.
650 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
651 lwp_stop_reason.
652
653 2015-03-24 Gary Benson <gbenson@redhat.com>
654
655 * linux-low.h (linux_stop_lwp): Remove declaration.
656
657 2015-03-24 Gary Benson <gbenson@redhat.com>
658
659 * linux-low.h: Include nat/linux-nat.h.
660 * linux-low.c (iterate_over_lwps_args): New structure.
661 (iterate_over_lwps_filter): New function.
662 (iterate_over_lwps): Likewise.
663 * linux-x86-low.c (update_debug_registers_callback):
664 Update signature to what iterate_over_lwps expects.
665 Remove PID check that iterate_over_lwps now performs.
666 (x86_dr_low_set_addr): Use iterate_over_lwps.
667 (x86_dr_low_set_control): Likewise.
668
669 2015-03-24 Gary Benson <gbenson@redhat.com>
670
671 * linux-x86-low.c (x86_debug_reg_state): New function.
672 (x86_linux_prepare_to_resume): Use the above.
673
674 2015-03-24 Gary Benson <gbenson@redhat.com>
675
676 * linux-low.c (current_lwp_ptid): New function.
677 * linux-x86-low.c: Include nat/linux-nat.h.
678 (x86_dr_low_get_addr): Use current_lwp_ptid.
679 (x86_dr_low_get_control): Likewise.
680 (x86_dr_low_get_status): Likewise.
681
682 2015-03-20 Pedro Alves <palves@redhat.com>
683
684 * tracepoint.c (cmd_qtstatus): Make "str" const.
685
686 2015-03-20 Pedro Alves <palves@redhat.com>
687
688 * server.c (handle_general_set): Make "req_str" const.
689
690 2015-03-19 Pedro Alves <palves@redhat.com>
691
692 * linux-low.c (linux_resume_one_lwp): Rename to ...
693 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
694 instead call perror_with_name.
695 (check_ptrace_stopped_lwp_gone): New function.
696 (linux_resume_one_lwp): Reimplement as wrapper around
697 linux_resume_one_lwp_throw that swallows errors if the LWP is
698 gone.
699
700 2015-03-19 Pedro Alves <palves@redhat.com>
701
702 * linux-low.c (count_events_callback, select_event_lwp_callback):
703 No longer check whether the thread has resume_stop as last resume
704 kind.
705
706 2015-03-19 Pedro Alves <palves@redhat.com>
707
708 * linux-low.c (count_events_callback, select_event_lwp_callback):
709 Use the lwp's status_pending_p field, not the thread's.
710
711 2015-03-19 Pedro Alves <palves@redhat.com>
712
713 * linux-low.c (select_event_lwp_callback): Update comments to
714 no longer mention SIGTRAP.
715
716 2015-03-18 Gary Benson <gbenson@redhat.com>
717
718 * server.c (handle_query): Do not report vFile:fstat as supported.
719
720 2015-03-11 Gary Benson <gbenson@redhat.com>
721
722 * hostio.c (sys/types.h): New include.
723 (sys/stat.h): Likewise.
724 (common-remote-fileio.h): Likewise.
725 (handle_fstat): New function.
726 (handle_vFile): Handle vFile:fstat packets.
727
728 2015-03-11 Gary Benson <gbenson@redhat.com>
729
730 * configure.ac (AC_CHECK_MEMBERS): Add checks for
731 struct stat.st_blocks and struct stat.st_blksize.
732 * configure: Regenerate.
733 * config.in: Likewise.
734 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
735 (OBS): Add common-remote-fileio.o.
736 (common-remote-fileio.o): New rule.
737
738 2015-03-09 Pedro Alves <palves@redhat.com>
739
740 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
741 'struct sockaddr' pointer in 'accept' call.
742
743 2015-03-09 Pedro Alves <palves@redhat.com>
744
745 Revert:
746 2015-03-07 Pedro Alves <palves@redhat.com>
747 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
748 or <winsock2.h> here. Instead include "gdb_socket.h".
749 (remote_open): Use union gdb_sockaddr_u.
750 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
751 or <winsock2.h> here. Instead include "gdb_socket.h".
752 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
753 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
754 or <sys/un.h>.
755 (init_named_socket, gdb_agent_helper_thread): Use union
756 gdb_sockaddr_u.
757
758 2015-03-07 Pedro Alves <palves@redhat.com>
759
760 * configure.ac (build_warnings): Move
761 -Wdeclaration-after-statement to the C-specific set.
762 * configure: Regenerate.
763
764 2015-03-07 Pedro Alves <palves@redhat.com>
765
766 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
767 or <winsock2.h> here. Instead include "gdb_socket.h".
768 (remote_open): Use union gdb_sockaddr_u.
769 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
770 or <winsock2.h> here. Instead include "gdb_socket.h".
771 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
772 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
773 or <sys/un.h>.
774 (init_named_socket, gdb_agent_helper_thread): Use union
775 gdb_sockaddr_u.
776
777 2015-03-07 Pedro Alves <palves@redhat.com>
778
779 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
780 instead.
781
782 2015-03-06 Yao Qi <yao.qi@linaro.org>
783
784 * linux-aarch64-low.c (aarch64_insert_point): Use
785 show_debug_regs as a boolean.
786 (aarch64_remove_point): Likewise.
787
788 2015-03-05 Pedro Alves <palves@redhat.com>
789
790 * lynx-low.c (lynx_target_ops): Install NULL hooks for
791 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
792 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
793 * nto-low.c (nto_target_ops): Likewise.
794 * spu-low.c (spu_target_ops): Likewise.
795 * win32-low.c (win32_target_ops): Likewise.
796
797 2015-03-04 Pedro Alves <palves@redhat.com>
798
799 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
800 Decide whether a breakpoint triggered based on the SIGTRAP's
801 siginfo.si_code.
802 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
803 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
804 (linux_low_filter_event): Check for breakpoints before checking
805 watchpoints.
806 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
807 siginfo.si_code.
808 (linux_stopped_by_sw_breakpoint)
809 (linux_supports_stopped_by_sw_breakpoint)
810 (linux_stopped_by_hw_breakpoint)
811 (linux_supports_stopped_by_hw_breakpoint): New functions.
812 (linux_target_ops): Install new target methods.
813
814 2015-03-04 Pedro Alves <palves@redhat.com>
815
816 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
817 * server.c (swbreak_feature, hwbreak_feature): New globals.
818 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
819 (captured_main): Clear swbreak_feature and hwbreak_feature.
820 * server.h (swbreak_feature, hwbreak_feature): Declare.
821 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
822 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
823 supports_stopped_by_hw_breakpoint>: New fields.
824 (target_supports_stopped_by_sw_breakpoint)
825 (target_stopped_by_sw_breakpoint)
826 (target_supports_stopped_by_hw_breakpoint)
827 (target_stopped_by_hw_breakpoint): Declare.
828
829 2015-03-04 Pedro Alves <palves@redhat.com>
830
831 enum lwp_stop_reason -> enum target_stop_reason
832 * linux-low.c (check_stopped_by_breakpoint): Adjust.
833 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
834 (linux_wait_1, stuck_in_jump_pad_callback)
835 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
836 (linux_stopped_by_watchpoint):
837 * linux-low.h (enum lwp_stop_reason): Delete.
838 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
839 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
840
841 2015-03-04 Yao Qi <yao.qi@linaro.org>
842
843 * Makefile.in (SFILES): Add linux-aarch64-low.c.
844
845 2015-03-03 Gary Benson <gbenson@redhat.com>
846
847 * hostio.c (handle_vFile): Fix prefix lengths.
848
849 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
850
851 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
852 ptr_bits.
853
854 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
855
856 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
857 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
858 (clean): Add "rm -f" for above C files.
859 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
860 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
861 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
862 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
863 * linux-s390-low.c (HWCAP_S390_VX): New macro.
864 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
865 (init_registers_s390x_vx_linux64)
866 (init_registers_s390x_tevx_linux64)
867 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
868 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
869 declarations.
870 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
871 (s390_store_vxrs_high): New functions.
872 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
873 NT_S390_VXRS_HIGH.
874 (s390_arch_setup): Add logic for selecting one of the new target
875 descriptions. Activate the new vector regsets if applicable.
876 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
877 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
878 and init_registers_s390x_tevx_linux64.
879
880 2015-03-01 Pedro Alves <palves@redhat.com>
881
882 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
883 parameter.
884
885 2015-02-27 Pedro Alves <palves@redhat.com>
886
887 * linux-x86-low.c (u_debugreg_offset): New function.
888 (x86_linux_dr_get, x86_linux_dr_set): Use it.
889
890 2015-02-27 Pedro Alves <palves@redhat.com>
891
892 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
893 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
894 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
895 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
896 (ps_lsetfpregs, ps_getpid)
897 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
898 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
899 (ps_lsetxregs, ps_plog): Declare.
900
901 2015-02-27 Pedro Alves <palves@redhat.com>
902
903 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
904 IP_AGENT_EXPORT_FUNC.
905 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
906 IP_AGENT_EXPORT_FUNC.
907 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
908 (IP_AGENT_EXPORT): Delete.
909 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
910 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
911 (gdb_trampoline_buffer_error, collecting, gdb_collect)
912 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
913 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
914 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
915 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
916 (traceframe_read_count, traceframe_write_count)
917 (traceframes_created, trace_state_variables, get_raw_reg)
918 (get_trace_state_variable_value, set_trace_state_variable_value)
919 (ust_loaded, helper_thread_id, cmd_buf): Use
920 IPA_SYM_EXPORTED_NAME.
921 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
922 (tracepoints) Use IP_AGENT_EXPORT_VAR.
923 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
924 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
925 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
926 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
927 EXTERN_C_PUSH/EXTERN_C_POP.
928 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
929 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
930 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
931 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
932 (traceframe_write_count, traceframe_read_count)
933 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
934 (about_to_request_buffer_space, get_trace_state_variable_value)
935 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
936 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
937 EXTERN_C_PUSH/EXTERN_C_POP.
938 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
939 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
940 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
941 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
942 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
943 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
944 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
945 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
946 Define.
947 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
948 (IP_AGENT_EXPORT_VAR_DECL): Define.
949 (tracing): Declare.
950 (gdb_agent_get_raw_reg): Declare.
951
952 2015-02-27 Tom Tromey <tromey@redhat.com>
953 Pedro Alves <palves@redhat.com>
954
955 Rename symbols whose names are reserved C++ keywords throughout.
956
957 2015-02-27 Pedro Alves <palves@redhat.com>
958
959 * Makefile.in (COMPILER): New, get it from autoconf.
960 (CXX): Get from autoconf instead.
961 (COMPILE.pre): Use COMPILER.
962 (CC-LD): Rename to ...
963 (CC_LD): ... this. Use COMPILER.
964 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
965 (CXX_FOR_TARGET): Default to g++ instead of gcc.
966 * acinclude.m4: Include build-with-cxx.m4.
967 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
968 Disable -Werror by default if building in C++ mode.
969 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
970 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
971 the C++ compiler. Save/restore CXXFLAGS too.
972 * configure: Regenerate.
973
974 2015-02-27 Pedro Alves <palves@redhat.com>
975
976 * acinclude.m4: Include libiberty.m4.
977 * configure.ac: Call libiberty_INIT.
978 * config.in, configure: Regenerate.
979
980 2015-02-26 Pedro Alves <palves@redhat.com>
981
982 * linux-low.c (linux_wait_1): When incrementing the PC past a
983 program breakpoint always use the_low_target.breakpoint_len as
984 increment, rather than the maximum between that and
985 the_low_target.decr_pc_after_break.
986
987 2015-02-23 Pedro Alves <palves@redhat.com>
988
989 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
990 thread was doing a step-over; always adjust the PC if
991 we stepped over a permanent breakpoint.
992 (linux_wait_1): If we stepped over breakpoint that was on top of a
993 permanent breakpoint, manually advance the PC past it.
994
995 2015-02-23 Pedro Alves <palves@redhat.com>
996
997 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
998 modes.
999 (x86_fill_gregset, x86_store_gregset): Use it when handling
1000 $orig_eax.
1001
1002 2015-02-20 Pedro Alves <palves@redhat.com>
1003
1004 * thread-db.c: Include "nat/linux-procfs.h".
1005 (thread_db_init): Skip listing new threads if the kernel supports
1006 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1007
1008 2015-02-20 Pedro Alves <palves@redhat.com>
1009
1010 * linux-low.c (status_pending_p_callback): Use ptid_match.
1011
1012 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1013
1014 PR breakpoints/16812
1015 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1016 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1017 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1018
1019 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1020
1021 PR breakpoints/15956
1022 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1023
1024 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1025
1026 * linux-low.c (linux_low_btrace_conf): Print size.
1027 * server.c (handle_btrace_conf_general_set): New.
1028 (hanle_general_set): Call handle_btrace_conf_general_set.
1029 (handle_query): Report Qbtrace-conf:bts:size as supported.
1030
1031 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1032
1033 * linux-low.c (linux_low_enable_btrace): Update parameters.
1034 (linux_low_btrace_conf): New.
1035 (linux_target_ops)<to_btrace_conf>: Initialize.
1036 * server.c (current_btrace_conf): New.
1037 (handle_btrace_enable): Rename to ...
1038 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1039 to target_enable_btrace. Update comment. Update users.
1040 (handle_qxfer_btrace_conf): New.
1041 (qxfer_packets): Add btrace-conf entry.
1042 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1043 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1044 (target_ops)<read_btrace_conf>: New.
1045 (target_enable_btrace): Update parameters.
1046 (target_read_btrace_conf): New.
1047
1048 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1049
1050 * server.c (handle_btrace_general_set): Remove call to
1051 target_supports_btrace.
1052 (supported_btrace_packets): New.
1053 (handle_query): Call supported_btrace_packets.
1054 * target.h: include btrace-common.h.
1055 (btrace_target_info): Removed.
1056 (supports_btrace, target_supports_btrace): Update parameters.
1057
1058 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1059
1060 * Makefile.in (SFILES): Add common/btrace-common.c.
1061 (OBS): Add common/btrace-common.o.
1062 (btrace-common.o): Add build rules.
1063 * linux-low: Include btrace-common.h.
1064 (linux_low_read_btrace): Use struct btrace_data. Call
1065 btrace_data_init and btrace_data_fini.
1066
1067 2015-02-06 Pedro Alves <palves@redhat.com>
1068
1069 * thread-db.c (find_new_threads_callback): Add debug output.
1070
1071 2015-02-04 Pedro Alves <palves@redhat.com>
1072
1073 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1074 (resume_stopped_resumed_lwps): New function.
1075 (linux_wait_for_event_filtered): Use it.
1076
1077 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1078
1079 * Makefile.in (SFILES): Add linux-personality.c.
1080 (linux-personality.o): New rule.
1081 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1082 list of objects to be built.
1083 * linux-low.c: Include nat/linux-personality.h.
1084 (linux_create_inferior): Remove code to disable address space
1085 randomization (moved to ../nat/linux-personality.c). Create
1086 cleanup to disable address space randomization.
1087
1088 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1089
1090 * Makefile.in (posix-strerror.o): New rule.
1091 (mingw-strerror.o): Likewise.
1092 * configure: Regenerated.
1093 * configure.ac: Source file ../common/common.host. Initialize new
1094 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1095
1096 2015-01-14 Yao Qi <yao@codesourcery.com>
1097
1098 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1099 (ppc-linux.o): New rule.
1100 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1101 * configure.ac: AC_CHECK_FUNCS(getauxval).
1102 * config.in: Re-generated.
1103 * configure: Re-generated.
1104 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1105 ppc64_64bit_inferior_p
1106
1107 2015-01-14 Yao Qi <yao@codesourcery.com>
1108
1109 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1110 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1111 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1112 (PT_ORIG_R3, PT_TRAP): Likewise.
1113 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1114 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1115 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1116
1117 2015-01-10 Joel Brobecker <brobecker@adacore.com>
1118
1119 * i387-fp.c (i387_cache_to_xsave): In look over
1120 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1121 zmmh_low_space field by use of zmmh_high_space.
1122
1123 2015-01-09 Pedro Alves <palves@redhat.com>
1124
1125 * linux-low.c (step_over_bkpt): Move higher up in the file.
1126 (handle_extended_wait): Don't store the stop_pc here.
1127 (get_stop_pc): Adjust comments and rename to ...
1128 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1129 stopped for a software breakpoint or hardware breakpoint.
1130 (thread_still_has_status_pending_p): New function.
1131 (status_pending_p_callback): Use
1132 thread_still_has_status_pending_p. If the event is no longer
1133 interesting, resume the LWP.
1134 (handle_tracepoints): Add assert.
1135 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1136 (wstatus_maybe_breakpoint): New function.
1137 (cancel_breakpoint): Delete function.
1138 (check_stopped_by_watchpoint): New function, factored out from
1139 linux_low_filter_event.
1140 (lp_status_maybe_breakpoint): Delete function.
1141 (linux_low_filter_event): Remove filter_ptid argument.
1142 Leave thread group exits pending here. Store the LWP's stop PC.
1143 Always leave events pending.
1144 (linux_wait_for_event_filtered): Pull all events out of the
1145 kernel, and leave them all pending.
1146 (count_events_callback, select_event_lwp_callback): Consider all
1147 events.
1148 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1149 (select_event_lwp): Only give preference to the stepping LWP in
1150 all-stop mode. Adjust comments.
1151 (ignore_event): New function.
1152 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1153 references to cancel_breakpoints. Adjust to renames. Also give
1154 equal priority to all LWPs that have had events in non-stop mode.
1155 If reporting a software breakpoint event, unadjust the LWP's PC.
1156 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1157 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1158 Adjust.
1159 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1160 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1161 (linux_stopped_by_watchpoint): Adjust.
1162 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1163 * linux-low.h (enum lwp_stop_reason): New.
1164 (struct lwp_info) <stop_pc>: Adjust comment.
1165 <stopped_by_watchpoint>: Delete field.
1166 <stop_reason>: New field.
1167 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1168 * mem-break.c (software_breakpoint_inserted_here)
1169 (hardware_breakpoint_inserted_here): New function.
1170 * mem-break.h (software_breakpoint_inserted_here)
1171 (hardware_breakpoint_inserted_here): Declare.
1172 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1173 (cancel_breakpoints): Delete.
1174 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1175 (upload_fast_traceframes): Remove references to
1176 cancel_breakpoints.
1177
1178 2015-01-09 Pedro Alves <palves@redhat.com>
1179
1180 * thread-db.c (find_new_threads_callback): Ignore thread if the
1181 kernel thread ID is -1.
1182
1183 2015-01-09 Pedro Alves <palves@redhat.com>
1184
1185 * linux-low.c (linux_attach_fail_reason_string): Move to
1186 nat/linux-ptrace.c, and rename.
1187 (linux_attach_lwp): Update comment.
1188 (attach_proc_task_lwp_callback): New function.
1189 (linux_attach): Adjust to rename and use
1190 linux_proc_attach_tgid_threads.
1191 (linux_attach_fail_reason_string): Delete declaration.
1192
1193 2015-01-01 Joel Brobecker <brobecker@adacore.com>
1194
1195 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1196 * server.c (gdbserver_version): Likewise.
1197
1198 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1199
1200 * remote-utils.c: Include ctype.h.
1201 (input_interrupt): Explicitly handle the case when the char
1202 received is the NUL byte. Improve the printing of non-ASCII
1203 characters.
1204
1205 2014-12-16 Joel Brobecker <brobecker@adacore.com>
1206
1207 * linux-low.c (linux_low_filter_event): Update call to
1208 linux_enable_event_reporting following the addition of
1209 a new parameter to that function.
1210
1211 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
1212
1213 PR server/17457
1214 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1215 (AARCH64_FPCR_REGNO): Likewise.
1216 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1217 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1218 (aarch64_store_fpregset): Likewise.
1219
1220 2014-12-15 Joel Brobecker <brobecker@adacore.com>
1221
1222 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1223 Remove FIXME comment about assumption about N.
1224
1225 2014-12-13 Joel Brobecker <brobecker@adacore.com>
1226
1227 * configure.ac: If large-file support is disabled in GDBserver,
1228 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1229 * configure: Regenerate.
1230
1231 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1232
1233 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1234 warning upon ENODATA from ptrace.
1235 * linux-s390-low.c (s390_store_tdb): New.
1236 (s390_regsets): Add regset for NT_S390_TDB.
1237
1238 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1239
1240 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1241 without a fill_function.
1242 * linux-s390-low.c (s390_fill_last_break): Remove.
1243 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1244 (s390_arch_setup): Use regset's size instead of fill_function for
1245 loop end condition.
1246
1247 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1248
1249 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1250 the regset's store function when ptrace returned an error.
1251 * regcache.c (get_thread_regcache): Invalidate register cache
1252 before fetching inferior's registers.
1253
1254 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1255
1256 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1257 while-loop as for-loop.
1258 (regsets_store_inferior_registers): Likewise.
1259
1260 2014-11-28 Yao Qi <yao@codesourcery.com>
1261
1262 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1263 * config.in, configure: Re-generate.
1264 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1265 is defined.
1266
1267 2014-11-21 Yao Qi <yao@codesourcery.com>
1268
1269 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1270 (AC_CHECK_HEADERS): Remove malloc.h.
1271 * configure: Re-generated.
1272 * config.in: Re-generated.
1273 * server.h: Don't include alloca.h and malloc.h.
1274 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1275 Don't include malloc.h.
1276
1277 2014-11-17 Joel Brobecker <brobecker@adacore.com>
1278
1279 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1280 corresponding ERRNO check in same block.
1281
1282 2014-11-12 Pedro Alves <palves@redhat.com>
1283
1284 * server.c (cont_thread): Update comment.
1285 (start_inferior, attach_inferior): No longer clear cont_thread.
1286 (handle_v_cont): No longer set cont_thread.
1287 (captured_main): Clear cont_thread each time a GDB connects.
1288
1289 2014-11-12 Pedro Alves <palves@redhat.com>
1290
1291 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1292 thread, and don't resume all threads if the Hc thread has exited.
1293
1294 2014-11-12 Pedro Alves <palves@redhat.com>
1295
1296 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1297 the process group instead of to a specific LWP.
1298
1299 2014-10-15 Pedro Alves <palves@redhat.com>
1300
1301 PR server/17487
1302 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1303 parameter.
1304 (arm_set_thread_context): Delete.
1305 (the_low_target): Adjust.
1306 * win32-i386-low.c (debug_registers_changed)
1307 (debug_registers_used): Delete.
1308 (update_debug_registers_callback): New function.
1309 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1310 needing to update their debug registers.
1311 (win32_get_current_dr): New function.
1312 (x86_dr_low_get_addr, x86_dr_low_get_control)
1313 (x86_dr_low_get_status): Fetch the debug register from the thread
1314 record's context.
1315 (i386_initial_stuff): Adjust.
1316 (i386_get_thread_context): Remove current_event parameter. Don't
1317 clear debug_registers_changed nor copy DR values to
1318 debug_reg_state.
1319 (i386_set_thread_context): Delete.
1320 (i386_prepare_to_resume): New function.
1321 (i386_thread_added): Mark the thread as needing to update irs
1322 debug registers.
1323 (the_low_target): Remove i386_set_thread_context and install
1324 i386_prepare_to_resume.
1325 * win32-low.c (win32_get_thread_context): Adjust.
1326 (win32_set_thread_context): Use SetThreadContext
1327 directly.
1328 (win32_prepare_to_resume): New function.
1329 (win32_require_context): New function, factored out from ...
1330 (thread_rec): ... this.
1331 (continue_one_thread): Call win32_prepare_to_resume on each thread
1332 we're about to continue.
1333 (win32_resume): Call win32_prepare_to_resume on the event thread.
1334 * win32-low.h (struct win32_thread_info)
1335 <debug_registers_changed>: New field.
1336 (struct win32_target_ops): Change prototype of set_thread_context,
1337 delete set_thread_context and add prepare_to_resume.
1338 (win32_require_context): New declaration.
1339
1340 2014-10-08 Gary Benson <gbenson@redhat.com>
1341
1342 * server.h: Do not include common-exceptions.h.
1343
1344 2014-10-08 Gary Benson <gbenson@redhat.com>
1345
1346 * server.h: Do not include cleanups.h.
1347
1348 2014-09-30 James Hogan <james.hogan@imgtec.com>
1349
1350 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1351 mips64-dsp-linux.c.
1352
1353 2014-09-23 Yao Qi <yao@codesourcery.com>
1354
1355 * linux-low.c (lp_status_maybe_breakpoint): New function.
1356 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1357 (count_events_callback): Likewise.
1358 (select_event_lwp_callback): Likewise.
1359 (cancel_breakpoints_callback): Likewise.
1360
1361 2014-09-19 Don Breazeal <donb@codesourcery.com>
1362
1363 * linux-low.c (handle_extended_wait): Call
1364 linux_ptrace_get_extended_event.
1365 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1366 linux_is_extended_waitstatus.
1367
1368 2014-09-16 Joel Brobecker <brobecker@adacore.com>
1369
1370 * Makefile.in (CPPFLAGS): Define.
1371 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1372 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1373
1374 2014-09-16 Gary Benson <gbenson@redhat.com>
1375
1376 * inferiors.h (current_inferior): Renamed as...
1377 (current_thread): New variable. All uses updated.
1378 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1379 (maybe_move_out_of_jump_pad): Likewise.
1380 (cancel_breakpoint): Likewise.
1381 (linux_low_filter_event): Likewise.
1382 (wait_for_sigstop): Likewise.
1383 (linux_resume_one_lwp): Likewise.
1384 (need_step_over_p): Likewise.
1385 (start_step_over): Likewise.
1386 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1387 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1388 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1389 and save_inferior as saved_thread.
1390 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1391 saved_thread.
1392 (regcache_invalidate_thread): Likewise.
1393 * remote-utils.c (prepare_resume_reply): Likewise.
1394 * thread-db.c (thread_db_get_tls_address): Likewise.
1395 (disable_thread_event_reporting): Likewise.
1396 (remove_thread_event_breakpoints): Likewise.
1397 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1398 as saved_thread.
1399 * target.h (set_desired_inferior): Renamed as...
1400 (set_desired_thread): New declaration. All uses updated.
1401 * server.c (myresume): Updated comment to reference thread instead
1402 of inferior.
1403 (handle_serial_event): Likewise.
1404 (handle_target_event): Likewise.
1405
1406 2014-09-12 Tom Tromey <tromey@redhat.com>
1407 Gary Benson <gbenson@redhat.com>
1408
1409 * regcache.h: Include common-regcache.h.
1410 (regcache_read_pc): Don't declare.
1411 * regcache.c (get_thread_regcache_for_ptid): New function.
1412
1413 2014-09-11 Tom Tromey <tromey@redhat.com>
1414 Gary Benson <gbenson@redhat.com>
1415
1416 * symbol.c: New file.
1417 * Makefile.in (SFILES): Add symbol.c.
1418 (OBS): Add symbol.o.
1419
1420 2014-09-11 Gary Benson <gbenson@redhat.com>
1421
1422 * target.c (target_stop_ptid, target_continue_ptid): New
1423 functions.
1424
1425 2014-09-11 Tom Tromey <tromey@redhat.com>
1426 Gary Benson <gbenson@redhat.com>
1427
1428 * target.h: Include target/target.h.
1429 * target.c (target_read_memory, target_read_uint32)
1430 (target_write_memory): New functions.
1431
1432 2014-09-11 Gary Benson <gbenson@redhat.com>
1433
1434 * server.h (debug_hw_points): Don't declare.
1435 * server.c (debug_hw_points): Don't define. Replace all uses
1436 with show_debug_regs.
1437 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1438 all uses with show_debug_regs.
1439
1440 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1441
1442 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1443 endianness into account.
1444 (ppc_supply_ptrace_register): Likewise.
1445
1446 2014-09-03 James Hogan <james.hogan@imgtec.com>
1447
1448 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1449 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1450
1451 2014-09-03 Gary Benson <gbenson@redhat.com>
1452
1453 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1454 ALL_DEBUG_ADDRESS_REGISTERS.
1455
1456 2014-09-02 Gary Benson <gbenson@redhat.com>
1457
1458 * i386-low.h: Renamed as...
1459 * x86-low.h: New file. All type, function and variable name
1460 prefixes changed from "i386_" to "x86_". All references updated.
1461 * i386-low.c: Renamed as...
1462 * x86-low.c: New file. All type, function and variable name
1463 prefixes changed from "i386_" to "x86_". All references updated.
1464
1465 2014-09-02 Gary Benson <gbenson@redhat.com>
1466
1467 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1468 (x86_linux_new_thread): Likewise.
1469
1470 2014-08-29 Gary Benson <gbenson@redhat.com>
1471
1472 * server.h (setjmp.h): Do not include.
1473 (toplevel): Do not declare.
1474 (common-exceptions.h): Include.
1475 (cleanups.h): Likewise.
1476 * server.c (toplevel): Do not define.
1477 (exit_code): New static global.
1478 (detach_or_kill_for_exit_cleanup): New function.
1479 (main): New function. Original main renamed to...
1480 (captured_main): New function.
1481 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1482
1483 2014-08-29 Gary Benson <gbenson@redhat.com>
1484
1485 * Makefile.in (SFILES): Add common/common-exceptions.c.
1486 (OBS): Add common-exceptions.o.
1487 (common-exceptions.o): New rule.
1488 * utils.c (prepare_to_throw_exception): New function.
1489
1490 2014-08-29 Gary Benson <gbenson@redhat.com>
1491
1492 * config.in: Regenerate.
1493 * configure: Likewise.
1494
1495 2014-08-29 Gary Benson <gbenson@redhat.com>
1496
1497 * Makefile.in (SFILES): Add common/cleanups.c.
1498 (OBS): cleanups.o.
1499 (cleanups.o): New rule.
1500
1501 2014-08-29 Gary Benson <gbenson@redhat.com>
1502
1503 * utils.c (internal_vwarning): New function.
1504
1505 2014-08-28 Gary Benson <gbenson@redhat.com>
1506
1507 * utils.h (fatal): Remove declaration.
1508 * utils.c (fatal): Remove function.
1509
1510 2014-08-28 Gary Benson <gbenson@redhat.com>
1511
1512 * tracepoint.c (gdb_agent_init): Replace fatal with
1513 perror_with_name.
1514 (initialize_tracepoint): Likewise.
1515
1516 2014-08-28 Gary Benson <gbenson@redhat.com>
1517
1518 * remote-utils.c (remote_prepare): Replace fatal with error.
1519
1520 2014-08-28 Gary Benson <gbenson@redhat.com>
1521
1522 * linux-low.c (linux_async): Replace fatal with warning.
1523 Tidy up and return.
1524 (linux_start_non_stop): Return -1 if linux_async failed.
1525
1526 2014-08-28 Gary Benson <gbenson@redhat.com>
1527
1528 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1529 gdb_assert.
1530 (i386_dr_low_get_addr): Remove vague comment.
1531 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1532 gdb_assert.
1533
1534 2014-08-28 Gary Benson <gbenson@redhat.com>
1535
1536 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1537 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1538 internal_error.
1539 (linux_resume_one_lwp): Likewise.
1540 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1541 gdb_assert.
1542 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1543 with internal_error.
1544 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1545 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1546 (find_register_by_name): Replace fatal with internal_error.
1547 (find_regno): Likewise.
1548 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1549 * thread-db.c (thread_db_create_event): Likewise.
1550 (thread_db_load_search): Likewise.
1551 (try_thread_db_load_1): Likewise.
1552 * tracepoint.c (get_jump_space_head): Replace fatal with
1553 internal_error.
1554 (claim_trampoline_space): Likewise.
1555 (have_fast_tracepoint_trampoline_buffer): Likewise.
1556 (cmd_qtstart): Likewise.
1557 (stop_tracing): Likewise.
1558 (fast_tracepoint_collecting): Likewise.
1559 (target_malloc): Likewise.
1560 (download_tracepoint): Likewise.
1561 (download_trace_state_variables): Replace check with gdb_assert.
1562 (upload_fast_traceframes): Replace fatal with internal_error.
1563
1564 2014-08-19 Tom Tromey <tromey@redhat.com>
1565 Gary Benson <gbenson@redhat.com>
1566
1567 * Makefile.in (SFILES): Add common/common-debug.c.
1568 (OBS): Add common-debug.o.
1569 (common-debug.o): New rule.
1570 * debug.h (debug_printf): Don't declare.
1571 * debug.c (debug_printf): Renamed and rewritten as...
1572 (debug_vprintf): New function.
1573
1574 2014-08-19 Gary Benson <gbenson@redhat.com>
1575
1576 * utils.h: Do not include print-utils.h.
1577
1578 2014-08-19 Tom Tromey <tromey@redhat.com>
1579 Gary Benson <gbenson@redhat.com>
1580
1581 * server.h: Add static assertion.
1582 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1583
1584 2014-08-19 Tom Tromey <tromey@redhat.com>
1585 Gary Benson <gbenson@redhat.com>
1586
1587 * Makefile.in (SFILES): Add common/errors.c.
1588 (OBS): Add errors.o.
1589 (IPA_OBS): Add errors-ipa.o.
1590 (errors.o): New rule.
1591 (errors-ipa.o): Likewise.
1592 * utils.h (perror_with_name, error, warning): Don't declare.
1593 * utils.c (warning): Renamed and rewritten as...
1594 (vwarning): New function.
1595 (error): Renamed and rewritten as...
1596 (verror): New function.
1597 (internal_error): Renamed and rewritten as...
1598 (internal_verror): New function.
1599
1600 2014-08-07 Gary Benson <gbenson@redhat.com>
1601
1602 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1603 * configure: Regenerate.
1604 * config.in: Likewise.
1605 * server.h: Do not include errno.h.
1606 * event-loop.c: Likewise.
1607 * hostio-errno.c: Likewise.
1608 * linux-low.c: Likewise.
1609 * remote-utils.c: Likewise.
1610 * spu-low.c: Likewise.
1611 * utils.c: Likewise.
1612 * gdbreplay.c: Unconditionally include errno.h.
1613
1614 2014-08-07 Gary Benson <gbenson@redhat.com>
1615
1616 * server.h: Do not include string.h.
1617 * event-loop.c: Likewise.
1618 * linux-low.c: Likewise.
1619 * regcache.c: Likewise.
1620 * remote-utils.c: Likewise.
1621 * spu-low.c: Likewise.
1622 * utils.c: Likewise.
1623
1624 2014-08-07 Gary Benson <gbenson@redhat.com>
1625
1626 * server.h: Do not include gdb_assert.h.
1627
1628 2014-08-07 Gary Benson <gbenson@redhat.com>
1629
1630 * server.h: Do not include common-utils.h.
1631
1632 2014-08-07 Gary Benson <gbenson@redhat.com>
1633
1634 * server.h: Do not include ptid.h.
1635 * notif.h: Likewise.
1636
1637 2014-08-07 Gary Benson <gbenson@redhat.com>
1638
1639 * server.h: Do not include gdb_locale.h.
1640
1641 2014-08-07 Gary Benson <gbenson@redhat.com>
1642
1643 * server.h: Do not include gdb/signals.h.
1644 * win32-low.c: Likewise.
1645
1646 2014-08-07 Gary Benson <gbenson@redhat.com>
1647
1648 * server.h: Do not include pathmax.h.
1649
1650 2014-08-07 Gary Benson <gbenson@redhat.com>
1651
1652 * server.h: Do not include libiberty.h.
1653 * linux-bfin-low.c: Likewise.
1654
1655 2014-08-07 Gary Benson <gbenson@redhat.com>
1656
1657 * server.h: Do not include ansidecl.h.
1658
1659 2014-08-07 Gary Benson <gbenson@redhat.com>
1660
1661 * linux-x86-low.c: Do not include stddef.h.
1662 * lynx-ppc-low.c: Likewise.
1663 * tracepoint.c: Likewise.
1664
1665 2014-08-07 Gary Benson <gbenson@redhat.com>
1666
1667 * server.h: Do not include stdarg.h.
1668 * nto-low.c: Likewise.
1669
1670 2014-08-07 Gary Benson <gbenson@redhat.com>
1671
1672 * server.h: Do not include stdlib.h.
1673 * inferiors.c: Likewise.
1674 * linux-low.c: Likewise.
1675 * regcache.c: Likewise.
1676 * spu-low.c: Likewise.
1677 * tracepoint.c: Likewise.
1678 * utils.c: Likewise.
1679
1680 2014-08-07 Gary Benson <gbenson@redhat.com>
1681
1682 * server.h: Do not include stdio.h.
1683 * linux-low.c: Likewise.
1684 * remote-utils.c: Likewise.
1685 * spu-low.c: Likewise.
1686 * utils.c: Likewise.
1687 * wincecompat.c: Likewise.
1688
1689 2014-08-06 Gary Benson <gbenson@redhat.com>
1690
1691 * regcache.c (init_register_cache): Move conditionals inside if.
1692
1693 2014-08-06 Gary Benson <gbenson@redhat.com>
1694
1695 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1696
1697 2014-07-31 Gary Benson <gbenson@redhat.com>
1698
1699 * ax.h: Do not include server.h.
1700 * gdbthread.h: Likewise.
1701 * lynx-low.h: Likewise.
1702 * notif.h: Likewise.
1703
1704 2014-07-30 Gary Benson <gbenson@redhat.com>
1705
1706 * server.h: Include common-defs.h.
1707 Do not include config.h or build-gnulib-gdbserver/config.h.
1708
1709 2014-07-30 Gary Benson <gbenson@redhat.com>
1710
1711 * hostio-errno.c: Move server.h to top of includes list.
1712 * inferiors.c: Likewise.
1713 * linux-x86-low.c: Likewise.
1714 * notif.c: Include server.h.
1715
1716 2014-07-24 Tom Tromey <tromey@redhat.com>
1717 Gary Benson <gbenson@redhat.com>
1718
1719 * server.h (CORE_ADDR): Now unsigned.
1720
1721 2014-07-16 Pedro Alves <palves@redhat.com>
1722
1723 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1724
1725 2014-07-15 Pedro Alves <palves@redhat.com>
1726
1727 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1728 copy.
1729
1730 2014-07-11 Pedro Alves <palves@redhat.com>
1731
1732 * linux-low.c (kill_wait_lwp): New function, based on
1733 kill_one_lwp_callback, but use my_waitpid directly.
1734 (kill_one_lwp_callback, linux_kill): Use it.
1735
1736 2014-06-23 Pedro Alves <palves@redhat.com>
1737
1738 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1739 before setting DR0..DR3.
1740
1741 2014-06-20 Gary Benson <gbenson@redhat.com>
1742
1743 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1744 * configure: Regenerated.
1745 * config.in: Likewise.
1746
1747 2014-06-20 Gary Benson <gbenson@redhat.com>
1748
1749 * Makefile.in (SFILES): Update locations for files moved
1750 from common to nat.
1751 (object file files): Reordered.
1752
1753 2014-06-20 Gary Benson <gbenson@redhat.com>
1754
1755 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1756 (i386_dr_low_set_addr): Likewise.
1757 (i386_dr_low_get_addr): Likewise.
1758 (i386_dr_low_can_set_control): Likewise.
1759 (i386_dr_low_set_control): Likewise.
1760 (i386_dr_low_get_control): Likewise.
1761 (i386_dr_low_get_status): Likewise.
1762 (i386_get_debug_register_length): Likewise.
1763 * linux-x86-low.c (i386_dr_low_set_addr):
1764 Changed signature. Made static.
1765 (i386_dr_low_get_addr): Likewise.
1766 (i386_dr_low_set_control): Likewise.
1767 (i386_dr_low_get_control): Likewise.
1768 (i386_dr_low_get_status): Likewise.
1769 (i386_dr_low): New global variable.
1770 * win32-i386-low.c (i386_dr_low_set_addr):
1771 Changed signature. Made static.
1772 (i386_dr_low_get_addr): Likewise.
1773 (i386_dr_low_set_control): Likewise.
1774 (i386_dr_low_get_control): Likewise.
1775 (i386_dr_low_get_status): Likewise.
1776 (i386_dr_low): New global variable.
1777
1778 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1779
1780 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1781 * Makefile.in (AR, AR_FLAGS): Define.
1782 * configure: Regenerate.
1783
1784 2014-06-19 Gary Benson <gbenson@redhat.com>
1785
1786 * Makefile.in (i386-dregs.o): New rule.
1787 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1788 * i386-low.c (target.h): Remove include.
1789 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1790 (DR_CONTROL_SHIFT): Likewise.
1791 (DR_CONTROL_SIZE): Likewise.
1792 (DR_RW_EXECUTE): Likewise.
1793 (DR_RW_WRITE): Likewise.
1794 (DR_RW_READ): Likewise.
1795 (DR_RW_IORW): Likewise.
1796 (DR_LEN_1): Likewise.
1797 (DR_LEN_2): Likewise.
1798 (DR_LEN_4): Likewise.
1799 (DR_LEN_8): Likewise.
1800 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1801 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1802 (DR_ENABLE_SIZE): Likewise.
1803 (DR_LOCAL_SLOWDOWN): Likewise.
1804 (DR_GLOBAL_SLOWDOWN): Likewise.
1805 (DR_CONTROL_RESERVED): Likewise.
1806 (I386_DR_CONTROL_MASK): Likewise.
1807 (I386_DR_VACANT): Likewise.
1808 (I386_DR_LOCAL_ENABLE): Likewise.
1809 (I386_DR_GLOBAL_ENABLE): Likewise.
1810 (I386_DR_DISABLE): Likewise.
1811 (I386_DR_SET_RW_LEN): Likewise.
1812 (I386_DR_GET_RW_LEN): Likewise.
1813 (I386_DR_WATCH_HIT): Likewise.
1814 (i386_wp_op_t): Likewise.
1815 (i386_show_dr): Likewise.
1816 (i386_length_and_rw_bits): Likewise.
1817 (i386_insert_aligned_watchpoint): Likewise.
1818 (i386_remove_aligned_watchpoint): Likewise.
1819 (i386_handle_nonaligned_watchpoint): Likewise.
1820 i386_update_inferior_debug_regs(): Likewise.
1821 (i386_dr_insert_watchpoint): Likewise.
1822 (i386_dr_remove_watchpoint): Likewise.
1823 (i386_dr_region_ok_for_watchpoint): Likewise.
1824 (i386_dr_stopped_data_address): Likewise.
1825 (i386_dr_stopped_by_watchpoint): Likewise.
1826
1827 2014-06-19 Gary Benson <gbenson@redhat.com>
1828
1829 * i386-low.c (i386_dr_show): Renamed to
1830 i386_show_dr and made static. All uses updated.
1831 (i386_dr_length_and_rw_bits): Renamed to
1832 i386_length_and_rw_bits and made static.
1833 All uses updated.
1834 (i386_dr_insert_aligned_watchpoint): Renamed to
1835 i386_insert_aligned_watchpoint and made static.
1836 All uses updated.
1837 (i386_dr_remove_aligned_watchpoint): Renamed to
1838 i386_remove_aligned_watchpoint and made static.
1839 All uses updated.
1840 (i386_dr_update_inferior_debug_regs): Renamed to
1841 i386_update_inferior_debug_regs and made static.
1842 All uses updated.
1843
1844 2014-06-18 Gary Benson <gbenson@redhat.com>
1845
1846 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1847 (i386_dr_low_can_set_control): Likewise.
1848 (i386_get_debug_register_length): Likewise.
1849 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1850 (i386_dr_low_can_set_control): Likewise.
1851 (i386_get_debug_register_length): Likewise.
1852
1853 2014-06-17 Gary Benson <gbenson@redhat.com>
1854
1855 * i386-low.h (i386-dregs.h): New include.
1856 (DR_FIRSTADDR): Now in i386-dregs.h.
1857 (DR_LASTADDR): Likewise.
1858 (DR_NADDR): Likewise.
1859 (DR_STATUS): Likewise.
1860 (DR_CONTROL): Likewise.
1861 (i386_debug_reg_state): Likewise.
1862 (i386_dr_insert_watchpoint): Likewise.
1863 (i386_dr_remove_watchpoint): Likewise.
1864 (i386_dr_region_ok_for_watchpoint): Likewise.
1865 (i386_dr_stopped_data_address): Likewise.
1866 (i386_dr_stopped_by_watchpoint): Likewise.
1867 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1868
1869 2014-06-18 Gary Benson <gbenson@redhat.com>
1870
1871 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1872 i386_dr_insert_watchpoint.
1873 (i386_low_remove_watchpoint): Renamed to
1874 i386_dr_remove_watchpoint.
1875 (i386_low_region_ok_for_watchpoint): Renamed to
1876 i386_dr_region_ok_for_watchpoint.
1877 (i386_low_stopped_data_address): Renamed to
1878 i386_dr_stopped_data_address.
1879 (i386_low_stopped_by_watchpoint): Renamed to
1880 i386_dr_stopped_by_watchpoint.
1881 * i386-low.c (i386_show_dr): Renamed to
1882 i386_dr_show and made nonstatic. All uses updated.
1883 (i386_length_and_rw_bits): Renamed to
1884 i386_dr_length_and_rw_bits and made nonstatic.
1885 All uses updated.
1886 (i386_insert_aligned_watchpoint): Renamed to
1887 i386_dr_insert_aligned_watchpoint and made nonstatic.
1888 All uses updated.
1889 (i386_remove_aligned_watchpoint): Renamed to
1890 i386_dr_remove_aligned_watchpoint and made nonstatic.
1891 All uses updated.
1892 (i386_update_inferior_debug_regs): Renamed to
1893 i386_dr_update_inferior_debug_regs and made nonstatic.
1894 All uses updated.
1895 (i386_low_insert_watchpoint): Renamed to
1896 i386_dr_insert_watchpoint. All uses updated.
1897 (i386_low_remove_watchpoint): Renamed to
1898 i386_dr_remove_watchpoint. All uses updated.
1899 (i386_low_region_ok_for_watchpoint): Renamed to
1900 i386_dr_region_ok_for_watchpoint. All uses updated.
1901 (i386_low_stopped_data_address): Renamed to
1902 i386_dr_stopped_data_address. All uses updated.
1903 (i386_low_stopped_by_watchpoint): Renamed to
1904 i386_dr_stopped_by_watchpoint. All uses updated.
1905
1906 2014-06-18 Gary Benson <gbenson@redhat.com>
1907
1908 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1909 (i386_dr_low_can_set_control): Likewise.
1910 (i386_insert_aligned_watchpoint): New check.
1911
1912 2014-06-18 Gary Benson <gbenson@redhat.com>
1913
1914 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1915 Renamed to state.
1916
1917 2014-06-18 Gary Benson <gbenson@redhat.com>
1918
1919 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1920 instead of fatal and error.
1921 (i386_handle_nonaligned_watchpoint): Likewise.
1922
1923 2014-06-18 Gary Benson <gbenson@redhat.com>
1924
1925 * i386-low.c (i386_get_debug_register_length): New macro.
1926 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1927 (i386_show_dr): Use debug_printf instead of fprintf. Use
1928 phex to format values.
1929
1930 2014-06-18 Gary Benson <gbenson@redhat.com>
1931
1932 * i386-low.h: Comment changes.
1933 * i386-low.c: Likewise.
1934
1935 2014-06-18 Gary Benson <gbenson@redhat.com>
1936
1937 * i386-low.c: Whitespace changes.
1938
1939 2014-06-12 Tom Tromey <tromey@redhat.com>
1940
1941 * utils.c (freeargv): Remove.
1942
1943 2014-06-12 Tom Tromey <tromey@redhat.com>
1944
1945 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1946 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1947 (parse_debug_format_options): Likewise.
1948 (gdbserver_usage): Likewise.
1949 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1950 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1951 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1952 against libiberty.
1953 ($(LIBGNU)): Depend on libiberty.
1954 (all-lib): Recurse into all subdirs.
1955 (install-only): Invoke "install" target in subdirs.
1956 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1957 targets.
1958 * configure: Rebuild.
1959 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1960 for vasprintf, vsnprintf, or gettimeofday.
1961 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1962 srv_tgtobj.
1963
1964 2014-06-05 Joel Brobecker <brobecker@adacore.com>
1965
1966 * development.sh: Delete.
1967 * Makefile.in (config.status): Adjust dependency on development.sh.
1968 * configure.ac: Adjust development.sh source call.
1969 * configure: Regenerate.
1970
1971 2014-06-02 Pedro Alves <palves@redhat.com>
1972
1973 * ax.c (gdb_free_agent_expr): New function.
1974 * ax.h (gdb_free_agent_expr): New declaration.
1975 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1976 list.
1977 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1978 static.
1979 (clear_breakpoint_conditions_and_commands): New function.
1980 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1981 (clear_breakpoint_conditions_and_commands): New declaration.
1982
1983 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1984
1985 * linux-aarch64-low.c (asm/ptrace.h): Include.
1986
1987 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1988
1989 Fix TLS access for -static -pthread.
1990 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1991 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1992 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1993
1994 2014-05-20 Pedro Alves <palves@redhat.com>
1995
1996 * linux-aarch64-low.c (aarch64_insert_point)
1997 (aarch64_remove_point): No longer check whether the type is
1998 supported here. Adjust to new interface.
1999 (the_low_target): Install aarch64_supports_z_point_type as
2000 supports_z_point_type method.
2001 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2002 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2003 instead of a Z packet char. Adjust.
2004 (arm_supports_z_point_type): New function.
2005 (arm_insert_point, arm_remove_point): Adjust to new interface.
2006 (the_low_target): Install arm_supports_z_point_type.
2007 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2008 (cris_insert_point, cris_remove_point): Adjust to new interface.
2009 Don't check whether the type is supported here.
2010 (the_low_target): Install cris_supports_z_point_type.
2011 * linux-low.c (linux_supports_z_point_type): New function.
2012 (linux_insert_point, linux_remove_point): Adjust to new interface.
2013 * linux-low.h (struct linux_target_ops) <insert_point,
2014 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2015 raw_breakpoint pointer parameter.
2016 <supports_z_point_type>: New method.
2017 * linux-mips-low.c (mips_supports_z_point_type): New function.
2018 (mips_insert_point, mips_remove_point): Adjust to new interface.
2019 Use mips_supports_z_point_type.
2020 (the_low_target): Install mips_supports_z_point_type.
2021 * linux-ppc-low.c (the_low_target): Install NULL as
2022 supports_z_point_type method.
2023 * linux-s390-low.c (the_low_target): Install NULL as
2024 supports_z_point_type method.
2025 * linux-sparc-low.c (the_low_target): Install NULL as
2026 supports_z_point_type method.
2027 * linux-x86-low.c (x86_supports_z_point_type): New function.
2028 (x86_insert_point): Adjust to new insert_point interface. Use
2029 insert_memory_breakpoint. Adjust to new
2030 i386_low_insert_watchpoint interface.
2031 (x86_remove_point): Adjust to remove_point interface. Use
2032 remove_memory_breakpoint. Adjust to new
2033 i386_low_remove_watchpoint interface.
2034 (the_low_target): Install x86_supports_z_point_type.
2035 * lynx-low.c (lynx_target_ops): Install NULL as
2036 supports_z_point_type callback.
2037 * nto-low.c (nto_supports_z_point_type): New.
2038 (nto_insert_point, nto_remove_point): Adjust to new interface.
2039 (nto_target_ops): Install nto_supports_z_point_type.
2040 * mem-break.c: Adjust intro comment.
2041 (struct raw_breakpoint) <raw_type, size>: New fields.
2042 <inserted>: Update comment.
2043 <shlib_disabled>: Delete field.
2044 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2045 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2046 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2047 (raw_bkpt_type_to_target_hw_bp_type): New function.
2048 (find_enabled_raw_code_breakpoint_at): New function.
2049 (find_raw_breakpoint_at): New type and size parameters. Use them.
2050 (insert_memory_breakpoint): New function, based off
2051 set_raw_breakpoint_at.
2052 (remove_memory_breakpoint): New function.
2053 (set_raw_breakpoint_at): Reimplement.
2054 (set_breakpoint): New, based on set_breakpoint_at.
2055 (set_breakpoint_at): Reimplement.
2056 (delete_raw_breakpoint): Go through the_target->remove_point
2057 instead of assuming memory breakpoints.
2058 (find_gdb_breakpoint_at): Delete.
2059 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2060 (find_gdb_breakpoint): New function.
2061 (set_gdb_breakpoint_at): Delete.
2062 (z_type_supported): New function.
2063 (set_gdb_breakpoint_1): New function, loosely based off
2064 set_gdb_breakpoint_at.
2065 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2066 (delete_gdb_breakpoint_at): Delete.
2067 (delete_gdb_breakpoint_1): New function, loosely based off
2068 delete_gdb_breakpoint_at.
2069 (delete_gdb_breakpoint): New function.
2070 (clear_gdb_breakpoint_conditions): Rename to ...
2071 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2072 breakpoint.
2073 (add_condition_to_breakpoint): Make static.
2074 (add_breakpoint_condition): Take a struct breakpoint pointer
2075 instead of an address. Adjust.
2076 (gdb_condition_true_at_breakpoint): Rename to ...
2077 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2078 z_type parameter.
2079 (gdb_condition_true_at_breakpoint): Reimplement.
2080 (add_breakpoint_commands): Take a struct breakpoint pointer
2081 instead of an address. Adjust.
2082 (gdb_no_commands_at_breakpoint): Rename to ...
2083 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2084 parameter. Return true if no breakpoint was found. Change debug
2085 output.
2086 (gdb_no_commands_at_breakpoint): Reimplement.
2087 (run_breakpoint_commands): Rename to ...
2088 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2089 and change return type to boolean.
2090 (run_breakpoint_commands): New function.
2091 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2092 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2093 breakpoint. Go through the_target->remove_point instead of
2094 assuming memory breakpoint.
2095 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2096 software and hardware breakpoints.
2097 (reinsert_raw_breakpoint): Go through the_target->insert_point
2098 instead of assuming memory breakpoint.
2099 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2100 software and hardware breakpoints.
2101 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2102 Check both software and hardware breakpoints.
2103 (validate_inserted_breakpoint): Assert the breakpoint is a
2104 software breakpoint. Set the inserted flag to -1 instead of
2105 setting shlib_disabled.
2106 (delete_disabled_breakpoints): Adjust.
2107 (validate_breakpoints): Only validate software breakpoints.
2108 Adjust to inserted flag change.
2109 (check_mem_read, check_mem_write): Skip breakpoint types other
2110 than software breakpoints. Adjust to inserted flag change.
2111 * mem-break.h (enum raw_bkpt_type): New enum.
2112 (raw_breakpoint, struct process_info): Forward declare.
2113 (Z_packet_to_target_hw_bp_type): Delete declaration.
2114 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2115 (set_gdb_breakpoint, delete_gdb_breakpoint)
2116 (clear_breakpoint_conditions): New declarations.
2117 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2118 (breakpoint_inserted_here): Update comment.
2119 (add_breakpoint_condition, add_breakpoint_commands): Replace
2120 address parameter with a breakpoint pointer parameter.
2121 (gdb_breakpoint_here): Update comment.
2122 (delete_gdb_breakpoint_at): Delete.
2123 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2124 * server.c (process_point_options): Take a struct breakpoint
2125 pointer instead of an address. Adjust.
2126 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2127 delete_gdb_breakpoint.
2128 * spu-low.c (spu_target_ops): Install NULL as
2129 supports_z_point_type method.
2130 * target.h: Include mem-break.h.
2131 (struct target_ops) <prepare_to_access_memory>: Update comment.
2132 <supports_z_point_type>: New field.
2133 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2134 instead of a char. Also take a raw breakpoint pointer.
2135 * win32-arm-low.c (the_low_target): Install NULL as
2136 supports_z_point_type.
2137 * win32-i386-low.c (i386_supports_z_point_type): New function.
2138 (i386_insert_point, i386_remove_point): Adjust to new interface.
2139 (the_low_target): Install i386_supports_z_point_type.
2140 * win32-low.c (win32_supports_z_point_type): New function.
2141 (win32_insert_point, win32_remove_point): Adjust to new interface.
2142 (win32_target_ops): Install win32_supports_z_point_type.
2143 * win32-low.h (struct win32_target_ops):
2144 <supports_z_point_type>: New method.
2145 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2146 instead of a char. Also take a raw breakpoint pointer.
2147
2148 2014-05-20 Pedro Alves <palves@redhat.com>
2149
2150 * mem-break.h: Include break-common.h.
2151 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2152 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2153 (Z_packet_to_target_hw_bp_type): New declaration.
2154 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2155 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2156 (Z_PACKET_ACCESS_WP): Delete macros.
2157 (Z_packet_to_hw_type): Delete function.
2158 * i386-low.h: Don't include break-common.h here.
2159 (Z_packet_to_hw_type): Delete declaration.
2160 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2161 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2162 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2163 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2164 * linux-aarch64-low.c: Don't include break-common.h here.
2165 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2166 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2167 (Z_packet_to_target_hw_bp_type): Delete function.
2168 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2169 function.
2170 (mips_insert_point, mips_remove_point): Use
2171 Z_packet_to_target_hw_bp_type.
2172
2173 2014-05-20 Pedro Alves <palves@redhat.com>
2174
2175 * linux-aarch64-low.c: Include break-common.h.
2176 (enum target_point_type): Delete.
2177 (Z_packet_to_point_type): Rename to ...
2178 (Z_packet_to_target_hw_bp_type): ... this, and return a
2179 target_hw_bp_type instead.
2180 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2181 instead of an enum target_point_type.
2182 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2183 breakpoint type.
2184 (aarch64_dr_state_insert_one_point)
2185 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2186 (aarch64_handle_aligned_watchpoint)
2187 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2188 Take an enum target_hw_bp_type instead of an enum
2189 target_point_type.
2190 (aarch64_supports_z_point_type): New function.
2191 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2192 use Z_packet_to_target_hw_bp_type.
2193
2194 2014-05-20 Joel Brobecker <brobecker@adacore.com>
2195
2196 * configure.ac: Only use -Werror by default when DEVELOPMENT
2197 is true.
2198 * configure: Regenerate.
2199
2200 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2201
2202 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2203 * linux-x86-low.c (X86_64_USER_REGS): New.
2204 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2205
2206 2014-04-28 Yao Qi <yao@codesourcery.com>
2207
2208 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2209 name.
2210
2211 2014-04-25 Pedro Alves <palves@redhat.com>
2212
2213 PR server/16255
2214 * linux-low.c (linux_attach_fail_reason_string): New function.
2215 (linux_attach_lwp): Delete.
2216 (linux_attach_lwp_1): Rename to ...
2217 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2218 argument. Remove "initial" parameter. Return int instead of
2219 void. Don't error or warn here.
2220 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2221 failure to attach to the tgid. Call warning when failing to
2222 attach to an lwp.
2223 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2224 argument. Remove "initial" parameter. Return int instead of
2225 void. Don't error or warn here.
2226 (linux_attach_fail_reason_string): New declaration.
2227 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2228 interface change. Use linux_attach_fail_reason_string.
2229
2230 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
2231 Walfred Tedeschi <walfred.tedeschi@intel.com>
2232
2233 * Makefile.in: Added rules to handle new files
2234 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2235 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2236 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2237 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2238 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2239 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2240 x32-avx512-linux.o.
2241 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2242 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2243 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2244 i386/x32-avx512.xml.
2245 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2246 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2247 i386/x32-avx512-linux.xml.
2248 * i387-fp.c (num_avx512_k_registers): New constant for number
2249 of K registers.
2250 (num_avx512_zmmh_low_registers): New constant for number of
2251 lower ZMM registers (0-15).
2252 (num_avx512_zmmh_high_registers): New constant for number of
2253 higher ZMM registers (16-31).
2254 (num_avx512_ymmh_registers): New contant for number of higher
2255 YMM registers (ymm16-31 added by avx521 on x86_64).
2256 (num_avx512_xmm_registers): New constant for number of higher
2257 XMM registers (xmm16-31 added by AVX512 on x86_64).
2258 (struct i387_xsave): Add space for AVX512 registers.
2259 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2260 Add code to handle AVX512 registers.
2261 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2262 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2263 prototypei from generated file.
2264 (tdesc_amd64_avx512_linux): Likewise.
2265 (init_registers_x32_avx512_linux): Likewise.
2266 (tdesc_x32_avx512_linux): Likewise.
2267 (init_registers_i386_avx512_linux): Likewise.
2268 (tdesc_i386_avx512_linux): Likewise.
2269 (x86_64_regmap): Add AVX512 registers.
2270 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2271 mask.
2272 (initialize_low_arch): Add code to initialize AVX512 registers.
2273
2274 2014-04-23 Pedro Alves <palves@redhat.com>
2275
2276 * mem-break.c (find_gdb_breakpoint_at): Make static.
2277 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2278
2279 2014-04-23 Pedro Alves <palves@redhat.com>
2280
2281 * i386-low.c: Don't include break-common.h here.
2282 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2283 prototype to take target_hw_bp_type as argument instead of a Z
2284 packet char.
2285 * i386-low.h: Include break-common.h here.
2286 (Z_packet_to_hw_type): Declare.
2287 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2288 prototypes.
2289 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2290 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2291 (x86_remove_point): Convert the packet number to a
2292 target_hw_bp_type before calling i386_low_remove_watchpoint.
2293 * win32-i386-low.c (i386_insert_point): Convert the packet number
2294 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2295 (i386_remove_point): Convert the packet number to a
2296 target_hw_bp_type before calling i386_low_remove_watchpoint.
2297
2298 2014-04-23 Pedro Alves <palves@redhat.com>
2299
2300 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2301
2302 2014-04-10 Pedro Alves <palves@redhat.com>
2303
2304 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2305 Check if the condition or command is NULL before checking if the
2306 breakpoint is known. On success, return true.
2307 * mem-break.h (add_breakpoint_condition): Document return.
2308 (add_breakpoint_commands): Add describing comment.
2309 * server.c (skip_to_semicolon): New function.
2310 (process_point_options): Use it.
2311
2312 2014-04-09 Pedro Alves <palves@redhat.com>
2313
2314 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2315 to lwpid_of.
2316
2317 2014-02-27 Pedro Alves <palves@redhat.com>
2318
2319 PR 12702
2320 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2321 macros.
2322 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2323 output.
2324 (last_thread_of_process_p): Take a PID argument instead of a
2325 thread pointer.
2326 (linux_wait_for_lwp): Delete.
2327 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2328 functions.
2329 (linux_low_filter_event): New function, party factored out from
2330 linux_wait_for_event.
2331 (linux_wait_for_event): Rename to ...
2332 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2333 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2334 sigsuspend. Check for zombie leaders.
2335 (linux_wait_for_event): Reimplement as wrapper around
2336 linux_wait_for_event_filtered.
2337 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2338 a normal or signal exit is seen, it's the whole process exiting.
2339 (wait_for_sigstop): No longer a for_each_inferior callback.
2340 Rewrite on top of linux_wait_for_event_filtered.
2341 (stop_all_lwps): Call wait_for_sigstop directly.
2342 * server.c (resume, handle_target_event): Handle
2343 TARGET_WAITKIND_NO_RESUMED.
2344
2345 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2346
2347 * win32-low.c (psapi_get_dll_name,
2348 * win32_CreateToolhelp32Snapshot): Delete.
2349 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2350 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2351 Delete.
2352 (handle_load_dll): Add function description.
2353 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2354
2355 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2356
2357 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2358 Add comment.
2359 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2360 base address when calling win32_add_one_solib.
2361 (handle_load_dll): Delete local variable load_addr.
2362 Remove 0x1000 offset applied to DLL base address when calling
2363 win32_add_one_solib.
2364 (handle_unload_dll): Add comment.
2365
2366 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2367
2368 * win32-low.c (win32_add_all_dlls): Renames
2369 win32_ensure_ntdll_loaded. Rewrite function documentation.
2370 Adjust implementation to always load all DLLs.
2371 Add 0x1000 offset to DLL base address when calling
2372 win32_add_one_solib.
2373 (child_initialization_done): New static global.
2374 (do_initial_child_stuff): Set child_initialization_done to
2375 zero during child initialization, and 1 after. Replace call
2376 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2377 Add comment.
2378 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2379 (handle_unload_dll): Add function documentation.
2380 (get_child_debug_event): Ignore load and unload DLL events
2381 during child initialization.
2382
2383 2014-02-20 Doug Evans <dje@google.com>
2384
2385 Remove global all_lwps.
2386 * inferiors.h (ptid_of): Move here from linux-low.h.
2387 (pid_of, lwpid_of): Ditto.
2388 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2389 parameter is a struct thread_info * now.
2390 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2391 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2392 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2393 directly.
2394 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2395 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2396 * linux-arm-low.c (update_registers_callback): Update, "entry"
2397 parameter is a struct thread_info * now.
2398 Fetch lwpid from current_inferior directly.
2399 (arm_insert_point): Pass &all_threads to find_inferior instead of
2400 &all_lwps.
2401 (arm_remove_point): Ditto.
2402 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2403 (arm_prepare_to_resume): Fetch pid from thread.
2404 (arm_read_description): Fetch lwpid from current_inferior directly.
2405 * linux-low.c (all_lwps): Delete.
2406 (delete_lwp): Delete call to remove_inferior.
2407 (handle_extended_wait): Fetch lwpid from thread.
2408 (add_lwp): Don't set lwp->entry.id. Remove call to
2409 add_inferior_to_list.
2410 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2411 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2412 (kill_one_lwp_callback): Ditto.
2413 (linux_kill): Don't dereference NULL pointer.
2414 Fetch ptid,lwpid from thread.
2415 (get_detach_signal): Fetch ptid from thread.
2416 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2417 Simplify call to regcache_invalidate_thread.
2418 (delete_lwp_callback): Update, "entry" parameter is a
2419 struct thread_info * now. Fetch pid from thread.
2420 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2421 (status_pending_p_callback): Update, "entry" parameter is a
2422 struct thread_info * now. Fetch ptid from thread.
2423 (find_lwp_pid): Update, "entry" parameter is a
2424 struct thread_info * now.
2425 (linux_wait_for_lwp): Fetch pid from thread.
2426 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2427 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2428 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2429 (dequeue_one_deferred_signal): Ditto.
2430 (cancel_breakpoint): Fetch ptid from current_inferior.
2431 (linux_wait_for_event): Pass &all_threads to find_inferior,
2432 not &all_lwps. Fetch ptid, lwpid from thread.
2433 (count_events_callback): Update, "entry" parameter is a
2434 struct thread_info * now.
2435 (select_singlestep_lwp_callback): Ditto.
2436 (select_event_lwp_callback): Ditto.
2437 (cancel_breakpoints_callback): Ditto.
2438 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2439 not &all_lwps.
2440 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2441 (unsuspend_one_lwp): Update, "entry" parameter is a
2442 struct thread_info * now.
2443 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2444 not &all_lwps.
2445 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2446 Fetch lwpid from thread, not lwp.
2447 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2448 Pass &all_threads to find_inferior, not &all_lwps.
2449 (send_sigstop): Fetch lwpid from thread, not lwp.
2450 (send_sigstop_callback): Update, "entry" parameter is a
2451 struct thread_info * now.
2452 (suspend_and_send_sigstop_callback): Ditto.
2453 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2454 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2455 struct thread_info * now.
2456 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2457 from thread, lwp.
2458 (lwp_running): Update, "entry" parameter is a
2459 struct thread_info * now.
2460 (stop_all_lwps): Fetch ptid from thread.
2461 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2462 (linux_resume_one_lwp): Fetch lwpid from thread.
2463 (linux_set_resume_request): Update, "entry" parameter is a
2464 struct thread_info * now. Fetch pid, lwpid from thread.
2465 (resume_status_pending_p): Update, "entry" parameter is a
2466 struct thread_info * now.
2467 (need_step_over_p): Ditto. Fetch lwpid from thread.
2468 (start_step_over): Fetch lwpid from thread.
2469 (linux_resume_one_thread): Update, "entry" parameter is a
2470 struct thread_info * now. Fetch lwpid from thread.
2471 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2472 (proceed_one_lwp): Update, "entry" parameter is a
2473 struct thread_info * now. Fetch lwpid from thread.
2474 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2475 struct thread_info * now.
2476 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2477 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2478 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2479 directly.
2480 (regsets_store_inferior_registers): Ditto.
2481 (fetch_register, store_register): Ditto.
2482 (linux_read_memory, linux_write_memory): Ditto.
2483 (linux_request_interrupt): Ditto.
2484 (linux_read_auxv): Ditto.
2485 (linux_xfer_siginfo): Ditto.
2486 (linux_qxfer_spu): Ditto.
2487 (linux_qxfer_libraries_svr4): Ditto.
2488 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2489 moved to inferiors.h.
2490 (get_lwp): Delete.
2491 (get_thread_lwp): Update.
2492 (struct lwp_info): Delete member "entry". Simplify comment for
2493 member "thread".
2494 (all_lwps): Delete.
2495 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2496 current_inferior directly.
2497 (update_watch_registers_callback): Update, "entry" parameter is a
2498 struct thread_info * now. Fetch pid from thread.
2499 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2500 (mips_insert_point): Fetch lwpid from current_inferior.
2501 Pass &all_threads to find_inferior, not &all_lwps.
2502 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2503 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2504 directly.
2505 (mips_stopped_data_address): Ditto.
2506 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2507 directly.
2508 * linux-tile-low.c (tile_arch_setup): Ditto.
2509 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2510 (update_debug_registers_callback): Update, "entry" parameter is a
2511 struct thread_info * now. Fetch pid from thread.
2512 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2513 Pass &all_threads to find_inferior, not &all_lwps.
2514 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2515 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2516 Pass &all_threads to find_inferior, not &all_lwps.
2517 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2518 (i386_dr_low_get_status): Ditto.
2519 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2520 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2521 (x86_linux_read_description): Ditto.
2522 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2523
2524 2014-02-20 Doug Evans <dje@google.com>
2525
2526 * inferiors.c (get_first_inferior): Fix buglet.
2527
2528 2014-02-19 Doug Evans <dje@google.com>
2529
2530 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2531 * inferiors.c (add_thread): Change result type to struct thread_info *.
2532 All callers updated.
2533 (add_lwp): Call add_thread here instead of in callers.
2534 All callers updated.
2535 * linux-low.h (get_lwp_thread): Rewrite.
2536 (struct lwp_info): New member "thread".
2537
2538 2014-02-19 Doug Evans <dje@google.com>
2539
2540 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2541 All callers updated.
2542
2543 2014-02-19 Doug Evans <dje@google.com>
2544
2545 * inferiors.c (add_thread): Fix whitespace.
2546
2547 2014-02-19 Doug Evans <dje@google.com>
2548
2549 * dll.c (clear_dlls): Replace accessing list implemention details
2550 with API function.
2551 * gdbthread.h (get_first_thread): Declare.
2552 * inferiors.c (for_each_inferior_with_data): New function.
2553 (get_first_thread): New function.
2554 (find_thread_ptid): Simplify.
2555 (get_first_inferior): New function.
2556 (clear_list): Delete.
2557 (one_inferior_p): New function.
2558 (clear_inferior_list): New function.
2559 (clear_inferiors): Update.
2560 * inferiors.h (for_each_inferior_with_data): Declare.
2561 (clear_inferior_list): Declare.
2562 (one_inferior_p): Declare.
2563 (get_first_inferior): Declare.
2564 * linux-low.c (linux_wait_for_event): Replace accessing list
2565 implemention details with API function.
2566 * server.c (target_running): Ditto.
2567 (accumulate_file_name_length): New function.
2568 (emit_dll_description): New function.
2569 (handle_qxfer_libraries): Replace accessing list implemention
2570 details with API function.
2571 (handle_qxfer_threads_worker): New function.
2572 (handle_qxfer_threads_proper): Replace accessing list implemention
2573 details with API function.
2574 (handle_query): Ditto.
2575 (visit_actioned_threads_callback_ftype): New typedef.
2576 (visit_actioned_threads_data): New struct.
2577 (visit_actioned_threads): Rewrite to be find_inferior callback.
2578 (resume): Call find_inferior.
2579 (handle_status): Replace accessing list implemention
2580 details with API function.
2581 (process_serial_event): Replace accessing list implemention details
2582 with API function.
2583 * target.c (set_desired_inferior): Replace accessing list implemention
2584 details with API function.
2585 * tracepoint.c (same_process_p): New function.
2586 (gdb_agent_about_to_close): Replace accessing list implemention
2587 details with API function.
2588 * win32-low.c (child_delete_thread): Replace accessing list
2589 implemention details with API function.
2590 (match_dll_by_basename): New function.
2591 (dll_is_loaded_by_basename): New function.
2592 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2593 details call to dll_is_loaded_by_basename.
2594
2595 2014-02-19 Doug Evans <dje@google.com>
2596
2597 * dll.h (struct dll_info): Add comment.
2598 * gdbthread.h (struct thread_info): Add comment.
2599 (current_ptid): Simplify.
2600 * inferiors.c (add_process): Update.
2601 (remove_process): Update.
2602 * inferiors.h (struct process_info): Rename member "head" to "entry".
2603 * linux-low.c (delete_lwp): Update.
2604 (add_lwp): Update.
2605 (last_thread_of_process_p): Update.
2606 (kill_one_lwp_callback, linux_kill): Update.
2607 (status_pending_p_callback): Update.
2608 (wait_for_sigstop): Update. Simplify read of ptid.
2609 (start_step_over): Update.
2610 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2611 (get_lwp_thread): Update.
2612 (struct lwp_info): Rename member "head" to "entry".
2613 * regcache.h (inferior_list_entry): Delete.
2614 * server.c (kill_inferior_callback): Update.
2615 (detach_or_kill_inferior_callback): Update.
2616 (print_started_pid): Update.
2617 (print_attached_pid): Update.
2618 (process_serial_event): Simplify read of ptid.
2619 * thread-db.c (thread_db_create_event): Update.
2620 (thread_db_get_tls_address): Update.
2621 * win32-low.c (current_inferior_ptid): Simplify.
2622
2623 2014-02-19 Tom Tromey <tromey@redhat.com>
2624
2625 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2626 argument.
2627 (target_supports_btrace): Update.
2628
2629 2014-02-14 Yao Qi <yao@codesourcery.com>
2630
2631 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2632 (rsp-low-ipa.o): New target.
2633
2634 2014-02-12 Tom Tromey <tromey@redhat.com>
2635
2636 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2637 convert_ascii_to_int.
2638 * regcache.c (registers_to_string): Likewise.
2639 * remote-utils.c (decode_M_packet): Likewise.
2640 * server.c (process_serial_event): Likewise.
2641
2642 2014-02-12 Tom Tromey <tromey@redhat.com>
2643
2644 * server.c (handle_query, handle_v_run): Use hex2bin, not
2645 unhexify.
2646 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2647
2648 2014-02-12 Tom Tromey <tromey@redhat.com>
2649
2650 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2651 convert_int_to_ascii.
2652 * regcache.c (registers_to_string, collect_register_as_string):
2653 Likewise.
2654 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2655 Likewise.
2656 * server.c (process_serial_event): Likewise.
2657 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2658 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2659
2660 2014-02-12 Tom Tromey <tromey@redhat.com>
2661
2662 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2663 bin2hex, not hexify.
2664 * tracepoint.c (cmd_qtstatus): Likewise.
2665
2666 2014-02-12 Tom Tromey <tromey@redhat.com>
2667
2668 * remote-utils.c (monitor_output): Pass explicit length to
2669 hexify.
2670
2671 2014-02-12 Tom Tromey <tromey@redhat.com>
2672
2673 * tracepoint.c: Include rsp-low.h.
2674 * server.c: Include rsp-low.h.
2675 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2676 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2677 declare.
2678 * remote-utils.c: Include rsp-low.h.
2679 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2680 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2681 (convert_int_to_ascii, convert_ascii_to_int): Move to
2682 common/rsp-low.c.
2683 * regcache.c: Include rsp-low.h.
2684 * ax.c: Include rsp-low.h.
2685 * Makefile.in (SFILES): Add common/rsp-low.c.
2686 (OBS): Add rsp-low.o.
2687 (rsp-low.o): New target.
2688
2689 2014-02-12 Tom Tromey <tromey@redhat.com>
2690
2691 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2692 Include print-utils.h.
2693 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2694 (plongest, thirty_two, phex_nz): Remove.
2695 * Makefile.in (SFILES): Add common/print-utils.c.
2696 (OBS): Add print-utils.o.
2697 (print-utils-ipa.o): New target.
2698 (print-utils.o): New target.
2699 (IPA_OBJS): Add print-utils-ipa.o.
2700
2701 2014-02-06 Tom Tromey <tromey@redhat.com>
2702
2703 * Makefile.in (SFILES): Fix indentation.
2704
2705 2014-02-05 Doug Evans <dje@google.com>
2706
2707 * linux-low.c (linux_wait_for_event): Improve comment.
2708 (linux_wait_1): Keep current_inferior in sync with event_child.
2709
2710 2014-01-22 Doug Evans <dje@google.com>
2711
2712 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2713
2714 2014-01-22 Doug Evans <dje@google.com>
2715
2716 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2717 * configure: Regenerate.
2718 * config.in: Regenerate.
2719 * Makefile.in (SFILES): Add debug.c.
2720 (OBS): Add debug.o.
2721 * debug.c: New file.
2722 * debug.h: New file.
2723 * linux-aarch64-low.c (*): Update all debugging printfs to use
2724 debug_printf instead of fprintf.
2725 * linux-arm-low.c (*): Ditto.
2726 * linux-cris-low.c (*): Ditto.
2727 * linux-crisv32-low.c (*): Ditto.
2728 * linux-m32r-low.c (*): Ditto.
2729 * linux-sparc-low.c (*): Ditto.
2730 * linux-x86.c (*): Ditto.
2731 * linux-low.c (*): Ditto.
2732 (linux_wait_1): Add calls to debug_enter, debug_exit.
2733 (linux_wait): Remove redundant debugging printf.
2734 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2735 (linux_resume, unstop_all_lwps): Ditto.
2736 * mem-break.c (*): Update all debugging printfs to use
2737 debug_printf instead of fprintf.
2738 * remote-utils.c (*): Ditto.
2739 * thread-db.c (*): Ditto.
2740 * server.c #include <ctype.h>, "gdb_vecs.h".
2741 (debug_threads): Moved to debug.c.
2742 (*): Update all debugging printfs to use debug_printf instead of
2743 fprintf.
2744 (start_inferior): Replace call to fflush with call to debug_flush.
2745 (monitor_show_help): Mention set debug-format.
2746 (parse_debug_format_options): New function.
2747 (handle_monitor_command): Handle "monitor set debug-format".
2748 (gdbserver_usage): Mention --debug-format.
2749 (main): Parse --debug-format.
2750 * server.h (debug_threads): Declaration moved to debug.h.
2751 #include "debug.h".
2752 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2753 trace_debug_1 that uses debug_printf.
2754 (tracepoint_look_up_symbols): Update all debugging printfs to use
2755 debug_printf instead of fprintf.
2756
2757 2014-01-20 Baruch Siach <baruch@tkos.co.il>
2758
2759 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2760 sys/ptrace.h.
2761
2762 2014-01-17 Pedro Alves <palves@redhat.com>
2763
2764 PR build/16445
2765 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2766 defined after including gdb_proc_service.h.
2767
2768 2014-01-16 Doug Evans <dje@google.com>
2769
2770 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2771 (match_dll): Use it.
2772
2773 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2774
2775 * target.h (target_ops) <read_btrace>: Change parameters and
2776 return type to allow error reporting.
2777 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2778 trace reading errors on.
2779 * linux-low.c (linux_low_read_btrace): Pass trace reading
2780 errors on.
2781 (linux_low_disable_btrace): New.
2782
2783 2014-01-15 Doug Evans <dje@google.com>
2784
2785 * inferiors.c (thread_id_to_gdb_id): Delete.
2786 * inferiors.h (thread_id_to_gdb_id): Delete.
2787
2788 2014-01-13 Eli Zaretskii <eliz@gnu.org>
2789
2790 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2791 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2792 versions.
2793
2794 2014-01-08 Pedro Alves <palves@redhat.com>
2795
2796 * server.c (handle_status): Don't discard previous queued stop
2797 replies or thread's pending status here.
2798 (main) <disconnection>: Do it here instead.
2799
2800 2014-01-08 Pedro Alves <palves@redhat.com>
2801
2802 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2803 * server.c (visit_actioned_threads, handle_pending_status): New
2804 function.
2805 (handle_v_cont): Factor out parts to ...
2806 (resume): ... this new function. If in all-stop, and a thread
2807 being resumed has a pending status, report it without actually
2808 resuming.
2809 (myresume): Adjust to use the new 'resume' function.
2810 (clear_pending_status_callback, set_pending_status_callback)
2811 (find_status_pending_thread_callback): New functions.
2812 (handle_status): Handle the case of multiple threads having
2813 interesting statuses to report. Report threads' real last signal
2814 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2815 with an interesting thread to report the status for, instead of
2816 always reporting the status of the first thread.
2817
2818 2014-01-01 Joel Brobecker <brobecker@adacore.com>
2819
2820 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2821 * gdbreplay.c (gdbreplay_version): Likewise.
2822
2823 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2824
2825 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2826 iov.iov_len with the real length in use.
2827
2828 2013-12-13 Joel Brobecker <brobecker@adacore.com>
2829
2830 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2831 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2832 for all targets that use win32-low.c.
2833 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2834 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2835
2836 2013-12-13 Pedro Alves <palves@redhat.com>
2837
2838 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2839 if equal to TARGET_WAITKIND_LOADED.
2840 * win32-low.c (cached_status): New static global.
2841 (win32_wait): Add declaration.
2842 (do_initial_child_stuff): Flush all initial pending debug events
2843 up to the initial breakpoint.
2844 (win32_wait): If CACHED_STATUS was set, return that instead
2845 of doing a real wait. Remove the code resuming the execution
2846 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2847 during the initial phase. Also remove the code changing
2848 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2849 TARGET_WAITKIND_STOPPED.
2850
2851 2013-12-11 Yao Qi <yao@codesourcery.com>
2852
2853 * notif.c (handle_notif_ack): Return 0 if no notification
2854 matches.
2855
2856 2013-11-20 Doug Evans <dje@google.com>
2857
2858 * linux-low.c (linux_set_resume_request): Fix comment.
2859
2860 2013-11-20 Doug Evans <dje@google.com>
2861
2862 * linux-low.c (resume_status_pending_p): Tweak comment.
2863
2864 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2865
2866 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2867 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2868 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2869 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2870 (srv_amd64_regobj): Add amd64-mpx.o.
2871 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2872 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2873 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2874 * i387-fp.c (num_pl_bnd_register) Added constant.
2875 (num_pl_bnd_cfg_registers) Added constant.
2876 (struct i387_xsave) Added reserved area and MPX fields.
2877 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2878 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2879 function.
2880 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2881 (init_registers_amd64_mpx_linux): Declare new function.
2882 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2883 (x86_64_regmap): Add MPX registers.
2884 (x86_linux_read_description): Add MPX case.
2885 (initialize_low_arch): Initialize MPX targets.
2886
2887 2013-11-18 Tom Tromey <tromey@redhat.com>
2888
2889 * configure: Rebuild.
2890 * configure.ac: Don't check for stdlib.h.
2891 * gdbreplay.c: Unconditionally include stdlib.h.
2892
2893 2013-11-18 Tom Tromey <tromey@redhat.com>
2894
2895 * config.in: Rebuild.
2896 * configure: Rebuild.
2897 * configure.ac: Don't use AC_HEADER_DIRENT.
2898
2899 2013-11-18 Tom Tromey <tromey@redhat.com>
2900
2901 * server.h: Don't check HAVE_STRING_H.
2902 * gdbreplay.c: Don't check HAVE_STRING_H.
2903 * configure: Rebuild.
2904
2905 2013-11-18 Tom Tromey <tromey@redhat.com>
2906
2907 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2908 LIBGNU.
2909
2910 2013-11-08 Tom Tromey <tromey@redhat.com>
2911
2912 * configure, config.in: Rebuild.
2913 * configure.ac: Remove unused configury.
2914
2915 2013-11-08 Tom Tromey <tromey@redhat.com>
2916
2917 * acinclude.m4: Include common.m4, codeset.m4.
2918 * configure, config.in: Rebuild.
2919 * configure.ac: Use GDB_AC_COMMON.
2920
2921 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2922
2923 * linux-s390-low.c (HWCAP_S390_TE): New define.
2924 (s390_arch_setup): Consider the TE field in the HWCAP for
2925 determining 'have_regset_tdb'.
2926
2927 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2928
2929 PR gdb/16014
2930 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2931 call to sizeof.
2932
2933 2013-10-02 Pedro Alves <palves@redhat.com>
2934
2935 * server.c (process_serial_event): Don't output "GDBserver
2936 exiting" if GDB is connected through stdio.
2937 * target.c (mywait): Likewise, be silent if GDB is connected
2938 through stdio.
2939
2940 2013-10-01 Joel Brobecker <brobecker@adacore.com>
2941
2942 * lynx-low.c (lynx_add_threads_after_attach): New function.
2943 (lynx_attach): Remove call to add_thread. Add call to
2944 lynx_add_threads_after_attach instead.
2945
2946 2013-09-28 Mike Frysinger <vapier@gentoo.org>
2947
2948 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2949 * config.in, configure: Regenerated.
2950
2951 2013-09-18 Yao Qi <yao@codesourcery.com>
2952
2953 PR server/15959
2954 * server.c (start_inferior): Clear 'resume_info'.
2955
2956 2013-09-16 Jiong Wang <jiwang@tilera.com>
2957
2958 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2959 for each register.
2960
2961 2013-09-16 Jiong Wang <jiwang@tilera.com>
2962
2963 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2964 linux-tile-low.o to srv_tgtobj.
2965
2966 2013-09-16 Will Newton <will.newton@linaro.org>
2967
2968 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2969 out regs.
2970
2971 2013-09-06 Pedro Alves <palves@redhat.com>
2972
2973 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2974 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2975 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2976 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2977 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2978 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2979
2980 2013-09-06 Pedro Alves <palves@redhat.com>
2981
2982 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2983 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2984
2985 2013-09-06 Pedro Alves <palves@redhat.com>
2986
2987 * linux-amd64-ipa.c: Include tracepoint.h.
2988 * linux-i386-ipa.c: Include tracepoint.h.
2989
2990 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2991
2992 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2993 (ps_get_thread_area): New function.
2994
2995 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2996
2997 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2998 (initialize_low_arch): Call init_registers_crisv32 rather than
2999 init_register_crisv32.
3000
3001 2013-09-05 Pedro Alves <palves@redhat.com>
3002
3003 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3004 to ...
3005 * hostio.h: ... this new file.
3006 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3007 win32-low.c: Include hostio.h.
3008
3009 2013-09-05 Pedro Alves <palves@redhat.com>
3010
3011 * server.h (gdb_client_data, handler_func, callback_handler_func)
3012 (delete_file_handler, add_file_handler, append_callback_event)
3013 (delete_callback_event, start_event_loop, initialize_event_loop):
3014 Move to event-loop.h and include it.
3015 * event-loop.h: New file.
3016
3017 2013-09-05 Pedro Alves <palves@redhat.com>
3018
3019 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3020 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3021 (loaded_dll, unloaded_dll): Move to ...
3022 * dll.h: ... this new file.
3023 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3024
3025 2013-09-05 Pedro Alves <palves@redhat.com>
3026
3027 * server.h (current_process, get_thread_process, all_processes)
3028 (add_inferior_to_list, for_each_inferior, current_inferior)
3029 (remove_inferior, add_process, remove_process, find_process_pid)
3030 (have_started_inferiors_p, have_attached_inferiors_p)
3031 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3032 (clear_inferiors, find_inferior, find_inferior_id)
3033 (inferior_target_data, set_inferior_target_data)
3034 (inferior_regcache_data, set_inferior_regcache_data): Move to
3035 inferiors.h, and include it.
3036 * inferiors.h: New file.
3037
3038 2013-09-05 Pedro Alves <palves@redhat.com>
3039
3040 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3041 Move ...
3042 * ax.h: ... here.
3043
3044 2013-09-05 Pedro Alves <palves@redhat.com>
3045
3046 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3047 tracepoint.h.
3048 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3049 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3050 (handle_tracepoint_general_set, handle_tracepoint_query)
3051 (tracepoint_finished_step, tracepoint_was_hit)
3052 (release_while_stepping_state_list, current_traceframe)
3053 (in_readonly_region, traceframe_read_mem)
3054 (fetch_traceframe_registers, traceframe_read_sdata)
3055 (traceframe_read_info, struct fast_tpoint_collect_status)
3056 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3057 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3058 (supply_fast_tracepoint_registers)
3059 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3060 (ipa_tdesc, claim_trampoline_space)
3061 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3062 (agent_mem_read, agent_get_trace_state_variable_value)
3063 (agent_set_trace_state_variable_value, agent_tsv_read)
3064 (agent_mem_read_string, get_raw_reg_func_addr)
3065 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3066 * tracepoint.h: ... this new file.
3067
3068 2013-09-05 Pedro Alves <palves@redhat.com>
3069
3070 * server.h (perror_with_name, error, fatal, warning, paddress)
3071 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3072 include it.
3073 * utils.h: New file.
3074
3075 2013-09-05 Pedro Alves <palves@redhat.com>
3076
3077 * server.h (remote_debug, noack_mode, transport_is_reliable)
3078 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3079 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3080 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3081 (write_enn, initialize_async_io, enable_async_io)
3082 (disable_async_io, check_remote_input_interrupt_request)
3083 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3084 (dead_thread_notify, prepare_resume_reply)
3085 (decode_address_to_semicolon, decode_address, decode_m_packet)
3086 (decode_M_packet, decode_X_packet, decode_xfer_write)
3087 (decode_search_memory_packet, unhexify, hexify)
3088 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3089 (look_up_one_symbol, relocate_instruction)
3090 (monitor_output): Move to remote-utils.h, and include it.
3091 * remote-utils.h: New file.
3092
3093 2013-09-05 Pedro Alves <palves@redhat.com>
3094
3095 * server.h (_): Delete.
3096
3097 2013-09-02 Pedro Alves <palves@redhat.com>
3098
3099 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3100 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3101 allocated.
3102 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3103
3104 2013-09-02 Pierre Muller <muller@sourceware.org>
3105
3106 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3107 or WriteProcessMemory complete successfully and handle
3108 ERROR_PARTIAL_COPY error.
3109
3110 2013-09-02 Pedro Alves <palves@redhat.com>
3111
3112 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3113 error instead of EIO.
3114
3115 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3116
3117 PR server/15604
3118 * linux-low.c: Include filestuff.h.
3119 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3120 * lynx-low.c: Include filestuff.h.
3121 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3122 * server.c: Include filestuff.h.
3123 (main): Call notice_open_fds.
3124 * spu-low.c: Include filestuff.h.
3125 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3126
3127 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
3128
3129 * Makefile.in: Explain why ../target and ../nat are not
3130 listed as include file search paths.
3131 (linux-waitpid.o): New object file rule.
3132 * configure.srv (srv_native_linux_obj): New variable.
3133 Replace all occurrences of linux native object files with
3134 $srv_native_linux_obj.
3135 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3136 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3137 (linux_enable_event_reporting): Remove declaration.
3138 (my_waitpid): Moved to common/linux-waitpid.c.
3139 (linux_wait_for_event): Pass ptid when calling
3140 linux_enable_event_reporting.
3141 (linux_supports_tracefork_flag): Remove.
3142 (linux_enable_event_reporting): Likewise.
3143 (linux_tracefork_grandchild): Remove.
3144 (STACK_SIZE): Moved to common/linux-ptrace.c.
3145 (linux_tracefork_child): Remove.
3146 (linux_test_for_tracefork): Remove.
3147 (linux_look_up_symbols): Call linux_supports_traceclone.
3148 (initialize_low): Remove call to linux_test_for_tracefork.
3149 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3150 common/linux-ptrace.h.
3151 (PTRACE_TYPE_ARG4): Likewise.
3152 Include linux-ptrace.h.
3153
3154 2013-08-21 Pedro Alves <palves@redhat.com>
3155
3156 * config.in: Renegerate.
3157
3158 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
3159
3160 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3161 (SFILES): Remove $(srcdir)/common/target-common.c and
3162 add $(srcdir)/target/waitstatus.c.
3163 (OBS): Remove target-common.o and add waitstatus.o.
3164 (server_h): Remove $(srcdir)/../common/target-common.h and
3165 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3166 and $(srcdir)/../target/waitstatus.h.
3167 (target-common.o): Remove.
3168 (waitstatus.o): New target object file.
3169 * target.h: Do not include target-common.h and
3170 include target/resume.h, target/wait.h and
3171 target/waitstatus.h.
3172
3173 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
3174
3175 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3176 to PTRACE_TYPE_ARG3.
3177 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3178 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3179 PTRACE_TYPE_ARG4.
3180 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3181 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3182
3183 2013-07-27 Jie Zhang <jie@codesourcery.com>
3184 Daniel Jacobowitz <dan@codesourcery.com>
3185 Yao Qi <yao@codesourcery.com>
3186
3187 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3188 (mips-linux-watch.o): New rule.
3189 (mips_linux_watch_h): New variable.
3190 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3191 srv_tgtobj.
3192 * linux-mips-low.c: Include mips-linux-watch.h.
3193 (struct arch_process_info, struct arch_lwp_info): New.
3194 (update_watch_registers_callback): New function.
3195 (mips_linux_new_process, mips_linux_new_thread) New functions.
3196 (mips_linux_prepare_to_resume, mips_insert_point): New
3197 functions.
3198 (mips_remove_point, mips_stopped_by_watchpoint): New
3199 functions.
3200 (rsp_bp_type_to_target_hw_bp_type): New function.
3201 (mips_stopped_data_address): New function.
3202 (the_low_target): Add watchpoint support functions.
3203
3204 2013-07-27 Yao Qi <yao@codesourcery.com>
3205
3206 * i386-low.c: Include break-common.h.
3207 (enum target_hw_bp_type): Remove.
3208
3209 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
3210
3211 * Makefile.in (SFILES): /common/target-common.c.
3212 (OBS): Add target-common.o.
3213 (server_h): Add $(srcdir)/../common/target-common.h.
3214 (target-common.o): New target.
3215 * server.c (queue_stop_reply_callback): Free
3216 status string after use.
3217 * target.c (target_waitstatus_to_string): Remove.
3218 * target.h: Include target-common.h.
3219 (resume_kind): Likewise.
3220 (target_waitkind): Likewise.
3221 (target_waitstatus): Likewise.
3222 (TARGET_WNOHANG): Likewise.
3223
3224 2013-07-04 Yao Qi <yao@codesourcery.com>
3225
3226 * Makefile.in (host_alias): Use @host_noncanonical@.
3227 (target_alias): Use @target_noncanonical@.
3228 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3229 ACX_NONCANONICAL_HOST.
3230 * configure: Regenerated.
3231
3232 Revert:
3233 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3234
3235 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3236 * configure: Rebuild.
3237 * Makefile.in (version_host, version_target): Get from configure.
3238 (version.c): Use $(version_host) and $(version_target).
3239
3240 2013-07-03 Pedro Alves <palves@redhat.com>
3241
3242 * Makefile.in (config.status): Depend on development.sh.
3243 * acinclude.m4: Include libmcheck.m4.
3244 * configure: Regenerate.
3245
3246 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3247
3248 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3249 attribute inside the parentheses.
3250 (winapi_DebugSetProcessKillOnExit): Ditto.
3251 (winapi_DebugBreakProcess): Ditto.
3252 (winapi_GenerateConsoleCtrlEvent): Ditto.
3253
3254 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3255
3256 * notif.h (notif_event): Add a dummy member to avoid compiler
3257 errors.
3258
3259 2013-07-01 Pedro Alves <palves@redhat.com>
3260
3261 * hostio.c (HOSTIO_PATH_MAX): Define.
3262 (require_filename, handle_open, handle_unlink, handle_readlink):
3263 Use it.
3264
3265 2013-07-01 Pedro Alves <palves@redhat.com>
3266
3267 * server.h: Include "pathmax.h".
3268 * linux-low.c: Don't include sys/param.h.
3269 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3270 MAXPATHLEN.
3271 * win32-low.c: Don't include sys/param.h.
3272 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3273
3274 2013-07-01 Pedro Alves <palves@redhat.com>
3275
3276 * event-loop.c: Don't check HAVE_UNISTD_H before including
3277 <unistd.h>.
3278 * gdbreplay.c: Likewise.
3279 * remote-utils.c: Likewise.
3280 * server.c: Likewise.
3281 * configure.ac: Don't check for unistd.h.
3282 * configure: Regenerate.
3283
3284 2013-06-28 Tom Tromey <tromey@redhat.com>
3285
3286 * Makefile.in (version.c): Use version.in, not
3287 common/version.in.
3288
3289 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3290
3291 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3292 * configure: Rebuild.
3293 * Makefile.in (version_host, version_target): Get from configure.
3294 (version.c): Use $(version_host) and $(version_target).
3295
3296 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3297
3298 Fix trace-status to output user name without trailing colon.
3299 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3300
3301 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3302
3303 Fix trace-status to output proper start-time and stop-time.
3304 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3305 output start time and stop time in hex as gdb expects.
3306
3307 2013-06-26 Pedro Alves <pedro@codesourcery.com>
3308
3309 * tracepoint.c (build_traceframe_info_xml): Output trace state
3310 variables present in the trace buffer.
3311
3312 2013-06-24 Tom Tromey <tromey@redhat.com>
3313
3314 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3315 create-version.sh.
3316 (version.o): Remove.
3317 * gdbreplay.c: Include version.h.
3318 (version, host_name): Don't declare.
3319 * server.h: Include version.h.
3320 (version, host_name): Don't declare.
3321
3322 2013-06-12 Pedro Alves <palves@redhat.com>
3323
3324 * linux-x86-low.c (linux_is_elf64): Delete global.
3325 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3326 with local linux_pid_exe_is_elf_64_file use.
3327
3328 2013-06-11 Pedro Alves <palves@redhat.com>
3329
3330 * linux-low.c (regset_disabled, disable_regset): New functions.
3331 (regsets_fetch_inferior_registers)
3332 (regsets_store_inferior_registers): Use them.
3333 (initialize_regsets_info); Don't allocate the disabled_regsets
3334 array here.
3335 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3336 comment.
3337
3338 2013-06-11 Pedro Alves <palves@redhat.com>
3339
3340 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3341 xmalloc.
3342
3343 2013-06-11 Pedro Alves <palves@redhat.com>
3344
3345 * linux-x86-low.c (initialize_low_arch): Call
3346 init_registers_x32_avx_linux.
3347
3348 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3349
3350 Fix compatibility with Android Bionic.
3351 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3352 it is not empty.
3353
3354 2013-06-07 Pedro Alves <palves@redhat.com>
3355
3356 PR server/14823
3357 * Makefile.in (OBS): Add tdesc.o.
3358 (IPA_OBJS): Add tdesc-ipa.o.
3359 (tdesc-ipa.o): New rule.
3360 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3361 interface.
3362 * linux-low.c (new_inferior): Delete.
3363 (disabled_regsets, num_regsets): Delete.
3364 (linux_add_process): Adjust to set the new per-process
3365 new_inferior flag.
3366 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3367 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3368 was a stop. When calling arch_setup, switch the current inferior
3369 to the thread that got an event.
3370 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3371 (regsets_fetch_inferior_registers)
3372 (regsets_store_inferior_registers): New regsets_info parameter.
3373 Adjust to use it.
3374 (linux_register_in_regsets): New regs_info parameter. Adjust to
3375 use it.
3376 (register_addr, fetch_register, store_register): New usrregs_info
3377 parameter. Adjust to use it.
3378 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3379 parameter regs_info. Adjust to use it.
3380 (linux_fetch_registers): Get the current inferior's regs_info, and
3381 adjust to use it.
3382 (linux_store_registers): Ditto.
3383 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3384 (initialize_low): Don't initialize the target_regsets here. Call
3385 initialize_low_arch.
3386 * linux-low.h (target_regsets): Delete declaration.
3387 (struct regsets_info): New.
3388 (struct usrregs_info): New.
3389 (struct regs_info): New.
3390 (struct process_info_private) <new_inferior>: New field.
3391 (struct linux_target_ops): Delete the num_regs, regmap, and
3392 regset_bitmap fields. New field regs_info.
3393 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3394 * i387-fp.c (num_xmm_registers): Delete.
3395 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3396 calls to new interface.
3397 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3398 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3399 Infer the number of xmm registers from the regcache's target
3400 description.
3401 * i387-fp.h (num_xmm_registers): Delete.
3402 * inferiors.c (add_thread): Don't install the thread's regcache
3403 here.
3404 * proc-service.c (gregset_info): Fetch the current inferior's
3405 regs_info. Adjust to use it.
3406 * regcache.c: Include tdesc.h.
3407 (register_bytes, reg_defs, num_registers)
3408 (gdbserver_expedite_regs): Delete.
3409 (get_thread_regcache): If the thread doesn't have a regcache yet,
3410 create one, instead of aborting gdbserver.
3411 (regcache_invalidate_one): Rename to ...
3412 (regcache_invalidate_thread): ... this.
3413 (regcache_invalidate_one): New.
3414 (regcache_invalidate): Only invalidate registers of the current
3415 process.
3416 (init_register_cache): Add target_desc parameter, and use it.
3417 (new_register_cache): Ditto. Assert the target description has a
3418 non zero registers_size.
3419 (regcache_cpy): Add assertions. Adjust.
3420 (realloc_register_cache, set_register_cache): Delete.
3421 (registers_to_string, registers_from_string): Adjust.
3422 (find_register_by_name, find_regno, find_register_by_number)
3423 (register_cache_size): Add target_desc parameter, and use it.
3424 (free_register_cache_thread, free_register_cache_thread_one)
3425 (regcache_release, register_cache_size): New.
3426 (register_size): Add target_desc parameter, and use it.
3427 (register_data, supply_register, supply_register_zeroed)
3428 (supply_regblock, supply_register_by_name, collect_register)
3429 (collect_register_as_string, collect_register_by_name): Adjust.
3430 * regcache.h (struct target_desc): Forward declare.
3431 (struct regcache) <tdesc>: New field.
3432 (init_register_cache, new_register_cache): Add target_desc
3433 parameter.
3434 (regcache_invalidate_thread): Declare.
3435 (regcache_invalidate_one): Delete declaration.
3436 (regcache_release): Declare.
3437 (find_register_by_number, register_cache_size, register_size)
3438 (find_regno): Add target_desc parameter.
3439 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3440 declarations.
3441 * remote-utils.c: Include tdesc.h.
3442 (outreg, prepare_resume_reply): Adjust.
3443 * server.c: Include tdesc.h.
3444 (gdbserver_xmltarget): Delete declaration.
3445 (get_features_xml, process_serial_event): Adjust.
3446 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3447 declare.
3448 (struct process_info) <tdesc>: New field.
3449 (ipa_tdesc): Declare.
3450 * tdesc.c: New file.
3451 * tdesc.h: New file.
3452 * tracepoint.c: Include tdesc.h.
3453 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3454 (get_context_regcache): Adjust to pass ipa_tdesc down.
3455 (do_action_at_tracepoint): Adjust to get the register cache size
3456 from the context regcache's description.
3457 (traceframe_walk_blocks): Adjust to get the register cache size
3458 from the current trace frame's description.
3459 (traceframe_get_pc): Adjust to get current trace frame's
3460 description and pass it down.
3461 (gdb_collect): Adjust to get the register cache size from the
3462 IPA's description.
3463 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3464 (gdbserver_xmltarget): Delete.
3465 (initialize_low_tracepoint): Set the ipa's target description.
3466 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3467 (initialize_low_tracepoint): Set the ipa's target description.
3468 * linux-x86-low.c: Include tdesc.h.
3469 [__x86_64__] (is_64bit_tdesc): New.
3470 (ps_get_thread_area, x86_get_thread_area): Use it.
3471 (i386_cannot_store_register): Rename to ...
3472 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3473 (i386_cannot_fetch_register): Rename to ...
3474 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3475 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3476 to new interface.
3477 (target_regsets): Rename to ...
3478 (x86_regsets): ... this.
3479 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3480 interface.
3481 (x86_siginfo_fixup): Use is_64bit_tdesc.
3482 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3483 (tdesc_x32_avx_linux, tdesc_x32_linux)
3484 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3485 Declare.
3486 (x86_linux_update_xmltarget): Delete.
3487 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3488 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3489 (AMD64_LINUX_USER64_CS): New.
3490 (x86_linux_read_description): New, based on
3491 x86_linux_update_xmltarget.
3492 (same_process_callback): New.
3493 (x86_arch_setup_process_callback): New.
3494 (x86_linux_update_xmltarget): New.
3495 (x86_regsets_info): New.
3496 (amd64_linux_regs_info): New.
3497 (i386_linux_usrregs_info): New.
3498 (i386_linux_regs_info): New.
3499 (x86_linux_regs_info): New.
3500 (x86_arch_setup): Reimplement.
3501 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3502 (x86_emit_ops): Ditto.
3503 (the_low_target): Adjust. Install x86_linux_regs_info,
3504 x86_cannot_fetch_register, and x86_cannot_store_register.
3505 (initialize_low_arch): New.
3506 * linux-ia64-low.c (tdesc_ia64): Declare.
3507 (ia64_fetch_register): Adjust.
3508 (ia64_usrregs_info, regs_info): New globals.
3509 (ia64_regs_info): New function.
3510 (the_low_target): Adjust.
3511 (initialize_low_arch): New function.
3512 * linux-sparc-low.c (tdesc_sparc64): Declare.
3513 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3514 Adjust.
3515 (sparc_arch_setup): New function.
3516 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3517 (the_low_target): Adjust.
3518 (initialize_low_arch): New function.
3519 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3520 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3521 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3522 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3523 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3524 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3525 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3526 (tdesc_powerpc_isa205_vsx64l): Declare.
3527 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3528 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3529 (ppc_set_pc, ppc_get_hwcap): Adjust.
3530 (ppc_usrregs_info): Forward declare.
3531 (!__powerpc64__) ppc_regmap_adjusted: New global.
3532 (ppc_arch_setup): Adjust to the current process'es target
3533 description.
3534 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3535 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3536 (ppc_store_evrregset): Adjust.
3537 (target_regsets): Rename to ...
3538 (ppc_regsets): ... this, and make static.
3539 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3540 (ppc_regs_info): New function.
3541 (the_low_target): Adjust.
3542 (initialize_low_arch): New function.
3543 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3544 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3545 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3546 (tdesc_s390x_linux64v2): Declare.
3547 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3548 (s390_fill_gregset, s390_store_last_break): Adjust.
3549 (target_regsets): Rename to ...
3550 (s390_regsets): ... this, and make static.
3551 (s390_get_pc, s390_set_pc): Adjust.
3552 (s390_get_hwcap): New target_desc parameter, and use it.
3553 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3554 (s390_arch_setup): Adjust to set the current process'es target
3555 description. Don't adjust the regmap.
3556 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3557 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3558 (regs_info_3264): New globals.
3559 (s390_regs_info): New function.
3560 (the_low_target): Adjust.
3561 (initialize_low_arch): New function.
3562 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3563 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3564 [__mips64] (init_registers_mips_linux)
3565 (init_registers_mips_dsp_linux): Delete defines.
3566 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3567 (have_dsp): New global.
3568 (mips_read_description): New, based on mips_arch_setup.
3569 (mips_arch_setup): Reimplement.
3570 (get_usrregs_info): New function.
3571 (mips_cannot_fetch_register, mips_cannot_store_register)
3572 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3573 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3574 (target_regsets): Rename to ...
3575 (mips_regsets): ... this, and make static.
3576 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3577 (dsp_regs_info, regs_info): New globals.
3578 (mips_regs_info): New function.
3579 (the_low_target): Adjust.
3580 (initialize_low_arch): New function.
3581 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3582 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3583 Declare.
3584 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3585 (arm_read_description): New, with bits factored from
3586 arm_arch_setup.
3587 (arm_arch_setup): Reimplement.
3588 (target_regsets): Rename to ...
3589 (arm_regsets): ... this, and make static.
3590 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3591 (arm_regs_info): New function.
3592 (the_low_target): Adjust.
3593 (initialize_low_arch): New function.
3594 * linux-m68k-low.c (tdesc_m68k): Declare.
3595 (target_regsets): Rename to ...
3596 (m68k_regsets): ... this, and make static.
3597 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3598 (m68k_regs_info): New function.
3599 (m68k_arch_setup): New function.
3600 (the_low_target): Adjust.
3601 (initialize_low_arch): New function.
3602 * linux-sh-low.c (tdesc_sharch): Declare.
3603 (target_regsets): Rename to ...
3604 (sh_regsets): ... this, and make static.
3605 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3606 (sh_regs_info, sh_arch_setup): New functions.
3607 (the_low_target): Adjust.
3608 (initialize_low_arch): New function.
3609 * linux-bfin-low.c (tdesc_bfin): Declare.
3610 (bfin_arch_setup): New function.
3611 (bfin_usrregs_info, regs_info): New globals.
3612 (bfin_regs_info): New function.
3613 (the_low_target): Adjust.
3614 (initialize_low_arch): New function.
3615 * linux-cris-low.c (tdesc_cris): Declare.
3616 (cris_arch_setup): New function.
3617 (cris_usrregs_info, regs_info): New globals.
3618 (cris_regs_info): New function.
3619 (the_low_target): Adjust.
3620 (initialize_low_arch): New function.
3621 * linux-cris-low.c (tdesc_crisv32): Declare.
3622 (cris_arch_setup): New function.
3623 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3624 (cris_regs_info): New function.
3625 (the_low_target): Adjust.
3626 (initialize_low_arch): New function.
3627 * linux-m32r-low.c (tdesc_m32r): Declare.
3628 (m32r_arch_setup): New function.
3629 (m32r_usrregs_info, regs_info): New globals.
3630 (m32r_regs_info): Adjust.
3631 (initialize_low_arch): New function.
3632 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3633 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3634 (tic6x_usrregs_info): Forward declare.
3635 (tic6x_read_description): New function, based on ...
3636 (tic6x_arch_setup): ... this. Reimplement.
3637 (target_regsets): Rename to ...
3638 (tic6x_regsets): ... this, and make static.
3639 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3640 (tic6x_regs_info): New function.
3641 (the_low_target): Adjust.
3642 (initialize_low_arch): New function.
3643 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3644 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3645 (target_regsets): Rename to ...
3646 (xtensa_regsets): ... this, and make static.
3647 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3648 globals.
3649 (xtensa_arch_setup, xtensa_regs_info): New functions.
3650 (the_low_target): Adjust.
3651 (initialize_low_arch): New function.
3652 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3653 (nios2_arch_setup): Set the current process'es tdesc.
3654 (target_regsets): Rename to ...
3655 (nios2_regsets): ... this.
3656 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3657 (nios2_regs_info): New function.
3658 (the_low_target): Adjust.
3659 (initialize_low_arch): New function.
3660 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3661 (aarch64_arch_setup): Set the current process'es tdesc.
3662 (target_regsets): Rename to ...
3663 (aarch64_regsets): ... this.
3664 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3665 (aarch64_regs_info): New function.
3666 (the_low_target): Adjust.
3667 (initialize_low_arch): New function.
3668 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3669 globals.
3670 (target_regsets): Rename to ...
3671 (tile_regsets): ... this.
3672 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3673 (tile_regs_info): New function.
3674 (tile_arch_setup): Set the current process'es tdesc.
3675 (the_low_target): Adjust.
3676 (initialize_low_arch): New function.
3677 * spu-low.c (tdesc_spu): Declare.
3678 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3679 * win32-arm-low.c (tdesc_arm): Declare.
3680 (arm_arch_setup): New function.
3681 (the_low_target): Install arm_arch_setup instead of
3682 init_registers_arm.
3683 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3684 (init_windows_x86): Rename to ...
3685 (i386_arch_setup): ... this. Set `win32_tdesc'.
3686 (the_low_target): Adjust.
3687 * win32-low.c (win32_tdesc): New global.
3688 (child_add_thread): Don't create the thread cache here.
3689 (do_initial_child_stuff): Set the new process'es tdesc.
3690 * win32-low.h (struct target_desc): Forward declare.
3691 (win32_tdesc): Declare.
3692 * lynx-i386-low.c (tdesc_i386): Declare global.
3693 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3694 * lynx-low.c (lynx_tdesc): New global.
3695 (lynx_add_process): Set the new process'es tdesc.
3696 * lynx-low.h (struct target_desc): Forward declare.
3697 (lynx_tdesc): Declare global.
3698 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3699 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3700 * nto-low.c (nto_tdesc): New global.
3701 (do_attach): Set the new process'es tdesc.
3702 * nto-low.h (struct target_desc): Forward declare.
3703 (nto_tdesc): Declare.
3704 * nto-x86-low.c (tdesc_i386): Declare.
3705 (nto_x86_arch_setup): Set `nto_tdesc'.
3706
3707 2013-06-04 Gary Benson <gbenson@redhat.com>
3708
3709 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3710 to qSupported response when appropriate.
3711 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3712 with nonzero-length annex.
3713 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3714 arguments supplied in annex.
3715
3716 2013-05-31 Doug Evans <dje@google.com>
3717
3718 PR server/15594
3719 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3720 64 bits in 64-cross-32 environment.
3721
3722 2013-05-28 Pedro Alves <palves@redhat.com>
3723
3724 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3725 (aarch64-without-fpu.c): Delete rule.
3726 * configure.srv (aarch64*-*-linux*): Remove references to
3727 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3728 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3729 declaration.
3730
3731 2013-05-24 Pedro Alves <palves@redhat.com>
3732
3733 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3734 instead of strchr/decode_address. Error if the range isn't split
3735 with a ','. Don't assume there's be a ':' in the action.
3736
3737 2013-05-23 Yao Qi <yao@codesourcery.com>
3738 Pedro Alves <palves@redhat.com>
3739
3740 * linux-low.c (lwp_in_step_range): New function.
3741 (linux_wait_1): If the thread was range stepping and stopped
3742 outside the stepping range, report the stop to GDB. Otherwise,
3743 continue stepping. Add range stepping debug output.
3744 (linux_set_resume_request): Copy the step range from the resume
3745 request to the lwp.
3746 (linux_supports_range_stepping): New.
3747 (linux_target_ops) <supports_range_stepping>: Set to
3748 linux_supports_range_stepping.
3749 * linux-low.h (struct linux_target_ops)
3750 <supports_range_stepping>: New field.
3751 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3752 * linux-x86-low.c (x86_supports_range_stepping): New.
3753 (the_low_target) <supports_range_stepping>: Set to
3754 x86_supports_range_stepping.
3755 * server.c (handle_v_cont): Handle 'r' action.
3756 (handle_v_requests): Append ";r" if the target supports range
3757 stepping.
3758 * target.h (struct thread_resume) <step_range_start,
3759 step_range_end>: New fields.
3760 (struct target_ops) <supports_range_stepping>:
3761 New field.
3762 (target_supports_range_stepping): New macro.
3763
3764 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3765
3766 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3767 confusion in comment.
3768
3769 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3770
3771 * lynx-low.c (struct process_info_private): New type.
3772 (lynx_add_process): New function.
3773 (lynx_create_inferior, lynx_attach): Replace calls to
3774 add_process by calls to lynx_add_process.
3775 (lynx_resume): If PTID is null, then try using
3776 current_process()->private->last_wait_event_ptid.
3777 Add comments.
3778 (lynx_clear_inferiors): Delete. The contents of that function
3779 has been inlined in lynx_mourn;
3780 (lynx_wait_1): Save the ptid in the process's private data.
3781 (lynx_mourn): Free the process' private data. Replace call
3782 to lynx_clear_inferiors by call to clear_inferiors.
3783
3784 2013-05-17 Yao Qi <yao@codesourcery.com>
3785
3786 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3787 the right place.
3788
3789 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
3790
3791 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3792 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3793 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3794 PT_TEXT_END_ADDR guards. Update comments.
3795 (linux_target_op) <read_offsets>: Conditionally define to
3796 linux_read_offsets if the target is UCLIBC and if it defines
3797 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3798
3799 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3800 Andrew Jenner <andrew@codesourcery.com>
3801
3802 * Makefile.in (SFILES): Add linux-nios2-low.c.
3803 (clean): Add action to delete nios2-linux.c.
3804 (nios2-linux.c): New rule.
3805 * configure.srv: Add nios2*-*-linux*.
3806 * linux-nios2-low.c: New.
3807
3808 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3809
3810 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3811
3812 2013-04-25 Hui Zhu <hui@codesourcery.com>
3813
3814 PR gdb/15186
3815 * ax.c (ax_printf): Add fflush.
3816
3817 2013-04-22 Tom Tromey <tromey@redhat.com>
3818
3819 * Makefile.in (SFILES): Add filestuff.c.
3820 (OBS): Add filestuff.o.
3821 (filestuff.o): New target.
3822 * config.in, configure: Rebuild.
3823 * configure.ac: Check for fdwalk, pipe2.
3824
3825 2013-04-17 Pedro Alves <palves@redhat.com>
3826
3827 * configure.ac (USE_THREAD_DB): Delete variable.
3828 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3829 Don't AC_SUBST USE_THREAD_DB.
3830 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3831 * config.in, configure: Regenerate.
3832
3833 2013-04-16 Pedro Alves <palves@redhat.com>
3834
3835 * linux-low.h (struct lwp_info) <thread_known>: Move under
3836 the USE_THREAD_DB #ifdef.
3837
3838 2013-04-16 Pedro Alves <palves@redhat.com>
3839
3840 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3841 (linux-low.o): Delete rule.
3842 * linux-low.h: Always include "gdb_thread_db.h" instead of
3843 conditionally including thread_db.h.
3844 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3845 HAVE_THREAD_DB_H.
3846
3847 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3848
3849 * Makefile.in (install-only): Fix make install regression.
3850
3851 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3852
3853 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3854 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3855 installation.
3856 * gdbserver.1: Remove.
3857
3858 2013-03-22 Pedro Alves <palves@redhat.com>
3859
3860 * linux-low.c (handle_extended_wait): Don't call
3861 linux_enable_event_reporting.
3862
3863 2013-03-15 Tony Theodore <tonyt@logyst.com>
3864
3865 PR build/9098:
3866 * Makefile.in (SHELL): Use @SHELL@.
3867
3868 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3869
3870 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3871 compiler warning.
3872
3873 2013-03-13 Joel Brobecker <brobecker@adacore.com>
3874
3875 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3876 Remove extraneous NULL element.
3877
3878 2013-03-13 Yao Qi <yao@codesourcery.com>
3879
3880 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3881 'V' block in trace frame.
3882
3883 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3884
3885 * target.h (struct target_ops): Add btrace ops.
3886 (target_supports_btrace): New macro.
3887 (target_enable_btrace): New macro.
3888 (target_disable_btrace): New macro.
3889 (target_read_btrace): New macro.
3890 * gdbthread.h (struct thread_info): Add btrace field.
3891 * server.c: Include btrace-common.h.
3892 (handle_btrace_general_set): New function.
3893 (handle_btrace_enable): New function.
3894 (handle_btrace_disable): New function.
3895 (handle_general_set): Call handle_btrace_general_set.
3896 (handle_qxfer_btrace): New function.
3897 (struct qxfer qxfer_packets[]): Add btrace entry.
3898 * inferiors.c (remove_thread): Disable btrace.
3899 * linux-low: Include linux-btrace.h.
3900 (linux_low_enable_btrace): New function.
3901 (linux_low_read_btrace): New function.
3902 (linux_target_ops): Add btrace ops.
3903 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3904 Add srv_linux_btrace=yes.
3905 (x86_64-*-linux*): Add linux-btrace.o.
3906 Add srv_linux_btrace=yes.
3907 * configure.ac: Define HAVE_LINUX_BTRACE.
3908 * config.in: Regenerated.
3909 * configure: Regenerated.
3910
3911 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3912
3913 * server.c (handle_qxfer): Preserve error message if -3 is
3914 returned.
3915 (qxfer): Document the -3 return value.
3916
3917 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3918
3919 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3920 (linux_btrace_h): New variable.
3921 (linux-btrace.o): New rule.
3922
3923 2013-03-08 Stan Shebs <stan@codesourcery.com>
3924 Hafiz Abid Qadeer <abidh@codesourcery.com>
3925
3926 * tracepoint.c (trace_buffer_size): New global.
3927 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3928 (init_trace_buffer): Change to one-argument function. Allocate
3929 trace buffer memory.
3930 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3931 handle QTBuffer:size packet.
3932 (cmd_bigqtbuffer_size): New function.
3933 (initialize_tracepoint): Call init_trace_buffer with
3934 DEFAULT_TRACE_BUFFER_SIZE.
3935 * server.c (handle_query): Add QTBuffer:size in the
3936 supported packets.
3937
3938 2013-03-07 Yao Qi <yao@codesourcery.com>
3939
3940 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3941 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3942 of -1.
3943 (cmd_qtsp): Adjust condition. Do post increment.
3944 Set cur_action and cur_step_action back to 0.
3945
3946 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3947
3948 PR server/15236
3949 * linux-low.c (linux_write_memory): Return early success if LEN is
3950 zero.
3951
3952 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
3953
3954 * configure.srv: Add x86_64-*-cygwin* as target.
3955
3956 2013-02-28 Tom Tromey <tromey@redhat.com>
3957
3958 * configure.ac: Invoke AC_SYS_LARGEFILE.
3959 * configure, config.in: Rebuild.
3960
3961 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
3962
3963 * win32-low.c: Throughout, fix format strings and casts of
3964 printf-like functions to avoid type related warnings on all
3965 platforms.
3966 (get_child_debug_event): Print dwDebugEventCode as hex since
3967 that's how it's usually documented.
3968
3969 2013-02-28 Yao Qi <yao@codesourcery.com>
3970
3971 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3972 pulongest.
3973
3974 2013-02-27 Jiong Wang <jiwang@tilera.com>
3975
3976 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3977 (reg-tilegx32.c): New rule.
3978 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3979 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3980 different register info initializer according to elf class.
3981 (init_registers_tilgx32): New function. The tilegx32 register info
3982 initializer.
3983 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3984 (tile_store_gregset): Likewise.
3985
3986 2013-02-27 Yao Qi <yao@codesourcery.com>
3987
3988 * server.c (process_point_options): Print debug message when
3989 debug_threads is true.
3990
3991 2013-02-26 Yao Qi <yao@codesourcery.com>
3992
3993 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3994
3995 2013-02-19 Pedro Alves <palves@redhat.com>
3996 Kai Tietz <ktietz@redhat.com>
3997
3998 PR gdb/15161
3999
4000 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4001 instead of strtoul to extract address from packet.
4002 (process_serial_event) <'z'>: Likewise.
4003
4004 2013-02-18 Yao Qi <yao@codesourcery.com>
4005
4006 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4007
4008 2013-02-14 Pedro Alves <palves@redhat.com>
4009
4010 Plug memory leak.
4011
4012 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4013 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4014
4015 2013-02-14 Pedro Alves <palves@redhat.com>
4016
4017 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4018
4019 2013-02-14 Pedro Alves <palves@redhat.com>
4020
4021 * tracepoint.c (save_string): Delete.
4022 (add_tracepoint_action): Use savestring instead of save_string.
4023
4024 2013-02-12 Pedro Alves <palves@redhat.com>
4025
4026 * linux-xtensa-low.c: Ditto.
4027 * xtensa-xtregs.c: Ditto.
4028
4029 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4030
4031 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4032 thread_db.
4033
4034 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4035
4036 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4037 aarch64_num_wp_regs and aarch64_num_bp_regs to
4038 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4039
4040 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4041
4042 * linux-aarch64-low.c (ps_get_thread_area): Replace
4043 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4044
4045 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4046 Marcus Shawcroft <marcus.shawcroft@arm.com>
4047 Nigel Stephens <nigel.stephens@arm.com>
4048 Yufeng Zhang <yufeng.zhang@arm.com>
4049
4050 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4051 (aarch64.c, aarch64-without-fpu.c): New targets.
4052 * configure.srv (aarch64*-*-linux*): New.
4053 * linux-aarch64-low.c: New file.
4054
4055 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4056
4057 * linux-low.c (handle_extended_wait, linux_create_inferior)
4058 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4059 (dequeue_one_deferred_signal, linux_resume_one_thread)
4060 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4061 (linux_tracefork_grandchild, linux_test_for_tracefork)
4062 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4063 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4064 where the argument is 0.
4065
4066 2013-01-25 Yao Qi <yao@codesourcery.com>
4067
4068 * event-loop.c: Include "queue.h".
4069 (gdb_event_p): New typedef.
4070 (struct gdb_event) <next_event>: Remove.
4071 (event_queue): Change to QUEUE(gdb_event_p).
4072 (async_queue_event): Remove.
4073 (gdb_event_xfree): New.
4074 (initialize_event_loop): New.
4075 (process_event): Use API from QUEUE.
4076 (wait_for_event): Likewise.
4077 * server.c (main): Call initialize_event_loop.
4078 * server.h (initialize_event_loop): Declare.
4079
4080 2013-01-18 Yao Qi <yao@codesourcery.com>
4081
4082 * ax.h (struct eval_agent_expr_context): New.
4083 (gdb_eval_agent_expr): Update declaration.
4084 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4085 TFRAME. Add new argument CTX.
4086 * server.h (struct eval_agent_expr_context): Declare.
4087 (agent_mem_read, agent_tsv_read): Update declaration.
4088 (agent_mem_read_string): Likewise.
4089 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4090 (add_traceframe_block): Add new argument TPOINT.
4091 Increase TPOINT->traceframe_usage.
4092 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4093 eval_tracepoint_agent_expr.
4094 (condition_true_at_tracepoint): Likewise.
4095 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4096 (agent_mem_read_string, agent_tsv_read): Likewise.
4097
4098 2013-01-16 Yao Qi <yao@codesourcery.com>
4099
4100 * linux-low.c (linux_resume_one_lwp): Don't check
4101 'lwp->bp_reinsert != 0'.
4102
4103 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4104 Pedro Alves <palves@redhat.com>
4105
4106 * lynx-low.c (ptrace_request_to_str): Define a temporary
4107 macro and use it to simplify this function's implementation.
4108
4109 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4110
4111 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4112 sets errno.
4113
4114 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4115
4116 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4117
4118 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4119
4120 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4121
4122 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4123
4124 * lynx-low.c (lynx_resume): Use the resume_info parameter
4125 to determine the ptid for the lynx_ptrace call, unless
4126 it is equal to minus_one_ptid, in which case we use the
4127 ptid of the current_inferior.
4128 (lynx_wait_1): After having received a thread create/exit
4129 event, resume the inferior's execution using the signaling
4130 thread's ptid, rather than the old ptid.
4131
4132 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4133
4134 * lynx-low.c (lynx_resume): Delete variable ret.
4135
4136 2013-01-01 Joel Brobecker <brobecker@adacore.com>
4137
4138 * gdbreplay.c (gdbreplay_version): Update copyright year.
4139 * server.c (gdbserver_version): Likewise.
4140
4141 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4142
4143 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4144 new thread.
4145
4146 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4147
4148 * lynx-low.c (ptrace_request_to_str): Add handling for
4149 PTRACE_GETTRACESIG.
4150
4151 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4152
4153 * lynx-low.c (lynx_attach): Delete variable new_process.
4154
4155 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4156
4157 * lynx-low.c (lynx_create_inferior): Delete variable
4158 new_process.
4159
4160 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4161
4162 * lynx-low.c (ptrace_request_to_str): Do not handle
4163 PTRACE_GETTHREADLIST if this macro does not exist.
4164
4165 2012-12-15 Yao Qi <yao@codesourcery.com>
4166
4167 * Makefile.in (OBS): Add notif.o.
4168 * notif.c, notif.h: New.
4169 * server.c: Include "notif.h".
4170 (struct vstop_notif) <next>: Remove.
4171 <base>: New field.
4172 (queue_stop_reply): Update.
4173 (push_event, send_next_stop_reply): Remove.
4174 (discard_queued_stop_replies): Update.
4175 (notif_stop): New variable.
4176 (handle_v_stopped): Remove.
4177 (handle_v_requests): Don't call handle_v_stopped. Call
4178 handle_ack_notif instead.
4179 (queue_stop_reply_callback): Call notif_event_enque instead
4180 of queue_stop_reply.
4181 (handle_status): Don't call send_next_stop_reply, call
4182 notif_write_event instead.
4183 (kill_inferior_callback): Likewise.
4184 (detach_or_kill_inferior_callback): Likewise.
4185 (main): Call initialize_notif.
4186 (process_serial_event): Call QUEUE_is_empty.
4187 (handle_target_event): Call notif_push instead of push event.
4188 * server.h (push_event): Remove declaration.
4189
4190 2012-12-10 Tom Tromey <tromey@redhat.com>
4191
4192 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4193 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4194 macros.
4195 (.c.o): Rewrite.
4196 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4197 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4198 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4199 (amd64-linux-ipa.o, ax.o): Rewrite.
4200 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4201 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4202 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4203 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4204 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4205 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4206 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4207 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4208 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4209 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4210 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4211 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4212 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4213 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4214 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4215 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4216 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4217 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4218 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4219 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4220 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4221 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4222 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4223 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4224 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4225 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4226 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4227 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4228 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4229 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4230 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4231 (reg-tilegx.o): Remove.
4232 (all_object_files): New macro.
4233 Include .deps files.
4234 * aclocal.m4, configure: Rebuild.
4235 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4236 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4237 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4238
4239 2012-12-05 Tom Tromey <tromey@redhat.com>
4240
4241 PR gdb/14917:
4242 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4243
4244 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
4245
4246 * configure.ac: Check for linux/perf_event.h.
4247 * config.in: Regenerated.
4248 * configure: Regenerated.
4249
4250 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4251
4252 * hostio.c (handle_readlink): Decrease buffer size
4253 parameter passed to readlink by one byte.
4254
4255 2012-11-26 Yao Qi <yao@codesourcery.com>
4256
4257 * configure.ac (build_warnings): Append '-Wempty-body'.
4258 * configure: Regenerated.
4259 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4260 body.
4261
4262 2012-11-15 Pierre Muller <muller@sourceware.org>
4263
4264 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4265 * config.in: Regenerate.
4266 * configure: Regenerate.
4267 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4268 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4269 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4270 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4271 header.
4272 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4273 instead of <sys/wait.h> header.
4274 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4275
4276 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
4277
4278 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4279 (various make rules): Remove -DGDBSERVER
4280
4281 2012-11-09 Yao Qi <yao@codesourcery.com>
4282
4283 * spu-low.c (current_ptid): Move it to ..
4284 * gdbthread.h: ... here. New.
4285 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4286 * server.c (myresume, process_serial_event): Likewise.
4287 * thread-db.c (thread_db_find_new_threads): Likewise.
4288 * tracepoint.c (run_inferior_command): Likewise.
4289
4290 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
4291
4292 * server.c (handle_search_memory_1): Include access length in
4293 warning message.
4294
4295 2012-09-05 Michael Brandt <michael.brandt@axis.com>
4296
4297 * linux-crisv32-low.c: Fix compile errors.
4298
4299 2012-09-04 Yao Qi <yao@codesourcery.com>
4300
4301 * tracepoint.c (cmd_qtsv): Adjust debug message.
4302 Don't check CUR_TPOINT.
4303
4304 2012-08-28 Yao Qi <yao@codesourcery.com>
4305
4306 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4307 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4308 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4309 Remove declarations of xmalloc, xreallloc, xstrdup and
4310 freeargv.
4311 * Makefile.in (libiberty_h): New.
4312 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4313 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4314
4315 2012-08-23 Yao Qi <yao@codesourcery.com>
4316
4317 * server.h: Remove declaration of 'xsnprintf'.
4318
4319 2012-08-22 Keith Seitz <keiths@redhat.com>
4320
4321 * server.h: Include build-gnulib-gbserver/config.h.
4322 * gdbreplay.c: Likewise.
4323
4324 2012-08-08 Doug Evans <dje@google.com>
4325
4326 * Makefile.in (SFILES): Add gdb_vecs.c.
4327 (OBS): Add gdb_vecs.o.
4328 (gdb_vecs_h, host_defs_h): New variables.
4329 (thread-db.o): Add $(gdb_vecs_h) dependency.
4330 (gdb_vecs.o): New rule.
4331 * thread-db.c: #include "gdb_vecs.h".
4332 (thread_db_load_search): Use a vector to iterate over path elements.
4333 Handle text appearing after "$pdir".
4334
4335 * configure.ac: Add check for strstr.
4336 * config.in: Regenerate.
4337 * configure: Regenerate.
4338
4339 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4340
4341 * hostio.c (handle_pread): If pread fails, fall back to attempting
4342 lseek/read.
4343 (handle_pwrite): Likewise for pwrite.
4344
4345 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4346
4347 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4348 between unsupported TYPE and unimplementable ADDR/LEN combination.
4349 (arm_insert_point): Act on new return value.
4350
4351 2012-07-31 Pedro Alves <palves@redhat.com>
4352
4353 * server.c (process_point_options): Only skip tokens if we find
4354 one that is unrecognized. Don't treat 'X' specially while
4355 skipping unrecognized tokens.
4356
4357 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4358
4359 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4360 to 4-byte-align HW breakpoint addresses for Thumb.
4361
4362 2012-07-27 Yao Qi <yao@codesourcery.com>
4363
4364 PR remote/14161.
4365
4366 * server.h: Declare gdb_agent_about_to_close.
4367 * target.c (kill_inferior): Include "agent.h".
4368 New. Send command 'kill'.
4369 * target.h (kill_inferior): Removed macro.
4370 * tracepoint.c (gdb_agent_about_to_close): New.
4371 (gdb_agent_helper_thread): Handle command 'close'.
4372 Wait endlessly until the inferior stops.
4373 Install gdb_agent_remove_socket to atexit hook.
4374 (agent_socket_name): New static variable.
4375 (gdb_agent_socket_init): Replace local variable 'name' with
4376 'agent_socket_name'.
4377 (gdb_agent_remove_socket): New.
4378
4379 2012-07-27 Yao Qi <yao@codesourcery.com>
4380
4381 * server.c (process_point_options): Stop at 'X' when parsing.
4382
4383 2012-07-19 Michael Eager <eager@eagercon.com>
4384
4385 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
4386 to hw_execute.
4387 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4388 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4389 hardware breakpoint.
4390
4391 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4392
4393 * gdbserver/linux-low.c (initialize_low): Call
4394 linux_ptrace_init_warnings.
4395
4396 2012-07-02 Doug Evans <dje@google.com>
4397
4398 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4399 pointer to int.
4400
4401 2012-07-02 Stan Shebs <stan@codesourcery.com>
4402
4403 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4404 (ax.o): Add it to build rule.
4405 (ax-ipa.o): Ditto.
4406 (OBS): Add format.o.
4407 (IPA_OBS): Add format.o.
4408 * server.c (handle_query): Claim support for breakpoint commands.
4409 (process_point_options): Add command case.
4410 (process_serial_event): Leave running if there are printfs in
4411 effect.
4412 * mem-break.h (any_persistent_commands): Declare.
4413 (add_breakpoint_commands): Declare.
4414 (gdb_no_commands_at_breakpoint): Declare.
4415 (run_breakpoint_commands): Declare.
4416 * mem-break.c (struct point_command_list): New struct.
4417 (struct breakpoint): New field command_list.
4418 (any_persistent_commands): New function.
4419 (add_commands_to_breakpoint): New function.
4420 (add_breakpoint_commands): New function.
4421 (gdb_no_commands_at_breakpoint): New function.
4422 (run_breakpoint_commands): New function.
4423 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4424 locally.
4425 * ax.c: Include format.h.
4426 (ax_printf): New function.
4427 (gdb_eval_agent_expr): Add printf opcode.
4428
4429 2012-06-13 Yao Qi <yao@codesourcery.com>
4430
4431 * server.c (start_inferior): Remove duplicated writes to fields
4432 'last_resume_kind' and 'last_status' of 'current_inferior'.
4433
4434 2012-06-12 Yao Qi <yao@codesourcery.com>
4435 Pedro Alves <palves@redhat.com>
4436
4437 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4438 comment.
4439 * server.c (handle_v_cont): Extend comment.
4440
4441 2012-06-11 Yao Qi <yao@codesourcery.com>
4442
4443 * linux-low.c (linux_attach): Add 'static'.
4444
4445 2012-06-06 Yao Qi <yao@codesourcery.com>
4446
4447 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4448
4449 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4450
4451 Fix gcc -flto compilation warning.
4452 * server.c (main): Make variable multi_mode and attach volatile.
4453
4454 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4455
4456 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4457 if the platform doesn't know about it.
4458
4459 2012-05-30 Jeff Kenton <jkenton@tilera.com>
4460
4461 * Makefile.in (SFILES): Add linux-tile-low.c.
4462 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4463 * configure.srv: Handle tilegx-*-linux*.
4464 * linux-tile-low.c: New file.
4465
4466 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4467
4468 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4469
4470 2012-05-24 Pedro Alves <palves@redhat.com>
4471
4472 PR gdb/7205
4473
4474 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4475
4476 2012-05-24 Pedro Alves <palves@redhat.com>
4477
4478 PR gdb/7205
4479
4480 Replace target_signal with gdb_signal throughout.
4481
4482 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4483
4484 * linux-low.c (linux_store_registers): Avoid the copying sequence
4485 when no data has been retrieved by ptrace.
4486
4487 2012-05-22 Will Deacon <will.deacon@arm.com>
4488
4489 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4490 Include asm/ptrace.h.
4491 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4492 already defined.
4493
4494 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4495
4496 * linux-low.c (linux_store_registers): Don't re-retrieve data
4497 with ptrace that has already been obtained from /proc. Always
4498 copy any data retrieved with ptrace to the buffer supplied.
4499
4500 2012-05-11 Yao Qi <yao@codesourcery.com>
4501 Pedro Alves <palves@redhat.com>
4502
4503 * linux-low.c (enum stopping_threads_kind): New.
4504 (stopping_threads): Change type to `enum stopping_threads_kind'.
4505 (handle_extended_wait): If stopping and suspending threads, leave
4506 the new_lwp suspended too.
4507 (linux_wait_for_event): Adjust.
4508 (stop_all_lwps): Set `stopping_threads' to
4509 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4510 whether we're suspending threads or just stopping them. Assert no
4511 recursion happens.
4512
4513 2012-04-29 Yao Qi <yao@codesourcery.com>
4514
4515 * server.h: Move some code to ...
4516 * gdbthread.h: ... here. New.
4517 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4518 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4519 (nto-low.o, win32-low.o): Likewise.
4520 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4521 * regcache.c, remote-utils.c, server.c: Likewise.
4522 * target.c, tracepoint.c, win32-low.c: Likewise.
4523
4524 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4525
4526 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4527 (PTRACE_ARG4_TYPE): Likewise.
4528 (PTRACE_XFER_TYPE): Likewise.
4529 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4530 ptrace to PTRACE_ARG3_TYPE.
4531 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4532 (PTRACE_ARG4_TYPE): Likewise.
4533 (PTRACE_XFER_TYPE): Likewise.
4534 (linux_detach_one_lwp): Cast fourth argument of
4535 ptrace to long then PTRACE_ARG4_TYPE.
4536 (regsets_fetch_inferior_registers): Cast third argument of
4537 ptrace to long then PTRACE_ARG3_TYPE.
4538 (regsets_store_inferior_registers): Likewise.
4539
4540 2012-04-20 Pedro Alves <palves@redhat.com>
4541
4542 * configure: Regenerate.
4543
4544 2012-04-19 Pedro Alves <palves@redhat.com>
4545
4546 * Makefile.in (GNULIB_BUILDDIR): New.
4547 (LIBGNU, INCGNU, GNULIB_H): Adjust.
4548 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4549 (all, install-only, uninstall, clean-info, all-lib, clean): No
4550 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4551 (maintainer-clean realclean distclean): Use subdir_do.
4552 (subdir_do): New.
4553 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
4554 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
4555 * acinclude.m4: Include acx_configure_dir.m4.
4556 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4557 calls. Call AC_PROG_RANLIB. Configure gnulib using
4558 ACX_CONFIGURE_DIR.
4559 (GNULIB): New.
4560 (GNULIB_STDINT_H): Adjust.
4561 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4562 * gdbreplay.c: Include build-gnulib/config.h.
4563 * server.h: Likewise.
4564 * aclocal.m4: Regenerate.
4565 * config.in: Regenerate.
4566 * configure: Regenerate.
4567
4568 2012-04-19 Pedro Alves <palves@redhat.com>
4569
4570 * Makefile.in (LIBGNU, INCGNU): Adjust.
4571 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4572 (all, install-only, uninstall, clean-info, all-lib, clean)
4573 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4574 * configure.ac: Adjust AC_OUTPUT output.
4575 * aclocal.m4: Regenerate.
4576 * configure: Regenerate.
4577
4578 2012-04-19 Pedro Alves <palves@redhat.com>
4579
4580 * Makefile.in (generated_files): New.
4581 (server_h): Remove the explicit dependency on config.h, and depend
4582 on $generated_files.
4583
4584 2012-04-19 Pedro Alves <palves@redhat.com>
4585
4586 * Makefile.in (INCGNU): Add -Ignulib.
4587
4588 2012-04-19 Pedro Alves <palves@redhat.com>
4589
4590 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4591 (INCGNU): ... this, and spell out -I here.
4592 (GNULIB_LIB): Rename to ...
4593 (LIBGNU): ... this.
4594 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4595
4596 2012-04-19 Pedro Alves <palves@redhat.com>
4597
4598 * config.in: Regenerate.
4599
4600 2012-04-19 Pedro Alves <palves@redhat.com>
4601
4602 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4603 * server.h (memmem): Remove declaration.
4604 * config.in: Regenerate.
4605 * configure: Regenerate.
4606
4607 2012-04-19 Yao Qi <yao@codesourcery.com>
4608
4609 * Makefile.in (SFILES): Add common/vec.c.
4610 (OBS): Add vec.o.
4611 (vec.o): New rule.
4612
4613 2012-04-19 Yao Qi <yao@codesourcery.com>
4614
4615 * remote-utils.c (prepare_resume_reply): Replace with macro
4616 target_core_of_thread.
4617 * server.c (handle_qxfer_threads_proper): Likewise.
4618 * target.h (traget_core_of_thread): New macro.
4619
4620 2012-04-18 Pedro Alves <palves@redhat.com>
4621
4622 * aclocal.m4: Regenerate.
4623 * configure: Regenerate.
4624
4625 2012-04-16 Yao Qi <yao@codesourcery.com>
4626
4627 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4628 duplicated on address.
4629
4630 2012-04-16 Yao Qi <yao@codesourcery.com>
4631
4632 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4633 (struct tracepoint_action_ops) <send>: New field.
4634 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4635 (agent_expr_send, x_tracepoint_action_send): New.
4636 (l_tracepoint_action_send): New.
4637 (cmd_qtdp): Download and install tracepoint
4638 according to `use_agent'.
4639 (run_inferior_command): Add one more parameter `len'.
4640 Update callers.
4641 (tracepoint_send_agent): New.
4642 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4643
4644 2012-04-16 Yao Qi <yao@codesourcery.com>
4645
4646 * tracepoint.c (download_tracepoints): Moved to ...
4647 (cmd_qtstart): ... here.
4648
4649 2012-04-14 Yao Qi <yao@codesourcery.com>
4650
4651 * tracepoint.c: Include inttypes.h.
4652 (struct collect_memory_action): Use sized types.
4653 (struct tracepoint): Likewise.
4654 (cmd_qtdp, stop_tracing): Update print specifiers.
4655 (cmd_qtp, response_tracepoint): Likewise.
4656 (collect_data_at_tracepoint): Likewise.
4657 (collect_data_at_step): Likewise.
4658
4659 2012-04-14 Yao Qi <yao@codesourcery.com>
4660
4661 Import gnulib module inttypes.
4662 * aclocal.m4, config.in, configure: Regenerated.
4663
4664 2012-04-14 Yao Qi <yao@codesourcery.com>
4665
4666 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4667 Makefile and config.status at last.
4668
4669 2012-04-13 Yao Qi <yao@codesourcery.com>
4670
4671 * tracepoint.c: Include stdint.h unconditionally.
4672
4673 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4674
4675 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4676 on BFD_HAVE_SYS_PROCFS_TYPE.
4677 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4678 * configure: Regenerate.
4679 * config.in: Likewise.
4680
4681 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4682
4683 * Makefile.in (clean): Also remove x32.c x32-linux.c
4684 x32-avx.c x32-avx-linux.c.
4685 (x32.o): New target.
4686 (x32.c): Likewise.
4687 (x32-linux.o): Likewise.
4688 (x32-linux.c): Likewise.
4689 (x32-avx.o): Likewise.
4690 (x32-avx.c): Likewise.
4691 (x32-avx-linux.o): Likewise.
4692 (x32-avx-linux.c): Likewise.
4693
4694 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4695 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4696 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4697 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4698 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4699 i386/x32-avx-linux.xml.
4700
4701 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4702 (init_registers_x32_avx_linux): Likwise.
4703 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4704 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4705
4706 2012-04-13 Pedro Alves <palves@redhat.com>
4707
4708 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4709 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4710 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4711 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4712 the sub-make.
4713
4714 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4715
4716 * linux-x86-low.c (compat_x32_clock_t): New.
4717 (compat_x32_siginfo_t): Likewise.
4718 (compat_x32_siginfo_from_siginfo): Likewise.
4719 (siginfo_from_compat_x32_siginfo): Likewise.
4720 (linux_is_elf64): Likewise.
4721 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4722 and siginfo_from_compat_x32_siginfo for x32.
4723 (x86_arch_setup): Set linux_is_elf64.
4724
4725 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4726
4727 PR gdb/13969
4728 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4729 e_machine field.
4730 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4731 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4732 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4733 compatible with process.
4734
4735 2012-04-12 Yao Qi <yao@codesourcery.com>
4736
4737 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4738 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4739 (install-only, install-info, clean): Handle sub dir gnulib.
4740 (all-lib, am--refresh): New targets.
4741 (memmem.o): Remove target.
4742 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4743 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4744 (AC_REPLACE_FUNCS): Remove memmem.
4745 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4746 (AC_OUTPUT): Generate Makefile in gnulib/.
4747 * aclocal.m4, config.in, configure: Regenerated.
4748
4749 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4750
4751 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4752
4753 2012-04-05 Pedro Alves <palves@redhat.com>
4754
4755 -Werror=strict-aliasing
4756
4757 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4758 pointer.
4759
4760 2012-04-04 Pedro Alves <palves@redhat.com>
4761
4762 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4763 (sparc_store_gregset_from_stack, sparc_store_gregset)
4764 (sparc_breakpoint_at): Fix formatting.
4765
4766 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4767
4768 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4769 are available.
4770 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4771 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4772 * config.in: Regenerate.
4773 * configure: Likewise.
4774
4775 2012-03-29 Pedro Alves <palves@redhat.com>
4776
4777 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4778 Correct ptrace arguments.
4779
4780 2012-03-28 Pedro Alves <palves@redhat.com>
4781
4782 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4783 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4784 (IA64_FR1_REGNUM): New defines.
4785 (ia64_fetch_register): New.
4786 (the_low_target): Install it.
4787 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4788 field.
4789 * linux-low.c (linux_fetch_registers): Try the
4790 the_low_target.fetch_register hook first.
4791
4792 * linux-arm-low.c (the_low_target): Adjust.
4793 * linux-bfin-low.c (the_low_target): Adjust.
4794 * linux-cris-low.c (the_low_target): Adjust.
4795 * linux-crisv32-low.c (the_low_target): Adjust.
4796 * linux-m32r-low.c (the_low_target): Adjust.
4797 * linux-m68k-low.c (the_low_target): Adjust.
4798 * linux-mips-low.c (the_low_target): Adjust.
4799 * linux-ppc-low.c (the_low_target): Adjust.
4800 * linux-s390-low.c (the_low_target): Adjust.
4801 * linux-sh-low.c (the_low_target): Adjust.
4802 * linux-sparc-low.c (the_low_target): Adjust.
4803 * linux-tic6x-low.c (the_low_target): Adjust.
4804 * linux-x86-low.c (the_low_target): Adjust.
4805 * linux-xtensa-low.c (the_low_target): Adjust.
4806
4807 2012-03-26 Pedro Alves <palves@redhat.com>
4808
4809 * server.c (handle_qxfer_libraries): Don't bail early if
4810 the_target->qxfer_libraries_svr4 is not NULL.
4811
4812 2012-03-26 Pedro Alves <palves@redhat.com>
4813
4814 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4815
4816 2012-03-23 Pedro Alves <palves@redhat.com>
4817
4818 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4819 "library-list-svr4" element's start tag when the the DSO list is
4820 empty.
4821
4822 2012-03-23 Pedro Alves <palves@redhat.com>
4823
4824 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4825 a variable whose type size is the same as the inferior's pointer
4826 size.
4827
4828 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4829
4830 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4831 struct siginfo.
4832 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4833 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4834 * linux-low.h: Include <signal.h>.
4835 (struct siginfo): Remove forward declaration.
4836 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4837 struct siginfo.
4838
4839 2012-03-21 Mike Frysinger <vapier@gentoo.org>
4840
4841 * .gitignore: Ignore more files.
4842
4843 2012-03-19 Pedro Alves <palves@redhat.com>
4844 Jan Kratochvil <jan.kratochvil@redhat.com>
4845
4846 * server.c (cont_thread, general_thread): Add describing comments.
4847 (start_inferior): Clear `cont_thread'.
4848 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4849 of a process.
4850
4851 2012-03-15 Yao Qi <yao@codesourcery.com>
4852
4853 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4854 handling to ...
4855 (cmd_qtdp): ... here.
4856
4857 2012-03-15 Yao Qi <yao@codesourcery.com>
4858
4859 * tracepoint.c (struct tracepoint_action_ops): New.
4860 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4861 (m_tracepoint_action_download): New.
4862 (r_tracepoint_action_download): New.
4863 (x_tracepoint_action_download): New.
4864 (l_tracepoint_action_download): New.
4865 (add_tracepoint_action): Install `action->ops' according type.
4866 (download_tracepoint_1): Move code `download' function pointer
4867 of various tracepoint_action_ops.
4868
4869 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4870
4871 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4872 linux_ptrace_attach_warnings.
4873
4874 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4875
4876 * Makefile.in (linux-ptrace.o): New.
4877 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4878 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4879 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4880 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4881 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4882 of these targets.
4883 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4884
4885 2012-03-08 Yao Qi <yao@codesourcery.com>
4886 Pedro Alves <palves@redhat.com>
4887
4888 Fix PR server/13392.
4889 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4890 offset of JMP insn.
4891 * tracepoint.c (remove_tracepoint): New.
4892 (cmd_qtdp): Call remove_tracepoint when failed to install.
4893
4894 2012-03-07 Pedro Alves <palves@redhat.com>
4895
4896 * linux-low.c (get_detach_signal): New.
4897 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4898 Pass on pending signals to PTRACE_DETACH. Check the result of the
4899 ptrace call.
4900 * server.c (program_signals, program_signals_p): New.
4901 (handle_general_set): Handle QProgramSignals.
4902 * server.h (program_signals, program_signals_p): Declare.
4903
4904 2012-03-05 Pedro Alves <palves@redhat.com>
4905 Jan Kratochvil <jan.kratochvil@redhat.com>
4906
4907 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4908 New comment why.
4909
4910 2012-03-03 Yao Qi <yao@codesourcery.com>
4911
4912 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4913 agent_look_up_symbols.
4914
4915 2012-03-03 Yao Qi <yao@codesourcery.com>
4916
4917 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4918 (linux-x86-low.o): Likewise.
4919 * server.h: Remove in_process_agent_loaded.
4920 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4921 common/agent.c.
4922 Update callers.
4923
4924 2012-03-03 Yao Qi <yao@codesourcery.com>
4925
4926 * tracepoint.c (gdb_agent_capability): New global.
4927 (in_process_agent_loaded_ust): Renamed to
4928 `in_process_agent_supports_ust'.
4929 Update callers.
4930 (in_process_agent_supports_ust): Call agent_capability_check.
4931 (clear_installed_tracepoints): Assert that agent supports
4932 agent.
4933
4934 2012-03-03 Yao Qi <yao@codesourcery.com>
4935
4936 * linux-low.c (linux_supports_agent): New.
4937 (linux_target_ops): Initialize field `supports_agent' with
4938 linux_supports_agent.
4939 * target.h (struct target_ops) <supports_agent>: New.
4940 (target_supports_agent): New macro.
4941 * server.c (handle_general_set): Handle packet 'QAgent'.
4942 (handle_query): Send `QAgent+'.
4943 * Makefile.in (server.o): Depends on agent.h.
4944
4945 2012-03-03 Yao Qi <yao@codesourcery.com>
4946
4947 * Makefile.in (OBS): Add agent.o.
4948 Add new rule for agent.o.
4949 Track dependence of tracepoint.c on agent.h.
4950 * tracepoint.c (run_inferior_command_1):
4951 (run_inferior_command): Call agent_run_command.
4952 (gdb_ust_connect_sync_socket): Deleted. Move it to
4953 common/agent.c.
4954 (resume_thread, stop_thread): Likewise.
4955 (gdb_ust_socket_init): Renamed to ...
4956 (gdb_agent_socket_init): ... New.
4957 (gdb_ust_thread): Renamed to ...
4958 (gdb_agent_helper_thread): ... New.
4959 (gdb_ust_init): Move some code to ...
4960 (gdb_agent_init): ... here. New.
4961 [HAVE_UST]: Call gdb_ust_init.
4962 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4963 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4964 * config.in, configure: Regenerated.
4965
4966 2012-03-02 Pedro Alves <palves@redhat.com>
4967
4968 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4969 * linux-low.c (struct simple_pid_list): New.
4970 (stopped_pids): New a struct simple_pid_list pointer.
4971 (add_to_pid_list, pull_pid_from_list): New.
4972 (handle_extended_wait): Don't assume the first signal new children
4973 report is SIGSTOP. Adjust call to pull_pid_from_list.
4974 (linux_wait_for_lwp): Adjust.
4975
4976 2012-03-02 Yao Qi <yao@codesourcery.com>
4977
4978 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4979 debug log.
4980
4981 2012-03-02 Yao Qi <yao@codesourcery.com>
4982
4983 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4984 `stop_pc' and `tpoint'. Update caller.
4985
4986 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4987
4988 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4989 * linux-low.c (use_linux_regsets): New macro.
4990 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4991 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4992 (linux_register_in_regsets): New function.
4993 (usr_fetch_inferior_registers): Skip registers covered by
4994 regsets.
4995 (usr_store_inferior_registers): Likewise.
4996 (usr_fetch_inferior_registers): New macro.
4997 (usr_store_inferior_registers): Likewise.
4998 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4999 (linux_store_registers): Likewise.
5000 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5001 prototype.
5002 (init_registers_mips64_dsp_linux): Likewise.
5003 (init_registers_mips_linux): New macro.
5004 (init_registers_mips_dsp_linux): Likewise.
5005 (mips_dsp_num_regs): Likewise.
5006 (DSP_BASE, DSP_CONTROL): New fallback macros.
5007 (mips_base_regs): New macro.
5008 (mips_regmap): Use it. Fix the size.
5009 (mips_dsp_regmap): New variable.
5010 (mips_dsp_regset_bitmap): Likewise.
5011 (mips_arch_setup): New function.
5012 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5013 than mips_regmap.
5014 (mips_cannot_store_register): Likewise.
5015 (the_low_target): Update .arch_setup, .num_regs and .regmap
5016 initializers. Add .regset_bitmap initializer.
5017 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5018 initializer.
5019 * linux-bfin-low.c (the_low_target): Likewise.
5020 * linux-cris-low.c (the_low_target): Likewise.
5021 * linux-crisv32-low.c (the_low_target): Likewise.
5022 * linux-ia64-low.c (the_low_target): Likewise.
5023 * linux-m32r-low.c (the_low_target): Likewise.
5024 * linux-m68k-low.c (the_low_target): Likewise.
5025 * linux-ppc-low.c (the_low_target): Likewise.
5026 * linux-s390-low.c (the_low_target): Likewise.
5027 * linux-sh-low.c (the_low_target): Likewise.
5028 * linux-sparc-low.c (the_low_target): Likewise.
5029 * linux-tic6x-low.c (the_low_target): Likewise.
5030 * linux-x86-low.c (the_low_target): Likewise.
5031 * linux-xtensa-low.c (the_low_target): Likewise.
5032 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5033 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5034 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5035 srv_xmlfiles.
5036 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5037 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5038
5039 2012-02-29 Yao Qi <yao@codesourcery.com>
5040 Pedro Alves <palves@redhat.com>
5041
5042 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5043 `step_over_finished' is true.
5044
5045 2012-02-27 Pedro Alves <palves@redhat.com>
5046
5047 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5048 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5049
5050 2012-02-27 Pedro Alves <palves@redhat.com>
5051
5052 PR server/9684
5053 * linux-low.c (pid_is_stopped): New.
5054 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5055
5056 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
5057
5058 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5059 of conditions.
5060
5061 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5062
5063 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5064
5065 2012-02-24 Luis Machado <lgustavo@codesourcery>
5066
5067 * server.c (handle_query): Advertise support for target-side
5068 breakpoint condition evaluation.
5069 (process_point_options): New function.
5070 (process_serial_event): When inserting a breakpoint, check for
5071 a target-side condition that should be evaluated.
5072
5073 * mem-break.c: Include regcache.h and ax.h.
5074 (point_cond_list_t): New data structure.
5075 (breakpoint) <cond_list>: New field.
5076 (find_gdb_breakpoint_at): Make non-static.
5077 (delete_gdb_breakpoint_at): Clear any target-side
5078 conditions.
5079 (clear_gdb_breakpoint_conditions): New function.
5080 (add_condition_to_breakpoint): Likewise.
5081 (add_breakpoint_condition): Likewise.
5082 (gdb_condition_true_at_breakpoint): Likewise.
5083 (gdb_breakpoint_here): Return result directly instead
5084 of going through a local variable.
5085
5086 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5087 (clear_gdb_breakpoint_conditions): Likewise.
5088 (add_breakpoint_condition): Likewise.
5089 (gdb_condition_true_at_breakpoint): Likewise.
5090
5091 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5092 (need_step_over_p): Take target-side breakpoint condition into
5093 consideration.
5094
5095 2012-02-24 Luis Machado <lgustavo@codesourcery>
5096
5097 * server.h: Include tracepoint.h.
5098 (agent_mem_read, agent_get_trace_state_variable_value,
5099 agent_set_trace_state_variable_value,
5100 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5101 get_set_tsv_func_addr): New prototypes.
5102
5103 * ax.h: New include file.
5104 * ax.c: New source file.
5105
5106 * tracepoint.c: Include ax.h.
5107 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5108 agent_expr, eval_result_type): Move to ax.h.
5109 (parse_agent_expr): Rename to ...
5110 (gdb_parse_agent_expr): ... this, make it non-static and move
5111 to ax.h.
5112 (unparse_agent_expr) Rename to ...
5113 (gdb_unparse_agent_expr): ... this, make it non-static and move
5114 to ax.h.
5115 (eval_agent_expr): Rename to ...
5116 (eval_tracepoint_agent_expr): ... this.
5117 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5118 forward declarations.
5119 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5120 (agent_get_trace_state_variable_value): New function.
5121 (agent_set_trace_state_variable_value): New function.
5122 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5123 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5124 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5125 (condition_true_at_tracepoint): Likewise.
5126 (parse_agent_expr): Rename to ...
5127 (gdb_parse_agent_expr): ... this and move to ax.c.
5128 (unparse_agent_expr): Rename to ...
5129 (gdb_unparse_agent_expr): ... this and move to ax.c.
5130 (gdb_agent_op_name): Move to ax.c.
5131 (eval_agent_expr): Rename to ...
5132 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5133 and move to ax.c.
5134 (eval_tracepoint_agent_expr): New function.
5135 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
5136 non-static.
5137 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5138 ax.c.
5139 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5140 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5141 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5142 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5143 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5144 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5145 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5146 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5147 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5148 (compile_bytecodes): Remove forward declaration.
5149 (is_goto_target): Move to ax.c.
5150 (compile_bytecodes): Move to ax.c and call
5151 agent_get_trace_state_variable_value (...) and
5152 agent_set_trace_state_variable_value (...).
5153
5154 * Makefile.in: Update ax.c and IPA dependencies.
5155
5156 2012-02-24 Pedro Alves <palves@redhat.com>
5157
5158 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5159 (cmd_bigqtbuffer_circular): ... this. Only handle
5160 'QTBuffer:circular:'.
5161 (handle_tracepoint_general_set): Adjust.
5162
5163 2012-02-16 Yao Qi <yao@codesourcery.com>
5164
5165 * inferiors.c: Move code to ...
5166 * dll.c: .... here. New.
5167 * server.h: Declare clear_dlls.
5168 * Makefile.in (SFILES): Add dll.c.
5169 (OBS): Add dll.o
5170 (dll.o): New rule.
5171
5172 2012-02-11 Yao Qi <yao@codesourcery.com>
5173
5174 * server.c: (handle_monitor_command): Add a new parameter
5175 `own_buf'.
5176 (handle_query): Update caller.
5177
5178 2012-02-09 Joel Brobecker <brobecker@adacore.com>
5179
5180 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5181 * configure, config.in: Regenerate.
5182 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5183 is not defined.
5184
5185 2012-02-02 Pedro Alves <palves@redhat.com>
5186
5187 Try SIGKILL first, then PTRACE_KILL.
5188 * linux-low.c (linux_kill_one_lwp): New.
5189 (linux_kill_one_lwp): Rename to ...
5190 (kill_one_lwp_callback): ... this. Use the new
5191 linux_kill_one_lwp.
5192
5193 2012-02-02 Pedro Alves <palves@redhat.com>
5194
5195 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5196 inferior.
5197
5198 2012-01-27 Pedro Alves <palves@redhat.com>
5199
5200 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5201 (elf_64_file_p): Make static.
5202 (linux_pid_exe_is_elf_64_file): New.
5203 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5204 Delete declarations.
5205 (linux_pid_exe_is_elf_64_file): Declare.
5206 * linux-x86-low.c (x86_arch_setup): Use
5207 linux_pid_exe_is_elf_64_file.
5208
5209 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5210
5211 * linux-low.c (linux_wait_for_event_1): Rename to ...
5212 (linux_wait_for_event): ... here and merge it with former
5213 linux_wait_for_event - new variable wait_ptid, use it.
5214 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5215
5216 2012-01-23 Pedro Alves <palves@redhat.com>
5217
5218 * server.c (main): Avoid yet another case of infinite loop while
5219 detaching/killing after a longjmp.
5220
5221 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5222
5223 Code cleanup.
5224 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5225
5226 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5227
5228 * hostio.c (handle_readlink): New function.
5229 (handle_vFile): Call it to handle "vFile:readlink" packets.
5230
5231 2012-01-20 Pedro Alves <palves@redhat.com>
5232 Ulrich Weigand <ulrich.weigand@linaro.org>
5233
5234 * server.c (handle_v_requests): Only support vAttach and vRun to
5235 start multiple processes when in extended protocol mode.
5236
5237 2012-01-17 Pedro Alves <palves@redhat.com>
5238
5239 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5240 memalign plus mprotect to allocate the scratch buffer.
5241
5242 2012-01-13 Pedro Alves <palves@redhat.com>
5243
5244 * server.c (attach_inferior): Clear `cont_thread'.
5245
5246 2012-01-13 Pedro Alves <palves@redhat.com>
5247
5248 * server.c (main): Avoid infinite loop while detaching/killing
5249 after a longjmp.
5250
5251 2012-01-09 Doug Evans <dje@google.com>
5252
5253 * server.c (start_inferior): Set last_ptid in --wrapper case.
5254
5255 2012-01-06 Yao Qi <yao@codesourcery.com>
5256
5257 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5258 defined.
5259 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5260
5261 2012-01-04 Yao Qi <yao@codesourcery.com>
5262
5263 * tracepoint.c (cmd_qtdp): Print debug message
5264 for static tracepoint.
5265
5266 2012-01-04 Yao Qi <yao@codesourcery.com>
5267
5268 * tracepoint.c (trace_vdebug): Differentiate debug message
5269 between gdbserver and IPA.
5270
5271 2012-01-03 Yao Qi <yao@codesourcery.com>
5272
5273 * tracepoint.c (tracepoint_was_hit): Don't collect for
5274 static tracepoint.
5275
5276 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5277
5278 * terminal.h: Reformat copyright header.
5279
5280 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5281
5282 * server.c (gdbserver_version): Update copyright year.
5283 * gdbreplay.c (gdbreplay_version): Likewise.
5284
5285 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5286
5287 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5288
5289 Revert:
5290 2011-12-18 Hui Zhu <teawater@gmail.com>
5291 * linux-low.c (linux_create_inferior): Save return value to ret.
5292
5293 2011-12-18 Hui Zhu <teawater@gmail.com>
5294
5295 * linux-low.c (linux_create_inferior): Save return value to ret.
5296
5297 2011-12-16 Doug Evans <dje@google.com>
5298
5299 * linux-low.c (linux_create_inferior): If stdio connection,
5300 redirect stdin from /dev/null, stdout to stderr.
5301 * remote-utils.c (remote_is_stdio): New static global.
5302 (remote_connection_is_stdio): New function.
5303 (remote_prepare): Handle stdio connection.
5304 (remote_open): Ditto.
5305 (remote_close): Don't close stdin for stdio connections.
5306 (read_prim,write_prim): New functions. Replace all calls to
5307 read/write to these.
5308 * server.c (main): Watch for "-" argument. Move call to
5309 remote_prepare before start_inferior.
5310 * server.h (STDIO_CONNECTION_NAME): New macro.
5311 (remote_connection_is_stdio): Declare.
5312
5313 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5314 in debugging output.
5315
5316 2011-12-15 Yao Qi <yao@codesourcery.com>
5317
5318 * tracepoint.c: Include sys/syscall.h.
5319 (gdb_ust_thread): Remove preprocessor conditional.
5320
5321 2011-12-14 Pedro Alves <pedro@codesourcery.com>
5322
5323 * linux-low.c (linux_detach_one_lwp): Call
5324 the_low_target.prepare_to_resume before detaching.
5325
5326 2011-12-14 Yao Qi <yao@codesourcery.com>
5327
5328 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5329 of write.
5330
5331 2011-12-14 Yao Qi <yao@codesourcery.com>
5332
5333 * i386-low.c (i386_low_stopped_data_address): Initialize local
5334 variable `control'.
5335
5336 2011-12-13 Pedro Alves <pedro@codesourcery.com>
5337
5338 PR remote/13492
5339
5340 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5341 DR_CONTROL unless necessary. Extend comments.
5342 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5343 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5344
5345 2011-12-13 Yao Qi <yao@codesourcery.com>
5346
5347 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5348 macros.
5349 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5350
5351 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5352
5353 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5354 Print new debug message for such case.
5355
5356 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5357
5358 Fix overlapping memcpy.
5359 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5360 the read_inferior_memory transfer.
5361 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5362 write_inferior_memory transfer.
5363 (set_fast_tracepoint_jump): New variable buf. Use it for the
5364 read_inferior_memory and write_inferior_memory transfers.
5365 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5366 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5367 Use it for the write_inferior_memory transfer.
5368 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5369 buffers.
5370
5371 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5372
5373 * linux-low.c (fetch_register, store_register): Make code
5374 consistent, fix formatting.
5375
5376 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5377
5378 * linux-low.c (usr_store_inferior_registers): Factor out code
5379 to handle individual registers into...
5380 (store_register): ... this new function.
5381
5382 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5383
5384 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5385 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5386 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5387 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5388 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5389 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5390 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5391 (srv_xmlfiles): Add new XML files.
5392
5393 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5394 and <sys/uio.h>.
5395 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5396 (init_registers_s390_linux32v1): Add prototype.
5397 (init_registers_s390_linux32v2): Likewise.
5398 (init_registers_s390_linux64v1): Likewise.
5399 (init_registers_s390_linux64v2): Likewise.
5400 (init_registers_s390x_linux64v1): Likewise.
5401 (init_registers_s390x_linux64v2): Likewise.
5402 (s390_num_regs): Increment to 52.
5403 (s390_regmap): Add orig_r2 register.
5404 (s390_num_regs_3264): Increment to 68.
5405 (s390_regmap_3264): Add orig_r2 register.
5406 (s390_collect_ptrace_register): Handle orig_r2 register.
5407 (s390_supply_ptrace_register): Likewise.
5408 (s390_fill_last_break): New function.
5409 (s390_store_last_break): Likewise.
5410 (s390_fill_system_call): New function.
5411 (s390_store_system_call): Likewise.
5412 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5413 register sets.
5414 (s390_check_regset): New function.
5415 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5416 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5417 Update target_regsets for available register sets.
5418
5419 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5420 Jan Kratochvil <jan.kratochvil@redhat.com>
5421
5422 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5423 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5424 New.
5425 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5426 * linux-low.h (struct process_info_private): New member r_debug.
5427 * server.c (handle_qxfer_libraries): Call
5428 the_target->qxfer_libraries_svr4.
5429 (handle_qxfer_libraries_svr4): New function.
5430 (qxfer_packets): New entry "libraries-svr4".
5431 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5432 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5433 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5434 PACKET_qXfer_libraries_svr4.
5435
5436 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5437
5438 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5439 PSW address/mask between 8-byte and 16-byte formats.
5440 (s390_supply_ptrace_register): Likewise.
5441 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5442 basic addressing mode bit.
5443
5444 2011-11-24 Stan Shebs <stan@codesourcery.com>
5445
5446 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5447
5448 2011-11-17 Stan Shebs <stan@codesourcery.com>
5449
5450 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5451 (tracing_start_time): New global.
5452 (tracing_stop_time): New global.
5453 (tracing_user_name): New global.
5454 (tracing_notes): New global.
5455 (tracing_stop_note): New global.
5456 (cmd_qtstart): Set traceframe_usage, start_time.
5457 (stop_tracing): Set stop_time.
5458 (cmd_qtstatus): Report additional status.
5459 (cmd_qtp): New function.
5460 (handle_tracepoint_query): Call it.
5461 (cmd_qtnotes): New function.
5462 (handle_tracepoint_general_set): Call it.
5463 (get_timestamp): Rename from tsv_get_timestamp.
5464
5465 2011-11-14 Stan Shebs <stan@codesourcery.com>
5466 Kwok Cheung Yeung <kcy@codesourcery.com>
5467
5468 * linux-x86-low.c (small_jump_insn): New.
5469 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5470 trampoline and error message, build a trampoline and issue a small
5471 jump instruction to it.
5472 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5473 trampoline and error message.
5474 (x86_get_min_fast_tracepoint_insn_len): New.
5475 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5476 * linux-low.h (struct linux_target_ops): Add arguments to
5477 install_fast_tracepoint_jump_pad operation, add new operation.
5478 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5479 arguments.
5480 (linux_get_min_fast_tracepoint_insn_len): New function.
5481 (linux_target_op): Add new operation.
5482 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5483 (gdb_trampoline_buffer_end): Ditto.
5484 (gdb_trampoline_buffer_error): Ditto.
5485 (struct ipa_sym_addresses): Add fields for new IPA variables.
5486 (symbol_list): Add entries for new IPA variables.
5487 (struct tracepoint): Add fields to hold the address range of the
5488 trampoline used by the tracepoint.
5489 (trampoline_buffer_head): New static variable.
5490 (trampoline_buffer_tail): Ditto.
5491 (claim_trampoline_space): New function.
5492 (have_fast_tracepoint_trampoline_buffer): New function.
5493 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5494 structure.
5495 (install_fast_tracepoint): Ditto, also add error buffer argument.
5496 (cmd_qtminftpilen): New function.
5497 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5498 (fast_tracepoint_from_trampoline_address): New function.
5499 (fast_tracepoint_collecting): Handle trampoline as part of jump
5500 pad space.
5501 (set_trampoline_buffer_space): New function.
5502 (initialize_tracepoint): Initialize new IPA variables.
5503 * target.h (struct target_ops): Add arguments to
5504 install_fast_tracepoint_jump_pad operation, add new
5505 get_min_fast_tracepoint_insn_len operation.
5506 (target_get_min_fast_tracepoint_insn_len): New.
5507 (install_fast_tracepoint_jump_pad): Add arguments.
5508 * server.h (IPA_BUFSIZ): Define.
5509 * linux-i386-ipa.c: Include extra header files.
5510 (initialize_fast_tracepoint_trampoline_buffer): New function.
5511 (initialize_low_tracepoint): Call it.
5512 * server.h (set_trampoline_buffer_space): Declare.
5513 (claim_trampoline_space): Ditto.
5514 (have_fast_tracepoint_trampoline_buffer): Ditto.
5515
5516 2011-11-14 Yao Qi <yao@codesourcery.com>
5517
5518 * server.c (handle_query): Handle InstallInTrace for qSupported.
5519 * tracepoint.c (add_tracepoint): Sort list.
5520 (install_tracepoint, download_tracepoint): New.
5521 (cmd_qtdp): Call them to install and download tracepoints.
5522 (sort_tracepoints): Removed.
5523 (cmd_qtstart): Update.
5524
5525 2011-11-14 Yao Qi <yao@codesourcery.com>
5526
5527 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5528 * mem-break.h: Declare.
5529 * tracepoint.c (cmd_qtstart): Move some code to ...
5530 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5531 New.
5532 (download_tracepoints): Move some code to ...
5533 (download_tracepoint_1): ... here. New.
5534
5535 2011-11-08 Yao Qi <yao@codesourcery.com>
5536
5537 * remote-utils.c (relocate_instruction): A comment fix.
5538
5539 2011-11-07 Joel Brobecker <brobecker@adacore.com>
5540
5541 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5542 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5543 dr_status_mirror and dr_control_mirror from debug_reg_state.
5544 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5545 (i386_initial_stuff): Remove use of deleted globals.
5546 (i386_get_thread_context, i386_set_thread_context,
5547 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5548 from debug_reg_state.
5549
5550 2011-11-05 Yao Qi <yao@codesourcery.com>
5551
5552 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5553 address as TPOINT's.
5554
5555 2011-11-02 Stan Shebs <stan@codesourcery.com>
5556
5557 * tracepoint.c (agent_mem_read_string): New function.
5558 (eval_agent_expr): Call it for tracenz.
5559 * server.c (handle_query): Report support for tracenz.
5560
5561 2011-11-02 Yao Qi <yao@codesourcery.com>
5562
5563 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5564
5565 2011-11-02 Yao Qi <yao@codesourcery.com>
5566
5567 * target.h: Fix a typo in comment.
5568
5569 2011-10-31 Pedro Alves <pedro@codesourcery.com>
5570
5571 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5572 clobber the breakpoints' shadows with fast tracepoint jumps.
5573 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5574 * target.c (write_inferior_memory): Also pass MYADDR down to
5575 check_mem_write.
5576
5577 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5578
5579 * configure.ac: Check support for personality routine.
5580 * configure: Regenerate.
5581 * config.in: Likewise.
5582 * linux-low.c: Include <sys/personality.h>.
5583 Define ADDR_NO_RANDOMIZE if necessary.
5584 (linux_create_inferior): Disable address space randomization when
5585 forking inferior, if requested.
5586 (linux_supports_disable_randomization): New function.
5587 (linux_target_ops): Install it.
5588 * server.h (disable_randomization): Declare.
5589 * server.c (disable_randomization): New global variable.
5590 (handle_general_set): Handle QDisableRandomization.
5591 (handle_query): Likewise for qSupported.
5592 (main): Support --disable-randomization and --no-disable-randomization
5593 command line arguments.
5594 * target.h (struct target_ops): Add supports_disable_randomization.
5595 (target_supports_disable_randomization): New macro.
5596
5597 2011-09-29 Mike Frysinger <vapier@gentoo.org>
5598
5599 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5600 ifdef check.
5601 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5602 [!PT_GETDSBT] (target_loadmap): New definition.
5603 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5604 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5605 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5606 and PT_GETDSBT to LINUX_LOADMAP.
5607 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5608 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5609
5610 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5611
5612 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5613 (arm_linux_hwbp_cap): New static variable.
5614 (arm_linux_get_hwbp_cap): Replace by ...
5615 (arm_linux_init_hwbp_cap): ... this new function.
5616 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5617 (arm_linux_get_hw_watchpoint_count): Likewise.
5618 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5619 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5620 (arm_prepare_to_resume): Use perror_with_name instead of error.
5621
5622 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5623
5624 * linux-arm-low.c: Include <signal.h>.
5625 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5626 (struct arm_linux_hwbp_cap): New data type.
5627 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5628 (struct arm_linux_hw_breakpoint): New data type.
5629 (MAX_BPTS, MAX_WPTS): Define.
5630 (struct arch_process_info, struct arch_lwp_info): New data types.
5631 (arm_linux_get_hwbp_cap): New function.
5632 (arm_linux_get_hw_breakpoint_count): Likewise.
5633 (arm_linux_get_hw_watchpoint_count): Likewise.
5634 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5635 (arm_hwbp_control_initialize): Likewise.
5636 (arm_hwbp_control_is_enabled): Likewise.
5637 (arm_hwbp_control_is_initialized): Likewise.
5638 (arm_hwbp_control_disable): Likewise.
5639 (arm_linux_hw_breakpoint_equal): Likewise.
5640 (arm_linux_hw_point_initialize): Likewise.
5641 (struct update_registers_data): New data structure.
5642 (update_registers_callback: New function.
5643 (arm_insert_point): Likewise.
5644 (arm_remove_point): Likewise.
5645 (arm_stopped_by_watchpoint): Likewise.
5646 (arm_stopped_data_address): Likewise.
5647 (arm_new_process): Likewise.
5648 (arm_new_thread): Likewise.
5649 (arm_prepare_to_resume): Likewise.
5650 (the_low_target): Register arm_insert_point, arm_remove_point,
5651 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5652 arm_new_thread, and arm_prepare_to_resume.
5653
5654 2011-09-15 Stan Shebs <stan@codesourcery.com>
5655
5656 * server.h (struct emit_ops): Add compare-goto fields.
5657 * tracepoint.c (gdb_agent_op_sizes): New table.
5658 (emit_eq_goto): New function.
5659 (emit_ne_goto): New function.
5660 (emit_lt_goto): New function.
5661 (emit_le_goto): New function.
5662 (emit_gt_goto): New function.
5663 (emit_ge_goto): New function.
5664 (is_goto_target): New function.
5665 (compile_bytecodes): Recognize special cases of compare-goto
5666 combinations and call specialized emitters for them.
5667 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5668 (amd64_emit_ne_goto): New function.
5669 (amd64_emit_lt_goto): New function.
5670 (amd64_emit_le_goto): New function.
5671 (amd64_emit_gt_goto): New function.
5672 (amd64_emit_ge_goto): New function.
5673 (amd64_emit_ops): Add the new functions.
5674 (i386_emit_eq_goto): New function.
5675 (i386_emit_ne_goto): New function.
5676 (i386_emit_lt_goto): New function.
5677 (i386_emit_le_goto): New function.
5678 (i386_emit_gt_goto): New function.
5679 (i386_emit_ge_goto): New function.
5680 (i386_emit_ops): Add the new functions.
5681
5682 2011-09-08 Stan Shebs <stan@codesourcery.com>
5683
5684 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5685 (i386_emit_epilogue): Restore %ebx.
5686
5687 2011-08-31 Jie Zhang <jzhang918@gmail.com>
5688
5689 * server.c (step_thread): Remove definition.
5690 (process_serial_event): Don't handle Hs.
5691 * server.h (step_thread): Remove declaration.
5692 * target.c (set_desired_inferior): Remove use of step_thread.
5693
5694 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5695
5696 * linux-low.c: Include linux-procfs.h.
5697 (linux_attach_lwp_1): Update comments.
5698 (linux_attach): Scan for existing threads when attaching to a
5699 process that is the tgid.
5700 * Makefile.in: Update dependencies.
5701
5702 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5703
5704 * configure.srv: Add linux-procfs.o dependencies.
5705
5706 2011-08-14 Yao Qi <yao@codesourcery.com>
5707
5708 * target.h (struct target_ops): Fix indent.
5709 * win32-low.c (win32_target_ops): Fix comment.
5710
5711 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
5712 Yao Qi <yao@codesourcery.com>
5713
5714 * Makefile.in (clean): Remove tic6x-*.c files.
5715 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5716 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5717 (tic6x-c64xp-linux.c): Likewise.
5718 * configure.srv: Add support for tic6x-*-uclinux.
5719 * linux-tic6x-low.c: New.
5720 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5721
5722 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
5723 Yao Qi <yao@codesourcery.com>
5724
5725 * target.h (struct target_ops): Add read_loadmap.
5726 * linux-low.c (struct target_loadseg): New type.
5727 (struct target_loadmap): New type.
5728 (linux_read_loadmap): New function.
5729 (linux_target_ops): Add linux_read_loadmap.
5730 * server.c (handle_query): Support qXfer:fdpic:read packet.
5731 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5732 to NULL.
5733
5734 2011-08-05 Eli Zaretskii <eliz@gnu.org>
5735
5736 * win32-low.c: Include <stdint.h>.
5737
5738 2011-07-22 Pedro Alves <pedro@codesourcery.com>
5739
5740 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5741 to the inferior here.
5742 (i386_remove_aligned_watchpoint): Ditto.
5743 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5744 fit part of the watchpoint in the debug registers.
5745 (i386_update_inferior_debug_regs): New.
5746 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5747 registers, and only update the inferior on success.
5748 (i386_low_remove_watchpoint): Ditto.
5749
5750 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5751
5752 * linux-low.c (compare_ints, unique, list_threads, show_process,
5753 linux_core_of_thread): Delete.
5754 (linux_target_ops): Change linux_core_of_thread to
5755 linux_common_core_of_thread.
5756 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5757 * utils.c (malloc_failure): Change type of argument.
5758 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5759 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5760 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5761 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5762 (IPA_OBJS): Add common-utils-ipa.o.
5763 (ptid_h, linux_osdata_h): New macros.
5764 (server_h): Add common/common-utils.h, common/xml-utils.h,
5765 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5766 common/ptid.h.
5767 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5768 ptid.o, buffer.o): New rules.
5769 (linux-low.o): Add common/linux-osdata.h as a dependency.
5770 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5771 * configure.ac: Add AC_HEADER_DIRENT check.
5772 * config.in: Regenerate.
5773 * configure: Regenerate.
5774 * remote-utils.c (xml_escape_text): Delete.
5775 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5776 buffer_xml_printf): Move to common/buffer.c.
5777 * server.c (main): Remove call to initialize_inferiors.
5778 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5779 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5780 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5781 internal_error, gdb_assert, gdb_assert_fail): Delete.
5782 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5783 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5784 common/buffer.h.
5785 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5786 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5787 initialize_inferiors): Delete.
5788
5789 2011-07-20 Pedro Alves <pedro@codesourcery.com>
5790
5791 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5792 symbol error.
5793
5794 2011-05-31 Pedro Alves <pedro@codesourcery.com>
5795
5796 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5797 assertion.
5798 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5799
5800 2011-05-26 Yao Qi <yao@codesourcery.com>
5801
5802 * Makefile.in (thread-db.o): Track dependence to
5803 common/gdb_thread_db.h.
5804 * thread-db.c: include gdb_thread_db.h from right place.
5805
5806 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5807
5808 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5809 __FILE__ and __LINE__ to internal_error.
5810
5811 2011-05-13 Doug Evans <dje@google.com>
5812
5813 * thread-db.c (try_thread_db_load_from_sdir): New function.
5814 (try_thread_db_load_from_dir): New function.
5815 (thread_db_load_search): Handle $sdir, ignore $pdir.
5816 Remove trying of system directories if search of
5817 libthread-db-search-path fails, that is now done via $sdir.
5818
5819 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5820
5821 * server.c (handle_query): Add EnableDisableTracepoints to the list
5822 of supported features.
5823 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
5824 tracepoints.
5825 (cmd_qtenable_disable): New.
5826 (cmd_qtstart): Install tracepoints even if disabled.
5827 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5828 receiving a QTEnable or QTDisable packet.
5829 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5830 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5831 tracepoints.
5832 (gdb_probe): Skip data collection if static tracepoint is disabled.
5833
5834 2011-05-10 Doug Evans <dje@google.com>
5835
5836 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5837
5838 2011-05-04 Doug Evans <dje@google.com>
5839
5840 * linux-low.c (linux_join): Skip process lookup.
5841 * spu-low.c (spu_join): Ditto.
5842 * server.c (join_inferiors_callback): Delete.
5843 (process_serial_event): For 'D' packet (detach) call join_inferior
5844 directly.
5845
5846 2011-05-04 Joseph Myers <joseph@codesourcery.com>
5847
5848 * README: Don't mention xscale*-*-linux*.
5849 * configure.srv (xscale*-*-linux*): Don't handle target.
5850
5851 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5852
5853 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5854 casting pointers.
5855 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5856 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5857 (i386_emit_void_call_2): Likewise.
5858
5859 2011-04-26 Yao Qi <yao@codesourcery.com>
5860
5861 * linux-low.c: Move common macros to linux-ptrace.h.
5862 Include linux-ptrace.h.
5863 * Makefile.in (linux_ptrace_h): New.
5864 (linux-low.o): Depends on linux-ptrace.h.
5865
5866 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5867
5868 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5869 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5870 (remote_prepare): New function with most of the TCP code from ...
5871 (remote_open): ... here. Detect PORT here unconditionally. Move also
5872 setting transport_is_reliable.
5873 * server.c (run_once): New variable.
5874 (gdbserver_usage): Document it.
5875 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5876 the first run if RUN_ONCE.
5877 * server.h (run_once, remote_prepare): New declarations.
5878
5879 2011-04-19 Tom Tromey <tromey@redhat.com>
5880
5881 * win32-low.c (handle_load_dll): Remove duplicate "the".
5882
5883 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5884
5885 Remove support for old Cygwin 1.5 versions.
5886 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5887 function to avoid warning.
5888 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5889 warning.
5890
5891 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5892
5893 * gdbserver/server.h (Macro _): Define it if not available.
5894
5895 2011-03-14 Michael Snyder <msnyder@vmware.com>
5896
5897 * hostio.c (handle_close): Remove unnecessary null test.
5898
5899 2011-03-10 Joel Brobecker <brobecker@adacore.com>
5900
5901 * Makefile.in (maintainer-clean realclean distclean): Remove
5902 "make ... subdir_do" command.
5903
5904 2011-03-10 Michael Snyder <msnyder@vmware.com>
5905
5906 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5907
5908 * server.c (handle_v_run): Free alloced buffer on early return.
5909
5910 2011-03-09 Yao Qi <yao@codesourcery.com>
5911
5912 Revert:
5913 2011-03-04 Yao Qi <yao@codesourcery.com>
5914
5915 * Makefile.in: Remove GNU make feature --directory.
5916
5917 2011-03-05 Yao Qi <yao@codesourcery.com>
5918
5919 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5920 (subdir_do): New make target. Copied from gdb/Makefile.
5921 (maintainer-clean, realclean, distclean, clean): Call corresponding
5922 make targets in common/Makefile.
5923
5924 2011-02-11 Yao Qi <yao@codesourcery.com>
5925
5926 * configure.ac: Call AC_PROG_RANLIB.
5927 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5928 * configure: Regenerate.
5929
5930 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5931
5932 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5933
5934 2011-03-06 Yao Qi <yao@codesourcery.com>
5935
5936 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5937
5938 2011-03-05 Yao Qi <yao@codesourcery.com>
5939
5940 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5941 (subdir_do): New make target. Copied from gdb/Makefile.
5942 (maintainer-clean, realclean, distclean, clean): Call corresponding
5943 make targets in common/Makefile.
5944
5945 2011-03-04 Yao Qi <yao@codesourcery.com>
5946
5947 * Makefile.in: Remove GNU make feature --directory.
5948
5949 2011-03-04 Michael Snyder <msnyder@vmware.com>
5950
5951 * server.c (queue_stop_reply): Call xmalloc not malloc.
5952
5953 2011-03-02 Michael Snyder <msnyder@vmware.com>
5954
5955 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5956
5957 2011-02-28 Michael Snyder <msnyder@vmware.com>
5958
5959 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5960 (cmd_qtframe): Ditto.
5961 (cmd_qtbuffer): Ditto.
5962 (cmd_bigqtbuffer): Ditto.
5963
5964 * utils.c (decimal2str): Initialize 'width' to nine, then
5965 don't mess with it.
5966
5967 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5968
5969 * hostio.c (require_data): Free *data, not data.
5970
5971 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5972
5973 * hostio.c (require_data): Use free, not xfree.
5974
5975 2011-02-27 Michael Snyder <msnyder@vmware.com>
5976
5977 * server.c (handle_query): Discard unused value.
5978
5979 * hostio.c (require_data): Free malloc memory before returning
5980 error.
5981
5982 2011-02-26 Michael Snyder <msnyder@vmware.com>
5983
5984 * linux-low.c (list_threads): Call closedir for dirent.
5985
5986 2011-02-27 Michael Snyder <msnyder@vmware.com>
5987
5988 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5989 a case statement falls through.
5990
5991 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5992
5993 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5994 in comparison.
5995
5996 2011-02-26 Michael Snyder <msnyder@vmware.com>
5997
5998 * utils.c (decimal2str): Eliminate dead code and dead param.
5999 (pulongest): Drop dead param from call to decimal2str.
6000 (plongest): Ditto.
6001
6002 2011-02-24 Joel Brobecker <brobecker@adacore.com>
6003
6004 Revert the following patch (not approved yet):
6005 2011-02-21 Hui Zhu <teawater@gmail.com>
6006 * tracepoint.c (tp_printf): New function.
6007 (eval_agent_expr): Handle gdb_agent_op_printf.
6008
6009 2011-02-21 Hui Zhu <teawater@gmail.com>
6010
6011 * tracepoint.c (tp_printf): New function.
6012 (eval_agent_expr): Handle gdb_agent_op_printf.
6013
6014 2011-02-18 Tom Tromey <tromey@redhat.com>
6015
6016 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6017 (tracepoint.o): Likewise.
6018 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6019 (gdb_agent_op_names): Likewise.
6020
6021 2011-02-18 Tom Tromey <tromey@redhat.com>
6022
6023 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6024 gdb_agent_op_rot>: New constants.
6025 (gdb_agent_op_names): Add pick and roll.
6026 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6027 cases.
6028
6029 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6030
6031 * aclocal.m4: Regenerated with aclocal-1.11.1.
6032
6033 2011-02-14 Pedro Alves <pedro@codesourcery.com>
6034
6035 * server.c (handle_qxfer_traceframe_info): New.
6036 (qxfer_packets): Register "traceframe-info".
6037 (handle_query): Report support for qXfer:traceframe-info:read+.
6038 * tracepoint.c (match_blocktype): New.
6039 (traceframe_find_block_type): Rename to ...
6040 (traceframe_walk_blocks): ... this. Add callback filter argument,
6041 and use it.
6042 (traceframe_find_block_type): New, reimplemented on top of
6043 traceframe_walk_blocks.
6044 (build_traceframe_info_xml): New.
6045 (traceframe_read_info): New.
6046 * server.h (traceframe_read_info): Declare.
6047
6048 2011-02-11 Yao Qi <yao@codesourcery.com>
6049
6050 * configure.ac: Call AC_PROG_RANLIB.
6051 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6052 * configure: Regenerate.
6053
6054 2011-02-07 Pedro Alves <pedro@codesourcery.com>
6055
6056 * server.c (gdb_read_memory): Change return semantics to allow
6057 partial transfers.
6058 (handle_search_memory_1): Adjust.
6059 (process_serial_event) <'m' packet>: Handle partial transfers.
6060 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6061
6062 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6063
6064 * regcache.c (init_register_cache): Initialize
6065 regcache->register_status.
6066 (free_register_cache): Release regcache->register_status.
6067 (regcache_cpy): Copy register_status.
6068 (registers_to_string): Print 'x's for unavailable registers.
6069 (supply_register): Mark the register's status valid or
6070 unavailable, depending on whether a buffer was passed in or not.
6071 (supply_register_zeroed): New.
6072 (supply_regblock): Mark the registers' status valid or
6073 unavailable, depending on whether a buffer was passed in or not.
6074 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6075 (struct regcache): New `register_status' field.
6076 (supply_register_zeroed): Declare.
6077 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6078 supply_register_zeroed, rather than passing a NULL buffer to
6079 supply_register.
6080 * tracepoint.c (fetch_traceframe_registers): Update comment.
6081
6082 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6083
6084 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6085 buffer explicit.
6086
6087 2011-01-25 Pedro Alves <pedro@codesourcery.com>
6088
6089 * server.h (decode_xfer_write): Change prototype.
6090 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6091 and don't extract the annex here.
6092 * server.c (decode_xfer_read): Remove `annex' parameter,
6093 and don't extract the annex here.
6094 (decode_xfer): New.
6095 (struct qxfer): New.
6096 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6097 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6098 (handle_qxfer_statictrace): New functions, abstracted out from
6099 handle_query, and made to use the struct qxfer interface.
6100 (handle_threads_qxfer_proper): Rename to ...
6101 (handle_qxfer_threads_proper): ... this.
6102 (handle_threads_qxfer): Rename to ...
6103 (handle_qxfer_threads): ... this. Adjust.
6104 (qxfer_packets): New array.
6105 (handle_qxfer): New function.
6106 (handle_query): Use handle_qxfer.
6107
6108 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6109
6110 * gdbreplay.c: Shorten lines of >= 80 columns.
6111 * linux-low.c: Ditto.
6112 * linux-ppc-low.c: Ditto.
6113 * linux-s390-low.c: Ditto.
6114 * linux-sparc-low.c: Ditto.
6115 * linux-x86-low.c: Ditto.
6116 * linux-xtensa-low.c: Ditto.
6117 * mem-break.c: Ditto.
6118 * nto-low.c: Ditto.
6119 * regcache.h: Ditto.
6120 * remote-utils.c: Ditto.
6121 * server.c: Ditto.
6122 * server.h: Ditto.
6123 * thread-db.c: Ditto.
6124 * tracepoint.c: Ditto.
6125 * utils.c: Ditto.
6126 * win32-low.h: Ditto.
6127
6128 2011-01-05 Joel Brobecker <brobecker@adacore.com>
6129
6130 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6131 update.
6132
6133 2011-01-01 Joel Brobecker <brobecker@adacore.com>
6134
6135 * server.c (gdbserver_version): Update copyright year in version
6136 output.
6137 * gdbreplay.c (gdbreplay_version): Ditto.
6138
6139 2010-12-29 Jie Zhang <jie.zhang@analog.com>
6140
6141 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6142 * linux-bfin-low.c: New file.
6143 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6144 PT_DATA_ADDR for BFIN targets.
6145 * Makefile.in (SFILES): Add linux-bfin-low.c.
6146 (clean): Remove reg-bfin.c.
6147 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6148 * README: Mention supported Blackfin targets.
6149
6150 2010-12-23 Mike Frysinger <vapier@gentoo.org>
6151
6152 * .gitignore: New file.
6153
6154 2010-11-16 Mike Frysinger <vapier@gentoo.org>
6155
6156 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6157
6158 2010-10-22 Jie Zhang <jie@codesourcery.com>
6159
6160 * Makefile.in: Add FLAGS_TO_PASS variable.
6161 (install): Remove dependency of install-only and recursively
6162 invoke make for install-only.
6163
6164 2010-10-04 Doug Evans <dje@google.com>
6165
6166 * Makefile.in (uninstall): Use $(DESTDIR).
6167
6168 2010-09-24 Pedro Alves <pedro@codesourcery.com>
6169
6170 PR gdb/11842
6171
6172 * linux-x86-low.c (compat_siginfo_from_siginfo)
6173 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6174 si_code is < 0. Check for si_code == SI_TIMER before checking for
6175 si_code < 0.
6176
6177 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6178
6179 * lynx-i386-low.c: New file.
6180 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6181
6182 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6183
6184 * lynx-low.c (ptrace_request_to_str): Remove handling for
6185 request values that have been removed in LynxOS 5.x.
6186
6187 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6188
6189 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6190 <ptrace.h>
6191
6192 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6193
6194 * configure.ac: Add --enable-inprocess-agent option.
6195 * configure: Rebuilt.
6196
6197 2010-09-06 Yao Qi <yao@codesourcery.com>
6198
6199 * linux-low.c (linux_kill): Remove unused variable.
6200 (linux_stabilize_threads): Likewise.
6201 * server.c (start_inferior): Likewise.
6202 (queue_stop_reply_callback): Likewise.
6203 * tracepoint.c (do_action_at_tracepoint): Likewise.
6204
6205 2010-09-06 Yao Qi <yao@codesourcery.com>
6206
6207 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6208 on return.
6209
6210 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6211
6212 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6213
6214 2010-09-06 Pedro Alves <pedro@codesourcery.com>
6215
6216 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6217 "$(IPA_DEPFILES)".
6218
6219 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6220
6221 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6222 gdbserver/lynx-ppc-low.c: New files.
6223 * Makefile.in (lynx_low_h): New variable.
6224 (lynx-low.o, lynx-ppc-low.o): New rules.
6225 * configure.ac: On LynxOS, link with -lnetinet.
6226 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6227 * configure: regenerate.
6228
6229 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6230
6231 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6232 * configure.ac: Add check for vasprintf and vsnprintf.
6233 * configure, config.in: Regenerate.
6234 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6235
6236 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6237
6238 * gdbreplay.c: Move include of alloca.h up, next to include of
6239 malloc.h.
6240 * server.h: Add include of malloc.h.
6241 * mem-break.c: Remove include of malloc.h.
6242 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6243
6244 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6245
6246 * Makefile.in (memmem.o): Build with -Wno-error.
6247
6248 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6249
6250 * utils.c (xsnprintf): Make non-static.
6251 * server.h: Add xsnprintf declaration.
6252 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6253 replace calls to snprintf by calls to xsnprintf throughout.
6254
6255 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6256
6257 * configure.ac: Add configure check for alloca.
6258 * configure, config.in: Regenerate.
6259 * server.h: Include alloca.h if it exists.
6260 * gdbreplay.c: Include alloca.h if it exists.
6261
6262 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6263
6264 * linux-low.c (__SIGRTMIN): Define if not already defined.
6265 (linux_create_inferior): Check for __ANDROID__ rather than
6266 __SIGRTMIN.
6267 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6268 are already deferred.
6269 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6270 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6271 stopped and already has a pending signal to report.
6272 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6273 a pending signal to report or is moving out of a jump pad.
6274 (linux_init_signals): Check for __ANDROID__ rather than
6275 __SIGRTMIN.
6276
6277 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6278
6279 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6280 debug_threads check. Avoid a linear search when not doing debug
6281 output.
6282
6283 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6284
6285 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6286 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6287 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6288 (process_event): Change local fd's type to gdb_fildes_t.
6289 (create_file_handler): Adjust prototype.
6290 (delete_file_handler): Adjust prototype.
6291 (handle_file_event): Adjust prototype. Use pfildes.
6292 (create_file_event): Adjsut prototype.
6293 * remote-utils.c (remote_desc, listen_desc): Change type to
6294 gdb_fildes_t.
6295 * server.h: New gdb_fildes_t typedef.
6296 [USE_WIN32API]: Include winsock2.h.
6297 (delete_file_handler, add_file_handler): Adjust prototypes.
6298 (pfildes): Declare.
6299 * utils.c (pfildes): New.
6300
6301 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6302
6303 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6304 * configure: Regenerate.
6305
6306 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6307
6308 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6309 (linux_done_accessing_memory): ... this.
6310 (linux_target_ops): Adjust.
6311 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6312 * nto-low.c (nto_target_ops): Adjust comment.
6313 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6314 * spu-low.c (spu_target_ops): Adjust comment.
6315 * target.h (target_ops): Rename unprepare_to_access_memory field
6316 to done_accessing_memory.
6317 (unprepare_to_access_memory): Rename to ...
6318 (done_accessing_memory): ... this.
6319
6320 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6321
6322 * linux-low.c (linux_prepare_to_access_memory): New.
6323 (linux_unprepare_to_access_memory): New.
6324 (linux_target_ops): Install them.
6325 * server.c (read_memory): Rename to ...
6326 (gdb_read_memory): ... this. Use
6327 prepare_to_access_memory/prepare_to_access_memory.
6328 (write_memory): Rename to ...
6329 (gdb_write_memory): ... this. Use
6330 prepare_to_access_memory/prepare_to_access_memory.
6331 (handle_search_memory_1): Adjust.
6332 (process_serial_event): Adjust.
6333 * target.h (struct target_ops): New fields
6334 prepare_to_access_memory and unprepare_to_access_memory.
6335 (prepare_to_access_memory, unprepare_to_access_memory): New.
6336 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6337 prepare_to_access_memory/prepare_to_access_memory.
6338 * nto-low.c (nto_target_ops): Adjust.
6339 * spu-low.c (spu_target_ops): Adjust.
6340 * win32-low.c (win32_target_ops): Adjust.
6341
6342 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6343
6344 * Makefile.in (WARN_CFLAGS): Get it from configure.
6345 (WERROR_CFLAGS): New.
6346 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6347 * configure.ac: Introduce --enable-werror, which adds -Werror to
6348 the compiler command line. Enabled by default. Disable with
6349 --disable-werror. Add -Wdeclaration-after-statement
6350 Wpointer-arith and -Wformat-nonliteral to warning flags.
6351 * configure: Regenerate.
6352
6353 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6354
6355 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6356
6357 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6358
6359 * gdbreplay.c (remote_error): New.
6360 (gdbchar): New.
6361 (expect): Use gdbchar. Check for error reading from GDB.
6362 Clarify sync error output.
6363 (play): Check for errors writing to GDB.
6364 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6365 * remote-utils.c (getpkt): Check for errors writing to the remote
6366 descriptor.
6367
6368 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6369
6370 * linux-low.c (linux_wait_1): Move non-debugging code out of
6371 `debug_threads' control.
6372
6373 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6374
6375 * linux-low.c (linux_wait_1): Don't set last_status here.
6376 * server.c (push_event, queue_stop_reply_callback): Assert we're
6377 not pushing a TARGET_WAITKIND_IGNORE event.
6378 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6379 (myresume, handle_target_event): Set the thread's last_resume_kind
6380 and last_status from the target returned status.
6381
6382 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6383
6384 PR threads/10729
6385
6386 * linux-x86-low.c (update_debug_registers_callback): New.
6387 (i386_dr_low_set_addr): Use it.
6388 (i386_dr_low_get_addr): New.
6389 (i386_dr_low_set_control): Use update_debug_registers_callback.
6390 (i386_dr_low_get_control): New.
6391 (i386_dr_low_get_status): Adjust.
6392 * linux-low.c (linux_stop_lwp): New.
6393 * linux-low.h (linux_stop_lwp): Declare.
6394
6395 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6396 argument instead of a i386_debug_reg_state.
6397 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6398 a i386_debug_reg_state.
6399 (i386_insert_aligned_watchpoint): Adjust.
6400 (i386_remove_aligned_watchpoint): Adjust.
6401 (i386_low_stopped_data_address): Read the debug registers from the
6402 inferior instead of from the mirrors.
6403 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6404 (i386_dr_low_get_addr): Declare.
6405 (i386_dr_low_get_control): Declare.
6406 (i386_dr_low_get_status): Change prototype.
6407
6408 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6409 (i386_dr_low_get_addr): New.
6410 (i386_dr_low_get_control): New.
6411 (i386_dr_low_get_status): Adjust prototype. Return
6412 dr_status_mirror.
6413 (i386_initial_stuff): Clear dr_status_mirror and
6414 dr_control_mirror.
6415 (i386_get_thread_context): Adjust.
6416 (i386_set_thread_context): Adjust.
6417 (i386_thread_added): Adjust.
6418
6419 2010-08-24 Pedro Alves <pedro@codesourcery.com>
6420
6421 * linux-low.h (linux_thread_area): Delete declaration.
6422
6423 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6424
6425 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6426 after its termination.
6427
6428 2010-08-09 Pedro Alves <pedro@codesourcery.com>
6429
6430 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6431 (gdb_wants_all_stopped): Delete.
6432 (linux_wait_1): Don't call them.
6433 * server.c (handle_v_cont): Tag all threads as want-stopped.
6434 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6435 stopped as "client-wants-stopped".
6436
6437 2010-07-31 Pedro Alves <pedro@codesourcery.com>
6438
6439 * Makefile.in (signals_h): New.
6440 (server_h): Depend on it.
6441 (server.o): Don't depend on $(signals_def).
6442 (signals.o): Depend on $(signals_def).
6443
6444 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6445
6446 * Makefile.in (signals_def): New.
6447 (server_h): Append include/gdb/signals.h and signals_def.
6448 (server.o): Append signals_def.
6449
6450 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6451
6452 * server.c (handle_target_event): Use target_signal_to_host for
6453 resume_info.sig initialization.
6454 * target.h (struct thread_resume) <sig>: New comment.
6455
6456 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6457
6458 * server.c (handle_query): strcpy() the returned string from paddress()
6459 instead of sprintf().
6460 * utils.c (paddress): Return phex_nz().
6461
6462 2010-07-07 Joel Brobecker <brobecker@adacore.com>
6463
6464 * server.c (handle_v_cont): Call mourn_inferior if process
6465 just exited.
6466 (myresume): Likewise.
6467
6468 2010-07-01 Pedro Alves <pedro@codesourcery.com>
6469
6470 Static tracepoints, and integration with UST.
6471
6472 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6473 * mem-break.c (uninsert_all_breakpoints)
6474 (reinsert_all_breakpoints): New.
6475 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6476 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6477 (gdb_agent_ust_loaded, helper_thread_id)
6478 (gdb_agent_helper_thread_id): New macros.
6479 (struct ipa_sym_addresses): Add addr_ust_loaded,
6480 addr_helper_thread_id, addr_cmd_buf.
6481 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6482 (in_process_agent_loaded_ust): New.
6483 (write_e_ust_not_loaded): New.
6484 (maybe_write_ipa_ust_not_loaded): New.
6485 (struct collect_static_trace_data_action): New.
6486 (enum tracepoint_type) <static_tracepoint>: New.
6487 (struct tracepoint) <handle>: Mention static tracepoints.
6488 (struct static_tracepoint_ctx): New.
6489 (CMD_BUF_SIZE): New.
6490 (add_tracepoint_action): Handle static tracepoint actions.
6491 (unprobe_marker_at): New.
6492 (clear_installed_tracepoints): Handle static tracepoints.
6493 (cmd_qtdp): Handle static tracepoints.
6494 (probe_marker_at): New.
6495 (cmd_qtstart): Handle static tracepoints.
6496 (response_tracepoint): Handle static tracepoints.
6497 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6498 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6499 (get_context_regcache): Handle static tracepoints.
6500 (do_action_at_tracepoint): Handle static tracepoint actions.
6501 (traceframe_find_block_type): Handle static trace data blocks.
6502 (traceframe_read_sdata): New.
6503 (download_tracepoints): Download static tracepoint actions.
6504 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6505 (GDB_PROBE_NAME): New.
6506 (ust_ops): New.
6507 (GET_UST_SYM): New.
6508 (USTF): New.
6509 (dlsym_ust): New.
6510 (ust_marker_to_static_tracepoint): New.
6511 (gdb_probe): New.
6512 (collect_ust_data_at_tracepoint): New.
6513 (gdb_ust_probe): New.
6514 (UNIX_PATH_MAX, SOCK_DIR): New.
6515 (gdb_ust_connect_sync_socket): New.
6516 (resume_thread, stop_thread): New.
6517 (run_inferior_command): New.
6518 (init_named_socket): New.
6519 (gdb_ust_socket_init): New.
6520 (cstr_to_hexstr): New.
6521 (next_st): New.
6522 (first_marker, next_marker): New.
6523 (response_ust_marker): New.
6524 (cmd_qtfstm, cmd_qtsstm): New.
6525 (unprobe_marker_at, probe_marker_at): New.
6526 (cmd_qtstmat, gdb_ust_thread): New.
6527 (gdb_ust_init): New.
6528 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6529 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6530 (ST_REGENTRY): New.
6531 (x86_64_st_collect_regmap): New.
6532 (X86_64_NUM_ST_COLLECT_GREGS): New.
6533 (AMD64_RIP_REGNUM): New.
6534 (supply_static_tracepoint_registers): New.
6535 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6536 (ST_REGENTRY): New.
6537 (i386_st_collect_regmap): New.
6538 (i386_NUM_ST_COLLECT_GREGS): New.
6539 (supply_static_tracepoint_registers): New.
6540 * server.c (handle_query): Handle qXfer:statictrace:read.
6541 <qSupported>: Report support for StaticTracepoints, and
6542 qXfer:statictrace:read features.
6543 * server.h (traceframe_read_sdata)
6544 (supply_static_tracepoint_registers): Declare.
6545 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6546 (unpack_varlen_hex): Include in IPA build.
6547 * Makefile.in (ustlibs, ustinc): New.
6548 (IPA_OBJS): Add remote-utils-ipa.o.
6549 ($(IPA_LIB)): Link -ldl and -lpthread.
6550 (UST_CFLAGS): New.
6551 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6552 * config.in, configure: Regenerate.
6553
6554 2010-06-20 Ian Lance Taylor <iant@google.com>
6555 Pedro Alves <pedro@codesourcery.com>
6556
6557 * linux-x86-low.c (always_true): Delete.
6558 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6559 trying to fool the compiler with always_true.
6560
6561 2010-06-20 Pedro Alves <pedro@codesourcery.com>
6562
6563 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6564 conditions in gdbserver.
6565
6566 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6567
6568 * spu-low.c (spu_read_memory): Wrap around local store limit.
6569 (spu_write_memory): Likewise.
6570
6571 2010-06-15 Pedro Alves <pedro@codesourcery.com>
6572
6573 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6574 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6575 LONGEST uses.
6576 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6577 uses.
6578 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6579 uses with LONGEST uses.
6580
6581 2010-06-14 Stan Shebs <stan@codesourcery.com>
6582 Pedro Alves <pedro@codesourcery.com>
6583
6584 Bytecode compiler.
6585
6586 * linux-x86-low.c: Include limits.h.
6587 (add_insns): New.
6588 (always_true): New.
6589 (EMIT_ASM): New.
6590 (EMIT_ASM32): New.
6591 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6592 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6593 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6594 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6595 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6596 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6597 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6598 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6599 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6600 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6601 (amd64_emit_void_call_2): New.
6602 (amd64_emit_ops): New.
6603 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6604 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6605 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6606 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6607 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6608 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6609 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6610 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6611 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6612 (i386_emit_stack_adjust, i386_emit_int_call_1)
6613 (i386_emit_void_call_2): New.
6614 (i386_emit_ops): New.
6615 (x86_emit_ops): New.
6616 (the_low_target): Install x86_emit_ops.
6617 * server.h (struct emit_ops): New.
6618 (get_raw_reg_func_addr): Declare.
6619 (current_insn_ptr, emit_error): Declare.
6620 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6621 (set_trace_state_variable_value): New defines.
6622 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6623 addr_get_trace_state_variable_value and
6624 addr_set_trace_state_variable_value.
6625 (symbol_list): New fields for get_raw_reg,
6626 get_trace_state_variable_value and set_trace_state_variable_value.
6627 (condfn): New typedef.
6628 (struct tracepoint): New field `compiled_cond'.
6629 (do_action_at_tracepoint): Clear compiled_cond.
6630 (get_trace_state_variable_value, set_trace_state_variable_value):
6631 Export in the IPA.
6632 (condition_true_at_tracepoint): If there's a compiled condition,
6633 run that.
6634 (current_insn_ptr, emit_error): New globals.
6635 (struct bytecode_address): New.
6636 (get_raw_reg_func_addr): New.
6637 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6638 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6639 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6640 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6641 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6642 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6643 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6644 (compile_tracepoint_condition, compile_bytecodes): New.
6645 * target.h (emit_ops): Forward declare.
6646 (struct target_ops): New field emit_ops.
6647 (target_emit_ops): New.
6648 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6649 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6650 * linux-low.c (linux_emit_ops): New.
6651 (linux_target_ops): Install it.
6652 * linux-low.h (struct linux_target_ops): New field emit_ops.
6653
6654 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6655
6656 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6657 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6658
6659 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6660 Stan Shebs <stan@codesourcery.com>
6661
6662 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6663 (all): Depend on $(extra_libraries).
6664 (install-only): Install the IPA.
6665 (IPA_OBJS, IPA_LIB): New.
6666 (clean): Remove the IPA lib.
6667 (IPAGENT_CFLAGS): New.
6668 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6669 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6670 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6671 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6672 * configure.ac: Check for atomic builtins support in the compiler.
6673 (IPA_DEPFILES, extra_libraries): Define.
6674 * configure.srv (ipa_obj): Add description.
6675 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6676 (i[34567]86-*-linux*): Set ipa_obj.
6677 (x86_64-*-linux*): Set ipa_obj.
6678 * linux-low.c (stabilizing_threads): New.
6679 (supports_fast_tracepoints): New.
6680 (linux_detach): Stabilize threads before detaching.
6681 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6682 the lwp is either not stabilizing, or is moving out of a jump pad.
6683 (linux_fast_tracepoint_collecting): New.
6684 (maybe_move_out_of_jump_pad): New.
6685 (enqueue_one_deferred_signal): New.
6686 (dequeue_one_deferred_signal): New.
6687 (linux_wait_for_event_1): If moving out of a jump pad, defer
6688 pending signals to later.
6689 (linux_stabilize_threads): New.
6690 (linux_wait_1): Check if threads need moving out of jump pads, and
6691 do it if so.
6692 (stuck_in_jump_pad_callback): New.
6693 (move_out_of_jump_pad_callback): New.
6694 (lwp_running): New.
6695 (linux_resume_one_lwp): Handle moving out of jump pads.
6696 (linux_set_resume_request): Dequeue deferred signals.
6697 (need_step_over_p): Also step over fast tracepoint jumps.
6698 (start_step_over): Also uninsert fast tracepoint jumps.
6699 (finish_step_over): Also reinsert fast tracepoint jumps.
6700 (linux_install_fast_tracepoint_jump): New.
6701 (linux_target_ops): Install linux_stabilize_threads and
6702 linux_install_fast_tracepoint_jump_pad.
6703 * linux-low.h (linux_target_ops) <get_thread_area,
6704 install_fast_tracepoint_jump_pad>: New fields.
6705 (struct lwp_info) <collecting_fast_tracepoint,
6706 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6707 (linux_get_thread_area): Declare.
6708 * linux-x86-low.c (jump_insn): New.
6709 (x86_get_thread_area): New.
6710 (append_insns): New.
6711 (push_opcode): New.
6712 (amd64_install_fast_tracepoint_jump_pad): New.
6713 (i386_install_fast_tracepoint_jump_pad): New.
6714 (x86_install_fast_tracepoint_jump_pad): New.
6715 (the_low_target): Install x86_get_thread_area and
6716 x86_install_fast_tracepoint_jump_pad.
6717 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6718 (struct fast_tracepoint_jump): New.
6719 (fast_tracepoint_jump_insn): New.
6720 (fast_tracepoint_jump_shadow): New.
6721 (find_fast_tracepoint_jump_at): New.
6722 (fast_tracepoint_jump_here): New.
6723 (delete_fast_tracepoint_jump): New.
6724 (set_fast_tracepoint_jump): New.
6725 (uninsert_fast_tracepoint_jumps_at): New.
6726 (reinsert_fast_tracepoint_jumps_at): New.
6727 (set_breakpoint_at): Use write_inferior_memory.
6728 (uninsert_raw_breakpoint): Use write_inferior_memory.
6729 (check_mem_read): Mask out fast tracepoint jumps.
6730 (check_mem_write): Mask out fast tracepoint jumps.
6731 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6732 (set_fast_tracepoint_jump): Declare.
6733 (delete_fast_tracepoint_jump)
6734 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6735 (reinsert_fast_tracepoint_jumps_at): Declare.
6736 * regcache.c: Don't compile many functions when building the
6737 in-process agent library.
6738 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6739 the register buffer in the heap.
6740 (free_register_cache): If the register buffer isn't owned by the
6741 regcache, don't free it.
6742 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6743 pre-existing register caches.
6744 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6745 type.
6746 (convert_ascii_to_int): : Constify `from' parameter type.
6747 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6748 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6749 the needed buffer in-place.
6750 (relocate_instruction): New.
6751 * server.c (handle_query) <qSymbols>: If the target supports
6752 tracepoints, give it a chance of looking up symbols. Report
6753 support for fast tracepoints.
6754 (handle_status): Stabilize threads.
6755 (process_serial_event): Adjust.
6756 * server.h (struct fast_tracepoint_jump): Forward declare.
6757 (struct process_info) <fast_tracepoint_jumps>: New field.
6758 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6759 (decode_X_packet, decode_M_packet): Adjust.
6760 (relocate_instruction): Declare.
6761 (in_process_agent_loaded): Declare.
6762 (tracepoint_look_up_symbols): Declare.
6763 (struct fast_tpoint_collect_status): Declare.
6764 (fast_tracepoint_collecting): Declare.
6765 (force_unlock_trace_buffer): Declare.
6766 (handle_tracepoint_bkpts): Declare.
6767 (initialize_low_tracepoint)
6768 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6769 * target.h (struct target_ops) <stabilize_threads,
6770 install_fast_tracepoint_jump_pad>: New fields.
6771 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6772 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6773 [HAVE_STDINT_H]: Include stdint.h.
6774 (trace_debug_1): Rename to ...
6775 (trace_vdebug): ... this.
6776 (trace_debug): Rename to ...
6777 (trace_debug_1): ... this. Add `level' parameter.
6778 (trace_debug): New.
6779 (ATTR_USED, ATTR_NOINLINE): New.
6780 (IP_AGENT_EXPORT): New.
6781 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6782 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6783 (about_to_request_buffer_space, trace_buffer_is_full)
6784 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6785 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6786 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6787 (traceframe_write_count, traceframes_created)
6788 (trace_state_variables)
6789 New renaming defines.
6790 (struct ipa_sym_addresses): New.
6791 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6792 (symbol_list): New.
6793 (ipa_sym_addrs): New.
6794 (all_tracepoint_symbols_looked_up): New.
6795 (in_process_agent_loaded): New.
6796 (write_e_ipa_not_loaded): New.
6797 (maybe_write_ipa_not_loaded): New.
6798 (tracepoint_look_up_symbols): New.
6799 (debug_threads) [IN_PROCESS_AGENT]: New.
6800 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6801 (UNKNOWN_SIDE_EFFECTS): New.
6802 (stop_tracing): New.
6803 (flush_trace_buffer): New.
6804 (stop_tracing_bkpt): New.
6805 (flush_trace_buffer_bkpt): New.
6806 (read_inferior_integer): New.
6807 (read_inferior_uinteger): New.
6808 (read_inferior_data_pointer): New.
6809 (write_inferior_data_pointer): New.
6810 (write_inferior_integer): New.
6811 (write_inferior_uinteger): New.
6812 (struct collect_static_trace_data_action): Delete.
6813 (enum tracepoint_type): New.
6814 (struct tracepoint) <type>: New field `type'.
6815 <actions_str, step_actions, step_actions_str>: Only include in
6816 GDBserver.
6817 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6818 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6819 (tracepoints): Use IP_AGENT_EXPORT.
6820 (last_tracepoint): Don't include in the IPA.
6821 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6822 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6823 (alloced_trace_state_variables): New.
6824 (trace_state_variables): Use IP_AGENT_EXPORT.
6825 (traceframe_t): Delete unused variable.
6826 (circular_trace_buffer): Don't include in the IPA.
6827 (trace_buffer_start): Delete.
6828 (struct trace_buffer_control): New.
6829 (trace_buffer_free): Delete.
6830 (struct ipa_trace_buffer_control): New.
6831 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6832 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6833 New.
6834 (trace_buffer_ctrl): New.
6835 (TRACE_BUFFER_CTRL_CURR): New.
6836 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6837 Reimplement as macros.
6838 (trace_buffer_wrap): Delete.
6839 (traceframe_write_count, traceframe_read_count)
6840 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6841 (struct tracepoint_hit_ctx) <type>: New field.
6842 (struct fast_tracepoint_ctx): New.
6843 (memory_barrier): New.
6844 (cmpxchg): New.
6845 (record_tracepoint_error): Update atomically in the IPA.
6846 (clear_inferior_trace_buffer): New.
6847 (about_to_request_buffer_space): New.
6848 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6849 updating the same buffer.
6850 (add_tracepoint): Default the tracepoint's type to trap
6851 tracepoint, and orig_size to -1.
6852 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6853 internal variables.
6854 (create_trace_state_variable): New parameter `gdb'. Handle it.
6855 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6856 (cmd_qtdp): Handle fast tracepoints.
6857 (cmd_qtdv): Adjust.
6858 (max_jump_pad_size): New.
6859 (gdb_jump_pad_head): New.
6860 (get_jump_space_head): New.
6861 (claim_jump_space): New.
6862 (sort_tracepoints): New.
6863 (MAX_JUMP_SIZE): New.
6864 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6865 IPA.
6866 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6867 support. Upload fast traceframes, and delete internal IPA
6868 breakpoints.
6869 (stop_tracing_handler): New.
6870 (flush_trace_buffer_handler): New.
6871 (cmd_qtstop): Upload fast tracepoints.
6872 (response_tracepoint): Handle fast tracepoints.
6873 (tracepoint_finished_step): Upload fast traceframes. Set the
6874 tracepoint hit context's tracepoint type.
6875 (handle_tracepoint_bkpts): New.
6876 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6877 type. Add comment about fast tracepoints.
6878 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6879 non-existing action_str field.
6880 (get_context_regcache): Handle fast tracepoints.
6881 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6882 to the regcache.
6883 (fast_tracepoint_from_jump_pad_address): New.
6884 (fast_tracepoint_from_ipa_tpoint_address): New.
6885 (collecting_t): New.
6886 (force_unlock_trace_buffer): New.
6887 (fast_tracepoint_collecting): New.
6888 (collecting): New.
6889 (gdb_collect): New.
6890 (write_inferior_data_ptr): New.
6891 (target_tp_heap): New.
6892 (target_malloc): New.
6893 (download_agent_expr): New.
6894 (UALIGN): New.
6895 (download_tracepoints): New.
6896 (download_trace_state_variables): New.
6897 (upload_fast_traceframes): New.
6898 (IPA_FIRST_TRACEFRAME): New.
6899 (IPA_NEXT_TRACEFRAME_1): New.
6900 (IPA_NEXT_TRACEFRAME): New.
6901 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6902 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6903 (gdb_jump_pad_buffer_end): New.
6904 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6905 (initialize_tracepoint): Adjust.
6906 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6907 buffer. Initialize the low module.
6908 * utils.c (PREFIX, TOOLNAME): New.
6909 (malloc_failure): Use PREFIX.
6910 (error): In the IPA, an error causes an exit.
6911 (fatal, warning): Use PREFIX.
6912 (internal_error): Use TOOLNAME.
6913 (NUMCELLS): Increase to 10.
6914 * configure, config.in: Regenerate.
6915
6916 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6917
6918 * server.c (handle_query) <qSupported>: Do two passes over the
6919 qSupported string to avoid nesting strtok.
6920
6921 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6922
6923 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6924 (CDEPS): New.
6925 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6926 -Wl,--dynamic-list.
6927 * configure: Regenerate.
6928 * proc-service.list: New.
6929
6930 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6931
6932 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6933 New comment.
6934
6935 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6936
6937 * gdbreplay.c (remote_open): Check error return from socket() call by
6938 its equality to -1 not by it being negative.
6939 * remote-utils.c (remote_open): Likewise.
6940
6941 2010-05-23 Pedro Alves <pedro@codesourcery.com>
6942
6943 * config.h: Regenerate.
6944
6945 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6946
6947 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6948 doesn't provide PTRACE_GET_THREAD_AREA.
6949
6950 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6951
6952 * linux-m68k-low.c: Include <asm/ptrace.h>
6953 (ps_get_thread_area): Implement.
6954
6955 2010-05-03 Doug Evans <dje@google.com>
6956
6957 * event-loop.c (struct callback_event): New struct.
6958 (callback_list): New global.
6959 (append_callback_event, delete_callback_event): New functions.
6960 (process_callback): New function.
6961 (start_event_loop): Call it.
6962 * remote-utils.c (NOT_SCHEDULED): Define.
6963 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6964 moved out of readchar.
6965 (readchar): Rewrite. Call reschedule before returning.
6966 (reset_readchar): New function.
6967 (remote_close): Call it.
6968 (process_remaining, reschedule): New functions.
6969 * server.h (callback_handler_func): New typedef.
6970 (append_callback_event, delete_callback_event): Declare.
6971
6972 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6973
6974 * proc-service.c (ps_pglobal_lookup): Use
6975 thread_db_look_up_one_symbol.
6976 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6977 parameter. Use it instead of all_symbols_looked_up.
6978 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6979 field.
6980 (all_symbols_looked_up): Don't declare.
6981 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6982 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6983 field.
6984 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6985 Set all_symbols_looked_up here.
6986 (thread_db_look_up_one_symbol): New.
6987 (thread_db_get_tls_address): Adjust.
6988 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6989 thread_db object on the heap, and tentatively set it in the
6990 process structure.
6991 (thread_db_init): Don't set all_symbols_looked_up here.
6992 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6993
6994 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6995
6996 * linux-low.c (linux_kill, linux_detach): Adjust.
6997 (status_pending_p_callback): Remove redundant statement. Check
6998 for !TARGET_WAITIKIND_IGNORE, instead of
6999 TARGET_WAITKIND_STOPPED.
7000 (handle_tracepoints): Make sure LWP is locked. Adjust.
7001 (linux_wait_for_event_1): Adjust.
7002 (linux_cancel_breakpoints): New.
7003 (unsuspend_one_lwp): New.
7004 (unsuspend_all_lwps): New.
7005 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7006 (send_sigstop_callback): Change return type to int, add new
7007 `except' parameter and handle it.
7008 (suspend_and_send_sigstop_callback): New.
7009 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7010 pass them down. If SUSPEND, also increment the lwp's suspend
7011 count.
7012 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7013 (need_step_over_p): Don't consider suspended LWPs.
7014 (start_step_over): Adjust.
7015 (proceed_one_lwp): Change return type to int, add new `except'
7016 parameter and handle it.
7017 (unsuspend_and_proceed_one_lwp): New.
7018 (proceed_all_lwps): Use find_inferior instead of
7019 for_each_inferior.
7020 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7021 also decrement the suspend count of LWPs. Pass `except' down,
7022 instead of hacking its suspend count.
7023 (linux_pause_all): Add `freeze' parameter. Adjust.
7024 (linux_unpause_all): New.
7025 (linux_target_ops): Install linux_unpause_all.
7026 * server.c (handle_status): Adjust.
7027 * target.h (struct target_ops): New fields `unpause_all' and
7028 `cancel_breakpoints'. Add new parameter to `pause_all'.
7029 (pause_all): Add new `freeze' parameter.
7030 (unpause_all): New.
7031 (cancel_breakpoints): New.
7032 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7033 cancel breakpoints.
7034 (cmd_qtstart): Pause threads.
7035 (stop_tracing): Pause threads, and cancel breakpoints.
7036 * win32-low.c (win32_target_ops): Adjust.
7037
7038 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7039
7040 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7041 the inferior right away from here...
7042 (linux_wait_1): ... to here, and adjust to check the thread's
7043 last_resume_kind instead of the lwp's step or stop_expected flags.
7044
7045 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7046
7047 * README: Use consistent `GDB' and `GDBserver' spellings.
7048
7049 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7050
7051 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7052 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7053 (linux_detach_one_lwp): Assume the lwp is stopped.
7054 (any_thread_of): Delete.
7055 (linux_detach): Stop all lwps here. Don't blindly delete all
7056 breakpoints.
7057 (delete_lwp_callback): New.
7058 (linux_mourn): Delete all lwps of the process that is gone.
7059 (linux_wait_1): Don't delete the last lwp of the process here.
7060 * mem-break.h (mark_breakpoints_out): Declare.
7061 * mem-break.c (mark_breakpoints_out): New.
7062 (free_all_breakpoints): Use it.
7063 * server.c (handle_target_event): If the process is gone, mark
7064 breakpoints out.
7065 * thread-db.c (struct thread_db) <create_bp>: New field.
7066 (thread_db_enable_reporting): Fix prototype. Store a thread event
7067 breakpoint reference in the thread_db struct.
7068 (thread_db_load_search): Clear the thread_db object.
7069 (try_thread_db_load_1): Ditto.
7070 (switch_to_process): New.
7071 (disable_thread_event_reporting): Use it.
7072 (remove_thread_event_breakpoints): New.
7073 (thread_db_detach, thread_db_mourn): Use it.
7074
7075 2010-05-01 Pedro Alves <pedro@codesourcery.com>
7076
7077 * linux-low.c (linux_enable_event_reporting): New.
7078 (linux_wait_for_event_1, handle_extended_wait): Use it.
7079
7080 2010-04-30 Pedro Alves <pedro@codesourcery.com>
7081
7082 * linux-low.c (linux_kill_one_lwp, linux_kill)
7083 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7084 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7085 SIGSTOP even if the LWP is stopped.
7086 (send_sigstop_callback): New.
7087 (stop_all_lwps): Use send_sigstop_callback instead.
7088 (linux_resume_one_thread): Adjust.
7089 (proceed_one_lwp): Still proceed an LWP that the client has
7090 requested to stop, if we haven't reported it as stopped yet. Make
7091 sure that LWPs the client want stopped, have a pending SIGSTOP.
7092
7093 2010-04-26 Doug Evans <dje@google.com>
7094
7095 * server.c (handle_general_set): Make static.
7096
7097 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7098 Print received char after testing for error/eof instead of before.
7099 (input_interrupt): Tweak comment.
7100
7101 2010-04-23 Doug Evans <dje@google.com>
7102
7103 * server.c (start_inferior): Print inferior argv if --debug.
7104
7105 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7106
7107 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7108 * nto-x86-low.c: Include server.h
7109
7110 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7111
7112 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7113 be consistent with other sources of this directory.
7114 (init_registers_amd64): Correct name of source file of this function
7115 in the comment.
7116
7117 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7118
7119 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7120 64-bit executables.
7121
7122 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7123
7124 * win32-i386-low.c: Add 64-bit support.
7125 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7126 (init_registers_amd64): Declare.
7127 (mappings): Add 64-bit version of array.
7128 (init_windows_x86): New function.
7129 (the_low_target): Change init_arch field to init_windows_x86.
7130
7131 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7132
7133 * win32-low.c: Adapt to support also 64-bit architecture.
7134 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7135 (get_image_name): Use SIZE_T type for local variable `done'.
7136 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7137 (toolhelp_get_dll_name): Idem.
7138 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7139 Use uintptr_t typecast to avoid warning.
7140 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7141 (handle_exception): Use phex_nz to avoid warning.
7142 (win32_wait): Remove unused local variable `process'.
7143
7144 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7145
7146 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7147 `amd64-avx.o'.
7148
7149 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7150
7151 * configure.ac: Use `ws2_32' library for srv_mingw.
7152 * configure: Regenerate.
7153 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7154 * remote-utils.c: Likewise.
7155
7156 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7157
7158 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7159 if __x86_64__ is defined.
7160
7161 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7162
7163 * configure: Regenerate.
7164
7165 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7166
7167 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7168 * target.h (target_ops): New get_tib_address field.
7169 * win32-low.h (win32_thread_info): Add thread_local_base field.
7170 * win32-low.c (child_add_thread): Add tlb argument.
7171 Set thread_local_base field to TLB.
7172 (get_child_debug_event): Adapt to child_add_thread change.
7173 (win32_get_tib_address): New function.
7174 (win32_target_ops): Set get_tib_address field to
7175 win32_get_tib_address.
7176 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7177
7178 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7179
7180 * linux-low.c (linux_mourn): Also remove the process.
7181 * server.c (handle_target_event): Don't remove the process here.
7182 * nto-low.c (nto_mourn): New.
7183 (nto_target_ops): Install it.
7184 * spu-low.c (spu_mourn): New.
7185 (spu_target_ops): Install it.
7186 * win32-low.c (win32_mourn): New.
7187 (win32_target_ops): Install it.
7188
7189 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7190
7191 * server.h (buffer_xml_printf): Remove redundant `;'.
7192
7193 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7194
7195 * regcache.c (set_register_cache): Invalidate regcaches before
7196 changing the register cache layout.
7197 (regcache_invalidate_one): Allow a NULL regcache.
7198 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7199 regcaches before changing the register cache layout or the target
7200 regsets.
7201
7202 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7203
7204 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7205 variable warning on Linux/x86-64.
7206
7207 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7208
7209 GDBserver disconnected tracing support.
7210
7211 * linux-low.c (linux_remove_process): Delete.
7212 (add_lwp): Don't set last_resume_kind here.
7213 (linux_kill): Use `mourn'.
7214 (linux_detach): Use `thread_db_detach', and `mourn'.
7215 (linux_mourn): New.
7216 (linux_attach_lwp_1): Adjust comment.
7217 (linux_attach): last_resume_kind moved the thread_info; adjust.
7218 (status_pending_p_callback): Adjust.
7219 (linux_wait_for_event_1): Adjust.
7220 (count_events_callback, select_singlestep_lwp_callback)
7221 (select_event_lwp_callback, cancel_breakpoints_callback)
7222 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7223 (proceed_one_lwp): Adjust.
7224 (linux_async): Add debug output.
7225 (linux_thread_stopped): New.
7226 (linux_pause_all): New.
7227 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7228 linux_pause_all.
7229 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7230 (thread_db_free): Delete declaration.
7231 (thread_db_detach, thread_db_mourn): Declare.
7232 * thread-db.c (thread_db_init): Use thread_db_mourn.
7233 (thread_db_free): Delete, split in two.
7234 (disable_thread_event_reporting): New.
7235 (thread_db_detach): New.
7236 (thread_db_mourn): New.
7237
7238 * server.h (struct thread_info) <last_resume_kind>: New field.
7239 <attached>: Add comment.
7240 <gdb_detached>: New field.
7241 (handler_func): Change return type to int.
7242 (handle_serial_event, handle_target_event): Ditto.
7243 (gdb_connected): Declare.
7244 (tracing): Delete.
7245 (disconnected_tracing): Declare.
7246 (stop_tracing): Declare.
7247
7248 * server.c (handle_query) <qSupported>: Report support for
7249 disconnected tracing.
7250 (queue_stop_reply_callback): Account for running threads.
7251 (gdb_wants_thread_stopped): New.
7252 (gdb_wants_all_threads_stopped): New.
7253 (gdb_reattached_process): New.
7254 (handle_status): Clear the `gdb_detached' flag of all processes.
7255 In all-stop, stop all threads.
7256 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7257 (process_serial_event): If the remote connection breaks, or if an
7258 exit was forced with "monitor exit", force an event loop exit.
7259 Handle disconnected tracing on detach.
7260 (handle_serial_event): Adjust.
7261 (handle_target_event): If GDB isn't connected, forward events back
7262 to the inferior, unless the last process exited, in which case,
7263 exit gdbserver. Adjust interface.
7264
7265 * remote-utils.c (remote_open): Don't block in accept. Instead
7266 register an event loop source on the listen socket file
7267 descriptor. Refactor bits into ...
7268 (listen_desc): ... this new global.
7269 (gdb_connected): ... this new function.
7270 (enable_async_notification): ... this new function.
7271 (handle_accept_event): ... this new function.
7272 (remote_close): Clear remote_desc.
7273
7274 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7275
7276 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7277 New fields.
7278 (mourn_inferior): Define.
7279 (target_process_qsupported): Avoid the dangling else problem.
7280 (thread_stopped): Define.
7281 (pause_all): Define.
7282 (target_waitstatus_to_string): Declare.
7283 * target.c (target_waitstatus_to_string): New.
7284
7285 * tracepoint.c (tracing): Make extern.
7286 (disconnected_tracing): New.
7287 (stop_tracing): Make extern. Handle tracing stops due to GDB
7288 disconnecting.
7289 (cmd_qtdisconnected): New.
7290 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7291 (handle_tracepoint_general_set): Handle QTDisconnected.
7292
7293 * event-loop.c (event_handler_func): Change return type to int.
7294 (process_event): Bail out if the event handler wants the event
7295 loop to stop.
7296 (handle_file_event): Ditto.
7297 (start_event_loop): Bail out if the event handler wants the event
7298 loop to stop.
7299
7300 * nto-low.c (nto_target_ops): Adjust.
7301 * spu-low.c (spu_wait): Don't remove the process here.
7302 (spu_target_ops): Adjust.
7303 * win32-low.c (win32_wait): Don't remove the process here.
7304 (win32_target_ops): Adjust.
7305
7306 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7307
7308 * regcache.c (realloc_register_cache): Invalidate inferior's
7309 regcache before recreating it.
7310
7311 2010-04-09 Pedro Alves <pedro@codesourcery.com>
7312
7313 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7314
7315 2010-04-09 Stan Shebs <stan@codesourcery.com>
7316 Pedro Alves <pedro@codesourcery.com>
7317
7318 * server.h (LONGEST): New.
7319 (struct thread_info) <while_stepping>: New field.
7320 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7321 Declare.
7322 (initialize_tracepoint, handle_tracepoint_general_set)
7323 (handle_tracepoint_query, tracepoint_finished_step)
7324 (tracepoint_was_hit, release_while_stepping_state_list):
7325 (current_traceframe): Declare.
7326 * server.c (handle_general_set): Handle tracepoint packets.
7327 (read_memory): New.
7328 (write_memory): New.
7329 (handle_search_memory_1): Use read_memory.
7330 (handle_query): Report support for conditional tracepoints, trace
7331 state variables, and tracepoint sources. Handle tracepoint
7332 queries.
7333 (main): Initialize the tracepoints module.
7334 (process_serial_event): Handle traceframe reads/writes.
7335
7336 * linux-low.c (handle_tracepoints): New.
7337 (linux_wait_1): Call it.
7338 (linux_resume_one_lwp): Handle while-stepping.
7339 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7340 (linux_target_ops): Install them.
7341 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7342 New field.
7343 * linux-x86-low.c (x86_supports_tracepoints): New.
7344 (the_low_target). Install it.
7345
7346 * mem-break.h (delete_breakpoint): Declare.
7347 * mem-break.c (delete_breakpoint): Make external.
7348
7349 * target.h (struct target_ops): Add `supports_tracepoints',
7350 `read_pc', and `write_pc' fields.
7351 (target_supports_tracepoints): Define.
7352 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7353 (phex_nz): New.
7354
7355 * regcache.h (struct regcache) <registers_owned>: New field.
7356 (init_register_cache, regcache_cpy): Declare.
7357 (regcache_read_pc, regcache_write_pc): Declare.
7358 (register_cache_size): Declare.
7359 (supply_regblock): Declare.
7360 * regcache.c (init_register_cache): New.
7361 (new_register_cache): Use it.
7362 (regcache_cpy): New.
7363 (register_cache_size): New.
7364 (supply_regblock): New.
7365 (regcache_read_pc, regcache_write_pc): New.
7366
7367 * tracepoint.c: New.
7368
7369 * Makefile.in (OBS): Add tracepoint.o.
7370 (tracepoint.o): New rule.
7371
7372 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7373
7374 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7375 (i386-mmx.o): New.
7376 (i386-mmx.c): Likewise.
7377 (i386-mmx-linux.o): Likewise.
7378 (i386-mmx-linux.c): Likewise.
7379
7380 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7381 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7382 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7383 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7384
7385 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7386 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7387 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7388
7389 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7390
7391 * Makefile.in (clean): Updated.
7392 (i386-avx.o): New.
7393 (i386-avx.c): Likewise.
7394 (i386-avx-linux.o): Likewise.
7395 (i386-avx-linux.c): Likewise.
7396 (amd64-avx.o): Likewise.
7397 (amd64-avx.c): Likewise.
7398 (amd64-avx-linux.o): Likewise.
7399 (amd64-avx-linux.c): Likewise.
7400
7401 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7402 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7403 (srv_amd64_regobj): Add amd64-avx.o.
7404 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7405 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7406 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7407 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7408 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7409 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7410 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7411
7412 * i387-fp.c: Include "i386-xstate.h".
7413 (i387_xsave): New.
7414 (i387_cache_to_xsave): Likewise.
7415 (i387_xsave_to_cache): Likewise.
7416 (x86_xcr0): Likewise.
7417
7418 * i387-fp.h (i387_cache_to_xsave): Likewise.
7419 (i387_xsave_to_cache): Likewise.
7420 (x86_xcr0): Likewise.
7421
7422 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7423 * linux-crisv32-low.c (target_regsets): Likewise.
7424 * linux-m68k-low.c (target_regsets): Likewise.
7425 * linux-mips-low.c (target_regsets): Likewise.
7426 * linux-ppc-low.c (target_regsets): Likewise.
7427 * linux-s390-low.c (target_regsets): Likewise.
7428 * linux-sh-low.c (target_regsets): Likewise.
7429 * linux-sparc-low.c (target_regsets): Likewise.
7430 * linux-xtensa-low.c (target_regsets): Likewise.
7431
7432 * linux-low.c: Include <sys/uio.h>.
7433 (regsets_fetch_inferior_registers): Support nt_type.
7434 (regsets_store_inferior_registers): Likewise.
7435 (linux_process_qsupported): New.
7436 (linux_target_ops): Add linux_process_qsupported.
7437
7438 * linux-low.h (regset_info): Add nt_type.
7439 (linux_target_ops): Add process_qsupported.
7440
7441 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7442 and <sys/uio.h>.
7443 (init_registers_i386_avx_linux): New.
7444 (init_registers_amd64_avx_linux): Likewise.
7445 (xmltarget_i386_linux_no_xml): Likewise.
7446 (xmltarget_amd64_linux_no_xml): Likewise.
7447 (PTRACE_GETREGSET): Likewise.
7448 (PTRACE_SETREGSET): Likewise.
7449 (x86_fill_xstateregset): Likewise.
7450 (x86_store_xstateregset): Likewise.
7451 (use_xml): Likewise.
7452 (x86_linux_update_xmltarget): Likewise.
7453 (x86_linux_process_qsupported): Likewise.
7454 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7455 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7456 init_registers_i386_linux here. Call
7457 x86_linux_update_xmltarget.
7458 (the_low_target): Add x86_linux_process_qsupported.
7459
7460 * server.c (handle_query): Call target_process_qsupported.
7461
7462 * target.h (target_ops): Add process_qsupported.
7463 (target_process_qsupported): New.
7464
7465 2010-04-03 Pedro Alves <pedro@codesourcery.com>
7466
7467 * inferiors.c (add_thread): Set last_status kind to
7468 TARGET_WAITKIND_IGNORE.
7469 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7470 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7471 (linux_wait_1): Move `thread' local definition to block that uses
7472 it. Don't NULL initialize `event_child'.
7473 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7474 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7475 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7476
7477 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7478
7479 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7480 an extended waitstatus, or by a watchpoint.
7481 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7482 thread was stepping or has been stopped by a watchpoint.
7483
7484 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7485
7486 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7487 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7488 of another, then delete the previous, and validate all
7489 breakpoints.
7490 (validate_inserted_breakpoint): New.
7491 (delete_disabled_breakpoints): New.
7492 (validate_breakpoints): New.
7493 (check_mem_read): Validate breakpoints before trusting their
7494 shadow. Delete disabled breakpoints.
7495 (check_mem_write): Validate breakpoints before trusting they
7496 should be inserted. Delete disabled breakpoints.
7497 * mem-break.h (validate_breakpoints):
7498 * server.c (handle_query): Validate breakpoints when we see a
7499 qSymbol query.
7500
7501 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7502
7503 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7504 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7505 if we could tell there's a GDB breakpoint at stop_pc.
7506 (need_step_over_p): Don't do a step over if we find a GDB
7507 breakpoint at the resume PC.
7508
7509 * mem-break.c (struct raw_breakpoint): New.
7510 (enum bkpt_type): New type `gdb_breakpoint'.
7511 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7512 fields. New field `raw'.
7513 (find_raw_breakpoint_at): New.
7514 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7515 breakpoint instead.
7516 (set_breakpoint_at): Adjust.
7517 (delete_raw_breakpoint): New.
7518 (release_breakpoint): New.
7519 (delete_breakpoint): Rename to...
7520 (delete_breakpoint_1): ... this. Add proc parameter. Use
7521 release_breakpoint. Return ENOENT.
7522 (delete_breakpoint): Reimplement.
7523 (find_breakpoint_at): Delete.
7524 (find_gdb_breakpoint_at): New.
7525 (delete_breakpoint_at): Delete.
7526 (set_gdb_breakpoint_at): New.
7527 (delete_gdb_breakpoint_at): New.
7528 (gdb_breakpoint_here): New.
7529 (set_reinsert_breakpoint): Use release_breakpoint.
7530 (uninsert_breakpoint): Rename to ...
7531 (uninsert_raw_breakpoint): ... this.
7532 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7533 (reinsert_raw_breakpoint): Change parameter type to
7534 raw_breakpoint.
7535 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7536 instead.
7537 (check_breakpoints): Adjust. Use release_breakpoint.
7538 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7539 (breakpoint_inserted_here): Ditto.
7540 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7541 Don't trust the breakpoint's shadow if it is not inserted.
7542 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7543 (delete_all_breakpoints): Adjust.
7544 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7545 use delete_breakpoint_1.
7546
7547 * mem-break.h (breakpoints_supported): Delete declaration.
7548 (set_gdb_breakpoint_at): Declare.
7549 (gdb_breakpoint_here): Declare.
7550 (delete_breakpoint_at): Delete.
7551 (delete_gdb_breakpoint_at): Declare.
7552
7553 * server.h (struct raw_breakpoint): Forward declare.
7554 (struct process_info): New field `raw_breakpoints'.
7555
7556 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7557 breakpoints.
7558
7559 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7560
7561 * linux-low.c (status_pending_p_callback): Fix comment.
7562 (linux_wait_for_event_1): Move most of the internal breakpoint
7563 handling from here...
7564 (linux_wait_1): ... to here.
7565 (count_events_callback): New.
7566 (select_singlestep_lwp_callback): New.
7567 (select_event_lwp_callback): New.
7568 (cancel_breakpoints_callback): New.
7569 (select_event_lwp): New.
7570 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7571 priority to all LWPs that have had events that should be reported
7572 to the client. Cancel breakpoints when about to reporting the
7573 event to the client, not while stopping lwps. No longer cancel
7574 finished single-steps here.
7575 (cancel_finished_single_step): Delete.
7576 (cancel_finished_single_steps): Delete.
7577
7578 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7579
7580 * mem-break.c (enum bkpt_type): New.
7581 (struct breakpoint): New field `type'.
7582 (set_breakpoint_at): Change return type to struct breakpoint
7583 pointer. Set type to `other_breakpoint' by default.
7584 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7585 in the breakpoint list.
7586 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7587 (reinsert_breakpoint): Rename to ...
7588 (reinsert_raw_breakpoint): ... this.
7589 (reinsert_breakpoints_at): Adjust.
7590 * mem-break.h (struct breakpoint): Declare.
7591 (set_breakpoint_at): Change return type to struct breakpoint
7592 pointer.
7593
7594 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7595
7596 * server.c (handle_query): Assign, not compare.
7597
7598 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7599
7600 Teach linux gdbserver to step-over-breakpoints.
7601
7602 * linux-low.c (can_hardware_single_step): New.
7603 (supports_breakpoints): New.
7604 (handle_extended_wait): If stopping threads, read the stop pc of
7605 the new cloned LWP.
7606 (get_pc): New.
7607 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7608 low target doesn't support retrieving the PC.
7609 (add_lwp): Set last_resume_kind to resume_continue.
7610 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7611 (linux_attach): Don't clear stop_expected. Set the lwp's
7612 last_resume_kind to resume_stop.
7613 (linux_detach_one_lwp): Don't check for removed breakpoints.
7614 (check_removed_breakpoint): Delete.
7615 (status_pending_p): Rename to ...
7616 (status_pending_p_callback): ... this. Don't check for removed
7617 breakpoints. Don't consider threads that are stopped from GDB's
7618 perspective.
7619 (linux_wait_for_lwp): Always read the stop_pc here.
7620 (cancel_breakpoint): New.
7621 (step_over_bkpt): New global.
7622 (linux_wait_for_event_1): Implement stepping over breakpoints.
7623 (gdb_wants_lwp_stopped): New.
7624 (gdb_wants_all_stopped): New.
7625 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7626 single-step traps here. Store the thread's last reported target
7627 wait status.
7628 (send_sigstop): Don't clear stop_expected. Always set it,
7629 instead.
7630 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7631 (cancel_finished_single_step): New.
7632 (cancel_finished_single_steps): New.
7633 (wait_for_sigstop): Don't cancel finished single-step traps here.
7634 (linux_resume_one_lwp): Don't check for removed breakpoints.
7635 Don't set `step' on non-hardware step archs.
7636 (linux_set_resume_request): Ignore resume_stop requests if already
7637 stopping or stopped. Set the lwp's last_resume_kind.
7638 (resume_status_pending_p): Don't check for removed breakpoints.
7639 (need_step_over_p): New.
7640 (start_step_over): New.
7641 (finish_step_over): New.
7642 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7643 requests. Clear the thread's last reported target waitstatus.
7644 Don't use the `suspended' flag. Don't consider pending breakpoints.
7645 (linux_resume): Start a step-over if necessary.
7646 (proceed_one_lwp): New.
7647 (proceed_all_lwps): New.
7648 (unstop_all_lwps): New.
7649 * linux-low.h (struct lwp_info): Rewrite comment for the
7650 `suspended' flag. Add the `stop_pc' field. Delete the
7651 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7652 Add `'last_resume_kind' and `need_step_over' fields.
7653 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7654 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7655 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7656 (set_raw_breakpoint_at): New.
7657 (set_breakpoint_at): Rewrite to use it.
7658 (reinsert_breakpoint_handler): Delete.
7659 (set_reinsert_breakpoint): New.
7660 (reinsert_breakpoint_by_bp): Delete.
7661 (delete_reinsert_breakpoints): New.
7662 (uninsert_breakpoint): Rewrite.
7663 (uninsert_breakpoints_at): New.
7664 (reinsert_breakpoint): Rewrite.
7665 (reinsert_breakpoints_at): New.
7666 (check_breakpoints): Rewrite.
7667 (breakpoint_here): New.
7668 (breakpoint_inserted_here): New.
7669 (check_mem_read): Adjust.
7670 * mem-break.h (breakpoints_supported, breakpoint_here)
7671 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7672 (reinsert_breakpoint_by_bp): Delete declaration.
7673 (delete_reinsert_breakpoints): Declare.
7674 (reinsert_breakpoint): Delete declaration.
7675 (reinsert_breakpoints_at): Declare.
7676 (uninsert_breakpoint): Delete declaration.
7677 (uninsert_breakpoints_at): Declare.
7678 (check_breakpoints): Adjust prototype.
7679 * server.h: Adjust include order.
7680 (struct thread_info): Declare here. Add a `last_status' field.
7681
7682 2010-03-23 Michael Snyder <msnyder@vmware.com>
7683
7684 * server.c (crc32): New function.
7685 (handle_query): Add handling for 'qCRC:' request.
7686
7687 2010-03-23 Pedro Alves <pedro@codesourcery.com>
7688
7689 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7690 lwp had been stopped by a watchpoint.
7691
7692 2010-03-16 Pedro Alves <pedro@codesourcery.com>
7693
7694 * server.h (internal_error): Declare.
7695 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7696 * utils.c (internal_error): New function.
7697
7698 2010-03-15 Andreas Schwab <schwab@redhat.com>
7699
7700 * configure.srv: Fix typo setting srv_regobj.
7701
7702 2010-03-15 Pedro Alves <pedro@codesourcery.com>
7703
7704 * linux-low.c (fetch_register): Avoid passing a non string literal
7705 format to `error'.
7706 (usr_store_inferior_registers): Ditto.
7707
7708 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7709
7710 * linux-low.c (linux_write_memory): Bail out early if peeking
7711 memory failed.
7712
7713 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7714
7715 * linux-low.h (struct lwp_info): New fields
7716 `stopped_by_watchpoint' and `stopped_data_address'.
7717 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7718 here, and cache them in the lwp object.
7719 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7720 directly.
7721 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7722 field.
7723 (linux_stopped_by_watchpoint): Rewrite.
7724 (linux_stopped_data_address): Rewrite.
7725
7726 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
7727
7728 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7729 switching the current inferior, not before.
7730
7731 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7732
7733 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7734 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7735 i386-linux.c and amd64-linux.c.
7736 (reg-i386.o): Removed.
7737 (reg-i386.c): Likewise.
7738 (reg-i386-linux.o): Likewise.
7739 (reg-i386-linux.c): Likewise.
7740 (reg-x86-64.o): Likewise.
7741 (reg-x86-64.c): Likewise.
7742 (reg-x86-64-linux.o): Likewise.
7743 (reg-x86-64-linux.c): Likewise.
7744 (i386.o): New.
7745 (i386.c): Likewise.
7746 (i386-linux.o): Likewise.
7747 (i386-linux.c): Likewise.
7748 (amd64.o): Likewise.
7749 (amd64.c): Likewise.
7750 (amd64-linux.o): Likewise.
7751 (amd64-linux.c): Likewise.
7752
7753 * configure.srv (srv_i386_regobj): New.
7754 (srv_i386_linux_regobj): Likewise.
7755 (srv_amd64_regobj): Likewise.
7756 (srv_amd64_linux_regobj): Likewise.
7757 (srv_i386_32bit_xmlfiles): Likewise.
7758 (srv_i386_64bit_xmlfiles): Likewise.
7759 (srv_i386_xmlfiles): Likewise.
7760 (srv_amd64_xmlfiles): Likewise.
7761 (srv_i386_linux_xmlfiles): Likewise.
7762 (srv_amd64_linux_xmlfiles): Likewise.
7763 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7764 srv_xmlfiles to $srv_i386_xmlfiles.
7765 (i[34567]86-*-mingw32ce*): Likewise.
7766 (i[34567]86-*-mingw*): Likewise.
7767 (i[34567]86-*-nto*): Likewise.
7768 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7769 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7770 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7771 (x86_64-*-linux*): Likewise.
7772
7773 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7774 (init_registers_amd64_linux): New.
7775 (x86_arch_setup): Replace init_registers_x86_64_linux with
7776 init_registers_amd64_linux.
7777
7778 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7779
7780 * configure.ac: Check for libdl. If it is not available link against
7781 static libthread_db.
7782 * configure: Regenerate.
7783
7784 2010-02-22 Pedro Alves <pedro@codesourcery.com>
7785
7786 PR9605
7787
7788 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7789 handing a read watchpoint.
7790 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7791
7792 2010-02-12 Doug Evans <dje@google.com>
7793
7794 * linux-low.c (linux_supports_tracefork_flag): Document.
7795 (linux_look_up_symbols): Add comment.
7796
7797 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7798
7799 * regcache.c (supply_register): Clear regcache if buf is NULL.
7800
7801 2010-02-02 Nicolas Roche <roche@sourceware.org>
7802 Joel Brobecker <brobecker@adacore.com>
7803
7804 * inferiors.c (find_inferior): Add function documentation.
7805 (unloaded_dll): Handle the case where the unloaded dll has not
7806 been previously registered in the dll list.
7807
7808 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7809
7810 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7811 (thumb2_breakpoint): New.
7812 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7813
7814 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7815
7816 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7817 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7818 breakpoints.
7819
7820 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7821
7822 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7823
7824 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7825
7826 * linux-s390-low.c (s390_collect_ptrace_register)
7827 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7828
7829 2010-01-21 Doug Evans <dje@google.com>
7830
7831 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7832 (PTRACE_ARG4_TYPE): New macro.
7833 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7834 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7835 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7836 (usr_store_inferior_registers): Ditto.
7837 (linux_read_memory, linux_write_memory): Ditto.
7838 (linux_test_for_tracefork): Ditto.
7839
7840 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7841 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7842
7843 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7844
7845 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7846 target.
7847
7848 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7849
7850 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7851 prototype to take a regcache. Adjust.
7852
7853 2010-01-20 Pedro Alves <pedro@codesourcery.com>
7854
7855 * regcache.h (struct thread_info): Forward declare.
7856 (struct regcache): New.
7857 (new_register_cache): Adjust prototype.
7858 (get_thread_regcache): Declare.
7859 (free_register_cache): Adjust prototype.
7860 (registers_to_string, registers_from_string): Ditto.
7861 (supply_register, supply_register_by_name, collect_register)
7862 (collect_register_as_string, collect_register_by_name): Ditto.
7863 * regcache.c (struct inferior_regcache_data): Delete.
7864 (get_regcache): Rename to ...
7865 (get_thread_regcache): ... this. Adjust. Switch inferior before
7866 fetching registers.
7867 (regcache_invalidate_one): Adjust.
7868 (regcache_invalidate): Fix prototype.
7869 (new_register_cache): Return the new register cache.
7870 (free_register_cache): Change prototype.
7871 (realloc_register_cache): Adjust.
7872 (registers_to_string): Change prototype to take a regcache. Adjust.
7873 (registers_from_string): Ditto.
7874 (register_data): Ditto.
7875 (supply_register): Ditto.
7876 (supply_register_by_name): Ditto.
7877 (collect_register): Ditto.
7878 (collect_register_as_string): Ditto.
7879 (collect_register_by_name): Ditto.
7880 * server.c (process_serial_event): Adjust.
7881 * linux-low.h (regset_fill_func, regset_store_func): Change
7882 prototype.
7883 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7884 Change prototype.
7885 * linux-low.c (get_stop_pc): Adjust.
7886 (check_removed_breakpoint): Adjust.
7887 (linux_wait_for_event): Adjust.
7888 (linux_resume_one_lwp): Adjust.
7889 (fetch_register): Add regcache parameter. Adjust.
7890 (usr_store_inferior_registers): Ditto.
7891 (regsets_fetch_inferior_registers): Ditto.
7892 (regsets_store_inferior_registers): Ditto.
7893 (linux_fetch_registers, linux_store_registers): Ditto.
7894 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7895 regcache. Adjust.
7896 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7897 Ditto.
7898 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7899 prototype to take a regcache.
7900 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7901 * remote-utils.c (convert_ascii_to_int, outreg)
7902 (prepare_resume_reply): Change prototype to take a regcache.
7903 Adjust.
7904 * target.h (struct target_ops) <fetch_registers, store_registers>:
7905 Change prototype to take a regcache.
7906 (fetch_inferior_registers, store_inferior_registers): Change
7907 prototype to take a regcache. Adjust.
7908 * proc-service.c (ps_lgetregs): Adjust.
7909 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7910 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7911 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7912 take a regcache. Adjust.
7913 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7914 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7915 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7916 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7917 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7918 (cris_cannot_fetch_register):
7919 (cris_breakpoint_at): Change prototype to take a regcache.
7920 Adjust.
7921 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7922 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7923 to take a regcache. Adjust.
7924 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7925 Adjust.
7926 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7927 take a regcache. Adjust.
7928 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7929 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7930 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7931 * linux-mips-low.c (mips_get_pc):
7932 (mips_set_pc): Change prototype to take a regcache. Adjust.
7933 (mips_reinsert_addr): Adjust.
7934 (mips_collect_register): Change prototype to take a regcache.
7935 Adjust.
7936 (mips_supply_register):
7937 (mips_collect_register_32bit, mips_supply_register_32bit)
7938 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7939 (mips_store_fpregset): Ditto.
7940 * linux-ppc-low.c (ppc_supply_ptrace_register)
7941 (ppc_supply_ptrace_register): Ditto.
7942 (parse_spufs_run): Adjust.
7943 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7944 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7945 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7946 take a regcache. Adjust.
7947 * linux-s390-low.c (s390_collect_ptrace_register)
7948 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7949 (s390_set_pc): Change prototype to take a regcache. Adjust.
7950 (s390_arch_setup): Adjust.
7951 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7952 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7953 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7954 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7955 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7956 regcache. Adjust.
7957 (sparc_breakpoint_at): Adjust.
7958 * linux-xtensa-low.c (xtensa_fill_gregset):
7959 (xtensa_store_gregset):
7960 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7961 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7962 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7963 prototype to take a regcache. Adjust.
7964 * win32-arm-low.c (arm_fetch_inferior_register)
7965 (arm_store_inferior_register): Change prototype to take a
7966 regcache. Adjust.
7967 * win32-i386-low.c (i386_fetch_inferior_register)
7968 (i386_store_inferior_register): Change prototype to take a
7969 regcache. Adjust.
7970 * win32-low.c (child_fetch_inferior_registers)
7971 (child_store_inferior_registers): Change prototype to take a
7972 regcache. Adjust.
7973 (win32_wait): Adjust.
7974 (win32_fetch_inferior_registers): Change prototype to take a
7975 regcache. Adjust.
7976 (win32_store_inferior_registers): Adjust.
7977 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7978 store_inferior_register>: Change prototype to take a regcache.
7979
7980 2010-01-20 Doug Evans <dje@google.com>
7981
7982 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7983 #ifdef.
7984 (linux_wait_for_event1, linux_init_signals): Ditto.
7985 (W_STOPCODE): Provide definition if missing.
7986
7987 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7988
7989 * linux-low.c (linux_core_of_thread): New.
7990 (compare_ints, show_process, list_threads): New.
7991 (linux_qxfer_osdata): Report threads and cores.
7992 (linux_target_op): Register linux_core_of_thread.
7993 * remote-utils.c (prepare_resume_reply): Report the core.
7994 (buffer_xml_printf): Support %d specifier.
7995 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7996 New.
7997 (handle_query): Handle qXfer:threads. Announce availability
7998 thereof.
7999 * target.h (struct target_ops): New field core_of_thread.
8000
8001 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8002
8003 * Makefile.in (clean): Remove new generated files.
8004 (reg-s390.o, reg-s390.c): Remove rules.
8005 (reg-s390x.o, reg-s390x.c): Likewise.
8006 (s390-linux32.o, s390-linux32.c): Add rules.
8007 (s390-linux64.o, s390-linux64.c): Likewise.
8008 (s390x-linux64.o, s390x-linux64.c): Likewise.
8009 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8010 * linux-s390-low.c: Include <elf.h>.
8011 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8012 (init_registers_s390): Remove prototype.
8013 (init_registers_s390x): Likewise.
8014 (init_registers_s390_linux32): Add prototype.
8015 (init_registers_s390_linux64): Likewise.
8016 (init_registers_s390x_linux64): Likewise.
8017 (s390_num_regs_3264): New define.
8018 (s390_regmap_3264): New global variable.
8019 (s390_cannot_fetch_register): Remove obsolete check.
8020 (s390_cannot_store_register): Likewise.
8021 (s390_collect_ptrace_register): Handle upper/lower register halves.
8022 (s390_supply_ptrace_register): Likewise.
8023 (s390_fill_gregset): Update to register number changes.
8024 (s390_get_hwcap): New routine.
8025 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8026 Install appropriate regmap and register set.
8027
8028 2010-01-01 Joel Brobecker <brobecker@adacore.com>
8029
8030 * server.c (gdbserver_version): Update copyright year to 2010.
8031 * gdbreplay.c (gdbreplay_version): Likewise.
8032
8033 2009-12-28 Doug Evans <dje@google.com>
8034
8035 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8036 elf/external.h. Include <elf.h> instead but only if necessary.
8037
8038 2009-12-28 Pedro Alves <pedro@codesourcery.com>
8039
8040 * linux-low.c (linux_remove_process): Remove `detaching'
8041 parameter. Don't release/detach from thread_db here.
8042 (linux_kill): Release/detach from thread_db here, ...
8043 (linux_detach): ... and here, before actually detaching.
8044 (linux_wait_1): ... and here, when a process exits.
8045 * thread-db.c (any_thread_of): New.
8046 (thread_db_free): Switch the current inferior to a thread of the
8047 passed in process.
8048
8049 2009-12-21 Doug Evans <dje@google.com>
8050
8051 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8052
8053 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8054 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8055 warning ifndef __NR_tkill. Move setting of errno there too.
8056 Delete unnecessary resetting of errno after syscall.
8057 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8058
8059 * configure.ac: Check for dladdr.
8060 * config.in: Regenerate.
8061 * configure: Regenerate.
8062 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8063 (try_thread_db_load): Update.
8064
8065 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8066
8067 2009-12-18 Doug Evans <dje@google.com>
8068
8069 * event-loop.c: Include unistd.h if it exists.
8070
8071 * linux-low.c (my_waitpid): Move definition away from being in
8072 between linux_tracefork_child/linux_test_for_tracefork.
8073
8074 * gdb_proc_service.h (psaddr_t): Fix type.
8075 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8076 signature to match glibc.
8077
8078 2009-12-16 Doug Evans <dje@google.com>
8079
8080 * linux-low.c (linux_read_memory): Fix argument to read.
8081
8082 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8083
8084 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8085 events, don't leave current_inferior pointing at null.
8086
8087 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8088
8089 * win32-low.c (LOG): Delete.
8090 (OUTMSG): Output to stderr.
8091 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8092 on compile time LOG macro.
8093 (win32_wait): Fix debug output.
8094
8095 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8096
8097 * win32-low.c (win32_add_one_solib): If the dll name is
8098 "ntdll.dll", prepend the system directory to the dll path.
8099
8100 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8101
8102 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8103
8104 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
8105 Vladimir Prus <vladimir@codesourcery.com>
8106
8107 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8108 * configure.ac: Check for __mcoldfire__ and set
8109 gdb_cv_m68k_is_coldfire.
8110 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8111 reg-cf.o and reg-m68k.o.
8112 * configure: Regenerated.
8113
8114 2009-11-16 Pedro Alves <pedro@codesourcery.com>
8115
8116 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8117 Pass it to thread_db_free.
8118 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8119 proper `detaching' argument to linux_remove_process.
8120 * linux-low.h (thread_db_free): Add `detaching' parameter.
8121 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8122 to thread_db_free.
8123 (thread_db_free): Add `detaching' parameter. Only
8124 call td_ta_clear_event if detaching from process.
8125
8126 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8127
8128 * thread-db.c (thread_db_free): Fix typo.
8129
8130 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8131
8132 PR gdb/10838
8133 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8134
8135 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8136
8137 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8138 with an i686 compiler.
8139 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8140 needed.
8141 * configure: Rebuilt.
8142
8143 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8144
8145 PR gdb/10783
8146
8147 * server.c (handle_search_memory_1): Correct read_addr initialization
8148 in loop for searching subsequent chunks.
8149
8150 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8151
8152 * configure.ac: New --with-libthread-db option.
8153 * thread-db.c: Allow direct dependence on libthread_db.
8154 (thread_db_free): Adjust.
8155 * config.in: Regenerate.
8156 * configure: Likewise.
8157
8158 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8159
8160 PR gdb/10757
8161 * thread-db.c (attach_thread): New function.
8162 (maybe_attach_thread): Return success/failure.
8163 (find_new_threads_callback): Adjust.
8164 (thread_db_find_new_threads): Loop until no new threads.
8165
8166 2009-10-13 Pedro Alves <pedro@codesourcery.com>
8167
8168 * proc-service.c (ps_lgetregs): Formatting.
8169
8170 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8171
8172 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8173 * configure.ac: Adjust.
8174 * linux-low.h (struct process_info_private): Move members to struct
8175 thread_db.
8176 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8177 * linux-low.c (linux_remove_process): Adjust.
8178 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8179 * server.c (handle_query): Move code ...
8180 (handle_monitor_command): ... here. New function.
8181 * target.h (struct target_ops): New member.
8182 * thread-db.c (struct thread_db): New.
8183 (libthread_db_search_path): New variable.
8184 (thread_db_create_event, thread_db_enable_reporting)
8185 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8186 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8187 (try_thread_db_load_1, dladdr_to_soname): New functions.
8188 (try_thread_db_load, thread_db_load_search): New functions.
8189 (thread_db_init): Search for libthread_db.
8190 (thread_db_free): New function.
8191 (thread_db_handle_monitor_command): Likewise.
8192 * config.in: Regenerate.
8193 * configure: Regenerate.
8194
8195 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8196
8197 * spu-low.c (spu_kill): Wait for inferior to terminate.
8198 Call clear_inferiors.
8199 (spu_detach): Call clear_inferiors.
8200
8201 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8202
8203 * aclocal.m4: Regenerate.
8204 * config.in: Likewise.
8205 * configure: Likewise.
8206
8207 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8208
8209 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8210 (parse_spufs_run): New function.
8211 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8212 (ppc_breakpoint_at): Handle SPU breakpoints.
8213
8214 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8215
8216 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8217 (SPUFS_MAGIC): Define.
8218 (spu_enumerate_spu_ids): New function.
8219 (linux_qxfer_spu): New function.
8220 (linux_target_ops): Install linux_qxfer_spu.
8221
8222 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8223
8224 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8225 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8226 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8227 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8228 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8229 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8230 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8231 (init_registers_powerpc_cell32l): Add prototype.
8232 (init_registers_powerpc_cell64l): Likewise.
8233 (ppc_arch_setup): Detect Cell/B.E. architecture.
8234
8235 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8236
8237 * Makefile.in (datarootdir): New variable.
8238
8239 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8240
8241 * linux-low.c (linux_write_memory): Update debugging output.
8242 * Makefile.in (clean): Add new descriptions.
8243 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8244 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8245 * configure.srv: Add new files for arm*-*-linux*.
8246 * linux-arm-low.c: Add new declarations.
8247 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8248 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8249 (HWCAP_VFPv3D16): New.
8250 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8251 instead of __IWMMXT__.
8252 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8253 (arm_arch_setup): New.
8254 (target_regsets): Remove #ifdef. Add VFP regset.
8255 (the_low_target): Use arm_arch_setup.
8256
8257 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8258
8259 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8260 the main thread again.
8261
8262 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8263
8264 Adding Neutrino gdbserver.
8265 * configure: Regenerated.
8266 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8267 * configure.srv (i[34567]86-*-nto*): New target.
8268 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8269 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8270 (nto_comctrl) [__QNX__]: New function.
8271 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8272
8273 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
8274
8275 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8276 srv_tgtobj.
8277
8278 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8279 Pedro Alves <pedro@codesourcery.com>
8280
8281 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8282 don't support CONTEXT_EXTENDED_REGISTERS.
8283 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8284 (the_low_target): Install them.
8285 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8286 failing with ERROR_PIPE_NOT_CONNECTED.
8287
8288 2009-06-30 Doug Evans <dje@google.com>
8289 Pierre Muller <muller@ics.u-strasbg.fr>
8290
8291 Add h/w watchpoint support to x86-linux, win32-i386.
8292 * Makefile.in (SFILES): Add i386-low.c
8293 (i386_low_h): Define.
8294 (i386-low.o): Add dependencies.
8295 (linux-x86-low.o): Add i386-low.h dependency.
8296 (win32-i386-low.o): Ditto.
8297 * i386-low.c: New file.
8298 * i386-low.h: New file.
8299 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8300 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8301 * linux-low.c (linux_add_process): Initialize arch_private.
8302 (linux_remove_process): Free arch_private.
8303 (add_lwp): Initialize arch_private.
8304 (delete_lwp): Free arch_private.
8305 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8306 provided.
8307 * linux-low.h (process_info_private): New member arch_private.
8308 (lwp_info): New member arch_private.
8309 (linux_target_ops): New members new_process, new_thread,
8310 prepare_to_resume.
8311 (ptid_of): New macro.
8312 * linux-x86-low.c: Include stddef.h, i386-low.h.
8313 (arch_process_info): New struct.
8314 (arch_lwp_info): New struct.
8315 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8316 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8317 (i386_dr_low_get_status): New function.
8318 (x86_insert_point, x86_remove_point): New functions.
8319 (x86_stopped_by_watchpoint): New function.
8320 (x86_stopped_data_address): New function.
8321 (x86_linux_new_process, x86_linux_new_thread): New functions.
8322 (x86_linux_prepare_to_resume): New function.
8323 (the_low_target): Add entries for insert_point, remove_point,
8324 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8325 prepare_to_resume.
8326 * server.c (debug_hw_points): New global.
8327 (monitor_show_help): Document set debug-hw-points.
8328 (handle_query): Process "set debug-hw-points".
8329 * server.h (debug_hw_points): Declare.
8330 (paddress): Declare.
8331 * utils.c (NUMCELLS, CELLSIZE): New macros.
8332 (get_sell, xsnprintf, paddress): New functions.
8333 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8334 remove_point, stopped_by_watchpoint, stopped_data_address.
8335 * win32-i386-low.c: Include i386-low.h.
8336 (debug_reg_state): Replaces dr.
8337 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8338 (i386_dr_low_get_status): New function.
8339 (i386_insert_point, i386_remove_point): New functions.
8340 (i386_stopped_by_watchpoint): New function.
8341 (i386_stopped_data_address): New function.
8342 (i386_initial_stuff): Update.
8343 (get_thread_context,set_thread_context,i386_thread_added): Update.
8344 (the_low_target): Add entries for insert_point,
8345 remove_point, stopped_by_watchpoint, stopped_data_address.
8346 * win32-low.c (win32_insert_watchpoint): New function.
8347 (win32_remove_watchpoint): New function.
8348 (win32_stopped_by_watchpoint): New function.
8349 (win32_stopped_data_address): New function.
8350 (win32_target_ops): Add entries for insert_watchpoint,
8351 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8352 * win32-low.h (win32_target_ops): New members insert_point,
8353 remove_point, stopped_by_watchpoint, stopped_data_address.
8354
8355 2009-06-25 Pedro Alves <pedro@codesourcery.com>
8356
8357 * server.c (process_serial_event): Re-return unsupported, not
8358 error, if the type isn't recognized. Re-allow supporting only
8359 insert or remove packets. Also call require_running for
8360 breakpoints. Add missing break statement to default case. Tidy.
8361 * target.h (struct target_ops): Rename insert_watchpoint to
8362 insert_point, and remove_watchpoint to remove_point.
8363
8364 * linux-low.h (struct linux_target_ops): Likewise.
8365 * linux-low.c (linux_insert_watchpoint): Rename to ...
8366 (linux_insert_point): ... this. Adjust.
8367 (linux_remove_watchpoint): Rename to ...
8368 (linux_remove_point): ... this. Adjust.
8369 (linux_target_ops): Adjust.
8370 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8371 (cris_insert_point): ... this.
8372 (cris_remove_watchpoint): Rename to ...
8373 (cris_remove_point): ... this.
8374 (the_low_target): Adjust.
8375
8376 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8377
8378 * server.c (handle_v_kill): Pass signal_pid to
8379 kill_inferior if multi_process is zero.
8380
8381 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8382
8383 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8384 * target.h (target_ops): Comment for *_watchpoint to make it clear
8385 the functions can get types '0' and '1'.
8386
8387 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8388
8389 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8390 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8391 * regcache.c (get_regcache): Likewise.
8392 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8393 * win32-low.c (child_fetch_inferior_registers): Remove check for
8394 regno 0.
8395
8396 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8397 Pedro Alves <pedro@codesourcery.com>
8398
8399 * target.h (struct target_ops) <supports_multi_process>: New
8400 callback.
8401 (target_supports_multi_process): New.
8402 * server.c (handle_query): Even if GDB reports support, only
8403 enable multi-process if the target also supports it. Report
8404 multi-process support only if the target backend supports it.
8405 * linux-low.c (linux_supports_multi_process): New function.
8406 (linux_target_ops): Install it as target_supports_multi_process
8407 callback.
8408
8409 2009-05-24 Doug Evans <dje@google.com>
8410
8411 Global renaming of find_thread_pid to find_thread_ptid.
8412 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8413 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8414 All callers updated.
8415
8416 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8417 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8418 directly.
8419
8420 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8421 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8422 (linux_resume_one_lwp): Ditto.
8423
8424 2009-05-23 Doug Evans <dje@google.com>
8425
8426 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8427 from struct inferior_list_entry * to struct lwp_info *.
8428 All callers updated.
8429
8430 2009-05-13 Doug Evans <dje@google.com>
8431
8432 * linux-x86-low.c: Don't include assert.h.
8433 (x86_siginfo_fixup): Use fatal, not assert.
8434 (x86_arch_setup): Fix comment.
8435
8436 2009-05-12 Doug Evans <dje@google.com>
8437
8438 Biarch support for i386/amd64 gdbserver.
8439 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8440 Add linux-x86-low.c.
8441 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8442 (linux-x86-low.o): Add.
8443 * linux-x86-64-low.c: Delete.
8444 * linux-i386-low.c: Delete.
8445 * linux-x86-low.c: New file.
8446 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8447 linux-x86-low.o.
8448 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8449 linux-x86-low.o.
8450 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8451 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8452 (linux_child_pid_to_exec_file): New function.
8453 (elf_64_header_p, elf_64_file_p): New functions.
8454 (siginfo_fixup): New function.
8455 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8456 give target a chance to convert layout.
8457 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8458 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8459
8460 2009-05-07 Doug Evans <dje@google.com>
8461
8462 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8463 (regsets_store_inferior_registers): Ditto.
8464
8465 2009-05-06 Pedro Alves <pedro@codesourcery.com>
8466
8467 PR server/10048
8468
8469 * linux-low.c (must_set_ptrace_flags): Delete.
8470 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8471 of the global.
8472 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8473 `lwp->must_set_ptrace_flags' instead.
8474 (linux_wait_for_event_1): Set ptrace options here.
8475 (linux_wait_1): ... not here.
8476
8477 2009-04-30 Doug Evans <dje@google.com>
8478
8479 * inferiors.c (started_inferior_callback): New function.
8480 (attached_inferior_callback): New function.
8481 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8482 * server.c (print_started_pid, print_attached_pid): New functions.
8483 (detach_or_kill_for_exit): New function.
8484 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8485 * server.h (have_started_inferiors_p): Declare.
8486 (have_attached_inferiors_p): Declare.
8487
8488 * inferiors.c (remove_process): Fix memory leak, free process.
8489 * linux-low.c (linux_remove_process): New function.
8490 (linux_kill): Call it instead of remove_process.
8491 (linux_detach, linux_wait_1): Ditto.
8492
8493 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8494
8495 * configure.srv: Add x86 Windows CE target.
8496
8497 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8498
8499 * inferiors.c (get_thread_process): Make global.
8500 * server.h (get_thread_process): Add prototype.
8501 * thread-db.c (find_one_thread): Use get_thread_process
8502 instead of current_process.
8503 (thread_db_get_tls_address): Do not crash if called when
8504 thread layer is not yet initialized.
8505
8506 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8507
8508 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8509 * spu-low.c (current_tid): Rename to ...
8510 (current_ptid): ... this.
8511 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8512 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8513 ptid_get_lwp (current_ptid) instead of current_tid.
8514 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8515 instead of current_tid. Use find_process_pid to verify pid
8516 argument is valid. Pass proper argument to remove_process.
8517 (spu_thread_alive): Compare current_ptid instead of current_tid.
8518 (spu_resume): Likewise.
8519
8520 2009-04-02 Pedro Alves <pedro@codesourcery.com>
8521
8522 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8523 variable.
8524
8525 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8526
8527 Implement the multiprocess extensions, and add linux multiprocess
8528 support.
8529
8530 * server.h (ULONGEST): Declare.
8531 (struct ptid, ptid_t): New.
8532 (minus_one_ptid, null_ptid): Declare.
8533 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8534 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8535 (struct inferior_list_entry): Change `id' type from unsigned from
8536 to ptid_t.
8537 (struct sym_cache, struct breakpoint, struct
8538 process_info_private): Forward declare.
8539 (struct process_info): Declare.
8540 (current_process): Declare.
8541 (all_processes): Declare.
8542 (initialize_inferiors): Declare.
8543 (add_thread): Adjust to use ptid_t.
8544 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8545 (add_process, remove_process, find_thread_pid): Declare.
8546 (find_inferior_id): Adjust to use ptid_t.
8547 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8548 (multi_process): Declare.
8549 (push_event): Adjust to use ptid_t.
8550 (read_ptid, write_ptid): Declare.
8551 (prepare_resume_reply): Adjust to use ptid_t.
8552 (clear_symbol_cache): Declare.
8553 * inferiors.c (all_processes): New.
8554 (null_ptid, minus_one_ptid): New.
8555 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8556 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8557 (add_thread): Change unsigned long to ptid. Remove gdb_id
8558 parameter. Adjust.
8559 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8560 (gdb_id_to_thread): Rename to ...
8561 (find_thread_pid): ... this. Change unsigned long to ptid.
8562 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8563 (loaded_dll, pull_pid_from_list): Adjust.
8564 (add_process, remove_process, find_process_pid)
8565 (get_thread_process, current_process, initialize_inferiors): New.
8566 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8567 (struct target_waitstatus) <related_pid>: Ditto.
8568 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8569 return type to int.
8570 (struct target_ops) <join>: Add `pid' argument.
8571 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8572 (struct target_ops) <wait>: Add `ptid' field. Change return type
8573 to ptid.
8574 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8575 (mywait): Add `ptid' argument. Change return type to ptid_t.
8576 (target_pid_to_str): Declare.
8577 * target.c (set_desired_inferior): Adjust to use ptids.
8578 (mywait): Add new `ptid' argument. Adjust.
8579 (target_pid_to_str): New.
8580 * mem-break.h (free_all_breakpoints): Declare.
8581 * mem-break.c (breakpoints): Delelete.
8582 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8583 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8584 to use per-process breakpoint list.
8585 (free_all_breakpoints): New.
8586 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8587 (symbol_cache, all_symbols_looked_up): Delete.
8588 (hexchars): New.
8589 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8590 read_ptid): New.
8591 (prepare_resume_reply): Change ptid argument's type from unsigned
8592 long to ptid_t. Adjust. Implement W;process and X;process.
8593 (free_sym_cache, clear_symbol_cache): New.
8594 (look_up_one_symbol): Adjust to per-process symbol cache. *
8595 * server.c (cont_thread, general_thread, step_thread): Change type
8596 to ptid_t.
8597 (attached): Delete.
8598 (multi_process): New.
8599 (last_ptid): Change type to ptid_t.
8600 (struct vstop_notif) <ptid>: Change type to ptid_t.
8601 (queue_stop_reply, push_event): Change `ptid' argument's type to
8602 ptid_t.
8603 (discard_queued_stop_replies): Add `pid' argument.
8604 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8605 changes. Don't reference the `attached' global.
8606 (attach_inferior): Adjust to mywait interface changes.
8607 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8608 features. Handle and report "multiprocess+". Handle
8609 "qAttached:PID".
8610 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8611 changes.
8612 (handle_v_kill): New.
8613 (handle_v_stopped): Adjust to use target_pid_to_str.
8614 (handle_v_requests): Allow multiple attaches and runs when
8615 multiprocess extensions are in effect. Handle "vKill".
8616 (myresume): Adjust to use ptids.
8617 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8618 (handle_status): Adjust to discard_queued_stop_replies interface
8619 change.
8620 (first_thread_of, kill_inferior_callback)
8621 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8622 (main): Call initialize_inferiors. Adjust to use ptids, killing
8623 and detaching from all inferiors. Handle multiprocess packet
8624 variants.
8625 * linux-low.h: Include gdb_proc_service.h.
8626 (struct process_info_private): New.
8627 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8628 <lwpid_of>: Use ptid_get_lwp.
8629 (get_lwp_thread): Adjust.
8630 (struct lwp_info): Add `dead' member.
8631 (find_lwp_pid): Declare.
8632 * linux-low.c (thread_db_active): Delete.
8633 (new_inferior): Adjust comment.
8634 (inferior_pid): Delete.
8635 (linux_add_process): New.
8636 (handle_extended_wait): Adjust.
8637 (add_lwp): Change unsigned long to ptid.
8638 (linux_create_inferior): Add process to processes table. Adjust
8639 to use ptids. Don't set new_inferior here.
8640 (linux_attach_lwp): Rename to ...
8641 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8642 it. Adjust to use ptids.
8643 (linux_attach_lwp): New.
8644 (linux_attach): Add process to processes table. Don't set
8645 new_inferior here.
8646 (struct counter): New.
8647 (second_thread_of_pid_p, last_thread_of_process_p): New.
8648 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8649 multiple processes.
8650 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8651 processes. Remove process from process table.
8652 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8653 to multiple processes.
8654 (any_thread_of): New.
8655 (linux_detach): Add `pid' argument, and handle it. Remove process
8656 from processes table.
8657 (linux_join): Add `pid' argument. Handle it.
8658 (linux_thread_alive): Change unsighed long argument to ptid_t.
8659 Consider dead lwps as not being alive.
8660 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8661 threads we're not interested in.
8662 (same_lwp, find_lwp_pid): New.
8663 (linux_wait_for_lwp): Change `pid' argument's type from int to
8664 ptid_t. Adjust.
8665 (linux_wait_for_event): Rename to ...
8666 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8667 from int to ptid_t. Adjust.
8668 (linux_wait_for_event): New.
8669 (linux_wait_1): Add `ptid' argument. Change return type to
8670 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8671 that exit from the process table.
8672 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8673 Adjust.
8674 (mark_lwp_dead): New.
8675 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8676 stopping all threads, mark its main lwp as dead.
8677 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8678 ptids.
8679 (fetch_register, usr_store_inferior_registers)
8680 (regsets_fetch_inferior_registers)
8681 (regsets_store_inferior_registers, linux_read_memory)
8682 (linux_write_memory): Inline `inferior_pid'.
8683 (linux_look_up_symbols): Adjust to use per-process
8684 `thread_db_active'.
8685 (linux_request_interrupt): Adjust to use ptids.
8686 (linux_read_auxv): Inline `inferior_pid'.
8687 (initialize_low): Don't reference thread_db_active.
8688 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8689 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8690 (ps_getpid): Return the pid of the current inferior.
8691 * thread-db.c (proc_handle, thread_agent): Delete.
8692 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8693 per-process data.
8694 (find_one_thread): Change argument type to ptid_t. Adjust to
8695 per-process data.
8696 (maybe_attach_thread): Adjust to per-process data and ptids.
8697 (thread_db_find_new_threads): Ditto.
8698 (thread_db_init): Ditto.
8699 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8700 processes table. Adjust to use ptids.
8701 (spu_kill, spu_detach): Adjust interface. Remove process from
8702 processes table.
8703 (spu_join, spu_thread_alive): Adjust interface.
8704 (spu_wait): Adjust interface. Remove process from processes
8705 table. Adjust to use ptids.
8706 * win32-low.c (current_inferior_tid): Delete.
8707 (current_inferior_ptid): New.
8708 (debug_event_ptid): New.
8709 (thread_rec): Take a ptid. Adjust.
8710 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8711 (child_delete_thread): Ditto.
8712 (do_initial_child_stuff): Add `attached' argument. Add process to
8713 processes table.
8714 (child_fetch_inferior_registers, child_store_inferior_registers):
8715 Adjust.
8716 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8717 (win32_attach): Pass 1 to do_initial_child_stuff.
8718 (win32_kill): Adjust interface. Remove process from processes
8719 table.
8720 (win32_detach): Ditto.
8721 (win32_join): Adjust interface.
8722 (win32_thread_alive): Take a ptid.
8723 (win32_resume): Adjust to use ptids.
8724 (get_child_debug_event): Ditto.
8725 (win32_wait): Adjust interface. Remove exiting process from
8726 processes table.
8727
8728 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8729
8730 Non-stop mode support.
8731
8732 * server.h (non_stop): Declare.
8733 (gdb_client_data, handler_func): Declare.
8734 (delete_file_handler, add_file_handler, start_event_loop):
8735 Declare.
8736 (handle_serial_event, handle_target_event, push_event)
8737 (putpkt_notif): Declare.
8738 * target.h (enum resume_kind): New.
8739 (struct thread_resume): Replace `step' field by `kind' field.
8740 (TARGET_WNOHANG): Define.
8741 (struct target_ops) <wait>: Add `options' argument.
8742 <supports_non_stop, async, start_non_stop>: New fields.
8743 (target_supports_non_stop, target_async): New.
8744 (start_non_stop): Declare.
8745 (mywait): Add `options' argument.
8746 * target.c (mywait): Add `options' argument. Print child exit
8747 notifications here.
8748 (start_non_stop): New.
8749 * server.c (non_stop, own_buf, mem_buf): New globals.
8750 (struct vstop_notif): New.
8751 (notif_queue): New global.
8752 (queue_stop_reply, push_event, discard_queued_stop_replies)
8753 (send_next_stop_reply): New.
8754 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8755 interface changes.
8756 (attach_inferior): In non-stop mode, don't wait for the target
8757 here.
8758 (handle_general_set): Handle QNonStop.
8759 (handle_query): When handling qC, return the current general
8760 thread, instead of the first thread of the list.
8761 (handle_query): If the backend supports non-stop mode, include
8762 QNonStop+ in the qSupported query response.
8763 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8764 and non-stop mode.
8765 (handle_v_attach, handle_v_run): Handle non-stop mode.
8766 (handle_v_stopped): New.
8767 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8768 (myresume): Adjust to use resume_kind. Handle non-stop.
8769 (queue_stop_reply_callback): New.
8770 (handle_status): Handle non-stop mode.
8771 (main): Clear non_stop flag on reconnection. Use the event-loop.
8772 Refactor serial protocol handling from here ...
8773 (process_serial_event): ... to this new function. When GDB
8774 selects any thread, select one here. In non-stop mode, wait until
8775 GDB acks all pending events before exiting.
8776 (handle_serial_event, handle_target_event): New.
8777 * remote-utils.c (remote_open): Install remote_desc in the event
8778 loop.
8779 (remote_close): Remove remote_desc from the event loop.
8780 (putpkt_binary): Rename to...
8781 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8782 (putpkt_binary): New as wrapper around putpkt_binary_1.
8783 (putpkt_notif): New.
8784 (prepare_resume_reply): In non-stop mode, don't change the
8785 general_thread.
8786 * event-loop.c: New.
8787 * Makefile.in (OBJ): Add event-loop.o.
8788 (event-loop.o): New rule.
8789
8790 * linux-low.h (pid_of): Moved here.
8791 (lwpid_of): New.
8792 (get_lwp_thread): Use lwpid_of.
8793 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8794 * linux-low.c (pid_of): Delete.
8795 (inferior_pid): Use lwpid_of.
8796 (linux_event_pipe): New.
8797 (target_is_async_p): New.
8798 (delete_lwp): New.
8799 (handle_extended_wait): Use lwpid_of.
8800 (add_lwp): Don't set lwpid field.
8801 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8802 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8803 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8804 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8805 first. Adjust to linux_wait_for_event interface changes. Use
8806 lwpid_of.
8807 (linux_detach): Don't delete the main lwp here.
8808 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8809 (status_pending_p): Don't consider explicitly suspended lwps.
8810 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8811 pointer. Add OPTIONS argument. Change return type to int. Use
8812 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8813 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8814 pointer. Add status pointer argument. Return a pid instead of a
8815 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8816 changes. In non-stop mode, don't switch to a random thread.
8817 (linux_wait): Rename to...
8818 (linux_wait_1): ... this. Add target_options argument, and handle
8819 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8820 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8821 clean exit and signal exit code. Don't stop all threads in
8822 non-stop mode. In all-stop mode, only stop all threads when
8823 reporting a stop to GDB. Handle explicit thread stop requests.
8824 (async_file_flush, async_file_mark): New.
8825 (linux_wait): New.
8826 (send_sigstop): Use lwpid_of.
8827 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8828 interface changes. In non-stop mode, don't switch to a random
8829 thread.
8830 (linux_resume_one_lwp): Use lwpid_of.
8831 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8832 (linux_resume_one_thread): ... this. Handle resume_stop. In
8833 non-stop mode, don't look for pending flag in all threads.
8834 (resume_status_pending_p): Don't consider explicitly suspended
8835 threads.
8836 (my_waitpid): Reimplement. Emulate __WALL.
8837 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8838 Use lwpid_of.
8839 (sigchld_handler, linux_supports_non_stop, linux_async)
8840 (linux_start_non_stop): New.
8841 (linux_target_ops): Register linux_supports_non_stop, linux_async
8842 and linux_start_non_stop.
8843 (initialize_low): Install SIGCHLD handler.
8844 * thread-db.c (thread_db_create_event, find_one_thread)
8845 (thread_db_get_tls_address): Use lwpid_of.
8846 * win32-low.c (win32_detach): Adjust to use resume_kind.
8847 (win32_wait): Add `options' argument.
8848 * spu-low.c (spu_resume): Adjust to use resume_kind.
8849 (spu_wait): Add `options' argument.
8850
8851 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8852
8853 Decouple target code from remote protocol.
8854
8855 * target.h (enum target_waitkind): New.
8856 (struct target_waitstatus): New.
8857 (struct target_ops) <wait>: Return an unsigned long. Take a
8858 target_waitstatus pointer instead of a char pointer.
8859 (mywait): Likewise.
8860 * target.c (mywait): Change prototype to return an unsigned long.
8861 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8862 * server.h (thread_from_wait, old_thread_from_wait): Delete
8863 declarations.
8864 (prepare_resume_reply): Change prototype to take a
8865 target_waitstatus.
8866 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8867 (last_status, last_ptid): New.
8868 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8869 pid instead of a signal.
8870 (attach_inferior): Remove "status" and "signal" parameters.
8871 Adjust.
8872 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8873 not as an address.
8874 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8875 (handle_v_requests, myresume): Remove "status" and "signal"
8876 parameters. Adjust.
8877 (handle_status): New.
8878 (main): Delete local `status'. Adjust.
8879 * remote-utils.c: Include target.h.
8880 (prepare_resume_reply): Change prototype to take a
8881 target_waitstatus. Adjust.
8882
8883 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8884 interface.
8885 * spu-low.c (spu_wait): Adjust.
8886 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8887 Delete.
8888 (win32_wait): Adjust.
8889
8890 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8891
8892 * target.h (struct thread_resume): Delete leave_stopped member.
8893 (struct target_ops): Add a `n' argument to the `resume' callback.
8894 * server.c (start_inferior): Adjust.
8895 (handle_v_cont, myresume): Adjust.
8896 * linux-low.c (check_removed_breakpoint): Adjust to resume
8897 interface change, and to removed leave_stopped field.
8898 (resume_ptr): Delete.
8899 (struct thread_resume_array): New.
8900 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8901 resume interface change.
8902 (linux_continue_one_thread, linux_queue_one_thread)
8903 (resume_status_pending_p): Check if the resume field is NULL
8904 instead of checking the leave_stopped member.
8905 (linux_resume): Adjust to the target resume interface change.
8906 * spu-low.c (spu_resume): Adjust to the target resume interface
8907 change.
8908 * win32-low.c (win32_detach, win32_resume): Ditto.
8909
8910 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8911
8912 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8913 flag.
8914 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8915 pending.
8916 (linux_continue_one_thread): Only preserve the stepping flag if
8917 there's a pending breakpoint.
8918
8919 2009-03-31 Pedro Alves <pedro@codesourcery.com>
8920
8921 * server.c (main): After the inferior having exited, call
8922 remote_close before exiting gdbserver.
8923
8924 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8925
8926 Fix size of FPSCR in Power 7 processors.
8927 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8928 (PPC_FEATURE_HAS_DFP): New #define.
8929 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8930 size of the FPSCR.
8931
8932 2009-03-23 Pedro Alves <pedro@codesourcery.com>
8933
8934 * server.c (handle_query) Whitespace and formatting.
8935
8936 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8937
8938 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8939 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8940 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8941 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8942 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8943 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8944 Makefile.in, configure.ac: Fix whitespace throughout.
8945 * configure: Regenerate.
8946
8947 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8948
8949 * inferiors.c (find_inferior): Make it safe for the callback
8950 function to delete the currently iterated inferior.
8951
8952 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8953
8954 * Makefile.in (linuw_low_h): Move higher.
8955 (thread-db.o): Depend on $(linux_low_h).
8956
8957 2009-03-17 Pedro Alves <pedro@codesourcery.com>
8958
8959 Rename "process" to "lwp" throughout.
8960
8961 * linux-low.c (all_processes): Rename to...
8962 (all_lwps): ... this.
8963 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8964 (add_process): Rename to ...
8965 (add_lwp): ... this. Adjust.
8966 (linux_create_inferior): Adjust.
8967 (linux_attach_lwp): Adjust.
8968 (linux_attach): Adjust.
8969 (linux_kill_one_process): Rename to ...
8970 (linux_kill_one_lwp): ... this. Adjust.
8971 (linux_kill): Adjust.
8972 (linux_detach_one_process): Rename to ...
8973 (linux_detach_one_lwp): ... this. Adjust.
8974 (linux_detach): Adjust.
8975 (check_removed_breakpoint): Adjust.
8976 (status_pending_p): Adjust.
8977 (linux_wait_for_process): Rename to ...
8978 (linux_wait_for_lwp): ... this. Adjust.
8979 (linux_wait_for_event): Adjust.
8980 (send_sigstop): Adjust.
8981 (wait_for_sigstop): Adjust.
8982 (stop_all_processes): Rename to ...
8983 (stop_all_lwps): ... this.
8984 (linux_resume_one_process): Rename to ...
8985 (linux_resume_one_lwp): ... this. Adjust.
8986 (linux_set_resume_request, linux_continue_one_thread)
8987 (linux_queue_one_thread, resume_status_pending_p)
8988 (usr_store_inferior_registers, regsets_store_inferior_registers)
8989 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8990 Adjust.
8991 * linux-low.h (get_process): Rename to ...
8992 (get_lwp): ... this. Adjust.
8993 (get_thread_process): Rename to ...
8994 (get_thread_lwp): ... this. Adjust.
8995 (get_process_thread): Rename to ...
8996 (get_lwp_thread): ... this. Adjust.
8997 (struct process_info): Rename to ...
8998 (struct lwp_info): ... this.
8999 (all_processes): Rename to ...
9000 (all_lwps): ... this.
9001 * proc-service.c (ps_lgetregs): Adjust.
9002 * thread-db.c (thread_db_create_event, find_one_thread)
9003 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9004
9005 2009-03-14 Pedro Alves <pedro@codesourcery.com>
9006
9007 * server.c (handle_query): Handle "qAttached".
9008
9009 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9010
9011 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9012 GPLv3, update license URL.
9013
9014 2009-03-01 Doug Evans <dje@google.com>
9015
9016 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
9017 (server_h): Add gdb_signals.h.
9018 (signals.o): Update.
9019 * server.h (target_signal_from_host,target_signal_to_host_p)
9020 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9021
9022 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9023
9024 * remote-utils.c (getpkt): Also generate remote-debug
9025 information if noack_mode is set.
9026
9027 2009-02-06 Pedro Alves <pedro@codesourcery.com>
9028
9029 * server.c (handle_query): Report qXfer:siginfo:read and
9030 qXfer:siginfo:write as supported and handle them.
9031 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9032 * linux-low.c (linux_xfer_siginfo): New.
9033 (linux_target_ops): Set it.
9034
9035 2009-01-26 Pedro Alves <pedro@codesourcery.com>
9036
9037 * server.c (gdbserver_usage): Mention --remote-debug.
9038 (main): Accept '--remote-debug' switch.
9039
9040 2009-01-18 Doug Evans <dje@google.com>
9041
9042 * regcache.c (new_register_cache): No need to check result of xcalloc.
9043 * server.c (handle_search_memory): Back out calls to xmalloc,
9044 result is checked and error is returned to user upon failure.
9045 (handle_query): Ditto. Add more checks for result of malloc.
9046 (handle_v_cont): Check result of malloc, report error back to
9047 user upon failure.
9048 (handle_v_run): Ditto. Call freeargv.
9049 * server.h (freeargv): Declare.
9050 * utils.c (freeargv): New fn.
9051
9052 2009-01-15 Doug Evans <dje@google.com>
9053
9054 * gdbreplay.c (perror_with_name): Make arg const char *.
9055 * server.h (target_signal_to_name): Make return type const char *.
9056 * thread-db.c (thread_db_err_str): Make return type const char *.
9057 * utils.c (perror_with_name): Make arg const char *.
9058
9059 2009-01-14 Pedro Alves <pedro@codesourcery.com>
9060
9061 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9062 when handling a EXIT_PROCESS_DEBUG_EVENT.
9063
9064 2009-01-06 Joel Brobecker <brobecker@adacore.com>
9065
9066 * gdbreplay.c (gdbreplay_version): Update copyright year.
9067 * server.c (gdbserver_version): Likewise.
9068
9069 2009-01-05 Doug Evans <dje@google.com>
9070
9071 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
9072 (handle_extended_wait): Improve comment.
9073
9074 2008-12-13 Doug Evans <dje@google.com>
9075
9076 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9077 * server.h (ATTR_MALLOC): New macro.
9078 (xmalloc,xcalloc,xstrdup): Declare.
9079 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9080 * inferiors.c: Ditto.
9081 * linux-low.c: Ditto.
9082 * mem-break.c: Ditto.
9083 * regcache.c: Ditto.
9084 * remote-utils.c: Ditto.
9085 * server.c: Ditto.
9086 * target.c: Ditto.
9087 * win32-low.c: Ditto.
9088
9089 2008-12-12 Doug Evans <dje@google.com>
9090
9091 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9092 in debugging printf.
9093
9094 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9095
9096 2008-12-09 Doug Evans <dje@google.com>
9097
9098 * linux-low.h (struct process_info): Delete member tid, unused.
9099 * thread-db.c (find_one_thread): Update.
9100 (maybe_attach_thread): Update.
9101
9102 2008-12-02 Pedro Alves <pedro@codesourcery.com>
9103
9104 * target.h (struct target_ops): Add qxfer_osdata member.
9105 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9106 and dirent.h.
9107 (linux_qxfer_osdata): New functions.
9108 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9109 callback.
9110 * server.c (handle_query): Handle "qXfer:osdata:read:".
9111 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9112 (buffer_xml_printf): New functions.
9113 * server.h (struct buffer): New.
9114 (buffer_grow_str, buffer_grow_str0): New macros.
9115 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9116 (buffer_xml_printf): Declare.
9117
9118 2008-11-24 Doug Evans <dje@google.com>
9119
9120 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9121
9122 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9123
9124 * server.c (handle_v_run): Always use the supplied argument list.
9125
9126 2008-11-19 Bob Wilson <bob.wilson@acm.org>
9127
9128 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9129 (xtensa_regmap_table): Add entry for scompare1.
9130
9131 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9132
9133 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9134 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9135 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9136 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9137 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9138 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9139 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9140 XML target descriptions.
9141 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9142 when inferior is running on an ISA 2.05 or later processor. Add
9143 special case to return offset for full 64-bit slot of FPSCR when
9144 in 32-bits.
9145
9146 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9147
9148 * Makefile.in (SFILES, clean): Added sparc64 files.
9149 (reg-sparc64.o, reg-sparc64.c): New.
9150 * configure.srv (sparc*-*-linux*): New configuration.
9151 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9152 syscall arguments for SPARC.
9153 (regsets_store_inferior_registers): Likewise.
9154 * linux-sparc-low.c: New file.
9155
9156 2008-10-21 Doug Evans <dje@google.com>
9157
9158 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9159 (READLINE_DIR,READLINE_DEP): Delete.
9160 (INTERNAL_CFLAGS): Update.
9161 (LINTFLAGS): Update.
9162
9163 2008-10-10 Pedro Alves <pedro@codesourcery.com>
9164
9165 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9166 whole argv from the last run, not just argv[0].
9167
9168 2008-09-08 Pedro Alves <pedro@codesourcery.com>
9169
9170 * regcache.c (new_register_cache): Return NULL if the register
9171 cache size isn't known yet.
9172 (free_register_cache): Avoid dereferencing a NULL regcache.
9173
9174 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9175
9176 * configure.srv: Merge MIPS and MIPS64.
9177
9178 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9179
9180 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9181
9182 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
9183
9184 * Makefile.in: Add required vsx dependencies.
9185
9186 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9187 Declare init_registers_powerpc_vsx32l.
9188 Declare init_registers_powerpc_vsx64l.
9189 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9190 (ppc_arch_setup): Check for VSX in hwcap.
9191 (ppc_fill_vsxregset): New function.
9192 (ppc_store_vsxregset): New function.
9193 Add new VSX entry in regset_info target_regsets.
9194
9195 * configure.srv: Add new VSX dependencies.
9196
9197 2008-08-12 Pedro Alves <pedro@codesourcery.com>
9198
9199 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9200 (remote_open): Set or clear transport_is_reliable.
9201 (putpkt_binary): Don't expect acks in noack mode.
9202 (getpkt): Don't send ack/nac in noack mode.
9203 * server.c (handle_general_set): Handle QStartNoAckMode.
9204 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9205 qSupported.
9206 (main): Reset noack_mode on every connection.
9207 * server.h (noack_mode): Declare.
9208
9209 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9210
9211 * Makefile.in (GDBREPLAY_OBS): New variable.
9212 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9213
9214 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9215 Daniel Jacobowitz <dan@codesourcery.com>
9216
9217 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9218 (usr_store_inferior_registers): Likewise.
9219 (regsets_store_inferior_registers): Likewise.
9220
9221 2008-07-31 Rolf Jansen <rj@surtec.com>
9222 Pedro Alves <pedro@codesourcery.com>
9223
9224 * configure.ac: Check for memmem declaration.
9225 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9226 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9227 (disable_packet_qfThreadInfo): Unconditionally compile.
9228 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9229 * configure, config.in: Regenerate.
9230
9231 2008-07-28 Doug Kwan <dougkwan@google.com>
9232
9233 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9234 (linux_write_memory): Remove declaration of errno.
9235
9236 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9237
9238 * linux-low.c (handle_extended_wait): Do not use "status"
9239 variable uninitialized.
9240
9241 2008-07-07 Pedro Alves <pedro@codesourcery.com>
9242
9243 * server.c (handle_v_attach): Inhibit reporting dll changes.
9244
9245 2008-06-27 Pedro Alves <pedro@codesourcery.com>
9246
9247 * remote-utils.c (prepare_resume_reply): If requested, don't
9248 output "thread:TID" in the T stop reply.
9249
9250 * server.c (disable_packet_vCont, disable_packet_Tthread)
9251 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9252 (handle_query): If requested, disable support for qC, qfThreadInfo
9253 and qsThreadInfo.
9254 (handle_v_requests): If requested, disable support for vCont.
9255 (gdbserver_show_disableable): New.
9256 (main): Handle --disable-packet and --disable-packet=LIST.
9257
9258 * server.h (disable_packet_vCont, disable_packet_Tthread)
9259 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9260
9261 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9262
9263 * server.c (gdbserver_usage): Mention --version.
9264
9265 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9266
9267 * Makefile.in (gdbreplay.o): New rule.
9268
9269 2008-06-06 Joseph Myers <joseph@codesourcery.com>
9270
9271 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9272 message, not gdbserver.
9273
9274 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
9275 Nathan Sidwell <nathan@codesourcery.com>
9276 Joseph Myers <joseph@codesourcery.com>
9277
9278 * acinclude.m4: Include ../../config/acx.m4.
9279 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9280 * configure, config.in: Regenerate.
9281 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9282 * server.c (gdbserver_version): Print PKGVERSION.
9283 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9284 (main): Adjust gdbserver_usage calls.
9285 * gdbreplay.c (version, host_name): Add declarations.
9286 (gdbreplay_version, gdbreplay_usage): New.
9287 (main): Accept --version and --help options.
9288
9289 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9290
9291 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9292 (arm_breakpoint_at): Handle Thumb.
9293 (the_low_target): Add comment.
9294
9295 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9296
9297 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9298
9299 2008-05-09 Doug Evans <dje@google.com>
9300
9301 * server.h (decode_search_memory_packet): Declare.
9302 * remote-utils.c (decode_search_memory_packet): New fn.
9303 * server.c (handle_search_memory_1): New fn.
9304 (handle_search_memory): New fn.
9305 (handle_query): Process qSearch:memory packets.
9306
9307 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9308
9309 * regcache.c (registers_length): Remove.
9310 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9311 full register packet.
9312 * regcache.h (registers_length): Remove prototype.
9313 * server.h (PBUFSIZ): Define to 16384.
9314
9315 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9316
9317 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9318 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9319 powerpc-64l.o, and powerpc-altivec64l.o.
9320 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9321 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9322 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9323 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9324 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9325 to srv_xmlfiles.
9326
9327 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9328 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9329 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9330 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9331 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9332 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9333 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9334 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9335 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9336 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9337 (clean): Update.
9338
9339 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9340 (init_registers_powerpc_32l): ... this new prototype.
9341 (init_registers_powerpc_32): Remove, replace by ...
9342 (init_registers_powerpc_altivec32l): ... this new prototype.
9343 (init_registers_powerpc_e500): Remove, replace by ...
9344 (init_registers_powerpc_e500l): ... this new prototype.
9345 (init_registers_ppc64): Remove, replace by ...
9346 (init_registers_powerpc_64l): ... this new prototype.
9347 (init_registers_powerpc_64): Remove, replace by ...
9348 (init_registers_powerpc_altivec64l): ... this new prototype.
9349 (ppc_num_regs): Set to 73.
9350 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9351 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9352 (ppc_cannot_store_register): Handle orig_r3 and trap.
9353 (ppc_arch_setup): Update init_registers_... calls.
9354 (ppc_fill_gregset): Handle orig_r3 and trap.
9355
9356 * inferiors.c (clear_inferiors): Reset current_inferior.
9357
9358 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
9359
9360 * acinclude.m4: Add override.m4.
9361 * configure: Regenerate.
9362
9363 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9364
9365 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9366 initial call to init_register_ppc64.
9367
9368 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9369
9370 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9371 single powerpc*-*-linux* case.
9372 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9373
9374 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9375
9376 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
9377 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
9378 from reg_xmlfiles.
9379 * linux-ppc-low.c: Include <elf.h>.
9380 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9381 (ppc_hwcap): New global variable.
9382 (ppc_regmap): Remove __SPE__ #ifdef sections.
9383 (ppc_regmap_e500): New global variable.
9384 (ppc_cannot_store_register): Update __SPE__ special case.
9385 (ppc_get_hwcap): New function.
9386 (ppc_arch_setup): Use it to determine whether inferior supports
9387 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9388 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9389 Do not access registers if target does not support AltiVec.
9390 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9391 Do not access registers if target does not support SPE.
9392 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9393
9394 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9395
9396 * linux-low.c (disabled_regsets, num_regsets): New.
9397 (use_regsets_p): Delete.
9398 (linux_wait_for_process): Clear disabled_regsets.
9399 (regsets_fetch_inferior_registers): Check and set it.
9400 (regsets_store_inferior_registers): Likewise.
9401 (linux_fetch_registers, linux_store_registers): Do not use
9402 use_regsets_p.
9403 (initialize_low): Allocate disabled_regsets.
9404
9405 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9406
9407 * Makefile.in (LIBOBJS): New.
9408 (OBS): Use LIBOBJS.
9409 (memmem.o): New rule.
9410 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9411 * configure: Regenerated.
9412
9413 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9414
9415 * server.c (handle_query): Never return "unsupported" for
9416 qXfer:features:read queries.
9417
9418 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9419
9420 * server.c (get_features_xml): Fix inverted condition.
9421 (handle_query): Always support qXfer:feature:read.
9422
9423 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9424
9425 * server.c (wrapper_argv): New.
9426 (start_inferior): Handle wrapper_argv. If set, expect an extra
9427 trap.
9428 (gdbserver_usage): Document --wrapper.
9429 (main): Parse --wrapper.
9430
9431 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9432
9433 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9434 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9435 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9436 (ppc_set_pc): Likewise.
9437 (ppc_arch_setup): New function.
9438 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9439 of collect_register.
9440 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
9441
9442 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9443
9444 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9445 instead of linux-ppc64-low.o.
9446 * linux-ppc64-low.c: Remove file.
9447 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9448 (linux-ppc64-low.o): Remove rule.
9449
9450 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9451 (init_registers_powerpc_64): Likewise.
9452 (ppc_regmap): Conditionally define depending on __powerpc64__.
9453 (ppc_cannot_store_register): Do not special-case "fpscr" when
9454 compiled on __powerpc64__.
9455 (ppc_collect_ptrace_register): New function.
9456 (ppc_supply_ptrace_register): New function.
9457 (ppc_breakpoint): Change type to "unsigned int".
9458 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9459 (the_low_target): Conditionally provide initializers for the
9460 arch_setup member depending on __powerpc64__. Install
9461 collect_ptrace_register and supply_ptrace_register members.
9462
9463 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9464
9465 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9466 * server.c (gdbserver_xmltarget): Define.
9467 (get_features_xml): Use it to replace "target.xml" and arch_string.
9468
9469 * configure.srv: Remove srv_xmltarget. Add XML files that were
9470 mentioned there to srv_xmlfiles instead. Remove conditional tests
9471 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9472 srv_xmlfiles and srv_regobj to include all possible choices.
9473 * configure.ac (srv_xmltarget): Remove.
9474 (srv_xmlfiles): Do not add "target.xml".
9475 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9476 checks for supplementary target information.
9477 * configure: Regenerate.
9478 * Makefile.in (XML_TARGET): Remove.
9479 (target.xml): Remove rule.
9480 (clean): Do not clean up target.xml.
9481 (.PRECIOUS): Do not mention target.xml.
9482
9483 * target.h (struct target_ops): Remove arch_string member.
9484 * linux-low.c (linux_arch_string): Remove.
9485 (linux_target_ops): Remove arch_string initializer.
9486 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9487 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9488 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9489 * spu-low.c (spu_arch_string): Remove.
9490 (spu_target_ops): Remove arch_string initializer.
9491 * win32-low.c (win32_arch_string): Remove.
9492 (win32_target_ops): Remove arch_string initializer.
9493 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9494 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9495 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9496
9497 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9498
9499 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9500 by collect_ptrace_register and supply_ptrace_register hooks.
9501 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9502 instead of checking for the_low_target.left_pad_xfer.
9503 (usr_store_inferior_registers): Use collect_ptrace_register callback
9504 instead of checking for the_low_target.left_pad_xfer.
9505
9506 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9507 (s390_supply_ptrace_register): Likewise.
9508 (s390_fill_gregset): Call s390_collect_ptrace_register.
9509 (the_low_target): Update.
9510
9511 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9512 (ppc_supply_ptrace_register): Likewise.
9513 (the_low_target): Update.
9514
9515 * linux-i386-low.c (the_low_target): Update.
9516 * linux-x86-64-low.c (the_low_target): Update.
9517
9518 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9519
9520 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9521 reg-s390.o and reg-s390x.o.
9522
9523 * linux-low.c (new_inferior): New global variable.
9524 (linux_create_inferior, linux_attach): Set it.
9525 (linux_wait_for_process): Call the_low_target.arch_setup after the
9526 target has stopped for the first time.
9527 (initialize_low): Do not call the_low_target.arch_setup.
9528
9529 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9530 (s390_set_pc): Likewise.
9531 (s390_arch_setup): New function.
9532 (the_low_target): Use s390_arch_setup as arch_setup routine.
9533
9534 * regcache.c (realloc_register_cache): New function.
9535 (set_register_cache): Call it for each existing regcache.
9536
9537 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9538
9539 * server.h (init_registers): Remove prototype.
9540
9541 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9542 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9543 instead of init_registers ().
9544 * linux-arm-low.c (init_registers_arm): Add prototype.
9545 (init_registers_arm_with_iwmmxt): Likewise.
9546 (the_low_target): Add initializer for arch_setup field.
9547 * linux-cris-low.c (init_registers_cris): Add prototype.
9548 (the_low_target): Add initializer for arch_setup field.
9549 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9550 (the_low_target): Add initializer for arch_setup field.
9551 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9552 (the_low_target): Add initializer for arch_setup field.
9553 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9554 (the_low_target): Add initializer for arch_setup field.
9555 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9556 (the_low_target): Add initializer for arch_setup field.
9557 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9558 (the_low_target): Add initializer for arch_setup field.
9559 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9560 (init_registers_mips64_linux): Likewise.
9561 (the_low_target): Add initializer for arch_setup field.
9562 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9563 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9564 (the_low_target): Add initializer for arch_setup field.
9565 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9566 (init_registers_powerpc_64): Likewise.
9567 (the_low_target): Add initializer for arch_setup field.
9568 * linux-s390-low.c (init_registers_s390): Add prototype.
9569 (init_registers_s390x): Likewise.
9570 (the_low_target): Add initializer for arch_setup field.
9571 * linux-sh-low.c (init_registers_sh): Add prototype.
9572 (the_low_target): Add initializer for arch_setup field.
9573 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9574 (the_low_target): Add initializer for arch_setup field.
9575 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9576 (the_low_target): Add initializer for arch_setup field.
9577
9578 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9579 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9580 instead of init_registers ().
9581 * win32-arm-low.c (init_registers_arm): Add prototype.
9582 (the_low_target): Add initializer for arch_setup field.
9583 * win32-i386-low.c (init_registers_i386): Add prototype.
9584 (the_low_target): Add initializer for arch_setup field.
9585
9586 * spu-low.c (init_registers_spu): Add prototype.
9587 (initialize_low): Call initialie_registers_spu () instead of
9588 initialize_registers ().
9589
9590 2008-02-19 Pedro Alves <pedro@codesourcery.com>
9591
9592 * server.c (handle_v_requests): When handling the vRun and vAttach
9593 packets, if already debugging a process, don't kill it. Return an
9594 error instead.
9595
9596 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9597
9598 * server.c (handle_query): Correct length check.
9599
9600 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9601
9602 * win32-low.c (do_initial_child_stuff): Add process handle
9603 parameter. Set current_process_handle and current_process_id from the
9604 parameters. Clear globals.
9605 (win32_create_inferior): Don't set current_process_handle and
9606 current_process_id here. Instead pass them on the call to
9607 do_initial_child_stuff.
9608 (win32_attach): Likewise.
9609 (win32_clear_inferiors): New.
9610 (win32_kill): Don't close the current process handle or the
9611 current thread handle here. Instead call win32_clear_inferiors.
9612 (win32_detach): Don't open a new handle to the process. Call
9613 win32_clear_inferiors.
9614 (win32_join): Don't rely on current_process_handle; open a new
9615 handle using the process id.
9616 (win32_wait): Call win32_clear_inferiors when the inferior process
9617 has exited.
9618
9619 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9620
9621 * server.c (monitor_show_help): Add "exit".
9622
9623 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9624
9625 * Makefile.in (SFILES): Add linux-xtensa-low.c.
9626 (clean): Add reg-xtensa.c.
9627 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
9628 * configure.srv (xtensa*-*-linux*) New target.
9629 * linux-xtensa-low.c: New.
9630 * xtensa-xtregs.c: New.
9631
9632 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9633
9634 * hostio.c: Don't include errno.h.
9635 (errno_to_fileio_errno): Move to hostio-errno.
9636 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9637 error number outputting to the target->hostio_last_error callback.
9638 (hostio_packet_error): Use FILEIO_EINVAL directly.
9639 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9640 calls to hostio_error.
9641 * hostio-errno.c: New.
9642 * server.h (hostio_last_error_from_errno): Declare.
9643 * target.h (target_ops): Add hostio_last_error member.
9644 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9645 as hostio_last_error handler.
9646 * spu-low.c (spu_target_ops): Likewise.
9647 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9648 (wince_hostio_last_error): New functions.
9649 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9650 as hostio_last_error handler.
9651 (win32_target_ops) [!_WIN32_WCE]: Register
9652 hostio_last_error_from_errno as hostio_last_error handler.
9653 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9654 (hostio-errno.o): New rule.
9655 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9656 * configure.srv (srv_hostio_err_objs): New variable. Default to
9657 hostio-errno.o.
9658 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9659 * configure: Regenerate.
9660
9661 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9662
9663 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9664 (linux_kill, linux_detach): Clean up the process list.
9665 * remote-utils.c (remote_open): Improve port number parsing.
9666 (putpkt_binary, input_interrupt): Only send interrupts if the target
9667 is running.
9668 * server.c (extended_protocol): Make static.
9669 (attached): Define earlier.
9670 (exit_requested, response_needed, program_argv): New variables.
9671 (target_running): New.
9672 (start_inferior): Clear attached here.
9673 (attach_inferior): Set attached here.
9674 (require_running): Define.
9675 (handle_query): Use require_running and target_running. Implement
9676 "monitor exit".
9677 (handle_v_attach, handle_v_run): New.
9678 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9679 (gdbserver_usage): Update.
9680 (main): Redo argument parsing. Handle --debug and --multi. Handle
9681 --attach along with other options or after the port. Save
9682 program_argv. Support no initial program. Resynchronize
9683 communication with GDB after an error. Handle "monitor exit".
9684 Use require_running and target_running. Always allow the extended
9685 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9686 restart in extended mode.
9687 * README: Refer to the GDB manual. Update --attach usage.
9688
9689 2007-12-20 Andreas Schwab <schwab@suse.de>
9690
9691 * linux-low.c (STACK_SIZE): Define.
9692 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9693 (linux_test_for_tracefork): Likewise.
9694
9695 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9696
9697 * linux-low.c (linux_wait_for_event): Update messages. Do not
9698 reinsert auto-delete breakpoints.
9699 * mem-break.c (struct breakpoint): Change return type of handler to
9700 int.
9701 (set_breakpoint_at): Update handler type.
9702 (reinsert_breakpoint_handler): Return 1 instead of calling
9703 delete_breakpoint.
9704 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9705 setting a new one.
9706 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9707 * mem-break.h (set_breakpoint_at): Update handler type.
9708 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9709 * win32-low.c (auto_delete_breakpoint): New.
9710 (get_child_debug_event): Use it.
9711
9712 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9713
9714 * configure.ac: Check for pread and pwrite.
9715 * hostio.c (handle_pread): Fall back to lseek and read.
9716 (handle_pwrite): Fall back to lseek and write.
9717 * config.in, configure: Regenerated.
9718
9719 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9720
9721 * server.c (myresume): Add own_buf argument.
9722 (main): Update calls.
9723
9724 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9725
9726 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9727 * remote-utils.c (remote_open): Do not call disable_async_io.
9728 (block_async_io): Delete.
9729 (unblock_async_io): Make static.
9730 (initialize_async_io): New.
9731 * server.c (handle_v_cont): Handle async I/O here.
9732 (myresume): Likewise. Move other common resume tasks here...
9733 (main): ... from here. Call initialize_async_io. Disable async
9734 I/O before the main loop.
9735 * server.h (initialize_async_io): Declare.
9736 (block_async_io, unblock_async_io): Delete prototypes.
9737 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9738
9739 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9740
9741 * remote-utils.c (readchar): Allow binary data in received messages.
9742
9743 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9744
9745 * win32-low.c (attaching): New global.
9746 (win32_create_inferior): Clear the `attaching' global.
9747 (win32_attach): Set the `attaching' global.
9748 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9749 attaching. Only set a breakpoint at the entry point if not
9750 attaching.
9751
9752 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9753
9754 * server.c (main): Don't report dll events on the initial
9755 connection on attaches.
9756
9757 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9758
9759 * server.c (main): Relax numerical bases supported for the pid of
9760 the --attach command line argument.
9761
9762 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9763
9764 * win32-low.c (win32_attach): Call OpenProcess before
9765 DebugActiveProcess, not after. Add last error output to error
9766 call.
9767
9768 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9769
9770 * win32-low.c (win32_get_thread_context)
9771 (win32_set_thread_context): New functions.
9772 (thread_rec): Use win32_get_thread_context.
9773 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9774 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9775 field.
9776
9777 2007-12-03 Leo Zayas
9778 Pedro Alves <pedro_alves@portugalmail.pt>
9779
9780 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9781 global variables.
9782 (child_add_thread): Minor cleanup.
9783 (child_continue): Resume artificially suspended threads before
9784 calling ContinueDebugEvent.
9785 (suspend_one_thread): New.
9786 (fake_breakpoint_event): New.
9787 (get_child_debug_event): Change return type to int. Check here if
9788 gdb sent an interrupt request. If a soft interrupt was requested,
9789 fake a breakpoint event. Return 0 if there is no event to handle,
9790 and 1 otherwise.
9791 (win32_wait): Don't check here if gdb sent an interrupt request.
9792 Ensure there is a valid event to handle.
9793 (win32_request_interrupt): Add soft interruption method as last
9794 resort.
9795
9796 2007-12-03 Leo Zayas
9797 Pedro Alves <pedro_alves@portugalmail.pt>
9798
9799 * win32-low.h (win32_thread_info): Add descriptions to the
9800 structure members. Replace `suspend_count' counter by a
9801 `suspended' flag.
9802 * win32-low.c (thread_rec): Update condition of when to get the
9803 context from the inferior. Rely on ContextFlags being set if it
9804 has already been retrieved. Only suspend the inferior thread if
9805 we haven't already. Warn if that fails.
9806 (continue_one_thread): s/suspend_count/suspended/. Only call
9807 ResumeThread once. Warn if that fails.
9808
9809 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9810
9811 * win32-low.c (win32_wait): Don't read from the inferior when it
9812 has already exited.
9813
9814 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9815
9816 * Makefile.in (win32_low_h): New variable.
9817 (win32-low.o): Add dependency on $(win32_low_h).
9818 (win32-arm-low.o, win32-i386-low.o): New rules.
9819
9820 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9821
9822 * hostio.c: Correct copyright year.
9823
9824 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9825
9826 * Makefile.in (OBS): Add hostio.o.
9827 (hostio.o): New rule.
9828 * server.h (handle_vFile): Declare.
9829 * hostio.c: New file.
9830 * server.c (handle_v_requests): Take packet_len and new_packet_len
9831 for binary packets. Call handle_vFile.
9832 (main): Update call to handle_v_requests.
9833
9834 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9835
9836 * linux-low.c: Include <sched.h>.
9837
9838 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9839
9840 * linux-low.c (linux_tracefork_grandchild): New.
9841 (linux_tracefork_child): Use clone.
9842 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9843
9844 2007-10-31 Joel Brobecker <brobecker@adacore.com>
9845
9846 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9847
9848 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9849
9850 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9851
9852 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9853
9854 * inferiors.c (change_inferior_id): Delete.
9855 (add_pid_to_list, pull_pid_from_list): New.
9856 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9857 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9858 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9859 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9860 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9861 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9862 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9863 (using_threads): Always set to 1.
9864 (handle_extended_wait): New.
9865 (add_process): Do not set TID.
9866 (linux_create_inferior): Set must_set_ptrace_flags.
9867 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9868 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9869 (linux_thread_alive): Rename TID argument to LWPID.
9870 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9871 (linux_wait_for_event): Do not use TID or check using_threads. Update
9872 call to dead_thread_notify. Call handle_extended_wait.
9873 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9874 (send_sigstop): Delete sigstop_sent.
9875 (wait_for_sigstop): Avoid TID.
9876 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9877 (linux_test_for_tracefork): New.
9878 (linux_lookup_signals): Use thread_db_active and
9879 linux_supports_tracefork_flag.
9880 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9881 * linux-low.h (get_process_thread): Avoid TID.
9882 (struct process_ifo): Move thread_known and tid to the end. Remove
9883 sigstop_sent.
9884 (linux_attach_lwp, thread_db_init): Update prototypes.
9885 * server.h (change_inferior_id): Delete prototype.
9886 (add_pid_to_list, pull_pid_from_list): New prototypes.
9887 * thread-db.c (thread_db_use_events): New.
9888 (find_first_thread): Rename to...
9889 (find_one_thread): ...this. Update callers and messages. Do not
9890 call fatal. Check thread_db_use_events. Do not call
9891 change_inferior_id or new_thread_notify.
9892 (maybe_attach_thread): Update. Do not call new_thread_notify.
9893 (thread_db_init): Set thread_db_use_events. Check use_events.
9894 * utils.c (fatal, warning): Correct message prefix.
9895
9896 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9897
9898 * Makefile.in (clean): Remove new files.
9899 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9900 (powerpc-64.o, powerpc-64.c): New rules.
9901 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9902 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9903 with SPE.
9904 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9905 SPE targets.
9906 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9907 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9908 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9909 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9910 (target_regsets): Add AltiVec and SPE register sets.
9911 * configure.ac: Check for AltiVec and SPE.
9912 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9913 (ppc_fill_vrregset, ppc_store_vrregset): New.
9914 (target_regsets): Add AltiVec register set.
9915 * configure: Regenerated.
9916
9917 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9918
9919 * linux-low.c (O_LARGEFILE): Define.
9920 (linux_read_memory): Use /proc/PID/mem.
9921 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9922 * configure, config.in: Regenerated.
9923
9924 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9925
9926 * linux-low.c (linux_wait_for_event): Do not pass signals while
9927 single-stepping.
9928
9929 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9930
9931 * win32-low.c (create_process): New.
9932 (win32_create_inferior): Use create_process instead of
9933 CreateProcess. If create_process failed retry appending an ".exe"
9934 suffix. Store the GetLastError result immediatelly after
9935 create_process calls and use it on the call to error.
9936
9937 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9938
9939 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9940
9941 2007-08-23 Joel Brobecker <brobecker@adacore.com>
9942
9943 * configure.ac: Switch license to GPLv3.
9944
9945 2007-08-01 Michael Snyder <msnyder@access-company.com>
9946
9947 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9948
9949 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9950
9951 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9952 typedef.
9953 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9954 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9955 CloseToolhelp32Snapshot.
9956 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9957 CloseToolhelp32Snapshot.
9958
9959 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
9960
9961 * server.c (main): Check for inferior exit before main loop.
9962
9963 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9964
9965 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9966 instead of on tmp_desc.
9967
9968 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9969 Daniel Jacobowitz <dan@codesourcery.com>
9970
9971 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9972 (add_thread): Minor cleanups.
9973 (clear_inferiors): Move lower in the file. Clear the DLL
9974 list.
9975 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9976 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9977 (xml_escape_text): New.
9978 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9979 for qSupported.
9980 (handle_v_cont): Report errors.
9981 (gdbserver_version): Update.
9982 (main): Correct size of own_buf. Do not report initial DLL events.
9983 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9984 (unloaded_dll, xml_escape_text): New.
9985 * win32-low.c (enum target_waitkind): Update comments.
9986 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9987 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9988 (win32_EnumProcessModules, win32_GetModuleInformation)
9989 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9990 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9991 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9992 (win32_Module32First, win32_Module32Next, load_toolhelp)
9993 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9994 (get_child_debug_event): Handle DLL events.
9995 (win32_wait): Likewise.
9996
9997 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9998
9999 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10000 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10001
10002 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10003
10004 * win32-low.c (handle_output_debug_string): Ignore event if not
10005 waiting.
10006
10007 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10008
10009 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10010
10011 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10012
10013 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10014
10015 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10016
10017 * inferiors.c (change_inferior_id): Add comment.
10018 * linux-low.c (check_removed_breakpoint): Add an early
10019 prototype. Improve debug output.
10020 (linux_attach): Doc update.
10021 (linux_detach_one_process, linux_detach): Clean up before releasing
10022 each process.
10023 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10024 * linux-low.h (struct process_info): Doc improvement.
10025 * mem-break.c (delete_all_breakpoints): New.
10026 * mem-break.h (delete_all_breakpoints): New prototype.
10027 * thread-db.c (find_first_thread): New.
10028 (thread_db_create_event): Call it instead of
10029 thread_db_find_new_threads. Clean up unused variables.
10030 (maybe_attach_thread): Remove first thread handling.
10031 (thread_db_find_new_threads): Use find_first_thread.
10032 (thread_db_get_tls_address): Likewise.
10033
10034 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10035
10036 * thread-db.c (thread_db_find_new_threads): Add prototype.
10037 (thread_db_create_event): Check for the main thread before adding
10038 a new thread.
10039 (maybe_attach_thread): Only enable event reporting if TID == 0.
10040 (thread_db_get_tls_address): Check for new threads.
10041
10042 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10043
10044 * linux-low.c (linux_create_inferior): Try execv before execvp.
10045 * spu-low.c (spu_create_inferior): Likewise.
10046
10047 2007-06-13 Mike Frysinger <vapier@gentoo.org>
10048
10049 * linux-low.c (linux_create_inferior): Change execv to execvp.
10050 * spu-low.c (spu_create_inferior): Likewies.
10051
10052 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10053
10054 * Makefile.in (clean): Clean new files instead of deleted ones.
10055 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10056 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10057 rules.
10058 * configure.srv: Specify XML files and new regformats for MIPS and
10059 MIPS64 GNU/Linux.
10060 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10061 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10062 an entry for the restart register.
10063 (mips_cannot_fetch_register, mips_cannot_store_register)
10064 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10065 register names to match the XML descriptions.
10066 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10067 restart register instead of $0.
10068
10069 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10070 Markus Deuling <deuling@de.ibm.com>
10071
10072 * remote-utils.c (decode_xfer_write): New function.
10073 * server.h (decode_xfer_write): Add prototype.
10074 * server.c (handle_query): Add PACKET_LEN argument. Support
10075 qXfer:spu:read and qXfer:spu:write packets.
10076 (main): Pass packet_len to handle_query.
10077 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10078 * target.h (target_ops): Add qxfer_spu.
10079
10080 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10081
10082 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10083 accessing non-seekable spufs files.
10084
10085 2007-05-16 Markus Deuling <deuling@de.ibm.com>
10086
10087 * server.c (handle_query): Add reply for qC packet.
10088
10089 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10090 Leo Zayas <lerele@champenstudios@com>
10091
10092 * server.h (check_remote_input_interrupt_request): New function.
10093 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10094 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10095 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10096 (check_remote_input_interrupt_request): New function.
10097 * server.h (check_remote_input_interrupt_request): Declare.
10098 * win32-low.c (winapi_DebugBreakProcess,
10099 winapi_GenerateConsoleCtrlEvent): New typedefs.
10100 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10101 to 250 ms.
10102 (win32_wait): Check for remote interrupt request
10103 with check_remote_input_interrupt_request.
10104 (win32_request_interrupt): New function.
10105 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10106
10107 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10108
10109 * win32-low.c (debug_registers_changed,
10110 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10111 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10112 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10113 (thread_rec): Get context using the low target.
10114 (child_add_thread): Call thread_added on the low target,
10115 which does the same thing.
10116 (regptr): Delete.
10117 (do_initial_child_stuff): Remove debug registers references.
10118 Set context using the low target. Resume threads after
10119 setting the contexts.
10120 (child_continue): Remove dead variable. Remove debug
10121 registers references.
10122 (child_fetch_inferior_registers): Go through the low target.
10123 (do_child_store_inferior_registers): Remove.
10124 (child_store_inferior_registers): Go through the low target.
10125 (win32_resume): Remove debug registers references.
10126 Set context using the low target.
10127 (handle_exception): Change return type to void. Don't record
10128 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10129 first chance exception.
10130 (get_child_debug_event): Change return type to void. Remove
10131 goto loop. Always return after waiting for debug event.
10132 (win32_wait): Convert to switch statement. Handle spurious
10133 events.
10134
10135 * win32-i386-low.c (debug_registers_changed,
10136 debug_registers_used): New.
10137 (initial_stuff): Rename to ...
10138 (i386_initial_stuff): ... this. Clear debug registers
10139 state variables.
10140 (store_debug_registers): Delete.
10141 (i386_get_thread_context): New.
10142 (load_debug_registers): Delete.
10143 (i386_set_thread_context): New.
10144 (i386_thread_added): New.
10145 (single_step): Rename to ...
10146 (i386_single_step): ... this.
10147 (do_fetch_inferior_registers): Rename to ...
10148 (i386_fetch_inferior_register): ... this.
10149 (i386_store_inferior_register): New.
10150 (the_low_target): Adapt to new interface.
10151
10152 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10153 (arm_get_thread_context): New.
10154 (arm_set_thread_context): New.
10155 (regptr): New.
10156 (do_fetch_inferior_registers): Rename to ...
10157 (arm_fetch_inferior_register): ... this.
10158 (arm_store_inferior_register): New.
10159 (arm_wince_breakpoint): Reimplement as unsigned long.
10160 (arm_wince_breakpoint_len): Define.
10161 (the_low_target): Adapt to new interface.
10162
10163 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10164 load_debug_registers. Add get_thread_context, set_thread_context,
10165 thread_added and store_inferior_register. Rename
10166 fetch_inferior_registers to fetch_inferior_register.
10167 (regptr): Remove declaration.
10168
10169 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10170
10171 * linux-low.c (linux_detach): Change return type to int. Return 0.
10172 * spu-low.c (spu_detach): Likewise.
10173
10174 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10175
10176 * target.h (target_ops): Change return type of detach to int.
10177 Add join.
10178 (join_inferior): New.
10179 * server.c (main): Don't skip detach support on mingw32.
10180 If the inferior doesn't support detaching return error.
10181 Call join_inferior instead of using waitpid.
10182 * linux-low.c (linux_join): New.
10183 (linux_target_op): Add linux_join.
10184 * spu-low.c (spu_join): New.
10185 (spu_target_ops): Add spu_join.
10186 * win32-low.c (win32_detach): Adapt to new interface.
10187 Reopen current_process_handle before detaching. Issue a child
10188 resume before detaching.
10189 (win32_join): New.
10190 (win32_target_op): Add win32_join.
10191
10192 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10193
10194 * win32-low.c (win32-attach): Fix return value.
10195 * target.h (target_ops): Describe ATTACH return values.
10196
10197 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10198
10199 * win32-low.c (GETPROCADDRESS): Define.
10200 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10201 (winapi_DebugSetProcessKillOnExit): Likewise.
10202 (win32_create_inferior): Force usage of ansi CreateProcessA.
10203 (win32_attach): Use GETPROCADDRESS.
10204 (win32_detach): Likewise.
10205
10206 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10207
10208 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10209
10210 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10211
10212 * win32-low.c: Commit leftover changes from 2007-03-29.
10213
10214 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10215
10216 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10217 fields short instead of int. Add explicit padding.
10218 (i387_cache_to_fsave): Remove unnecessary casts.
10219 (i387_fsave_to_cache): Doc fix.
10220 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10221
10222 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10223
10224 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10225 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10226
10227 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10228
10229 * configure.srv (arm*-*-mingw32ce*): Move near the other
10230 arm targets.
10231
10232 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10233
10234 * configure.ac: Add errno checking.
10235 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10236 sys/file.h and malloc.h.
10237 (AC_CHECK_DECLS): Add perror.
10238 (srv_mingwce): Handle.
10239 * configure.srv (i[34567]86-*-cygwin*): Add
10240 win32-i386-low.o to srv_tgtobj.
10241 (i[34567]86-*-mingw*): Likewise.
10242 (arm*-*-mingw32ce*): Add case.
10243 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10244 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10245 [__MINGW32CE__] (strerror): New function.
10246 [__MINGW32CE__] (errno): Define to GetLastError.
10247 [__MINGW32CE__] (COUNTOF): New macro.
10248 (remote_open): Remove extra close call.
10249 * mem-break.c (delete_breakpoint_at): New function.
10250 * mem-break.h (delete_breakpoint_at): Declare.
10251 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10252 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10253 [USE_WIN32API] (read, write): Add char* casts.
10254 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10255 * server.h: Include wincecompat.h on Windows CE.
10256 [HAVE_ERRNO_H]: Check.
10257 (perror): Declare if not declared.
10258 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10259 (perror_with_name): Remove errno declaration.
10260 * wincecompat.h: New.
10261 * wincecompat.c: New.
10262 * win32-low.h: New.
10263 * win32-arm-low.c: New.
10264 * win32-i386-low.c: New.
10265 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10266 (OUTMSG2): Make it safe.
10267 (_T): New macro.
10268 (COUNTOF): New macro.
10269 (NUM_REGS): Get it from the low target.
10270 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10271 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10272 (thread_rec): Let low target handle debug registers.
10273 (child_add_thread): Likewise.
10274 (child_init_thread_list): Likewise.
10275 (continue_one_thread): Likewise.
10276 (regptr): New.
10277 (do_child_fetch_inferior_registers): Move to ...
10278 * win32-i386-low.c: ... here, and rename to ...
10279 (do_fetch_inferior_registers): ... this.
10280 * win32-low.c (child_fetch_inferior_registers):
10281 Go through the low target.
10282 (do_child_store_inferior_registers): Use regptr.
10283 (strwinerror): New function.
10284 (win32_create_inferior): Handle Windows CE.
10285 Use strwinerror instead of strerror on Windows error
10286 codes. Add program to the error output.
10287 Don't close the main thread handle on Windows CE.
10288 (win32_attach): Use coredll.dll on Windows CE.
10289 (win32_kill): Close current process and current
10290 thread handles.
10291 (win32_detach): Use coredll.dll on Windows CE.
10292 (win32_resume): Let low target handle debug registers, and
10293 step request.
10294 (handle_exception): Add/Remove initial breakpoint. Avoid
10295 non-existant WSTOPSIG on Windows CE.
10296 (win32_read_inferior_memory): Cast to remove warning.
10297 (win32_arch_string): Go through the low target.
10298 (initialize_low): Call set_breakpoint_data with the low
10299 target's breakpoint.
10300 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10301 FOP_REGNUM, mappings): Move to ...
10302 * win32-i386-low.c: ... here.
10303 * win32-low.c (win32_thread_info): Move to ...
10304 * win32-low.h: ... here.
10305 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10306 win32-arm-low.c and wincecompat.c.
10307 (all:): Add $EXEEXT.
10308 (install-only:): Likewise.
10309 (gdbserver:): Likewise.
10310 (gdbreplay:): Likewise.
10311 * config.in: Regenerate.
10312 * configure: Regenerate.
10313
10314 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10315
10316 * win32-low.c: Rename typedef thread_info to
10317 win32_thread_info throughout.
10318
10319 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10320
10321 * win32-i386-low.c: Rename to ...
10322 * win32-low.c: ... this.
10323 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10324 * Makefile.in: Likewise.
10325
10326 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10327
10328 * remote-utils.c (monitor_output): Constify msg parameter.
10329 * server.h (monitor_output): Likewise.
10330 * win32-i386-low.c (handle_output_debug_string): New.
10331 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10332 handle_output_debug_string.
10333 (get_child_debug_event): Likewise.
10334
10335 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10336
10337 * server.c (main): Correct strtoul check.
10338
10339 2007-03-27 Jon Ringle <jon@ringle.org>
10340
10341 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10342
10343 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10344
10345 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10346
10347 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10348
10349 * terminal.h: Check HAVE_SGTTY_H.
10350
10351 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
10352
10353 * remote-utils.c (remote_open): Print out the assigned port number.
10354
10355 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10356
10357 * remote-utils.c (monitor_output): New function.
10358 * server.c (debug_threads): Define here.
10359 (monitor_show_help): New function.
10360 (handle_query): Handle qRcmd.
10361 (main): Do not handle 'd' packet.
10362 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10363 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10364 of debug_threads.
10365
10366 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10367
10368 * Makefile.in (EXEEXT): New.
10369 (clean): Use $(EXEEXT).
10370
10371 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10372
10373 * target.h (target_ops): Rename send_signal to request_interrupt,
10374 and remove enum target_signal parameter.
10375 * linux-low.c (linux_request_interrupt): Rename from
10376 linux_send_signal, and always send SIGINT.
10377 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10378 and always send SIGINT.
10379 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10380 of send_signal.
10381 (input_interrupt): Likewise.
10382
10383 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10384
10385 * server.c (get_features_xml): Check if target implemented
10386 arch_string.
10387 * win32-i386-low.c (win32_arch_string): New.
10388 (win32_target_ops): Add win32_arch_string as arch_string member.
10389
10390 2007-02-22 Markus Deuling <deuling@de.ibm.com>
10391
10392 * spu-low.c (spu_arch_string): New.
10393 (spu_target_ops): Add spu_arch_string.
10394
10395 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10396
10397 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10398 * configure.ac: Do not check for terminal.h.
10399 * configure, config.in: Regenerated.
10400
10401 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10402
10403 * Makefile.in (OBS): Add $(XML_BUILTIN).
10404 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10405 (clean): Update.
10406 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10407 (arm-with-iwmmxt.c): New.
10408 * config.in, configure: Regenerate.
10409 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10410 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10411 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10412 (arm*-*-linux*): Add iWMMXt and regset support.
10413 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10414 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10415 (arm_store_wmmxregset, target_regsets): New.
10416 * server.c (get_features_xml): Take annex argument. Check builtin
10417 XML documents.
10418 (handle_query): Handle multiple annexes.
10419
10420 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10421
10422 * remote-utils.c [USE_WIN32API] (read, write): Define.
10423 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10424 write.
10425
10426 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10427
10428 * linux-i386-low.c (the_low_target): Set arch_string.
10429 * linux-x86-64-low.c (the_low_target): Likewise.
10430 * linux-low.c (linux_arch_string): New.
10431 (linux_target_ops): Add it.
10432 * linux-low.h (struct linux_target_ops): Add arch_string.
10433 * server.c (write_qxfer_response): Use const void * for DATA.
10434 (get_features_xml): New.
10435 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10436 * target.h (struct target_ops): Add arch_string method.
10437
10438 2007-01-03 Denis Pilat <denis.pilat@st.com>
10439 Daniel Jacobowitz <dan@codesourcery.com>
10440
10441 * linux-low.c (linux_kill): Handle being called with no threads.
10442 * win32-i386-low.c (win32_kill): Likewise.
10443 (get_child_debug_event): Clear current_process_handle.
10444
10445 2006-12-30 Denis PILAT <denis.pilat@st.com>
10446 Daniel Jacobowitz <dan@codesourcery.com>
10447
10448 * remote-utils.c (remote_open): Check the type of specified
10449 serial port devices before opening them.
10450 * server.c (main): Kill the inferior if an error occurs during
10451 the first remote_open.
10452
10453 2006-12-05 Markus Deuling <deuling@de.ibm.com>
10454
10455 * README: Update supported targets.
10456
10457 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10458
10459 * Makefile.in (clean): Remove reg-mips64.c.
10460 (reg-mips64.c, reg-mips64.o): New rules.
10461 * configure.srv: Handle mips64. Include regset support for mips.
10462 * linux-mips-low.c (union mips_register): New.
10463 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10464 (mips_breakpoint, mips_breakpoint_at): Use int.
10465 (mips_collect_register, mips_supply_register)
10466 (mips_collect_register_32bit, mips_supply_register_32bit)
10467 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10468 (mips_store_fpregset, target_regsets): New.
10469 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10470
10471 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10472
10473 * configure.srv: Add target "spu*-*-*".
10474 * Makefile.in (clean): Remove reg-spu.c.
10475 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10476 * spu-low.c: New file.
10477
10478 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10479
10480 * configure.ac: Correct td_thr_tls_get_addr test.
10481 * configure: Regenerated.
10482
10483 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10484
10485 * linux-low.c (linux_wait_for_event): Reformat. Use the
10486 pass_signals array.
10487 * remote-utils.c (decode_address_to_semicolon): New.
10488 * server.c (pass_signals, handle_general_set): New.
10489 (handle_query): Mention QPassSignals for qSupported.
10490 (main): Call handle_general_set.
10491 * server.h (pass_signals, decode_address_to_semicolon): New.
10492
10493 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10494
10495 * server.c (handle_query): Correct error handling for read_auxv.
10496
10497 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10498
10499 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10500 and srv_linux_thread_db to yes.
10501 * linux-s390-low.c (s390_fill_gregset): New function.
10502 (target_regsets): Define data structure.
10503
10504 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10505
10506 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10507 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10508 * config.in, configure: Regenerated.
10509 * inferiors.c (gdb_id_to_thread): New function.
10510 (gdb_id_to_thread_id): Use it.
10511 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10512 * linux-low.h (struct process_info): Add th member.
10513 (thread_db_get_tls_address): New prototype.
10514 * remote-utils.c (decode_address): Make non-static.
10515 * server.c (handle_query): Handle qGetTLSAddr.
10516 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10517 * target.h (struct target_ops): Add get_tls_address.
10518 * thread-db.c (maybe_attach_thread): Save the thread handle.
10519 (thread_db_get_tls_address): New.
10520
10521 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10522
10523 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10524 (linux_resume_one_process): Take a siginfo_t *. Update all
10525 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10526 (struct pending_signals): Add a siginfo_t.
10527 (linux_wait_for_process): Always set last_status.
10528 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10529 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10530 * linux-low.h (struct process_info): Add last_status.
10531
10532 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10533
10534 * remote-utils.c (try_rle): New function.
10535 (putpkt_binary): Use it.
10536
10537 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10538
10539 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10540 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10541 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10542 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10543 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10544 point registers.
10545
10546 2006-08-08 Richard Sandiford <richard@codesourcery.com>
10547
10548 * server.c (terminal_fd): New variable.
10549 (old_foreground_pgrp): Likewise.
10550 (restore_old_foreground_pgrp): New function.
10551 (start_inferior): Record the terminal file descriptor in terminal_fd
10552 and its original foreground group in old_foreground_pgrp. Register
10553 restore_old_foreground_pgrp with atexit().
10554
10555 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10556
10557 * server.c (handle_query): Correct qPart to qXfer.
10558
10559 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10560
10561 * configure.ac: Check for more headers which are missing on
10562 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10563 * configure.srv: Add Cygwin and mingw32.
10564 * remote-utils.c: Don't include headers unconditionally which
10565 are missing on mingw32. Include <winsock.h> for mingw32.
10566 (remote_open): Adjust for mingw32 support. Flush
10567 standard error after writing to it.
10568 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10569 (unblock_async_io, enable_async_io, disable_async_io)
10570 (readchar, getpkt): Update for Winsock support.
10571 (prepare_resume_reply): Expect a protocol signal number.
10572 * server.c: Disable <sys/wait.h> on mingw32.
10573 (start_inferior): Adjust for mingw32 support. Flush
10574 standard error after writing to it.
10575 (attach_inferior): Likewise. Use protocol signal
10576 numbers.
10577 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10578 and names.
10579 * win32-i386-low.c: New file.
10580 * Makefile.in (XM_CLIBS): Set.
10581 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10582 (win32-i386-low.o): New dependency rule.
10583 * linux-low.c (linux_wait): Use target signal numbers.
10584 * target.h (struct target_ops): Doc fix.
10585 * server.h (target_signal_to_name): New prototype.
10586 * gdbreplay.c: Don't include headers unconditionally which
10587 are missing on mingw32. Include <winsock.h> for mingw32.
10588 (remote_close, remote_open): Adjust for Winsock support.
10589 * configure, config.in: Regenerated.
10590
10591 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10592
10593 * server.c (decode_xfer_read, write_qxfer_response): New.
10594 (handle_query): Take a packet length argument. Handle
10595 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10596 the qSupported response.
10597 (main): Update call to handle_query.
10598
10599 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10600
10601 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10602 (putpkt_binary): Renamed from putpkt and adjusted for binary
10603 data.
10604 (putpkt): New wrapper for putpkt_binary.
10605 (readchar): Don't mask off the high bit.
10606 (decode_X_packet): New function.
10607 * server.c (main): Call putpkt_binary if a handler sets the packet
10608 length. Save the length of the incoming packet. Handle 'X'.
10609 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10610
10611 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10612
10613 * server.c (handle_query): Handle qSupported.
10614
10615 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10616
10617 * remote-utils.c (all_symbols_looked_up): New variable.
10618 (look_up_one_symbol): Check it.
10619 * server.h (look_up_one_symbol): New declaration.
10620 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10621
10622 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10623
10624 * Makefile.in (linux-arm-low.o): Update dependencies.
10625 * linux-arm-low.c: Include "gdb_proc_service.h".
10626 (PTRACE_GET_THREAD_AREA): Define.
10627 (ps_get_thread_area): New function.
10628
10629 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10630
10631 * configure.srv (m68k*-*-uclinux*): New target.
10632 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10633 (linux_resume_one_process): Remove extraneous cast.
10634 (linux_read_offsets): New.
10635 (linux_target_op): Add linux_read_offsets on mmuless systems.
10636 * server.c (handle_query): Add qOffsets logic.
10637 * target.h (struct target_ops): Add read_offsets.
10638
10639 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10640
10641 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10642 (PTRACE_GET_THREAD_AREA): Define.
10643 (ps_get_thread_area): New function.
10644 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10645 (linux-x86-64-low.o): Update.
10646
10647 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10648
10649 * configure.ac: Remove checks for prfpregset_t.
10650 * gdb_proc_service.h: New file.
10651 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10652 new "gdb_proc_service.h".
10653 * proc-service.c: Likewise.
10654 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10655 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10656 * Makefile.in (gdb_proc_service_h): Updated.
10657 * configure, config.in: Regenerated.
10658
10659 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10660
10661 * remote-utils.c (prepare_resume_reply): Move declaration
10662 of gdb_id_from_wait to the top of the block.
10663
10664 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10665
10666 * linux-low.c (regsets_store_inferior_registers): Read the regset
10667 from the target before filling it.
10668
10669 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10670
10671 * server.c (attach_inferior): Return SIGTRAP for a successful
10672 attach.
10673
10674 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10675
10676 * Makefile.in (OBS): Add version.o.
10677 (STAGESTUFF): Delete.
10678 (version.o): Add dependencies.
10679 (version.c): Replace rule.
10680 (clean): Remove version.c.
10681 * server.c (gdbserver_version): New.
10682 (gdbserver_usage): Use printf.
10683 (main): Handle --version and --help.
10684 * server.h (version, host_name): Add declarations.
10685
10686 2005-12-23 Eli Zaretskii <eliz@gnu.org>
10687
10688 * linux-arm-low.c:
10689 * linux-arm-low.c:
10690 * inferiors.c:
10691 * i387-fp.h:
10692 * i387-fp.c:
10693 * gdbreplay.c:
10694 * regcache.c:
10695 * proc-service.c:
10696 * mem-break.h:
10697 * mem-break.c:
10698 * linux-x86-64-low.c:
10699 * linux-sh-low.c:
10700 * linux-s390-low.c:
10701 * linux-ppc64-low.c:
10702 * linux-ppc-low.c:
10703 * linux-mips-low.c:
10704 * linux-m68k-low.c:
10705 * linux-m32r-low.c:
10706 * linux-low.h:
10707 * linux-low.c:
10708 * linux-ia64-low.c:
10709 * linux-i386-low.c:
10710 * linux-crisv32-low.c:
10711 * thread-db.c:
10712 * terminal.h:
10713 * target.h:
10714 * target.c:
10715 * server.h:
10716 * server.c:
10717 * remote-utils.c:
10718 * regcache.h:
10719 * utils.c:
10720 * Makefile.in:
10721 * configure.ac:
10722 * gdbserver.1: Add (C) after Copyright. Update the FSF
10723 address.
10724
10725 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10726
10727 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10728 (arm_breakpoint_at): Recognize both breakpoints.
10729 (the_low_target): Use the correct breakpoint instruction.
10730
10731 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10732
10733 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10734 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10735 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10736 (the_low_target): Update.
10737
10738 2005-10-25 Andreas Schwab <schwab@suse.de>
10739
10740 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10741
10742 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10743 (ia64_num_regs): Reduce to 462.
10744
10745 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10746
10747 * acinclude.m4: Correct quoting.
10748 * aclocal.m4: Regenerated.
10749
10750 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10751 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10752 (thread_db_init): Call thread_db_err_str.
10753 * configure.ac: Check for TD_VERSION.
10754 * config.in, configure: Regenerated.
10755
10756 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10757
10758 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10759
10760 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10761
10762 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10763 is not available. Define HAVE_PTRACE_GETREGS if it is.
10764 * config.in, configure: Regenerated.
10765 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10766 * linux-i386-low.c, linux-m68k-low.c: Update to use
10767 HAVE_PTRACE_GETREGS.
10768 * linux-low.c (regsets_fetch_inferior_registers)
10769 (regsets_store_inferior_registers): Only return 0 if we processed
10770 GENERAL_REGS.
10771 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10772 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10773
10774 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10775
10776 * inferiors.c (struct thread_info): Add gdb_id.
10777 (add_thread): Add gdb_id argument.
10778 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10779 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10780 calls to add_thread.
10781 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10782 * server.c (handle_query): Use thread_to_gdb_id.
10783 (handle_v_cont, main): Use gdb_id_to_thread_id.
10784 * server.h (add_thread): Update prototype.
10785 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10786 prototypes.
10787
10788 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10789
10790 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10791 left-padded registers.
10792 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10793 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10794
10795 2005-07-01 Steve Ellcey <sje@cup.hp.com>
10796
10797 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10798 * configure: Regenerate.
10799 * config.in: Regenerate.
10800 * server.h (NEED_DECLARATION_STRERROR):
10801 Replace with !HAVE_DECL_STRERROR.
10802
10803 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10804
10805 * linux-low.c (linux_wait, linux_send_signal): Don't test
10806 an unsigned long variable for > 0 if it could be MAX_ULONG.
10807 * server.c (myresume): Likewise.
10808 * target.c (set_desired_inferior): Likewise.
10809
10810 2005-06-13 Mark Kettenis <kettenis@gnu.org>
10811
10812 * configure.ac: Simplify and improve check for socklen_t.
10813 * configure, config.in: Regenerate.
10814
10815 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10816
10817 * acconfig.h: Remove.
10818 * configure.ac: Add a test for socklen_t. Use three-argument
10819 AC_DEFINE throughout.
10820 * config.in: Regenerated using autoheader 2.59.
10821 * configure: Regenerated.
10822
10823 * gdbreplay.c (socklen_t): Provide a default.
10824 (remote_open): Use socklen_t.
10825 * remote-utils.c (socklen_t): Provide a default.
10826 (remote_open): Use socklen_t.
10827 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10828 unsigned char.
10829
10830 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10831 char for buffers.
10832 * linux-low.c (linux_read_memory, linux_write_memory)
10833 (linux_read_auxv): Likewise.
10834 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10835 (check_mem_write): Likewise.
10836 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10837 Likewise.
10838 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10839 (registers_from_string, register_data): Likewise.
10840 * server.c (handle_query, main): Likewise.
10841 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10842 (decode_M_packet): Likewise.
10843 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10844 * target.h (struct target_ops): Update read_memory, write_memory,
10845 and read_auxv.
10846 (read_inferior_memory, write_inferior_memory): Update.
10847 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10848 to unsigned char *.
10849 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10850 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10851 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10852 linux-s390-low.c, linux-sh-low.c: Update for changes in
10853 read_inferior_memory and the_low_target->breakpoint.
10854
10855 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10856
10857 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10858 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10859 * configure.srv: Add powerpc64-*-linux*.
10860 * linux-ppc64-low.c: New file.
10861
10862 2005-05-23 Orjan Friberg <orjanf@axis.com>
10863
10864 * linux-cris-low.c: New file with support for CRIS.
10865 * linux-crisv32-low.c: Ditto for CRISv32.
10866 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10867 (clean): Add reg-cris.c and reg-crisv32.c.
10868 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
10869 reg-crisv32.o, and reg-crisv32.c to make rules.
10870 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10871 recognized targets.
10872
10873 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10874
10875 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10876 of sizeof (PTRACE_XFER_TYPE).
10877 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10878
10879 2005-05-12 Orjan Friberg <orjanf@axis.com>
10880
10881 * target.h (struct target_ops): Add insert_watchpoint,
10882 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10883 pointers for hardware watchpoint support.
10884 * linux-low.h (struct linux_target_ops): Ditto.
10885 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10886 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10887 to linux_target_ops.
10888 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10889 reply packet.
10890 * server.c (main): Recognize 'Z' and 'z' packets.
10891
10892 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10893
10894 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10895 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10896 (the_low_target): Add new members.
10897
10898 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10899
10900 * proc-service.c (ps_lgetregs): Search all_processes instead of
10901 all_threads.
10902
10903 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10904
10905 * server.c (start_inferior): Change return type to int.
10906 (attach_inferior): Change sigptr to int *.
10907 (handle_v_cont, handle_v_requests): Change signal to int *.
10908 (main): Change signal to int.
10909
10910 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
10911
10912 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10913 * configure.srv: Add m32r*-*-linux*.
10914 * linux-m32r-low.c: New file.
10915
10916 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10917
10918 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10919
10920 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10921
10922 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10923 Take unsigned long arguments for PIDs.
10924 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10925 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10926 (wait_for_sigstop, linux_resume_one_process)
10927 (regsets_fetch_inferior_registers, linux_send_signal)
10928 (linux_read_auxv): Likewise. Update the types of variables holding
10929 PIDs. Update format string specifiers.
10930 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10931 * remote-utils.c (prepare_resume_reply): Likewise.
10932 * server.c (cont_thread, general_thread, step_thread)
10933 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10934 unsigned long.
10935 (handle_query): Update format specifiers.
10936 (handle_v_cont, main): Use strtoul for thread IDs.
10937 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10938 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10939 (general_thread, step_thread, thread_from_wait)
10940 (old_thread_from_wait): Update.
10941 * target.h (struct thread_resume): Use unsigned long for THREAD.
10942 (struct target_ops): Use unsigned long for arguments to attach and
10943 thread_alive.
10944
10945 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10946
10947 * acinclude.m4: Include bfd/bfd.m4 directly.
10948 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10949 <agriffis@toolchain.org>.
10950 * aclocal.m4, configure: Regenerated.
10951
10952 2005-01-07 Andrew Cagney <cagney@gnu.org>
10953
10954 * configure.ac: Rename configure.in, require autoconf 2.59.
10955 * configure: Re-generate.
10956
10957 2004-12-08 Daniel Jacobowitz <dan@debian.org>
10958
10959 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10960 LIBS when finished.
10961 * aclocal.m4: Regenerated.
10962 * configure: Regenerated.
10963
10964 2004-11-21 Andreas Schwab <schwab@suse.de>
10965
10966 * linux-m68k-low.c (m68k_num_gregs): Define.
10967 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10968 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10969 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10970 (m68k_breakpoint_at): New. Add to the_low_target.
10971
10972 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10973 srv_linux_thread_db to yes.
10974
10975 2004-10-20 Joel Brobecker <brobecker@gnat.com>
10976
10977 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10978 (ARCH_SET_FS): Likewise.
10979 (ARCH_GET_FS): Likewise.
10980 (ARCH_GET_GS): Likewise.
10981
10982 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10983
10984 * linux-i386-low.c (ps_get_thread_area): New.
10985 * linux-x86-64-low.c (ps_get_thread_area): New.
10986 * linux-low.c: Include <sys/syscall.h>.
10987 (linux_kill_one_process): Don't kill the first thread here.
10988 (linux_kill): Kill the first thread here.
10989 (kill_lwp): New function.
10990 (send_sigstop, linux_send_signal): Use it.
10991 * proc-service.c: Clean up #ifdefs.
10992 (fpregset_info): Delete.
10993 (ps_lgetregs): Update and enable implementation.
10994 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10995 implementations.
10996 * remote-utils.c (struct sym_cache, symbol_cache): New.
10997 (input_interrupt): Print a clearer message.
10998 (async_io_enabled): New variable.
10999 (enable_async_io, disable_async_io): Use it. Update comments.
11000 (look_up_one_symbol): Use the symbol cache.
11001 * thread-db.c (thread_db_look_up_symbols): New function.
11002 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11003
11004 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11005
11006 * configure.in: Test for -rdynamic.
11007 * configure: Regenerated.
11008 * Makefile (INTERNAL_LDFLAGS): New.
11009 (gdbserver, gdbreplay): Use it.
11010
11011 2004-09-02 Andrew Cagney <cagney@gnu.org>
11012
11013 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11014
11015 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
11016
11017 * linux-low.c (linux_wait): Clear all_processes list also.
11018
11019 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11020
11021 * linux-low.c: Include <errno.h>. Remove extern declaration of
11022 errno.
11023
11024 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11025
11026 * gdbreplay.c, server.h, utils.c: Update copyright years.
11027
11028 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11029
11030 * server.c (main): Print child status or termination signal from
11031 variable 'signal', not 'sig'.
11032
11033 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11034
11035 * linux-low.c (linux_read_memory): Change return type to
11036 int. Check for and return error from ptrace().
11037 * target.c (read_inferior_memory): Change return type to int. Pass
11038 back return status from the_target->read_memory().
11039 * target.h (struct target_ops): Adapt *read_memory() prototype.
11040 Update comment.
11041 (read_inferior_memory): Adapt prototype.
11042 * server.c (main): Return an error packet if
11043 read_inferior_memory() returns an error.
11044
11045 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
11046
11047 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11048 Unify with other clean targets.
11049
11050 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11051
11052 * server.c (handle_v_cont): Call set_desired_inferior.
11053
11054 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11055
11056 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11057
11058 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11059
11060 * linux-low.c (linux_wait): Unblock async I/O.
11061 (linux_resume): Block and enable async I/O.
11062 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11063 * server.h (block_async_io, unblock_async_io): Add prototypes.
11064
11065 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11066
11067 * remote-utils.c (remote_open): Print a status notice after
11068 opening a TCP port.
11069 * server.c (attach_inferior): Print a status notice after
11070 attaching.
11071
11072 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11073
11074 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11075
11076 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
11077
11078 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11079 error packet.
11080 * server.c, target.h: Update copyright years.
11081
11082 2004-02-25 Roland McGrath <roland@redhat.com>
11083
11084 * target.h (struct target_ops): New member `read_auxv'.
11085 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11086 * linux-low.c (linux_read_auxv): New function.
11087 (linux_target_ops): Initialize `read_auxv' member to that.
11088
11089 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11090
11091 Committed by Jim Blandy <jimb@redhat.com>.
11092
11093 * linux-s390-low.c (s390_num_regs): Update.
11094 (s390_regmap): Remove control registers. Use __s390x__ predefine
11095 instead of GPR_SIZE to distiguish s390 and s390x targets.
11096
11097 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
11098
11099 * linux-low.c: Update copyright year.
11100 (check_removed_breakpoint): Clear pending_is_breakpoint.
11101 (linux_set_resume_request, linux_queue_one_thread)
11102 (resume_status_pending_p): New functions.
11103 (linux_continue_one_thread): Use process->resume.
11104 (linux_resume): Only resume threads if there are no pending events.
11105 * linux-low.h (struct process_info): Add resume request
11106 pointer.
11107
11108 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
11109
11110 * regcache.c (new_register_cache): Clear the allocated register
11111 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11112
11113 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
11114
11115 * linux-low.c (linux_resume): Take a struct thread_resume *
11116 argument.
11117 (linux_wait): Update call.
11118 (resume_ptr): New static variable.
11119 (linux_continue_one_thread): Renamed from
11120 linux_continue_one_process. Use resume_ptr.
11121 (linux_resume): Use linux_continue_one_thread.
11122 * server.c (handle_v_cont, handle_v_requests): New functions.
11123 (myresume): New function.
11124 (main): Handle 'v' case.
11125 * target.h (struct thread_resume): New type.
11126 (struct target_ops): Change argument of "resume" to struct
11127 thread_resume *.
11128 (myresume): Delete macro.
11129
11130 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11131
11132 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11133 (uninstall): Support DESTDIR.
11134
11135 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11136
11137 * configure.srv: Add xscale*linux copy of arm*linux entry.
11138
11139 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
11140
11141 * linux-arm-low.c (arm_reinsert_addr): New function.
11142 (the_low_target): Add arm_reinsert_addr.
11143
11144 2003-07-08 Mark Kettenis <kettenis@gnu.org>
11145
11146 * mem-break.c: Remove whitespace at end of file.
11147
11148 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11149
11150 * configure.in: Check whether we need to prototype strerror.
11151 * server.h: Optionally prototype strerror.
11152 * gdbreplay.c (perror_with_name): Use strerror.
11153 * linux-low.c (linux_attach_lwp): Use strerror.
11154 * utils.c (perror_with_name): Use strerror.
11155 * config.in, configure: Regenerated.
11156
11157 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11158
11159 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11160 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11161
11162 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
11163
11164 * Makefile.in (SFILES): Update.
11165 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11166 low-sun3.c: Remove files.
11167
11168 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
11169
11170 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11171 (linux_detach_one_process, linux_detach): New functions.
11172 (linux_target_ops): Add linux_detach.
11173 * server.c (main): Handle 'D' packet.
11174 * target.h (struct target_ops): Add "detach" member.
11175 (detach_inferior): Define.
11176
11177 2003-06-13 Mark Kettenis <kettenis@gnu.org>
11178
11179 From Kelley Cook <kelleycook@wideopenwest.com>:
11180 * configure.srv: Accept i[34567]86 variants.
11181
11182 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
11183
11184 * linux-low.c (linux_wait_for_event): Correct comment typos.
11185 (linux_resume_one_process): Call check_removed_breakpoint.
11186 (linux_send_signal): New function.
11187 (linux_target_ops): Add linux_send_signal.
11188 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11189 of kill.
11190 * target.h (struct target_ops): Add send_signal.
11191
11192 2003-05-29 Jim Blandy <jimb@redhat.com>
11193
11194 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11195 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11196 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11197 away part of the register's value.
11198
11199 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
11200
11201 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11202 (linux_wait_for_event, linux_init_signals): Likewise.
11203
11204 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
11205
11206 * configure.in: Check for stdlib.h.
11207 * configure: Regenerated.
11208 * config.in: Regenerated.
11209
11210 2003-01-04 Andreas Schwab <schwab@suse.de>
11211
11212 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11213
11214 2003-01-02 Andrew Cagney <ac131313@redhat.com>
11215
11216 * Makefile.in: Remove obsolete code.
11217
11218 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
11219
11220 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11221 defined(PT_FPR0_HI).
11222
11223 2002-11-17 Stuart Hughes <seh@zee2.com>
11224
11225 * linux-arm-low.c (arm_num_regs): Increase.
11226 (arm_regmap): Include status register.
11227
11228 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
11229
11230 * linux-low.c (register_addr): Remove incorrect -1 check.
11231
11232 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
11233
11234 * linux-low.c (linux_create_inferior): Call setpgid. Return
11235 the new PID.
11236 (unstopped_p, linux_signal_pid): Remove.
11237 (linux_target_ops): Remove linux_signal_pid.
11238 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11239 global instead of target method.
11240 * target.h (struct target_ops): Remove signal_pid. Update comment
11241 for create_inferior.
11242 * server.c (signal_pid): New variable.
11243 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
11244 gdbserver. Set the child to be the foreground process group.
11245 (attach_inferior): Set signal_pid.
11246
11247 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
11248
11249 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11250
11251 2002-08-20 Jim Blandy <jimb@redhat.com>
11252
11253 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11254 default for this.
11255
11256 2002-08-01 Andrew Cagney <cagney@redhat.com>
11257
11258 * Makefile.in: Make chill references obsolete.
11259
11260 2002-07-24 Kevin Buettner <kevinb@redhat.com>
11261
11262 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11263 * configure: Regenerate.
11264 * config.in: Regenerate.
11265
11266 2002-07-09 David O'Brien <obrien@FreeBSD.org>
11267
11268 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11269 (perror_with_name, remote_close, remote_open, expect, play): Static.
11270
11271 2002-07-04 Michal Ludvig <mludvig@suse.cz>
11272
11273 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
11274 byte offsets instead of an array of indexes.
11275 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11276
11277 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
11278
11279 * regcache.c: Add comment.
11280
11281 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
11282
11283 * thread-db.c: New file.
11284 * proc-service.c: New file.
11285 * acinclude.m4: New file.
11286 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11287 proc-service.o, and thread-db.o.
11288 (linux-low.o): Add USE_THREAD_DB.
11289 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11290 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11291 * aclocal.m4: Regenerated.
11292 * config.in: Regenerated.
11293 * configure: Regenerated.
11294 * configure.in: Check for proc_service.h, sys/procfs.h,
11295 thread_db.h, and linux/elf.h headrs.
11296 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11297 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11298 Check for -lthread_db and thread support.
11299 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11300 PowerPC, and SuperH.
11301 * i387-fp.c: Constify arguments.
11302 * i387-fp.h: Likewise.
11303 * inferiors.c: (struct thread_info): Renamed from
11304 `struct inferior_info'. Remove PID member. Use generic inferior
11305 list header. All uses updated.
11306 (inferiors, signal_pid): Removed.
11307 (all_threads): New variable.
11308 (get_thread): Define.
11309 (add_inferior_to_list): New function.
11310 (for_each_inferior): New function.
11311 (change_inferior_id): New function.
11312 (add_inferior): Removed.
11313 (remove_inferior): New function.
11314 (add_thread): New function.
11315 (free_one_thread): New function.
11316 (remove_thread): New function.
11317 (clear_inferiors): Use for_each_inferior and free_one_thread.
11318 (find_inferior): New function.
11319 (find_inferior_id): New function.
11320 (inferior_target_data): Update argument type.
11321 (set_inferior_target_data): Likewise.
11322 (inferior_regcache_data): Likewise.
11323 (set_inferior_regcache_data): Likewise.
11324 * linux-low.c (linux_bp_reinsert): Remove.
11325 (all_processes, stopping_threads, using_thrads)
11326 (struct pending_signals, debug_threads, pid_of): New.
11327 (inferior_pid): Replace with macro.
11328 (struct inferior_linux_data): Remove.
11329 (get_stop_pc, add_process): New functions.
11330 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11331 Use add_process and add_thread.
11332 (linux_attach_lwp): New function, based on old linux_attach. Use
11333 add_process and add_thread. Set stop_expected for new threads.
11334 (linux_attach): New function.
11335 (linux_kill_one_process): New function.
11336 (linux_kill): Kill all LWPs.
11337 (linux_thread_alive): Use find_inferior_id.
11338 (check_removed_breakpoints, status_pending_p): New functions.
11339 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11340 Update. Use WNOHANG. Wait for cloned processes also. Update process
11341 struct for the found process.
11342 (linux_wait_for_event): New function.
11343 (linux_wait): Use it. Support LWPs.
11344 (send_sigstop, wait_for_sigstop, stop_all_processes)
11345 (linux_resume_one_process, linux_continue_one_process): New functions.
11346 (linux_resume): Support LWPs.
11347 (REGISTER_RAW_SIZE): Remove.
11348 (fetch_register): Use register_size instead. Call supply_register.
11349 (usr_store_inferior_registers): Likewise. Call collect_register.
11350 Fix recursive case.
11351 (regsets_fetch_inferior_registers): Improve error message.
11352 (regsets_store_inferior_registers): Add debugging.
11353 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11354 (unstopped_p, linux_signal_pid): New functions.
11355 (linux_target_ops): Add linux_signal_pid.
11356 (linux_init_signals): New function.
11357 (initialize_low): Call it. Initialize using_threads.
11358 * regcache.c (inferior_regcache_data): Add valid
11359 flag.
11360 (get_regcache): Fetch registers lazily. Add fetch argument
11361 and update all callers.
11362 (regcache_invalidate_one, regcache_invalidate): New
11363 functions.
11364 (new_register_cache): Renamed from create_register_cache.
11365 Return the new regcache.
11366 (free_register_cache): Change argument to a void *.
11367 (registers_to_string, registers_from_string): Call get_regcache
11368 with fetch flag set.
11369 (register_data): Make static. Pass fetch flag to get_regcache.
11370 (supply_register): Call get_regcache with fetch flag clear.
11371 (collect_register): Call get_regcache with fetch flag set.
11372 (collect_register_as_string): New function.
11373 * regcache.h: Update.
11374 * remote-utils.c (putpkt): Flush after debug output and use
11375 stderr.
11376 Handle input interrupts while waiting for an ACK.
11377 (input_interrupt): Use signal_pid method.
11378 (getpkt): Flush after debug output and use stderr.
11379 (outreg): Use collect_register_as_string.
11380 (new_thread_notify, dead_thread_notify): New functions.
11381 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11382 and general_thread.
11383 (look_up_one_symbol): Flush after debug output.
11384 * server.c (step_thread, server_waiting): New variables.
11385 (start_inferior): Don't use signal_pid. Update call to mywait.
11386 (attach_inferior): Update call to mywait.
11387 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11388 (main): Don't fetch/store registers explicitly. Use
11389 set_desired_inferior. Support proposed ``Hs'' packet. Update
11390 calls to mywait.
11391 * server.h: Update.
11392 (struct inferior_list, struct_inferior_list_entry): New.
11393 * target.c (set_desired_inferior): New.
11394 (write_inferior_memory): Constify.
11395 (mywait): New function.
11396 * target.h: Update.
11397 (struct target_ops): New signal_pid method.
11398 (mywait): Removed macro, added prototype.
11399
11400 * linux-low.h (regset_func): Removed.
11401 (regset_fill_func, regset_store_func): New.
11402 (enum regset_type): New.
11403 (struct regset_info): Add type field. Use new operation types.
11404 (struct linux_target_ops): stop_pc renamed to get_pc.
11405 Add decr_pc_after_break and breakpoint_at.
11406 (get_process, get_thread_proess, get_process_thread)
11407 (strut process_info, all_processes, linux_attach_lwp)
11408 (thread_db_init): New.
11409
11410 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11411 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11412 (the_low_target): Add new members.
11413 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11414 (i386_store_fpxregset): Constify.
11415 (target_regsets): Add new kind identifier.
11416 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11417 (i386_set_pc): Add debugging.
11418 (i386_breakpoint_at): New function.
11419 (the_low_target): Add new members.
11420 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11421 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11422 (mips_breakpoint_at): New.
11423 (the_low_target): Add new members.
11424 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11425 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11426 (the_low_target): Add new members.
11427 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11428 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11429 (the_low_target): Add new members.
11430 * linux-x86-64-low.c (target_regsets): Add new kind
11431 identifier.
11432
11433 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
11434
11435 From Martin Pool <mbp@samba.org>:
11436 * server.c (gdbserver_usage): New function.
11437 (main): Call it.
11438
11439 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
11440
11441 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11442 stop_at -> stop_pc.
11443
11444 2002-05-04 Andrew Cagney <ac131313@redhat.com>
11445
11446 * Makefile.in: Remove obsolete code.
11447
11448 2002-04-24 Michal Ludvig <mludvig@suse.cz>
11449
11450 * linux-low.c (regsets_fetch_inferior_registers),
11451 (regsets_store_inferior_registers): Removed cast to int from
11452 ptrace() calls.
11453 * regcache.h: Added declaration of struct inferior_info.
11454
11455 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11456
11457 * inferiors.c (struct inferior_info): Add regcache_data.
11458 (add_inferior): Call create_register_cache.
11459 (clear_inferiors): Call free_register_cache.
11460 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11461 * regcache.c (struct inferior_regcache_data): New.
11462 (registers): Remove.
11463 (get_regcache): New function.
11464 (create_register_cache, free_register_cache): New functions.
11465 (set_register_cache): Don't initialize the register cache here.
11466 (registers_to_string, registers_from_string, register_data): Call
11467 get_regcache.
11468 * regcache.h: Add prototypes.
11469 * server.h: Likewise.
11470
11471 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11472
11473 * mem-break.c: New file.
11474 * mem-break.h: New file.
11475 * Makefile.in: Add mem-break.o rule; update server.h
11476 dependencies.
11477 * inferiors.c (struct inferior_info): Add target_data
11478 member.
11479 (clear_inferiors): Free target_data member if set.
11480 (inferior_target_data, set_inferior_target_data): New functions.
11481 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11482 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11483 * linux-low.c (linux_bp_reinsert): New variable.
11484 (struct inferior_linux_data): New.
11485 (linux_create_inferior): Use set_inferior_target_data.
11486 (linux_attach): Likewise. Call add_inferior.
11487 (linux_wait_for_one_inferior): New function.
11488 (linux_wait): Call it.
11489 (linux_write_memory): Add const.
11490 (initialize_low): Call set_breakpoint_data.
11491 * linux-low.h (struct linux_target_ops): Add breakpoint
11492 handling members.
11493 * server.c (attach_inferior): Remove extra add_inferior
11494 call.
11495 * server.h: Include mem-break.h. Update inferior.c
11496 prototypes.
11497 * target.c (read_inferior_memory)
11498 (write_inferior_memory): New functions.
11499 * target.h (read_inferior_memory)
11500 (write_inferior_memory): Change macros to prototypes.
11501 (struct target_ops): Update comments. Add const to write_memory
11502 definition.
11503
11504 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
11505
11506 * linux-low.c (usr_store_inferior_registers): Support
11507 registers which are allowed to fail to store.
11508 * linux-low.h (linux_target_ops): Likewise.
11509 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11510 (ppc_cannot_store_register): FPSCR may not be storable.
11511
11512 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11513
11514 * server.h: Include <string.h> if HAVE_STRING_H.
11515 * ChangeLog: Correct paths in last ChangeLog entry.
11516
11517 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11518
11519 * linux-low.h: Remove obsolete prototypes.
11520 (struct linux_target_ops): New.
11521 (extern the_low_target): New.
11522 * linux-low.c (num_regs, regmap): Remove declarations.
11523 (register_addr): Use the_low_target explicitly.
11524 (fetch_register): Likewise.
11525 (usr_fetch_inferior_registers): Likewise.
11526 (usr_store_inferior_registers): Likewise.
11527 * linux-arm-low.c (num_regs): Remove.
11528 (arm_num_regs): Define.
11529 (arm_regmap): Renamed from regmap, made static.
11530 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11531 made static.
11532 (arm_cannot_store_register): Renamed from cannot_store_register,
11533 made static.
11534 (the_low_target): New.
11535 * linux-i386-low.c (num_regs): Remove.
11536 (i386_num_regs): Define.
11537 (i386_regmap): Renamed from regmap, made static.
11538 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11539 made static.
11540 (i386_cannot_store_register): Renamed from cannot_store_register,
11541 made static.
11542 (the_low_target): New.
11543 * linux-ia64-low.c (num_regs): Remove.
11544 (ia64_num_regs): Define.
11545 (ia64_regmap): Renamed from regmap, made static.
11546 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11547 made static.
11548 (ia64_cannot_store_register): Renamed from cannot_store_register,
11549 made static.
11550 (the_low_target): New.
11551 * linux-m68k-low.c (num_regs): Remove.
11552 (m68k_num_regs): Define.
11553 (m68k_regmap): Renamed from regmap, made static.
11554 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11555 made static.
11556 (m68k_cannot_store_register): Renamed from cannot_store_register,
11557 made static.
11558 (the_low_target): New.
11559 * linux-mips-low.c (num_regs): Remove.
11560 (mips_num_regs): Define.
11561 (mips_regmap): Renamed from regmap, made static.
11562 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11563 made static.
11564 (mips_cannot_store_register): Renamed from cannot_store_register,
11565 made static.
11566 (the_low_target): New.
11567 * linux-ppc-low.c (num_regs): Remove.
11568 (ppc_num_regs): Define.
11569 (ppc_regmap): Renamed from regmap, made static.
11570 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11571 made static.
11572 (ppc_cannot_store_register): Renamed from cannot_store_register,
11573 made static.
11574 (the_low_target): New.
11575 * linux-s390-low.c (num_regs): Remove.
11576 (s390_num_regs): Define.
11577 (s390_regmap): Renamed from regmap, made static.
11578 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11579 made static.
11580 (s390_cannot_store_register): Renamed from cannot_store_register,
11581 made static.
11582 (the_low_target): New.
11583 * linux-sh-low.c (num_regs): Remove.
11584 (sh_num_regs): Define.
11585 (sh_regmap): Renamed from regmap, made static.
11586 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11587 made static.
11588 (sh_cannot_store_register): Renamed from cannot_store_register,
11589 made static.
11590 (the_low_target): New.
11591 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11592 (the_low_target): New.
11593
11594 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11595
11596 * Makefile.in: Add stamp-h target.
11597 * configure.in: Create stamp-h.
11598 * configure: Regenerated.
11599
11600 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11601
11602 * inferiors.c: New file.
11603 * target.c: New file.
11604 * target.h: New file.
11605 * Makefile.in: Add target.o and inferiors.o. Update
11606 dependencies.
11607 * linux-low.c (inferior_pid): New static variable,
11608 moved from server.c.
11609 (linux_create_inferior): Renamed from create_inferior.
11610 Call add_inferior. Return 0 on success instead of a PID.
11611 (linux_attach): Renamed from myattach.
11612 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11613 (linux_thread_alive): Renamed from mythread_alive.
11614 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11615 child dies.
11616 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11617 (regsets_store_inferior_registers): Correct error message.
11618 Add missing ``return 0''.
11619 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11620 (linux_store_registers): Renamed from store_inferior_registers.
11621 (linux_read_memory): Renamed from read_inferior_memory.
11622 (linux_write_memory): Renamed from write_inferior_memory.
11623 (linux_target_ops): New structure.
11624 (initialize_low): Call set_target_ops ().
11625 * remote-utils.c (unhexify): New function.
11626 (hexify): New function.
11627 (input_interrupt): Send signals to ``signal_pid''.
11628 * server.c (inferior_pid): Remove.
11629 (start_inferior): Update create_inferior call.
11630 (attach_inferior): Call add_inferior.
11631 (handle_query): New function.
11632 (main): Call handle_query for `q' packets.
11633 * server.h: Include "target.h". Remove obsolete prototypes.
11634 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11635
11636 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11637
11638 * Makefile.in: Add WARN_CFLAGS. Update configury
11639 dependencies.
11640 * configure.in: Check for <string.h>
11641 * configure: Regenerate.
11642 * config.in: Regenerate.
11643 * gdbreplay.c: Include needed system headers.
11644 (remote_open): Remove strchr prototype.
11645 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11646 * regcache.c (supply_register): Change buf argument to const void *.
11647 (supply_register_by_name): Likewise.
11648 (collect_register): Change buf argument to void *.
11649 (collect_register_by_name): Likewise.
11650 * regcache.h: Add missing prototypes.
11651 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11652 * server.c (handle_query): New function.
11653 (attached): New static variable, moved out of main.
11654 (main): Quiet longjmp clobber warnings.
11655 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11656 * utils.c (error): Remove NORETURN.
11657 (fatal): Likewise.
This page took 0.328873 seconds and 4 git commands to generate.