Convert fatal to gdb_assert in both i386_dr_low_set_addr
[binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2014-08-28 Gary Benson <gbenson@redhat.com>
2
3 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4 gdb_assert.
5 (i386_dr_low_get_addr): Remove vague comment.
6 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7 gdb_assert.
8
9 2014-08-28 Gary Benson <gbenson@redhat.com>
10
11 * inferiors.c (get_thread_process): Replace check with gdb_assert.
12 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
13 internal_error.
14 (linux_resume_one_lwp): Likewise.
15 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
16 gdb_assert.
17 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
18 with internal_error.
19 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
20 (init_register_cache): Replace fatal with gdb_assert_not_reached.
21 (find_register_by_name): Replace fatal with internal_error.
22 (find_regno): Likewise.
23 * tdesc.c (init_target_desc): Replace check with gdb_assert.
24 * thread-db.c (thread_db_create_event): Likewise.
25 (thread_db_load_search): Likewise.
26 (try_thread_db_load_1): Likewise.
27 * tracepoint.c (get_jump_space_head): Replace fatal with
28 internal_error.
29 (claim_trampoline_space): Likewise.
30 (have_fast_tracepoint_trampoline_buffer): Likewise.
31 (cmd_qtstart): Likewise.
32 (stop_tracing): Likewise.
33 (fast_tracepoint_collecting): Likewise.
34 (target_malloc): Likewise.
35 (download_tracepoint): Likewise.
36 (download_trace_state_variables): Replace check with gdb_assert.
37 (upload_fast_traceframes): Replace fatal with internal_error.
38
39 2014-08-19 Tom Tromey <tromey@redhat.com>
40 Gary Benson <gbenson@redhat.com>
41
42 * Makefile.in (SFILES): Add common/common-debug.c.
43 (OBS): Add common-debug.o.
44 (common-debug.o): New rule.
45 * debug.h (debug_printf): Don't declare.
46 * debug.c (debug_printf): Renamed and rewritten as...
47 (debug_vprintf): New function.
48
49 2014-08-19 Gary Benson <gbenson@redhat.com>
50
51 * utils.h: Do not include print-utils.h.
52
53 2014-08-19 Tom Tromey <tromey@redhat.com>
54 Gary Benson <gbenson@redhat.com>
55
56 * server.h: Add static assertion.
57 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
58
59 2014-08-19 Tom Tromey <tromey@redhat.com>
60 Gary Benson <gbenson@redhat.com>
61
62 * Makefile.in (SFILES): Add common/errors.c.
63 (OBS): Add errors.o.
64 (IPA_OBS): Add errors-ipa.o.
65 (errors.o): New rule.
66 (errors-ipa.o): Likewise.
67 * utils.h (perror_with_name, error, warning): Don't declare.
68 * utils.c (warning): Renamed and rewritten as...
69 (vwarning): New function.
70 (error): Renamed and rewritten as...
71 (verror): New function.
72 (internal_error): Renamed and rewritten as...
73 (internal_verror): New function.
74
75 2014-08-07 Gary Benson <gbenson@redhat.com>
76
77 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
78 * configure: Regenerate.
79 * config.in: Likewise.
80 * server.h: Do not include errno.h.
81 * event-loop.c: Likewise.
82 * hostio-errno.c: Likewise.
83 * linux-low.c: Likewise.
84 * remote-utils.c: Likewise.
85 * spu-low.c: Likewise.
86 * utils.c: Likewise.
87 * gdbreplay.c: Unconditionally include errno.h.
88
89 2014-08-07 Gary Benson <gbenson@redhat.com>
90
91 * server.h: Do not include string.h.
92 * event-loop.c: Likewise.
93 * linux-low.c: Likewise.
94 * regcache.c: Likewise.
95 * remote-utils.c: Likewise.
96 * spu-low.c: Likewise.
97 * utils.c: Likewise.
98
99 2014-08-07 Gary Benson <gbenson@redhat.com>
100
101 * server.h: Do not include gdb_assert.h.
102
103 2014-08-07 Gary Benson <gbenson@redhat.com>
104
105 * server.h: Do not include common-utils.h.
106
107 2014-08-07 Gary Benson <gbenson@redhat.com>
108
109 * server.h: Do not include ptid.h.
110 * notif.h: Likewise.
111
112 2014-08-07 Gary Benson <gbenson@redhat.com>
113
114 * server.h: Do not include gdb_locale.h.
115
116 2014-08-07 Gary Benson <gbenson@redhat.com>
117
118 * server.h: Do not include gdb/signals.h.
119 * win32-low.c: Likewise.
120
121 2014-08-07 Gary Benson <gbenson@redhat.com>
122
123 * server.h: Do not include pathmax.h.
124
125 2014-08-07 Gary Benson <gbenson@redhat.com>
126
127 * server.h: Do not include libiberty.h.
128 * linux-bfin-low.c: Likewise.
129
130 2014-08-07 Gary Benson <gbenson@redhat.com>
131
132 * server.h: Do not include ansidecl.h.
133
134 2014-08-07 Gary Benson <gbenson@redhat.com>
135
136 * linux-x86-low.c: Do not include stddef.h.
137 * lynx-ppc-low.c: Likewise.
138 * tracepoint.c: Likewise.
139
140 2014-08-07 Gary Benson <gbenson@redhat.com>
141
142 * server.h: Do not include stdarg.h.
143 * nto-low.c: Likewise.
144
145 2014-08-07 Gary Benson <gbenson@redhat.com>
146
147 * server.h: Do not include stdlib.h.
148 * inferiors.c: Likewise.
149 * linux-low.c: Likewise.
150 * regcache.c: Likewise.
151 * spu-low.c: Likewise.
152 * tracepoint.c: Likewise.
153 * utils.c: Likewise.
154
155 2014-08-07 Gary Benson <gbenson@redhat.com>
156
157 * server.h: Do not include stdio.h.
158 * linux-low.c: Likewise.
159 * remote-utils.c: Likewise.
160 * spu-low.c: Likewise.
161 * utils.c: Likewise.
162 * wincecompat.c: Likewise.
163
164 2014-08-06 Gary Benson <gbenson@redhat.com>
165
166 * regcache.c (init_register_cache): Move conditionals inside if.
167
168 2014-08-06 Gary Benson <gbenson@redhat.com>
169
170 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
171
172 2014-07-31 Gary Benson <gbenson@redhat.com>
173
174 * ax.h: Do not include server.h.
175 * gdbthread.h: Likewise.
176 * lynx-low.h: Likewise.
177 * notif.h: Likewise.
178
179 2014-07-30 Gary Benson <gbenson@redhat.com>
180
181 * server.h: Include common-defs.h.
182 Do not include config.h or build-gnulib-gdbserver/config.h.
183
184 2014-07-30 Gary Benson <gbenson@redhat.com>
185
186 * hostio-errno.c: Move server.h to top of includes list.
187 * inferiors.c: Likewise.
188 * linux-x86-low.c: Likewise.
189 * notif.c: Include server.h.
190
191 2014-07-24 Tom Tromey <tromey@redhat.com>
192 Gary Benson <gbenson@redhat.com>
193
194 * server.h (CORE_ADDR): Now unsigned.
195
196 2014-07-16 Pedro Alves <palves@redhat.com>
197
198 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
199
200 2014-07-15 Pedro Alves <palves@redhat.com>
201
202 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
203 copy.
204
205 2014-07-11 Pedro Alves <palves@redhat.com>
206
207 * linux-low.c (kill_wait_lwp): New function, based on
208 kill_one_lwp_callback, but use my_waitpid directly.
209 (kill_one_lwp_callback, linux_kill): Use it.
210
211 2014-06-23 Pedro Alves <palves@redhat.com>
212
213 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
214 before setting DR0..DR3.
215
216 2014-06-20 Gary Benson <gbenson@redhat.com>
217
218 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
219 * configure: Regenerated.
220 * config.in: Likewise.
221
222 2014-06-20 Gary Benson <gbenson@redhat.com>
223
224 * Makefile.in (SFILES): Update locations for files moved
225 from common to nat.
226 (object file files): Reordered.
227
228 2014-06-20 Gary Benson <gbenson@redhat.com>
229
230 * i386-low.h (i386_dr_low_can_set_addr): Removed.
231 (i386_dr_low_set_addr): Likewise.
232 (i386_dr_low_get_addr): Likewise.
233 (i386_dr_low_can_set_control): Likewise.
234 (i386_dr_low_set_control): Likewise.
235 (i386_dr_low_get_control): Likewise.
236 (i386_dr_low_get_status): Likewise.
237 (i386_get_debug_register_length): Likewise.
238 * linux-x86-low.c (i386_dr_low_set_addr):
239 Changed signature. Made static.
240 (i386_dr_low_get_addr): Likewise.
241 (i386_dr_low_set_control): Likewise.
242 (i386_dr_low_get_control): Likewise.
243 (i386_dr_low_get_status): Likewise.
244 (i386_dr_low): New global variable.
245 * win32-i386-low.c (i386_dr_low_set_addr):
246 Changed signature. Made static.
247 (i386_dr_low_get_addr): Likewise.
248 (i386_dr_low_set_control): Likewise.
249 (i386_dr_low_get_control): Likewise.
250 (i386_dr_low_get_status): Likewise.
251 (i386_dr_low): New global variable.
252
253 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
254
255 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
256 * Makefile.in (AR, AR_FLAGS): Define.
257 * configure: Regenerate.
258
259 2014-06-19 Gary Benson <gbenson@redhat.com>
260
261 * Makefile.in (i386-dregs.o): New rule.
262 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
263 * i386-low.c (target.h): Remove include.
264 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
265 (DR_CONTROL_SHIFT): Likewise.
266 (DR_CONTROL_SIZE): Likewise.
267 (DR_RW_EXECUTE): Likewise.
268 (DR_RW_WRITE): Likewise.
269 (DR_RW_READ): Likewise.
270 (DR_RW_IORW): Likewise.
271 (DR_LEN_1): Likewise.
272 (DR_LEN_2): Likewise.
273 (DR_LEN_4): Likewise.
274 (DR_LEN_8): Likewise.
275 (DR_LOCAL_ENABLE_SHIFT): Likewise.
276 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
277 (DR_ENABLE_SIZE): Likewise.
278 (DR_LOCAL_SLOWDOWN): Likewise.
279 (DR_GLOBAL_SLOWDOWN): Likewise.
280 (DR_CONTROL_RESERVED): Likewise.
281 (I386_DR_CONTROL_MASK): Likewise.
282 (I386_DR_VACANT): Likewise.
283 (I386_DR_LOCAL_ENABLE): Likewise.
284 (I386_DR_GLOBAL_ENABLE): Likewise.
285 (I386_DR_DISABLE): Likewise.
286 (I386_DR_SET_RW_LEN): Likewise.
287 (I386_DR_GET_RW_LEN): Likewise.
288 (I386_DR_WATCH_HIT): Likewise.
289 (i386_wp_op_t): Likewise.
290 (i386_show_dr): Likewise.
291 (i386_length_and_rw_bits): Likewise.
292 (i386_insert_aligned_watchpoint): Likewise.
293 (i386_remove_aligned_watchpoint): Likewise.
294 (i386_handle_nonaligned_watchpoint): Likewise.
295 i386_update_inferior_debug_regs(): Likewise.
296 (i386_dr_insert_watchpoint): Likewise.
297 (i386_dr_remove_watchpoint): Likewise.
298 (i386_dr_region_ok_for_watchpoint): Likewise.
299 (i386_dr_stopped_data_address): Likewise.
300 (i386_dr_stopped_by_watchpoint): Likewise.
301
302 2014-06-19 Gary Benson <gbenson@redhat.com>
303
304 * i386-low.c (i386_dr_show): Renamed to
305 i386_show_dr and made static. All uses updated.
306 (i386_dr_length_and_rw_bits): Renamed to
307 i386_length_and_rw_bits and made static.
308 All uses updated.
309 (i386_dr_insert_aligned_watchpoint): Renamed to
310 i386_insert_aligned_watchpoint and made static.
311 All uses updated.
312 (i386_dr_remove_aligned_watchpoint): Renamed to
313 i386_remove_aligned_watchpoint and made static.
314 All uses updated.
315 (i386_dr_update_inferior_debug_regs): Renamed to
316 i386_update_inferior_debug_regs and made static.
317 All uses updated.
318
319 2014-06-18 Gary Benson <gbenson@redhat.com>
320
321 * i386-low.h (i386_dr_low_can_set_addr): New macro.
322 (i386_dr_low_can_set_control): Likewise.
323 (i386_get_debug_register_length): Likewise.
324 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
325 (i386_dr_low_can_set_control): Likewise.
326 (i386_get_debug_register_length): Likewise.
327
328 2014-06-17 Gary Benson <gbenson@redhat.com>
329
330 * i386-low.h (i386-dregs.h): New include.
331 (DR_FIRSTADDR): Now in i386-dregs.h.
332 (DR_LASTADDR): Likewise.
333 (DR_NADDR): Likewise.
334 (DR_STATUS): Likewise.
335 (DR_CONTROL): Likewise.
336 (i386_debug_reg_state): Likewise.
337 (i386_dr_insert_watchpoint): Likewise.
338 (i386_dr_remove_watchpoint): Likewise.
339 (i386_dr_region_ok_for_watchpoint): Likewise.
340 (i386_dr_stopped_data_address): Likewise.
341 (i386_dr_stopped_by_watchpoint): Likewise.
342 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
343
344 2014-06-18 Gary Benson <gbenson@redhat.com>
345
346 * i386-low.h (i386_low_insert_watchpoint): Renamed to
347 i386_dr_insert_watchpoint.
348 (i386_low_remove_watchpoint): Renamed to
349 i386_dr_remove_watchpoint.
350 (i386_low_region_ok_for_watchpoint): Renamed to
351 i386_dr_region_ok_for_watchpoint.
352 (i386_low_stopped_data_address): Renamed to
353 i386_dr_stopped_data_address.
354 (i386_low_stopped_by_watchpoint): Renamed to
355 i386_dr_stopped_by_watchpoint.
356 * i386-low.c (i386_show_dr): Renamed to
357 i386_dr_show and made nonstatic. All uses updated.
358 (i386_length_and_rw_bits): Renamed to
359 i386_dr_length_and_rw_bits and made nonstatic.
360 All uses updated.
361 (i386_insert_aligned_watchpoint): Renamed to
362 i386_dr_insert_aligned_watchpoint and made nonstatic.
363 All uses updated.
364 (i386_remove_aligned_watchpoint): Renamed to
365 i386_dr_remove_aligned_watchpoint and made nonstatic.
366 All uses updated.
367 (i386_update_inferior_debug_regs): Renamed to
368 i386_dr_update_inferior_debug_regs and made nonstatic.
369 All uses updated.
370 (i386_low_insert_watchpoint): Renamed to
371 i386_dr_insert_watchpoint. All uses updated.
372 (i386_low_remove_watchpoint): Renamed to
373 i386_dr_remove_watchpoint. All uses updated.
374 (i386_low_region_ok_for_watchpoint): Renamed to
375 i386_dr_region_ok_for_watchpoint. All uses updated.
376 (i386_low_stopped_data_address): Renamed to
377 i386_dr_stopped_data_address. All uses updated.
378 (i386_low_stopped_by_watchpoint): Renamed to
379 i386_dr_stopped_by_watchpoint. All uses updated.
380
381 2014-06-18 Gary Benson <gbenson@redhat.com>
382
383 * i386-low.c (i386_dr_low_can_set_addr): New macro.
384 (i386_dr_low_can_set_control): Likewise.
385 (i386_insert_aligned_watchpoint): New check.
386
387 2014-06-18 Gary Benson <gbenson@redhat.com>
388
389 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
390 Renamed to state.
391
392 2014-06-18 Gary Benson <gbenson@redhat.com>
393
394 * i386-low.c (i386_length_and_rw_bits): Use internal_error
395 instead of fatal and error.
396 (i386_handle_nonaligned_watchpoint): Likewise.
397
398 2014-06-18 Gary Benson <gbenson@redhat.com>
399
400 * i386-low.c (i386_get_debug_register_length): New macro.
401 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
402 (i386_show_dr): Use debug_printf instead of fprintf. Use
403 phex to format values.
404
405 2014-06-18 Gary Benson <gbenson@redhat.com>
406
407 * i386-low.h: Comment changes.
408 * i386-low.c: Likewise.
409
410 2014-06-18 Gary Benson <gbenson@redhat.com>
411
412 * i386-low.c: Whitespace changes.
413
414 2014-06-12 Tom Tromey <tromey@redhat.com>
415
416 * utils.c (freeargv): Remove.
417
418 2014-06-12 Tom Tromey <tromey@redhat.com>
419
420 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
421 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
422 (parse_debug_format_options): Likewise.
423 (gdbserver_usage): Likewise.
424 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
425 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
426 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
427 against libiberty.
428 ($(LIBGNU)): Depend on libiberty.
429 (all-lib): Recurse into all subdirs.
430 (install-only): Invoke "install" target in subdirs.
431 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
432 targets.
433 * configure: Rebuild.
434 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
435 for vasprintf, vsnprintf, or gettimeofday.
436 * configure.srv: Don't add safe-ctype.o or lbasename.o to
437 srv_tgtobj.
438
439 2014-06-05 Joel Brobecker <brobecker@adacore.com>
440
441 * development.sh: Delete.
442 * Makefile.in (config.status): Adjust dependency on development.sh.
443 * configure.ac: Adjust development.sh source call.
444 * configure: Regenerate.
445
446 2014-06-02 Pedro Alves <palves@redhat.com>
447
448 * ax.c (gdb_free_agent_expr): New function.
449 * ax.h (gdb_free_agent_expr): New declaration.
450 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
451 list.
452 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
453 static.
454 (clear_breakpoint_conditions_and_commands): New function.
455 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
456 (clear_breakpoint_conditions_and_commands): New declaration.
457
458 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
459
460 * linux-aarch64-low.c (asm/ptrace.h): Include.
461
462 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
463
464 Fix TLS access for -static -pthread.
465 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
466 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
467 (thread_db_load_search, try_thread_db_load_1): Initialize it.
468
469 2014-05-20 Pedro Alves <palves@redhat.com>
470
471 * linux-aarch64-low.c (aarch64_insert_point)
472 (aarch64_remove_point): No longer check whether the type is
473 supported here. Adjust to new interface.
474 (the_low_target): Install aarch64_supports_z_point_type as
475 supports_z_point_type method.
476 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
477 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
478 instead of a Z packet char. Adjust.
479 (arm_supports_z_point_type): New function.
480 (arm_insert_point, arm_remove_point): Adjust to new interface.
481 (the_low_target): Install arm_supports_z_point_type.
482 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
483 (cris_insert_point, cris_remove_point): Adjust to new interface.
484 Don't check whether the type is supported here.
485 (the_low_target): Install cris_supports_z_point_type.
486 * linux-low.c (linux_supports_z_point_type): New function.
487 (linux_insert_point, linux_remove_point): Adjust to new interface.
488 * linux-low.h (struct linux_target_ops) <insert_point,
489 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
490 raw_breakpoint pointer parameter.
491 <supports_z_point_type>: New method.
492 * linux-mips-low.c (mips_supports_z_point_type): New function.
493 (mips_insert_point, mips_remove_point): Adjust to new interface.
494 Use mips_supports_z_point_type.
495 (the_low_target): Install mips_supports_z_point_type.
496 * linux-ppc-low.c (the_low_target): Install NULL as
497 supports_z_point_type method.
498 * linux-s390-low.c (the_low_target): Install NULL as
499 supports_z_point_type method.
500 * linux-sparc-low.c (the_low_target): Install NULL as
501 supports_z_point_type method.
502 * linux-x86-low.c (x86_supports_z_point_type): New function.
503 (x86_insert_point): Adjust to new insert_point interface. Use
504 insert_memory_breakpoint. Adjust to new
505 i386_low_insert_watchpoint interface.
506 (x86_remove_point): Adjust to remove_point interface. Use
507 remove_memory_breakpoint. Adjust to new
508 i386_low_remove_watchpoint interface.
509 (the_low_target): Install x86_supports_z_point_type.
510 * lynx-low.c (lynx_target_ops): Install NULL as
511 supports_z_point_type callback.
512 * nto-low.c (nto_supports_z_point_type): New.
513 (nto_insert_point, nto_remove_point): Adjust to new interface.
514 (nto_target_ops): Install nto_supports_z_point_type.
515 * mem-break.c: Adjust intro comment.
516 (struct raw_breakpoint) <raw_type, size>: New fields.
517 <inserted>: Update comment.
518 <shlib_disabled>: Delete field.
519 (enum bkpt_type) <gdb_breakpoint>: Delete value.
520 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
521 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
522 (raw_bkpt_type_to_target_hw_bp_type): New function.
523 (find_enabled_raw_code_breakpoint_at): New function.
524 (find_raw_breakpoint_at): New type and size parameters. Use them.
525 (insert_memory_breakpoint): New function, based off
526 set_raw_breakpoint_at.
527 (remove_memory_breakpoint): New function.
528 (set_raw_breakpoint_at): Reimplement.
529 (set_breakpoint): New, based on set_breakpoint_at.
530 (set_breakpoint_at): Reimplement.
531 (delete_raw_breakpoint): Go through the_target->remove_point
532 instead of assuming memory breakpoints.
533 (find_gdb_breakpoint_at): Delete.
534 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
535 (find_gdb_breakpoint): New function.
536 (set_gdb_breakpoint_at): Delete.
537 (z_type_supported): New function.
538 (set_gdb_breakpoint_1): New function, loosely based off
539 set_gdb_breakpoint_at.
540 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
541 (delete_gdb_breakpoint_at): Delete.
542 (delete_gdb_breakpoint_1): New function, loosely based off
543 delete_gdb_breakpoint_at.
544 (delete_gdb_breakpoint): New function.
545 (clear_gdb_breakpoint_conditions): Rename to ...
546 (clear_breakpoint_conditions): ... this. Don't handle a NULL
547 breakpoint.
548 (add_condition_to_breakpoint): Make static.
549 (add_breakpoint_condition): Take a struct breakpoint pointer
550 instead of an address. Adjust.
551 (gdb_condition_true_at_breakpoint): Rename to ...
552 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
553 z_type parameter.
554 (gdb_condition_true_at_breakpoint): Reimplement.
555 (add_breakpoint_commands): Take a struct breakpoint pointer
556 instead of an address. Adjust.
557 (gdb_no_commands_at_breakpoint): Rename to ...
558 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
559 parameter. Return true if no breakpoint was found. Change debug
560 output.
561 (gdb_no_commands_at_breakpoint): Reimplement.
562 (run_breakpoint_commands): Rename to ...
563 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
564 and change return type to boolean.
565 (run_breakpoint_commands): New function.
566 (gdb_breakpoint_here): Also check for Z1 breakpoints.
567 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
568 breakpoint. Go through the_target->remove_point instead of
569 assuming memory breakpoint.
570 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
571 software and hardware breakpoints.
572 (reinsert_raw_breakpoint): Go through the_target->insert_point
573 instead of assuming memory breakpoint.
574 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
575 software and hardware breakpoints.
576 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
577 Check both software and hardware breakpoints.
578 (validate_inserted_breakpoint): Assert the breakpoint is a
579 software breakpoint. Set the inserted flag to -1 instead of
580 setting shlib_disabled.
581 (delete_disabled_breakpoints): Adjust.
582 (validate_breakpoints): Only validate software breakpoints.
583 Adjust to inserted flag change.
584 (check_mem_read, check_mem_write): Skip breakpoint types other
585 than software breakpoints. Adjust to inserted flag change.
586 * mem-break.h (enum raw_bkpt_type): New enum.
587 (raw_breakpoint, struct process_info): Forward declare.
588 (Z_packet_to_target_hw_bp_type): Delete declaration.
589 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
590 (set_gdb_breakpoint, delete_gdb_breakpoint)
591 (clear_breakpoint_conditions): New declarations.
592 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
593 (breakpoint_inserted_here): Update comment.
594 (add_breakpoint_condition, add_breakpoint_commands): Replace
595 address parameter with a breakpoint pointer parameter.
596 (gdb_breakpoint_here): Update comment.
597 (delete_gdb_breakpoint_at): Delete.
598 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
599 * server.c (process_point_options): Take a struct breakpoint
600 pointer instead of an address. Adjust.
601 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
602 delete_gdb_breakpoint.
603 * spu-low.c (spu_target_ops): Install NULL as
604 supports_z_point_type method.
605 * target.h: Include mem-break.h.
606 (struct target_ops) <prepare_to_access_memory>: Update comment.
607 <supports_z_point_type>: New field.
608 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
609 instead of a char. Also take a raw breakpoint pointer.
610 * win32-arm-low.c (the_low_target): Install NULL as
611 supports_z_point_type.
612 * win32-i386-low.c (i386_supports_z_point_type): New function.
613 (i386_insert_point, i386_remove_point): Adjust to new interface.
614 (the_low_target): Install i386_supports_z_point_type.
615 * win32-low.c (win32_supports_z_point_type): New function.
616 (win32_insert_point, win32_remove_point): Adjust to new interface.
617 (win32_target_ops): Install win32_supports_z_point_type.
618 * win32-low.h (struct win32_target_ops):
619 <supports_z_point_type>: New method.
620 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
621 instead of a char. Also take a raw breakpoint pointer.
622
623 2014-05-20 Pedro Alves <palves@redhat.com>
624
625 * mem-break.h: Include break-common.h.
626 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
627 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
628 (Z_packet_to_target_hw_bp_type): New declaration.
629 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
630 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
631 (Z_PACKET_ACCESS_WP): Delete macros.
632 (Z_packet_to_hw_type): Delete function.
633 * i386-low.h: Don't include break-common.h here.
634 (Z_packet_to_hw_type): Delete declaration.
635 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
636 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
637 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
638 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
639 * linux-aarch64-low.c: Don't include break-common.h here.
640 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
641 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
642 (Z_packet_to_target_hw_bp_type): Delete function.
643 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
644 function.
645 (mips_insert_point, mips_remove_point): Use
646 Z_packet_to_target_hw_bp_type.
647
648 2014-05-20 Pedro Alves <palves@redhat.com>
649
650 * linux-aarch64-low.c: Include break-common.h.
651 (enum target_point_type): Delete.
652 (Z_packet_to_point_type): Rename to ...
653 (Z_packet_to_target_hw_bp_type): ... this, and return a
654 target_hw_bp_type instead.
655 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
656 instead of an enum target_point_type.
657 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
658 breakpoint type.
659 (aarch64_dr_state_insert_one_point)
660 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
661 (aarch64_handle_aligned_watchpoint)
662 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
663 Take an enum target_hw_bp_type instead of an enum
664 target_point_type.
665 (aarch64_supports_z_point_type): New function.
666 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
667 use Z_packet_to_target_hw_bp_type.
668
669 2014-05-20 Joel Brobecker <brobecker@adacore.com>
670
671 * configure.ac: Only use -Werror by default when DEVELOPMENT
672 is true.
673 * configure: Regenerate.
674
675 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
676
677 Fix gdbserver qGetTLSAddr for x86_64 -m32.
678 * linux-x86-low.c (X86_64_USER_REGS): New.
679 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
680
681 2014-04-28 Yao Qi <yao@codesourcery.com>
682
683 * Makefile.in (i386-avx512.c): Fix the typo of generated file
684 name.
685
686 2014-04-25 Pedro Alves <palves@redhat.com>
687
688 PR server/16255
689 * linux-low.c (linux_attach_fail_reason_string): New function.
690 (linux_attach_lwp): Delete.
691 (linux_attach_lwp_1): Rename to ...
692 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
693 argument. Remove "initial" parameter. Return int instead of
694 void. Don't error or warn here.
695 (linux_attach): Adjust to call linux_attach_lwp. Call error on
696 failure to attach to the tgid. Call warning when failing to
697 attach to an lwp.
698 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
699 argument. Remove "initial" parameter. Return int instead of
700 void. Don't error or warn here.
701 (linux_attach_fail_reason_string): New declaration.
702 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
703 interface change. Use linux_attach_fail_reason_string.
704
705 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
706 Walfred Tedeschi <walfred.tedeschi@intel.com>
707
708 * Makefile.in: Added rules to handle new files
709 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
710 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
711 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
712 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
713 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
714 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
715 x32-avx512-linux.o.
716 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
717 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
718 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
719 i386/x32-avx512.xml.
720 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
721 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
722 i386/x32-avx512-linux.xml.
723 * i387-fp.c (num_avx512_k_registers): New constant for number
724 of K registers.
725 (num_avx512_zmmh_low_registers): New constant for number of
726 lower ZMM registers (0-15).
727 (num_avx512_zmmh_high_registers): New constant for number of
728 higher ZMM registers (16-31).
729 (num_avx512_ymmh_registers): New contant for number of higher
730 YMM registers (ymm16-31 added by avx521 on x86_64).
731 (num_avx512_xmm_registers): New constant for number of higher
732 XMM registers (xmm16-31 added by AVX512 on x86_64).
733 (struct i387_xsave): Add space for AVX512 registers.
734 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
735 Add code to handle AVX512 registers.
736 (i387_xsave_to_cache): Add code to handle AVX512 registers.
737 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
738 prototypei from generated file.
739 (tdesc_amd64_avx512_linux): Likewise.
740 (init_registers_x32_avx512_linux): Likewise.
741 (tdesc_x32_avx512_linux): Likewise.
742 (init_registers_i386_avx512_linux): Likewise.
743 (tdesc_i386_avx512_linux): Likewise.
744 (x86_64_regmap): Add AVX512 registers.
745 (x86_linux_read_description): Add code to handle AVX512 XSTATE
746 mask.
747 (initialize_low_arch): Add code to initialize AVX512 registers.
748
749 2014-04-23 Pedro Alves <palves@redhat.com>
750
751 * mem-break.c (find_gdb_breakpoint_at): Make static.
752 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
753
754 2014-04-23 Pedro Alves <palves@redhat.com>
755
756 * i386-low.c: Don't include break-common.h here.
757 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
758 prototype to take target_hw_bp_type as argument instead of a Z
759 packet char.
760 * i386-low.h: Include break-common.h here.
761 (Z_packet_to_hw_type): Declare.
762 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
763 prototypes.
764 * linux-x86-low.c (x86_insert_point): Convert the packet number to
765 a target_hw_bp_type before calling i386_low_insert_watchpoint.
766 (x86_remove_point): Convert the packet number to a
767 target_hw_bp_type before calling i386_low_remove_watchpoint.
768 * win32-i386-low.c (i386_insert_point): Convert the packet number
769 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
770 (i386_remove_point): Convert the packet number to a
771 target_hw_bp_type before calling i386_low_remove_watchpoint.
772
773 2014-04-23 Pedro Alves <palves@redhat.com>
774
775 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
776
777 2014-04-10 Pedro Alves <palves@redhat.com>
778
779 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
780 Check if the condition or command is NULL before checking if the
781 breakpoint is known. On success, return true.
782 * mem-break.h (add_breakpoint_condition): Document return.
783 (add_breakpoint_commands): Add describing comment.
784 * server.c (skip_to_semicolon): New function.
785 (process_point_options): Use it.
786
787 2014-04-09 Pedro Alves <palves@redhat.com>
788
789 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
790 to lwpid_of.
791
792 2014-02-27 Pedro Alves <palves@redhat.com>
793
794 PR 12702
795 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
796 macros.
797 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
798 output.
799 (last_thread_of_process_p): Take a PID argument instead of a
800 thread pointer.
801 (linux_wait_for_lwp): Delete.
802 (num_lwps, check_zombie_leaders, not_stopped_callback): New
803 functions.
804 (linux_low_filter_event): New function, party factored out from
805 linux_wait_for_event.
806 (linux_wait_for_event): Rename to ...
807 (linux_wait_for_event_filtered): ... this. Add new filter ptid
808 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
809 sigsuspend. Check for zombie leaders.
810 (linux_wait_for_event): Reimplement as wrapper around
811 linux_wait_for_event_filtered.
812 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
813 a normal or signal exit is seen, it's the whole process exiting.
814 (wait_for_sigstop): No longer a for_each_inferior callback.
815 Rewrite on top of linux_wait_for_event_filtered.
816 (stop_all_lwps): Call wait_for_sigstop directly.
817 * server.c (resume, handle_target_event): Handle
818 TARGET_WAITKIND_NO_RESUMED.
819
820 2014-02-26 Joel Brobecker <brobecker@adacore.com>
821
822 * win32-low.c (psapi_get_dll_name,
823 * win32_CreateToolhelp32Snapshot): Delete.
824 (win32_CreateToolhelp32Snapshot, win32_Module32First)
825 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
826 Delete.
827 (handle_load_dll): Add function description.
828 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
829
830 2014-02-26 Joel Brobecker <brobecker@adacore.com>
831
832 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
833 Add comment.
834 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
835 base address when calling win32_add_one_solib.
836 (handle_load_dll): Delete local variable load_addr.
837 Remove 0x1000 offset applied to DLL base address when calling
838 win32_add_one_solib.
839 (handle_unload_dll): Add comment.
840
841 2014-02-26 Joel Brobecker <brobecker@adacore.com>
842
843 * win32-low.c (win32_add_all_dlls): Renames
844 win32_ensure_ntdll_loaded. Rewrite function documentation.
845 Adjust implementation to always load all DLLs.
846 Add 0x1000 offset to DLL base address when calling
847 win32_add_one_solib.
848 (child_initialization_done): New static global.
849 (do_initial_child_stuff): Set child_initialization_done to
850 zero during child initialization, and 1 after. Replace call
851 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
852 Add comment.
853 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
854 (handle_unload_dll): Add function documentation.
855 (get_child_debug_event): Ignore load and unload DLL events
856 during child initialization.
857
858 2014-02-20 Doug Evans <dje@google.com>
859
860 Remove global all_lwps.
861 * inferiors.h (ptid_of): Move here from linux-low.h.
862 (pid_of, lwpid_of): Ditto.
863 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
864 parameter is a struct thread_info * now.
865 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
866 directly. Pass &all_threads to find_inferior instead of &all_lwps.
867 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
868 directly.
869 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
870 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
871 * linux-arm-low.c (update_registers_callback): Update, "entry"
872 parameter is a struct thread_info * now.
873 Fetch lwpid from current_inferior directly.
874 (arm_insert_point): Pass &all_threads to find_inferior instead of
875 &all_lwps.
876 (arm_remove_point): Ditto.
877 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
878 (arm_prepare_to_resume): Fetch pid from thread.
879 (arm_read_description): Fetch lwpid from current_inferior directly.
880 * linux-low.c (all_lwps): Delete.
881 (delete_lwp): Delete call to remove_inferior.
882 (handle_extended_wait): Fetch lwpid from thread.
883 (add_lwp): Don't set lwp->entry.id. Remove call to
884 add_inferior_to_list.
885 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
886 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
887 (kill_one_lwp_callback): Ditto.
888 (linux_kill): Don't dereference NULL pointer.
889 Fetch ptid,lwpid from thread.
890 (get_detach_signal): Fetch ptid from thread.
891 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
892 Simplify call to regcache_invalidate_thread.
893 (delete_lwp_callback): Update, "entry" parameter is a
894 struct thread_info * now. Fetch pid from thread.
895 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
896 (status_pending_p_callback): Update, "entry" parameter is a
897 struct thread_info * now. Fetch ptid from thread.
898 (find_lwp_pid): Update, "entry" parameter is a
899 struct thread_info * now.
900 (linux_wait_for_lwp): Fetch pid from thread.
901 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
902 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
903 (enqueue_one_deferred_signal): Fetch lwpid from thread.
904 (dequeue_one_deferred_signal): Ditto.
905 (cancel_breakpoint): Fetch ptid from current_inferior.
906 (linux_wait_for_event): Pass &all_threads to find_inferior,
907 not &all_lwps. Fetch ptid, lwpid from thread.
908 (count_events_callback): Update, "entry" parameter is a
909 struct thread_info * now.
910 (select_singlestep_lwp_callback): Ditto.
911 (select_event_lwp_callback): Ditto.
912 (cancel_breakpoints_callback): Ditto.
913 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
914 not &all_lwps.
915 (select_event_lwp): Ditto. Fetch ptid from event_thread.
916 (unsuspend_one_lwp): Update, "entry" parameter is a
917 struct thread_info * now.
918 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
919 not &all_lwps.
920 (linux_stabilize_threads): Ditto. And for for_each_inferior.
921 Fetch lwpid from thread, not lwp.
922 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
923 Pass &all_threads to find_inferior, not &all_lwps.
924 (send_sigstop): Fetch lwpid from thread, not lwp.
925 (send_sigstop_callback): Update, "entry" parameter is a
926 struct thread_info * now.
927 (suspend_and_send_sigstop_callback): Ditto.
928 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
929 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
930 struct thread_info * now.
931 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
932 from thread, lwp.
933 (lwp_running): Update, "entry" parameter is a
934 struct thread_info * now.
935 (stop_all_lwps): Fetch ptid from thread.
936 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
937 (linux_resume_one_lwp): Fetch lwpid from thread.
938 (linux_set_resume_request): Update, "entry" parameter is a
939 struct thread_info * now. Fetch pid, lwpid from thread.
940 (resume_status_pending_p): Update, "entry" parameter is a
941 struct thread_info * now.
942 (need_step_over_p): Ditto. Fetch lwpid from thread.
943 (start_step_over): Fetch lwpid from thread.
944 (linux_resume_one_thread): Update, "entry" parameter is a
945 struct thread_info * now. Fetch lwpid from thread.
946 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
947 (proceed_one_lwp): Update, "entry" parameter is a
948 struct thread_info * now. Fetch lwpid from thread.
949 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
950 struct thread_info * now.
951 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
952 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
953 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
954 directly.
955 (regsets_store_inferior_registers): Ditto.
956 (fetch_register, store_register): Ditto.
957 (linux_read_memory, linux_write_memory): Ditto.
958 (linux_request_interrupt): Ditto.
959 (linux_read_auxv): Ditto.
960 (linux_xfer_siginfo): Ditto.
961 (linux_qxfer_spu): Ditto.
962 (linux_qxfer_libraries_svr4): Ditto.
963 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
964 moved to inferiors.h.
965 (get_lwp): Delete.
966 (get_thread_lwp): Update.
967 (struct lwp_info): Delete member "entry". Simplify comment for
968 member "thread".
969 (all_lwps): Delete.
970 * linux-mips-low.c (mips_read_description): Fetch lwpid from
971 current_inferior directly.
972 (update_watch_registers_callback): Update, "entry" parameter is a
973 struct thread_info * now. Fetch pid from thread.
974 (mips_linux_prepare_to_resume): Fetch ptid from thread.
975 (mips_insert_point): Fetch lwpid from current_inferior.
976 Pass &all_threads to find_inferior, not &all_lwps.
977 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
978 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
979 directly.
980 (mips_stopped_data_address): Ditto.
981 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
982 directly.
983 * linux-tile-low.c (tile_arch_setup): Ditto.
984 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
985 (update_debug_registers_callback): Update, "entry" parameter is a
986 struct thread_info * now. Fetch pid from thread.
987 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
988 Pass &all_threads to find_inferior, not &all_lwps.
989 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
990 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
991 Pass &all_threads to find_inferior, not &all_lwps.
992 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
993 (i386_dr_low_get_status): Ditto.
994 (x86_linux_prepare_to_resume): Fetch ptid from thread.
995 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
996 (x86_linux_read_description): Ditto.
997 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
998
999 2014-02-20 Doug Evans <dje@google.com>
1000
1001 * inferiors.c (get_first_inferior): Fix buglet.
1002
1003 2014-02-19 Doug Evans <dje@google.com>
1004
1005 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1006 * inferiors.c (add_thread): Change result type to struct thread_info *.
1007 All callers updated.
1008 (add_lwp): Call add_thread here instead of in callers.
1009 All callers updated.
1010 * linux-low.h (get_lwp_thread): Rewrite.
1011 (struct lwp_info): New member "thread".
1012
1013 2014-02-19 Doug Evans <dje@google.com>
1014
1015 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1016 All callers updated.
1017
1018 2014-02-19 Doug Evans <dje@google.com>
1019
1020 * inferiors.c (add_thread): Fix whitespace.
1021
1022 2014-02-19 Doug Evans <dje@google.com>
1023
1024 * dll.c (clear_dlls): Replace accessing list implemention details
1025 with API function.
1026 * gdbthread.h (get_first_thread): Declare.
1027 * inferiors.c (for_each_inferior_with_data): New function.
1028 (get_first_thread): New function.
1029 (find_thread_ptid): Simplify.
1030 (get_first_inferior): New function.
1031 (clear_list): Delete.
1032 (one_inferior_p): New function.
1033 (clear_inferior_list): New function.
1034 (clear_inferiors): Update.
1035 * inferiors.h (for_each_inferior_with_data): Declare.
1036 (clear_inferior_list): Declare.
1037 (one_inferior_p): Declare.
1038 (get_first_inferior): Declare.
1039 * linux-low.c (linux_wait_for_event): Replace accessing list
1040 implemention details with API function.
1041 * server.c (target_running): Ditto.
1042 (accumulate_file_name_length): New function.
1043 (emit_dll_description): New function.
1044 (handle_qxfer_libraries): Replace accessing list implemention
1045 details with API function.
1046 (handle_qxfer_threads_worker): New function.
1047 (handle_qxfer_threads_proper): Replace accessing list implemention
1048 details with API function.
1049 (handle_query): Ditto.
1050 (visit_actioned_threads_callback_ftype): New typedef.
1051 (visit_actioned_threads_data): New struct.
1052 (visit_actioned_threads): Rewrite to be find_inferior callback.
1053 (resume): Call find_inferior.
1054 (handle_status): Replace accessing list implemention
1055 details with API function.
1056 (process_serial_event): Replace accessing list implemention details
1057 with API function.
1058 * target.c (set_desired_inferior): Replace accessing list implemention
1059 details with API function.
1060 * tracepoint.c (same_process_p): New function.
1061 (gdb_agent_about_to_close): Replace accessing list implemention
1062 details with API function.
1063 * win32-low.c (child_delete_thread): Replace accessing list
1064 implemention details with API function.
1065 (match_dll_by_basename): New function.
1066 (dll_is_loaded_by_basename): New function.
1067 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1068 details call to dll_is_loaded_by_basename.
1069
1070 2014-02-19 Doug Evans <dje@google.com>
1071
1072 * dll.h (struct dll_info): Add comment.
1073 * gdbthread.h (struct thread_info): Add comment.
1074 (current_ptid): Simplify.
1075 * inferiors.c (add_process): Update.
1076 (remove_process): Update.
1077 * inferiors.h (struct process_info): Rename member "head" to "entry".
1078 * linux-low.c (delete_lwp): Update.
1079 (add_lwp): Update.
1080 (last_thread_of_process_p): Update.
1081 (kill_one_lwp_callback, linux_kill): Update.
1082 (status_pending_p_callback): Update.
1083 (wait_for_sigstop): Update. Simplify read of ptid.
1084 (start_step_over): Update.
1085 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1086 (get_lwp_thread): Update.
1087 (struct lwp_info): Rename member "head" to "entry".
1088 * regcache.h (inferior_list_entry): Delete.
1089 * server.c (kill_inferior_callback): Update.
1090 (detach_or_kill_inferior_callback): Update.
1091 (print_started_pid): Update.
1092 (print_attached_pid): Update.
1093 (process_serial_event): Simplify read of ptid.
1094 * thread-db.c (thread_db_create_event): Update.
1095 (thread_db_get_tls_address): Update.
1096 * win32-low.c (current_inferior_ptid): Simplify.
1097
1098 2014-02-19 Tom Tromey <tromey@redhat.com>
1099
1100 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1101 argument.
1102 (target_supports_btrace): Update.
1103
1104 2014-02-14 Yao Qi <yao@codesourcery.com>
1105
1106 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1107 (rsp-low-ipa.o): New target.
1108
1109 2014-02-12 Tom Tromey <tromey@redhat.com>
1110
1111 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1112 convert_ascii_to_int.
1113 * regcache.c (registers_to_string): Likewise.
1114 * remote-utils.c (decode_M_packet): Likewise.
1115 * server.c (process_serial_event): Likewise.
1116
1117 2014-02-12 Tom Tromey <tromey@redhat.com>
1118
1119 * server.c (handle_query, handle_v_run): Use hex2bin, not
1120 unhexify.
1121 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1122
1123 2014-02-12 Tom Tromey <tromey@redhat.com>
1124
1125 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1126 convert_int_to_ascii.
1127 * regcache.c (registers_to_string, collect_register_as_string):
1128 Likewise.
1129 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1130 Likewise.
1131 * server.c (process_serial_event): Likewise.
1132 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1133 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1134
1135 2014-02-12 Tom Tromey <tromey@redhat.com>
1136
1137 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1138 bin2hex, not hexify.
1139 * tracepoint.c (cmd_qtstatus): Likewise.
1140
1141 2014-02-12 Tom Tromey <tromey@redhat.com>
1142
1143 * remote-utils.c (monitor_output): Pass explicit length to
1144 hexify.
1145
1146 2014-02-12 Tom Tromey <tromey@redhat.com>
1147
1148 * tracepoint.c: Include rsp-low.h.
1149 * server.c: Include rsp-low.h.
1150 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1151 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1152 declare.
1153 * remote-utils.c: Include rsp-low.h.
1154 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1155 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1156 (convert_int_to_ascii, convert_ascii_to_int): Move to
1157 common/rsp-low.c.
1158 * regcache.c: Include rsp-low.h.
1159 * ax.c: Include rsp-low.h.
1160 * Makefile.in (SFILES): Add common/rsp-low.c.
1161 (OBS): Add rsp-low.o.
1162 (rsp-low.o): New target.
1163
1164 2014-02-12 Tom Tromey <tromey@redhat.com>
1165
1166 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1167 Include print-utils.h.
1168 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1169 (plongest, thirty_two, phex_nz): Remove.
1170 * Makefile.in (SFILES): Add common/print-utils.c.
1171 (OBS): Add print-utils.o.
1172 (print-utils-ipa.o): New target.
1173 (print-utils.o): New target.
1174 (IPA_OBJS): Add print-utils-ipa.o.
1175
1176 2014-02-06 Tom Tromey <tromey@redhat.com>
1177
1178 * Makefile.in (SFILES): Fix indentation.
1179
1180 2014-02-05 Doug Evans <dje@google.com>
1181
1182 * linux-low.c (linux_wait_for_event): Improve comment.
1183 (linux_wait_1): Keep current_inferior in sync with event_child.
1184
1185 2014-01-22 Doug Evans <dje@google.com>
1186
1187 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1188
1189 2014-01-22 Doug Evans <dje@google.com>
1190
1191 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1192 * configure: Regenerate.
1193 * config.in: Regenerate.
1194 * Makefile.in (SFILES): Add debug.c.
1195 (OBS): Add debug.o.
1196 * debug.c: New file.
1197 * debug.h: New file.
1198 * linux-aarch64-low.c (*): Update all debugging printfs to use
1199 debug_printf instead of fprintf.
1200 * linux-arm-low.c (*): Ditto.
1201 * linux-cris-low.c (*): Ditto.
1202 * linux-crisv32-low.c (*): Ditto.
1203 * linux-m32r-low.c (*): Ditto.
1204 * linux-sparc-low.c (*): Ditto.
1205 * linux-x86.c (*): Ditto.
1206 * linux-low.c (*): Ditto.
1207 (linux_wait_1): Add calls to debug_enter, debug_exit.
1208 (linux_wait): Remove redundant debugging printf.
1209 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1210 (linux_resume, unstop_all_lwps): Ditto.
1211 * mem-break.c (*): Update all debugging printfs to use
1212 debug_printf instead of fprintf.
1213 * remote-utils.c (*): Ditto.
1214 * thread-db.c (*): Ditto.
1215 * server.c #include <ctype.h>, "gdb_vecs.h".
1216 (debug_threads): Moved to debug.c.
1217 (*): Update all debugging printfs to use debug_printf instead of
1218 fprintf.
1219 (start_inferior): Replace call to fflush with call to debug_flush.
1220 (monitor_show_help): Mention set debug-format.
1221 (parse_debug_format_options): New function.
1222 (handle_monitor_command): Handle "monitor set debug-format".
1223 (gdbserver_usage): Mention --debug-format.
1224 (main): Parse --debug-format.
1225 * server.h (debug_threads): Declaration moved to debug.h.
1226 #include "debug.h".
1227 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1228 trace_debug_1 that uses debug_printf.
1229 (tracepoint_look_up_symbols): Update all debugging printfs to use
1230 debug_printf instead of fprintf.
1231
1232 2014-01-20 Baruch Siach <baruch@tkos.co.il>
1233
1234 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1235 sys/ptrace.h.
1236
1237 2014-01-17 Pedro Alves <palves@redhat.com>
1238
1239 PR build/16445
1240 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1241 defined after including gdb_proc_service.h.
1242
1243 2014-01-16 Doug Evans <dje@google.com>
1244
1245 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1246 (match_dll): Use it.
1247
1248 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
1249
1250 * target.h (target_ops) <read_btrace>: Change parameters and
1251 return type to allow error reporting.
1252 * server.c (handle_qxfer_btrace): Support delta reads. Pass
1253 trace reading errors on.
1254 * linux-low.c (linux_low_read_btrace): Pass trace reading
1255 errors on.
1256 (linux_low_disable_btrace): New.
1257
1258 2014-01-15 Doug Evans <dje@google.com>
1259
1260 * inferiors.c (thread_id_to_gdb_id): Delete.
1261 * inferiors.h (thread_id_to_gdb_id): Delete.
1262
1263 2014-01-13 Eli Zaretskii <eliz@gnu.org>
1264
1265 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
1266 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
1267 versions.
1268
1269 2014-01-08 Pedro Alves <palves@redhat.com>
1270
1271 * server.c (handle_status): Don't discard previous queued stop
1272 replies or thread's pending status here.
1273 (main) <disconnection>: Do it here instead.
1274
1275 2014-01-08 Pedro Alves <palves@redhat.com>
1276
1277 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
1278 * server.c (visit_actioned_threads, handle_pending_status): New
1279 function.
1280 (handle_v_cont): Factor out parts to ...
1281 (resume): ... this new function. If in all-stop, and a thread
1282 being resumed has a pending status, report it without actually
1283 resuming.
1284 (myresume): Adjust to use the new 'resume' function.
1285 (clear_pending_status_callback, set_pending_status_callback)
1286 (find_status_pending_thread_callback): New functions.
1287 (handle_status): Handle the case of multiple threads having
1288 interesting statuses to report. Report threads' real last signal
1289 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
1290 with an interesting thread to report the status for, instead of
1291 always reporting the status of the first thread.
1292
1293 2014-01-01 Joel Brobecker <brobecker@adacore.com>
1294
1295 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
1296 * gdbreplay.c (gdbreplay_version): Likewise.
1297
1298 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
1299
1300 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
1301 iov.iov_len with the real length in use.
1302
1303 2013-12-13 Joel Brobecker <brobecker@adacore.com>
1304
1305 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
1306 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
1307 for all targets that use win32-low.c.
1308 * win32-low.c (win32_ensure_ntdll_loaded): New function.
1309 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
1310
1311 2013-12-13 Pedro Alves <palves@redhat.com>
1312
1313 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
1314 if equal to TARGET_WAITKIND_LOADED.
1315 * win32-low.c (cached_status): New static global.
1316 (win32_wait): Add declaration.
1317 (do_initial_child_stuff): Flush all initial pending debug events
1318 up to the initial breakpoint.
1319 (win32_wait): If CACHED_STATUS was set, return that instead
1320 of doing a real wait. Remove the code resuming the execution
1321 of the inferior after receiving a TARGET_WAITKIND_LOADED event
1322 during the initial phase. Also remove the code changing
1323 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
1324 TARGET_WAITKIND_STOPPED.
1325
1326 2013-12-11 Yao Qi <yao@codesourcery.com>
1327
1328 * notif.c (handle_notif_ack): Return 0 if no notification
1329 matches.
1330
1331 2013-11-20 Doug Evans <dje@google.com>
1332
1333 * linux-low.c (linux_set_resume_request): Fix comment.
1334
1335 2013-11-20 Doug Evans <dje@google.com>
1336
1337 * linux-low.c (resume_status_pending_p): Tweak comment.
1338
1339 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1340
1341 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
1342 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
1343 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
1344 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
1345 (srv_amd64_regobj): Add amd64-mpx.o.
1346 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
1347 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
1348 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
1349 * i387-fp.c (num_pl_bnd_register) Added constant.
1350 (num_pl_bnd_cfg_registers) Added constant.
1351 (struct i387_xsave) Added reserved area and MPX fields.
1352 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
1353 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
1354 function.
1355 (tdesc_i386_mpx_linux): Add MPX amd64 target.
1356 (init_registers_amd64_mpx_linux): Declare new function.
1357 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
1358 (x86_64_regmap): Add MPX registers.
1359 (x86_linux_read_description): Add MPX case.
1360 (initialize_low_arch): Initialize MPX targets.
1361
1362 2013-11-18 Tom Tromey <tromey@redhat.com>
1363
1364 * configure: Rebuild.
1365 * configure.ac: Don't check for stdlib.h.
1366 * gdbreplay.c: Unconditionally include stdlib.h.
1367
1368 2013-11-18 Tom Tromey <tromey@redhat.com>
1369
1370 * config.in: Rebuild.
1371 * configure: Rebuild.
1372 * configure.ac: Don't use AC_HEADER_DIRENT.
1373
1374 2013-11-18 Tom Tromey <tromey@redhat.com>
1375
1376 * server.h: Don't check HAVE_STRING_H.
1377 * gdbreplay.c: Don't check HAVE_STRING_H.
1378 * configure: Rebuild.
1379
1380 2013-11-18 Tom Tromey <tromey@redhat.com>
1381
1382 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
1383 LIBGNU.
1384
1385 2013-11-08 Tom Tromey <tromey@redhat.com>
1386
1387 * configure, config.in: Rebuild.
1388 * configure.ac: Remove unused configury.
1389
1390 2013-11-08 Tom Tromey <tromey@redhat.com>
1391
1392 * acinclude.m4: Include common.m4, codeset.m4.
1393 * configure, config.in: Rebuild.
1394 * configure.ac: Use GDB_AC_COMMON.
1395
1396 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
1397
1398 * linux-s390-low.c (HWCAP_S390_TE): New define.
1399 (s390_arch_setup): Consider the TE field in the HWCAP for
1400 determining 'have_regset_tdb'.
1401
1402 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
1403
1404 PR gdb/16014
1405 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
1406 call to sizeof.
1407
1408 2013-10-02 Pedro Alves <palves@redhat.com>
1409
1410 * server.c (process_serial_event): Don't output "GDBserver
1411 exiting" if GDB is connected through stdio.
1412 * target.c (mywait): Likewise, be silent if GDB is connected
1413 through stdio.
1414
1415 2013-10-01 Joel Brobecker <brobecker@adacore.com>
1416
1417 * lynx-low.c (lynx_add_threads_after_attach): New function.
1418 (lynx_attach): Remove call to add_thread. Add call to
1419 lynx_add_threads_after_attach instead.
1420
1421 2013-09-28 Mike Frysinger <vapier@gentoo.org>
1422
1423 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
1424 * config.in, configure: Regenerated.
1425
1426 2013-09-18 Yao Qi <yao@codesourcery.com>
1427
1428 PR server/15959
1429 * server.c (start_inferior): Clear 'resume_info'.
1430
1431 2013-09-16 Jiong Wang <jiwang@tilera.com>
1432
1433 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
1434 for each register.
1435
1436 2013-09-16 Jiong Wang <jiwang@tilera.com>
1437
1438 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
1439 linux-tile-low.o to srv_tgtobj.
1440
1441 2013-09-16 Will Newton <will.newton@linaro.org>
1442
1443 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
1444 out regs.
1445
1446 2013-09-06 Pedro Alves <palves@redhat.com>
1447
1448 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
1449 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
1450 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
1451 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
1452 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
1453 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
1454
1455 2013-09-06 Pedro Alves <palves@redhat.com>
1456
1457 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
1458 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
1459
1460 2013-09-06 Pedro Alves <palves@redhat.com>
1461
1462 * linux-amd64-ipa.c: Include tracepoint.h.
1463 * linux-i386-ipa.c: Include tracepoint.h.
1464
1465 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
1466
1467 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
1468 (ps_get_thread_area): New function.
1469
1470 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
1471
1472 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
1473 (initialize_low_arch): Call init_registers_crisv32 rather than
1474 init_register_crisv32.
1475
1476 2013-09-05 Pedro Alves <palves@redhat.com>
1477
1478 * server.h (handle_vFile, hostio_last_error_from_errno): Move
1479 to ...
1480 * hostio.h: ... this new file.
1481 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
1482 win32-low.c: Include hostio.h.
1483
1484 2013-09-05 Pedro Alves <palves@redhat.com>
1485
1486 * server.h (gdb_client_data, handler_func, callback_handler_func)
1487 (delete_file_handler, add_file_handler, append_callback_event)
1488 (delete_callback_event, start_event_loop, initialize_event_loop):
1489 Move to event-loop.h and include it.
1490 * event-loop.h: New file.
1491
1492 2013-09-05 Pedro Alves <palves@redhat.com>
1493
1494 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
1495 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
1496 (loaded_dll, unloaded_dll): Move to ...
1497 * dll.h: ... this new file.
1498 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
1499
1500 2013-09-05 Pedro Alves <palves@redhat.com>
1501
1502 * server.h (current_process, get_thread_process, all_processes)
1503 (add_inferior_to_list, for_each_inferior, current_inferior)
1504 (remove_inferior, add_process, remove_process, find_process_pid)
1505 (have_started_inferiors_p, have_attached_inferiors_p)
1506 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
1507 (clear_inferiors, find_inferior, find_inferior_id)
1508 (inferior_target_data, set_inferior_target_data)
1509 (inferior_regcache_data, set_inferior_regcache_data): Move to
1510 inferiors.h, and include it.
1511 * inferiors.h: New file.
1512
1513 2013-09-05 Pedro Alves <palves@redhat.com>
1514
1515 * server.h (struct emit_ops, current_insn_ptr, emit_error):
1516 Move ...
1517 * ax.h: ... here.
1518
1519 2013-09-05 Pedro Alves <palves@redhat.com>
1520
1521 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
1522 tracepoint.h.
1523 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
1524 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
1525 (handle_tracepoint_general_set, handle_tracepoint_query)
1526 (tracepoint_finished_step, tracepoint_was_hit)
1527 (release_while_stepping_state_list, current_traceframe)
1528 (in_readonly_region, traceframe_read_mem)
1529 (fetch_traceframe_registers, traceframe_read_sdata)
1530 (traceframe_read_info, struct fast_tpoint_collect_status)
1531 (fast_tracepoint_collecting, force_unlock_trace_buffer)
1532 (handle_tracepoit_bkpts, initialize_low_tracepoint)
1533 (supply_fast_tracepoint_registers)
1534 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
1535 (ipa_tdesc, claim_trampoline_space)
1536 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
1537 (agent_mem_read, agent_get_trace_state_variable_value)
1538 (agent_set_trace_state_variable_value, agent_tsv_read)
1539 (agent_mem_read_string, get_raw_reg_func_addr)
1540 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
1541 * tracepoint.h: ... this new file.
1542
1543 2013-09-05 Pedro Alves <palves@redhat.com>
1544
1545 * server.h (perror_with_name, error, fatal, warning, paddress)
1546 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
1547 include it.
1548 * utils.h: New file.
1549
1550 2013-09-05 Pedro Alves <palves@redhat.com>
1551
1552 * server.h (remote_debug, noack_mode, transport_is_reliable)
1553 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
1554 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
1555 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
1556 (write_enn, initialize_async_io, enable_async_io)
1557 (disable_async_io, check_remote_input_interrupt_request)
1558 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
1559 (dead_thread_notify, prepare_resume_reply)
1560 (decode_address_to_semicolon, decode_address, decode_m_packet)
1561 (decode_M_packet, decode_X_packet, decode_xfer_write)
1562 (decode_search_memory_packet, unhexify, hexify)
1563 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
1564 (look_up_one_symbol, relocate_instruction)
1565 (monitor_output): Move to remote-utils.h, and include it.
1566 * remote-utils.h: New file.
1567
1568 2013-09-05 Pedro Alves <palves@redhat.com>
1569
1570 * server.h (_): Delete.
1571
1572 2013-09-02 Pedro Alves <palves@redhat.com>
1573
1574 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
1575 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
1576 allocated.
1577 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
1578
1579 2013-09-02 Pierre Muller <muller@sourceware.org>
1580
1581 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
1582 or WriteProcessMemory complete successfully and handle
1583 ERROR_PARTIAL_COPY error.
1584
1585 2013-09-02 Pedro Alves <palves@redhat.com>
1586
1587 * server.c (gdb_read_memory): Return -1 on traceframe memory read
1588 error instead of EIO.
1589
1590 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1591
1592 PR server/15604
1593 * linux-low.c: Include filestuff.h.
1594 (linux_create_inferior) <pid == 0>: Call close_most_fds.
1595 * lynx-low.c: Include filestuff.h.
1596 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
1597 * server.c: Include filestuff.h.
1598 (main): Call notice_open_fds.
1599 * spu-low.c: Include filestuff.h.
1600 (spu_create_inferior) <pid == 0>: Call close_most_fds.
1601
1602 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
1603
1604 * Makefile.in: Explain why ../target and ../nat are not
1605 listed as include file search paths.
1606 (linux-waitpid.o): New object file rule.
1607 * configure.srv (srv_native_linux_obj): New variable.
1608 Replace all occurrences of linux native object files with
1609 $srv_native_linux_obj.
1610 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
1611 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
1612 (linux_enable_event_reporting): Remove declaration.
1613 (my_waitpid): Moved to common/linux-waitpid.c.
1614 (linux_wait_for_event): Pass ptid when calling
1615 linux_enable_event_reporting.
1616 (linux_supports_tracefork_flag): Remove.
1617 (linux_enable_event_reporting): Likewise.
1618 (linux_tracefork_grandchild): Remove.
1619 (STACK_SIZE): Moved to common/linux-ptrace.c.
1620 (linux_tracefork_child): Remove.
1621 (linux_test_for_tracefork): Remove.
1622 (linux_look_up_symbols): Call linux_supports_traceclone.
1623 (initialize_low): Remove call to linux_test_for_tracefork.
1624 * linux-low.h (PTRACE_TYPE_ARG3): Move to
1625 common/linux-ptrace.h.
1626 (PTRACE_TYPE_ARG4): Likewise.
1627 Include linux-ptrace.h.
1628
1629 2013-08-21 Pedro Alves <palves@redhat.com>
1630
1631 * config.in: Renegerate.
1632
1633 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
1634
1635 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
1636 (SFILES): Remove $(srcdir)/common/target-common.c and
1637 add $(srcdir)/target/waitstatus.c.
1638 (OBS): Remove target-common.o and add waitstatus.o.
1639 (server_h): Remove $(srcdir)/../common/target-common.h and
1640 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
1641 and $(srcdir)/../target/waitstatus.h.
1642 (target-common.o): Remove.
1643 (waitstatus.o): New target object file.
1644 * target.h: Do not include target-common.h and
1645 include target/resume.h, target/wait.h and
1646 target/waitstatus.h.
1647
1648 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
1649
1650 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
1651 to PTRACE_TYPE_ARG3.
1652 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
1653 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
1654 PTRACE_TYPE_ARG4.
1655 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
1656 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
1657
1658 2013-07-27 Jie Zhang <jie@codesourcery.com>
1659 Daniel Jacobowitz <dan@codesourcery.com>
1660 Yao Qi <yao@codesourcery.com>
1661
1662 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
1663 (mips-linux-watch.o): New rule.
1664 (mips_linux_watch_h): New variable.
1665 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
1666 srv_tgtobj.
1667 * linux-mips-low.c: Include mips-linux-watch.h.
1668 (struct arch_process_info, struct arch_lwp_info): New.
1669 (update_watch_registers_callback): New function.
1670 (mips_linux_new_process, mips_linux_new_thread) New functions.
1671 (mips_linux_prepare_to_resume, mips_insert_point): New
1672 functions.
1673 (mips_remove_point, mips_stopped_by_watchpoint): New
1674 functions.
1675 (rsp_bp_type_to_target_hw_bp_type): New function.
1676 (mips_stopped_data_address): New function.
1677 (the_low_target): Add watchpoint support functions.
1678
1679 2013-07-27 Yao Qi <yao@codesourcery.com>
1680
1681 * i386-low.c: Include break-common.h.
1682 (enum target_hw_bp_type): Remove.
1683
1684 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
1685
1686 * Makefile.in (SFILES): /common/target-common.c.
1687 (OBS): Add target-common.o.
1688 (server_h): Add $(srcdir)/../common/target-common.h.
1689 (target-common.o): New target.
1690 * server.c (queue_stop_reply_callback): Free
1691 status string after use.
1692 * target.c (target_waitstatus_to_string): Remove.
1693 * target.h: Include target-common.h.
1694 (resume_kind): Likewise.
1695 (target_waitkind): Likewise.
1696 (target_waitstatus): Likewise.
1697 (TARGET_WNOHANG): Likewise.
1698
1699 2013-07-04 Yao Qi <yao@codesourcery.com>
1700
1701 * Makefile.in (host_alias): Use @host_noncanonical@.
1702 (target_alias): Use @target_noncanonical@.
1703 * configure.ac: Use ACX_NONCANONICAL_TARGET and
1704 ACX_NONCANONICAL_HOST.
1705 * configure: Regenerated.
1706
1707 Revert:
1708 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
1709
1710 * configure.ac (version_host, version_target): Set and AC_SUBST them.
1711 * configure: Rebuild.
1712 * Makefile.in (version_host, version_target): Get from configure.
1713 (version.c): Use $(version_host) and $(version_target).
1714
1715 2013-07-03 Pedro Alves <palves@redhat.com>
1716
1717 * Makefile.in (config.status): Depend on development.sh.
1718 * acinclude.m4: Include libmcheck.m4.
1719 * configure: Regenerate.
1720
1721 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
1722
1723 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
1724 attribute inside the parentheses.
1725 (winapi_DebugSetProcessKillOnExit): Ditto.
1726 (winapi_DebugBreakProcess): Ditto.
1727 (winapi_GenerateConsoleCtrlEvent): Ditto.
1728
1729 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
1730
1731 * notif.h (notif_event): Add a dummy member to avoid compiler
1732 errors.
1733
1734 2013-07-01 Pedro Alves <palves@redhat.com>
1735
1736 * hostio.c (HOSTIO_PATH_MAX): Define.
1737 (require_filename, handle_open, handle_unlink, handle_readlink):
1738 Use it.
1739
1740 2013-07-01 Pedro Alves <palves@redhat.com>
1741
1742 * server.h: Include "pathmax.h".
1743 * linux-low.c: Don't include sys/param.h.
1744 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
1745 MAXPATHLEN.
1746 * win32-low.c: Don't include sys/param.h.
1747 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
1748
1749 2013-07-01 Pedro Alves <palves@redhat.com>
1750
1751 * event-loop.c: Don't check HAVE_UNISTD_H before including
1752 <unistd.h>.
1753 * gdbreplay.c: Likewise.
1754 * remote-utils.c: Likewise.
1755 * server.c: Likewise.
1756 * configure.ac: Don't check for unistd.h.
1757 * configure: Regenerate.
1758
1759 2013-06-28 Tom Tromey <tromey@redhat.com>
1760
1761 * Makefile.in (version.c): Use version.in, not
1762 common/version.in.
1763
1764 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
1765
1766 * configure.ac (version_host, version_target): Set and AC_SUBST them.
1767 * configure: Rebuild.
1768 * Makefile.in (version_host, version_target): Get from configure.
1769 (version.c): Use $(version_host) and $(version_target).
1770
1771 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
1772
1773 Fix trace-status to output user name without trailing colon.
1774 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
1775
1776 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
1777
1778 Fix trace-status to output proper start-time and stop-time.
1779 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
1780 output start time and stop time in hex as gdb expects.
1781
1782 2013-06-26 Pedro Alves <pedro@codesourcery.com>
1783
1784 * tracepoint.c (build_traceframe_info_xml): Output trace state
1785 variables present in the trace buffer.
1786
1787 2013-06-24 Tom Tromey <tromey@redhat.com>
1788
1789 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
1790 create-version.sh.
1791 (version.o): Remove.
1792 * gdbreplay.c: Include version.h.
1793 (version, host_name): Don't declare.
1794 * server.h: Include version.h.
1795 (version, host_name): Don't declare.
1796
1797 2013-06-12 Pedro Alves <palves@redhat.com>
1798
1799 * linux-x86-low.c (linux_is_elf64): Delete global.
1800 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
1801 with local linux_pid_exe_is_elf_64_file use.
1802
1803 2013-06-11 Pedro Alves <palves@redhat.com>
1804
1805 * linux-low.c (regset_disabled, disable_regset): New functions.
1806 (regsets_fetch_inferior_registers)
1807 (regsets_store_inferior_registers): Use them.
1808 (initialize_regsets_info); Don't allocate the disabled_regsets
1809 array here.
1810 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
1811 comment.
1812
1813 2013-06-11 Pedro Alves <palves@redhat.com>
1814
1815 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
1816 xmalloc.
1817
1818 2013-06-11 Pedro Alves <palves@redhat.com>
1819
1820 * linux-x86-low.c (initialize_low_arch): Call
1821 init_registers_x32_avx_linux.
1822
1823 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
1824
1825 Fix compatibility with Android Bionic.
1826 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
1827 it is not empty.
1828
1829 2013-06-07 Pedro Alves <palves@redhat.com>
1830
1831 PR server/14823
1832 * Makefile.in (OBS): Add tdesc.o.
1833 (IPA_OBJS): Add tdesc-ipa.o.
1834 (tdesc-ipa.o): New rule.
1835 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
1836 interface.
1837 * linux-low.c (new_inferior): Delete.
1838 (disabled_regsets, num_regsets): Delete.
1839 (linux_add_process): Adjust to set the new per-process
1840 new_inferior flag.
1841 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
1842 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
1843 was a stop. When calling arch_setup, switch the current inferior
1844 to the thread that got an event.
1845 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
1846 (regsets_fetch_inferior_registers)
1847 (regsets_store_inferior_registers): New regsets_info parameter.
1848 Adjust to use it.
1849 (linux_register_in_regsets): New regs_info parameter. Adjust to
1850 use it.
1851 (register_addr, fetch_register, store_register): New usrregs_info
1852 parameter. Adjust to use it.
1853 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
1854 parameter regs_info. Adjust to use it.
1855 (linux_fetch_registers): Get the current inferior's regs_info, and
1856 adjust to use it.
1857 (linux_store_registers): Ditto.
1858 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
1859 (initialize_low): Don't initialize the target_regsets here. Call
1860 initialize_low_arch.
1861 * linux-low.h (target_regsets): Delete declaration.
1862 (struct regsets_info): New.
1863 (struct usrregs_info): New.
1864 (struct regs_info): New.
1865 (struct process_info_private) <new_inferior>: New field.
1866 (struct linux_target_ops): Delete the num_regs, regmap, and
1867 regset_bitmap fields. New field regs_info.
1868 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
1869 * i387-fp.c (num_xmm_registers): Delete.
1870 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
1871 calls to new interface.
1872 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
1873 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
1874 Infer the number of xmm registers from the regcache's target
1875 description.
1876 * i387-fp.h (num_xmm_registers): Delete.
1877 * inferiors.c (add_thread): Don't install the thread's regcache
1878 here.
1879 * proc-service.c (gregset_info): Fetch the current inferior's
1880 regs_info. Adjust to use it.
1881 * regcache.c: Include tdesc.h.
1882 (register_bytes, reg_defs, num_registers)
1883 (gdbserver_expedite_regs): Delete.
1884 (get_thread_regcache): If the thread doesn't have a regcache yet,
1885 create one, instead of aborting gdbserver.
1886 (regcache_invalidate_one): Rename to ...
1887 (regcache_invalidate_thread): ... this.
1888 (regcache_invalidate_one): New.
1889 (regcache_invalidate): Only invalidate registers of the current
1890 process.
1891 (init_register_cache): Add target_desc parameter, and use it.
1892 (new_register_cache): Ditto. Assert the target description has a
1893 non zero registers_size.
1894 (regcache_cpy): Add assertions. Adjust.
1895 (realloc_register_cache, set_register_cache): Delete.
1896 (registers_to_string, registers_from_string): Adjust.
1897 (find_register_by_name, find_regno, find_register_by_number)
1898 (register_cache_size): Add target_desc parameter, and use it.
1899 (free_register_cache_thread, free_register_cache_thread_one)
1900 (regcache_release, register_cache_size): New.
1901 (register_size): Add target_desc parameter, and use it.
1902 (register_data, supply_register, supply_register_zeroed)
1903 (supply_regblock, supply_register_by_name, collect_register)
1904 (collect_register_as_string, collect_register_by_name): Adjust.
1905 * regcache.h (struct target_desc): Forward declare.
1906 (struct regcache) <tdesc>: New field.
1907 (init_register_cache, new_register_cache): Add target_desc
1908 parameter.
1909 (regcache_invalidate_thread): Declare.
1910 (regcache_invalidate_one): Delete declaration.
1911 (regcache_release): Declare.
1912 (find_register_by_number, register_cache_size, register_size)
1913 (find_regno): Add target_desc parameter.
1914 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
1915 declarations.
1916 * remote-utils.c: Include tdesc.h.
1917 (outreg, prepare_resume_reply): Adjust.
1918 * server.c: Include tdesc.h.
1919 (gdbserver_xmltarget): Delete declaration.
1920 (get_features_xml, process_serial_event): Adjust.
1921 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
1922 declare.
1923 (struct process_info) <tdesc>: New field.
1924 (ipa_tdesc): Declare.
1925 * tdesc.c: New file.
1926 * tdesc.h: New file.
1927 * tracepoint.c: Include tdesc.h.
1928 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
1929 (get_context_regcache): Adjust to pass ipa_tdesc down.
1930 (do_action_at_tracepoint): Adjust to get the register cache size
1931 from the context regcache's description.
1932 (traceframe_walk_blocks): Adjust to get the register cache size
1933 from the current trace frame's description.
1934 (traceframe_get_pc): Adjust to get current trace frame's
1935 description and pass it down.
1936 (gdb_collect): Adjust to get the register cache size from the
1937 IPA's description.
1938 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
1939 (gdbserver_xmltarget): Delete.
1940 (initialize_low_tracepoint): Set the ipa's target description.
1941 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
1942 (initialize_low_tracepoint): Set the ipa's target description.
1943 * linux-x86-low.c: Include tdesc.h.
1944 [__x86_64__] (is_64bit_tdesc): New.
1945 (ps_get_thread_area, x86_get_thread_area): Use it.
1946 (i386_cannot_store_register): Rename to ...
1947 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
1948 (i386_cannot_fetch_register): Rename to ...
1949 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
1950 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
1951 to new interface.
1952 (target_regsets): Rename to ...
1953 (x86_regsets): ... this.
1954 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
1955 interface.
1956 (x86_siginfo_fixup): Use is_64bit_tdesc.
1957 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
1958 (tdesc_x32_avx_linux, tdesc_x32_linux)
1959 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
1960 Declare.
1961 (x86_linux_update_xmltarget): Delete.
1962 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
1963 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
1964 (AMD64_LINUX_USER64_CS): New.
1965 (x86_linux_read_description): New, based on
1966 x86_linux_update_xmltarget.
1967 (same_process_callback): New.
1968 (x86_arch_setup_process_callback): New.
1969 (x86_linux_update_xmltarget): New.
1970 (x86_regsets_info): New.
1971 (amd64_linux_regs_info): New.
1972 (i386_linux_usrregs_info): New.
1973 (i386_linux_regs_info): New.
1974 (x86_linux_regs_info): New.
1975 (x86_arch_setup): Reimplement.
1976 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
1977 (x86_emit_ops): Ditto.
1978 (the_low_target): Adjust. Install x86_linux_regs_info,
1979 x86_cannot_fetch_register, and x86_cannot_store_register.
1980 (initialize_low_arch): New.
1981 * linux-ia64-low.c (tdesc_ia64): Declare.
1982 (ia64_fetch_register): Adjust.
1983 (ia64_usrregs_info, regs_info): New globals.
1984 (ia64_regs_info): New function.
1985 (the_low_target): Adjust.
1986 (initialize_low_arch): New function.
1987 * linux-sparc-low.c (tdesc_sparc64): Declare.
1988 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
1989 Adjust.
1990 (sparc_arch_setup): New function.
1991 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
1992 (the_low_target): Adjust.
1993 (initialize_low_arch): New function.
1994 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
1995 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
1996 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
1997 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
1998 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
1999 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2000 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2001 (tdesc_powerpc_isa205_vsx64l): Declare.
2002 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2003 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2004 (ppc_set_pc, ppc_get_hwcap): Adjust.
2005 (ppc_usrregs_info): Forward declare.
2006 (!__powerpc64__) ppc_regmap_adjusted: New global.
2007 (ppc_arch_setup): Adjust to the current process'es target
2008 description.
2009 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2010 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2011 (ppc_store_evrregset): Adjust.
2012 (target_regsets): Rename to ...
2013 (ppc_regsets): ... this, and make static.
2014 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2015 (ppc_regs_info): New function.
2016 (the_low_target): Adjust.
2017 (initialize_low_arch): New function.
2018 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2019 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2020 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2021 (tdesc_s390x_linux64v2): Declare.
2022 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2023 (s390_fill_gregset, s390_store_last_break): Adjust.
2024 (target_regsets): Rename to ...
2025 (s390_regsets): ... this, and make static.
2026 (s390_get_pc, s390_set_pc): Adjust.
2027 (s390_get_hwcap): New target_desc parameter, and use it.
2028 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2029 (s390_arch_setup): Adjust to set the current process'es target
2030 description. Don't adjust the regmap.
2031 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2032 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2033 (regs_info_3264): New globals.
2034 (s390_regs_info): New function.
2035 (the_low_target): Adjust.
2036 (initialize_low_arch): New function.
2037 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2038 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2039 [__mips64] (init_registers_mips_linux)
2040 (init_registers_mips_dsp_linux): Delete defines.
2041 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2042 (have_dsp): New global.
2043 (mips_read_description): New, based on mips_arch_setup.
2044 (mips_arch_setup): Reimplement.
2045 (get_usrregs_info): New function.
2046 (mips_cannot_fetch_register, mips_cannot_store_register)
2047 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2048 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2049 (target_regsets): Rename to ...
2050 (mips_regsets): ... this, and make static.
2051 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2052 (dsp_regs_info, regs_info): New globals.
2053 (mips_regs_info): New function.
2054 (the_low_target): Adjust.
2055 (initialize_low_arch): New function.
2056 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2057 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2058 Declare.
2059 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2060 (arm_read_description): New, with bits factored from
2061 arm_arch_setup.
2062 (arm_arch_setup): Reimplement.
2063 (target_regsets): Rename to ...
2064 (arm_regsets): ... this, and make static.
2065 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2066 (arm_regs_info): New function.
2067 (the_low_target): Adjust.
2068 (initialize_low_arch): New function.
2069 * linux-m68k-low.c (tdesc_m68k): Declare.
2070 (target_regsets): Rename to ...
2071 (m68k_regsets): ... this, and make static.
2072 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2073 (m68k_regs_info): New function.
2074 (m68k_arch_setup): New function.
2075 (the_low_target): Adjust.
2076 (initialize_low_arch): New function.
2077 * linux-sh-low.c (tdesc_sharch): Declare.
2078 (target_regsets): Rename to ...
2079 (sh_regsets): ... this, and make static.
2080 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2081 (sh_regs_info, sh_arch_setup): New functions.
2082 (the_low_target): Adjust.
2083 (initialize_low_arch): New function.
2084 * linux-bfin-low.c (tdesc_bfin): Declare.
2085 (bfin_arch_setup): New function.
2086 (bfin_usrregs_info, regs_info): New globals.
2087 (bfin_regs_info): New function.
2088 (the_low_target): Adjust.
2089 (initialize_low_arch): New function.
2090 * linux-cris-low.c (tdesc_cris): Declare.
2091 (cris_arch_setup): New function.
2092 (cris_usrregs_info, regs_info): New globals.
2093 (cris_regs_info): New function.
2094 (the_low_target): Adjust.
2095 (initialize_low_arch): New function.
2096 * linux-cris-low.c (tdesc_crisv32): Declare.
2097 (cris_arch_setup): New function.
2098 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2099 (cris_regs_info): New function.
2100 (the_low_target): Adjust.
2101 (initialize_low_arch): New function.
2102 * linux-m32r-low.c (tdesc_m32r): Declare.
2103 (m32r_arch_setup): New function.
2104 (m32r_usrregs_info, regs_info): New globals.
2105 (m32r_regs_info): Adjust.
2106 (initialize_low_arch): New function.
2107 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2108 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2109 (tic6x_usrregs_info): Forward declare.
2110 (tic6x_read_description): New function, based on ...
2111 (tic6x_arch_setup): ... this. Reimplement.
2112 (target_regsets): Rename to ...
2113 (tic6x_regsets): ... this, and make static.
2114 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2115 (tic6x_regs_info): New function.
2116 (the_low_target): Adjust.
2117 (initialize_low_arch): New function.
2118 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2119 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2120 (target_regsets): Rename to ...
2121 (xtensa_regsets): ... this, and make static.
2122 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2123 globals.
2124 (xtensa_arch_setup, xtensa_regs_info): New functions.
2125 (the_low_target): Adjust.
2126 (initialize_low_arch): New function.
2127 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2128 (nios2_arch_setup): Set the current process'es tdesc.
2129 (target_regsets): Rename to ...
2130 (nios2_regsets): ... this.
2131 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2132 (nios2_regs_info): New function.
2133 (the_low_target): Adjust.
2134 (initialize_low_arch): New function.
2135 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2136 (aarch64_arch_setup): Set the current process'es tdesc.
2137 (target_regsets): Rename to ...
2138 (aarch64_regsets): ... this.
2139 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2140 (aarch64_regs_info): New function.
2141 (the_low_target): Adjust.
2142 (initialize_low_arch): New function.
2143 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2144 globals.
2145 (target_regsets): Rename to ...
2146 (tile_regsets): ... this.
2147 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2148 (tile_regs_info): New function.
2149 (tile_arch_setup): Set the current process'es tdesc.
2150 (the_low_target): Adjust.
2151 (initialize_low_arch): New function.
2152 * spu-low.c (tdesc_spu): Declare.
2153 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2154 * win32-arm-low.c (tdesc_arm): Declare.
2155 (arm_arch_setup): New function.
2156 (the_low_target): Install arm_arch_setup instead of
2157 init_registers_arm.
2158 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2159 (init_windows_x86): Rename to ...
2160 (i386_arch_setup): ... this. Set `win32_tdesc'.
2161 (the_low_target): Adjust.
2162 * win32-low.c (win32_tdesc): New global.
2163 (child_add_thread): Don't create the thread cache here.
2164 (do_initial_child_stuff): Set the new process'es tdesc.
2165 * win32-low.h (struct target_desc): Forward declare.
2166 (win32_tdesc): Declare.
2167 * lynx-i386-low.c (tdesc_i386): Declare global.
2168 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2169 * lynx-low.c (lynx_tdesc): New global.
2170 (lynx_add_process): Set the new process'es tdesc.
2171 * lynx-low.h (struct target_desc): Forward declare.
2172 (lynx_tdesc): Declare global.
2173 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2174 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2175 * nto-low.c (nto_tdesc): New global.
2176 (do_attach): Set the new process'es tdesc.
2177 * nto-low.h (struct target_desc): Forward declare.
2178 (nto_tdesc): Declare.
2179 * nto-x86-low.c (tdesc_i386): Declare.
2180 (nto_x86_arch_setup): Set `nto_tdesc'.
2181
2182 2013-06-04 Gary Benson <gbenson@redhat.com>
2183
2184 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2185 to qSupported response when appropriate.
2186 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2187 with nonzero-length annex.
2188 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2189 arguments supplied in annex.
2190
2191 2013-05-31 Doug Evans <dje@google.com>
2192
2193 PR server/15594
2194 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2195 64 bits in 64-cross-32 environment.
2196
2197 2013-05-28 Pedro Alves <palves@redhat.com>
2198
2199 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2200 (aarch64-without-fpu.c): Delete rule.
2201 * configure.srv (aarch64*-*-linux*): Remove references to
2202 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2203 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2204 declaration.
2205
2206 2013-05-24 Pedro Alves <palves@redhat.com>
2207
2208 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2209 instead of strchr/decode_address. Error if the range isn't split
2210 with a ','. Don't assume there's be a ':' in the action.
2211
2212 2013-05-23 Yao Qi <yao@codesourcery.com>
2213 Pedro Alves <palves@redhat.com>
2214
2215 * linux-low.c (lwp_in_step_range): New function.
2216 (linux_wait_1): If the thread was range stepping and stopped
2217 outside the stepping range, report the stop to GDB. Otherwise,
2218 continue stepping. Add range stepping debug output.
2219 (linux_set_resume_request): Copy the step range from the resume
2220 request to the lwp.
2221 (linux_supports_range_stepping): New.
2222 (linux_target_ops) <supports_range_stepping>: Set to
2223 linux_supports_range_stepping.
2224 * linux-low.h (struct linux_target_ops)
2225 <supports_range_stepping>: New field.
2226 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2227 * linux-x86-low.c (x86_supports_range_stepping): New.
2228 (the_low_target) <supports_range_stepping>: Set to
2229 x86_supports_range_stepping.
2230 * server.c (handle_v_cont): Handle 'r' action.
2231 (handle_v_requests): Append ";r" if the target supports range
2232 stepping.
2233 * target.h (struct thread_resume) <step_range_start,
2234 step_range_end>: New fields.
2235 (struct target_ops) <supports_range_stepping>:
2236 New field.
2237 (target_supports_range_stepping): New macro.
2238
2239 2013-05-17 Joel Brobecker <brobecker@adacore.com>
2240
2241 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2242 confusion in comment.
2243
2244 2013-05-17 Joel Brobecker <brobecker@adacore.com>
2245
2246 * lynx-low.c (struct process_info_private): New type.
2247 (lynx_add_process): New function.
2248 (lynx_create_inferior, lynx_attach): Replace calls to
2249 add_process by calls to lynx_add_process.
2250 (lynx_resume): If PTID is null, then try using
2251 current_process()->private->last_wait_event_ptid.
2252 Add comments.
2253 (lynx_clear_inferiors): Delete. The contents of that function
2254 has been inlined in lynx_mourn;
2255 (lynx_wait_1): Save the ptid in the process's private data.
2256 (lynx_mourn): Free the process' private data. Replace call
2257 to lynx_clear_inferiors by call to clear_inferiors.
2258
2259 2013-05-17 Yao Qi <yao@codesourcery.com>
2260
2261 * i386-low.c (i386_length_and_rw_bits): Move the comment to
2262 the right place.
2263
2264 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
2265
2266 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
2267 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
2268 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
2269 PT_TEXT_END_ADDR guards. Update comments.
2270 (linux_target_op) <read_offsets>: Conditionally define to
2271 linux_read_offsets if the target is UCLIBC and if it defines
2272 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
2273
2274 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
2275 Andrew Jenner <andrew@codesourcery.com>
2276
2277 * Makefile.in (SFILES): Add linux-nios2-low.c.
2278 (clean): Add action to delete nios2-linux.c.
2279 (nios2-linux.c): New rule.
2280 * configure.srv: Add nios2*-*-linux*.
2281 * linux-nios2-low.c: New.
2282
2283 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
2284
2285 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
2286
2287 2013-04-25 Hui Zhu <hui@codesourcery.com>
2288
2289 PR gdb/15186
2290 * ax.c (ax_printf): Add fflush.
2291
2292 2013-04-22 Tom Tromey <tromey@redhat.com>
2293
2294 * Makefile.in (SFILES): Add filestuff.c.
2295 (OBS): Add filestuff.o.
2296 (filestuff.o): New target.
2297 * config.in, configure: Rebuild.
2298 * configure.ac: Check for fdwalk, pipe2.
2299
2300 2013-04-17 Pedro Alves <palves@redhat.com>
2301
2302 * configure.ac (USE_THREAD_DB): Delete variable.
2303 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
2304 Don't AC_SUBST USE_THREAD_DB.
2305 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
2306 * config.in, configure: Regenerate.
2307
2308 2013-04-16 Pedro Alves <palves@redhat.com>
2309
2310 * linux-low.h (struct lwp_info) <thread_known>: Move under
2311 the USE_THREAD_DB #ifdef.
2312
2313 2013-04-16 Pedro Alves <palves@redhat.com>
2314
2315 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
2316 (linux-low.o): Delete rule.
2317 * linux-low.h: Always include "gdb_thread_db.h" instead of
2318 conditionally including thread_db.h.
2319 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
2320 HAVE_THREAD_DB_H.
2321
2322 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2323
2324 * Makefile.in (install-only): Fix make install regression.
2325
2326 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
2327
2328 Convert man pages to texinfo, new gdbinit.5 texinfo page.
2329 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
2330 installation.
2331 * gdbserver.1: Remove.
2332
2333 2013-03-22 Pedro Alves <palves@redhat.com>
2334
2335 * linux-low.c (handle_extended_wait): Don't call
2336 linux_enable_event_reporting.
2337
2338 2013-03-15 Tony Theodore <tonyt@logyst.com>
2339
2340 PR build/9098:
2341 * Makefile.in (SHELL): Use @SHELL@.
2342
2343 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
2344
2345 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
2346 compiler warning.
2347
2348 2013-03-13 Joel Brobecker <brobecker@adacore.com>
2349
2350 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
2351 Remove extraneous NULL element.
2352
2353 2013-03-13 Yao Qi <yao@codesourcery.com>
2354
2355 * tracepoint.c (traceframe_read_tsv): Look for the last matched
2356 'V' block in trace frame.
2357
2358 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2359
2360 * target.h (struct target_ops): Add btrace ops.
2361 (target_supports_btrace): New macro.
2362 (target_enable_btrace): New macro.
2363 (target_disable_btrace): New macro.
2364 (target_read_btrace): New macro.
2365 * gdbthread.h (struct thread_info): Add btrace field.
2366 * server.c: Include btrace-common.h.
2367 (handle_btrace_general_set): New function.
2368 (handle_btrace_enable): New function.
2369 (handle_btrace_disable): New function.
2370 (handle_general_set): Call handle_btrace_general_set.
2371 (handle_qxfer_btrace): New function.
2372 (struct qxfer qxfer_packets[]): Add btrace entry.
2373 * inferiors.c (remove_thread): Disable btrace.
2374 * linux-low: Include linux-btrace.h.
2375 (linux_low_enable_btrace): New function.
2376 (linux_low_read_btrace): New function.
2377 (linux_target_ops): Add btrace ops.
2378 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
2379 Add srv_linux_btrace=yes.
2380 (x86_64-*-linux*): Add linux-btrace.o.
2381 Add srv_linux_btrace=yes.
2382 * configure.ac: Define HAVE_LINUX_BTRACE.
2383 * config.in: Regenerated.
2384 * configure: Regenerated.
2385
2386 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2387
2388 * server.c (handle_qxfer): Preserve error message if -3 is
2389 returned.
2390 (qxfer): Document the -3 return value.
2391
2392 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2393
2394 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
2395 (linux_btrace_h): New variable.
2396 (linux-btrace.o): New rule.
2397
2398 2013-03-08 Stan Shebs <stan@codesourcery.com>
2399 Hafiz Abid Qadeer <abidh@codesourcery.com>
2400
2401 * tracepoint.c (trace_buffer_size): New global.
2402 (DEFAULT_TRACE_BUFFER_SIZE): New define.
2403 (init_trace_buffer): Change to one-argument function. Allocate
2404 trace buffer memory.
2405 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
2406 handle QTBuffer:size packet.
2407 (cmd_bigqtbuffer_size): New function.
2408 (initialize_tracepoint): Call init_trace_buffer with
2409 DEFAULT_TRACE_BUFFER_SIZE.
2410 * server.c (handle_query): Add QTBuffer:size in the
2411 supported packets.
2412
2413 2013-03-07 Yao Qi <yao@codesourcery.com>
2414
2415 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
2416 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
2417 of -1.
2418 (cmd_qtsp): Adjust condition. Do post increment.
2419 Set cur_action and cur_step_action back to 0.
2420
2421 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
2422
2423 PR server/15236
2424 * linux-low.c (linux_write_memory): Return early success if LEN is
2425 zero.
2426
2427 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
2428
2429 * configure.srv: Add x86_64-*-cygwin* as target.
2430
2431 2013-02-28 Tom Tromey <tromey@redhat.com>
2432
2433 * configure.ac: Invoke AC_SYS_LARGEFILE.
2434 * configure, config.in: Rebuild.
2435
2436 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
2437
2438 * win32-low.c: Throughout, fix format strings and casts of
2439 printf-like functions to avoid type related warnings on all
2440 platforms.
2441 (get_child_debug_event): Print dwDebugEventCode as hex since
2442 that's how it's usually documented.
2443
2444 2013-02-28 Yao Qi <yao@codesourcery.com>
2445
2446 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
2447 pulongest.
2448
2449 2013-02-27 Jiong Wang <jiwang@tilera.com>
2450
2451 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
2452 (reg-tilegx32.c): New rule.
2453 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
2454 * linux-tile-low.c (tile_arch_setup): New function. Invoke
2455 different register info initializer according to elf class.
2456 (init_registers_tilgx32): New function. The tilegx32 register info
2457 initializer.
2458 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
2459 (tile_store_gregset): Likewise.
2460
2461 2013-02-27 Yao Qi <yao@codesourcery.com>
2462
2463 * server.c (process_point_options): Print debug message when
2464 debug_threads is true.
2465
2466 2013-02-26 Yao Qi <yao@codesourcery.com>
2467
2468 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
2469
2470 2013-02-19 Pedro Alves <palves@redhat.com>
2471 Kai Tietz <ktietz@redhat.com>
2472
2473 PR gdb/15161
2474
2475 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
2476 instead of strtoul to extract address from packet.
2477 (process_serial_event) <'z'>: Likewise.
2478
2479 2013-02-18 Yao Qi <yao@codesourcery.com>
2480
2481 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
2482
2483 2013-02-14 Pedro Alves <palves@redhat.com>
2484
2485 Plug memory leak.
2486
2487 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
2488 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
2489
2490 2013-02-14 Pedro Alves <palves@redhat.com>
2491
2492 * tracepoint.c (cmd_qtdpsrc): Use savestring.
2493
2494 2013-02-14 Pedro Alves <palves@redhat.com>
2495
2496 * tracepoint.c (save_string): Delete.
2497 (add_tracepoint_action): Use savestring instead of save_string.
2498
2499 2013-02-12 Pedro Alves <palves@redhat.com>
2500
2501 * linux-xtensa-low.c: Ditto.
2502 * xtensa-xtregs.c: Ditto.
2503
2504 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
2505
2506 * thread-db.c (thread_db_get_tls_address): NULL pointer check
2507 thread_db.
2508
2509 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2510
2511 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
2512 aarch64_num_wp_regs and aarch64_num_bp_regs to
2513 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
2514
2515 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2516
2517 * linux-aarch64-low.c (ps_get_thread_area): Replace
2518 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
2519
2520 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
2521 Marcus Shawcroft <marcus.shawcroft@arm.com>
2522 Nigel Stephens <nigel.stephens@arm.com>
2523 Yufeng Zhang <yufeng.zhang@arm.com>
2524
2525 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
2526 (aarch64.c, aarch64-without-fpu.c): New targets.
2527 * configure.srv (aarch64*-*-linux*): New.
2528 * linux-aarch64-low.c: New file.
2529
2530 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
2531
2532 * linux-low.c (handle_extended_wait, linux_create_inferior)
2533 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
2534 (dequeue_one_deferred_signal, linux_resume_one_thread)
2535 (fetch_register, linux_write_memory, linux_enable_event_reporting)
2536 (linux_tracefork_grandchild, linux_test_for_tracefork)
2537 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
2538 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
2539 where the argument is 0.
2540
2541 2013-01-25 Yao Qi <yao@codesourcery.com>
2542
2543 * event-loop.c: Include "queue.h".
2544 (gdb_event_p): New typedef.
2545 (struct gdb_event) <next_event>: Remove.
2546 (event_queue): Change to QUEUE(gdb_event_p).
2547 (async_queue_event): Remove.
2548 (gdb_event_xfree): New.
2549 (initialize_event_loop): New.
2550 (process_event): Use API from QUEUE.
2551 (wait_for_event): Likewise.
2552 * server.c (main): Call initialize_event_loop.
2553 * server.h (initialize_event_loop): Declare.
2554
2555 2013-01-18 Yao Qi <yao@codesourcery.com>
2556
2557 * ax.h (struct eval_agent_expr_context): New.
2558 (gdb_eval_agent_expr): Update declaration.
2559 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
2560 TFRAME. Add new argument CTX.
2561 * server.h (struct eval_agent_expr_context): Declare.
2562 (agent_mem_read, agent_tsv_read): Update declaration.
2563 (agent_mem_read_string): Likewise.
2564 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
2565 (add_traceframe_block): Add new argument TPOINT.
2566 Increase TPOINT->traceframe_usage.
2567 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
2568 eval_tracepoint_agent_expr.
2569 (condition_true_at_tracepoint): Likewise.
2570 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
2571 (agent_mem_read_string, agent_tsv_read): Likewise.
2572
2573 2013-01-16 Yao Qi <yao@codesourcery.com>
2574
2575 * linux-low.c (linux_resume_one_lwp): Don't check
2576 'lwp->bp_reinsert != 0'.
2577
2578 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2579 Pedro Alves <palves@redhat.com>
2580
2581 * lynx-low.c (ptrace_request_to_str): Define a temporary
2582 macro and use it to simplify this function's implementation.
2583
2584 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2585
2586 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
2587 sets errno.
2588
2589 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2590
2591 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
2592
2593 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2594
2595 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
2596
2597 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2598
2599 * lynx-low.c (lynx_resume): Use the resume_info parameter
2600 to determine the ptid for the lynx_ptrace call, unless
2601 it is equal to minus_one_ptid, in which case we use the
2602 ptid of the current_inferior.
2603 (lynx_wait_1): After having received a thread create/exit
2604 event, resume the inferior's execution using the signaling
2605 thread's ptid, rather than the old ptid.
2606
2607 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2608
2609 * lynx-low.c (lynx_resume): Delete variable ret.
2610
2611 2013-01-01 Joel Brobecker <brobecker@adacore.com>
2612
2613 * gdbreplay.c (gdbreplay_version): Update copyright year.
2614 * server.c (gdbserver_version): Likewise.
2615
2616 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2617
2618 * lynx-low.c (lynx_wait_1): Add debug trace before adding
2619 new thread.
2620
2621 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2622
2623 * lynx-low.c (ptrace_request_to_str): Add handling for
2624 PTRACE_GETTRACESIG.
2625
2626 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2627
2628 * lynx-low.c (lynx_attach): Delete variable new_process.
2629
2630 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2631
2632 * lynx-low.c (lynx_create_inferior): Delete variable
2633 new_process.
2634
2635 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2636
2637 * lynx-low.c (ptrace_request_to_str): Do not handle
2638 PTRACE_GETTHREADLIST if this macro does not exist.
2639
2640 2012-12-15 Yao Qi <yao@codesourcery.com>
2641
2642 * Makefile.in (OBS): Add notif.o.
2643 * notif.c, notif.h: New.
2644 * server.c: Include "notif.h".
2645 (struct vstop_notif) <next>: Remove.
2646 <base>: New field.
2647 (queue_stop_reply): Update.
2648 (push_event, send_next_stop_reply): Remove.
2649 (discard_queued_stop_replies): Update.
2650 (notif_stop): New variable.
2651 (handle_v_stopped): Remove.
2652 (handle_v_requests): Don't call handle_v_stopped. Call
2653 handle_ack_notif instead.
2654 (queue_stop_reply_callback): Call notif_event_enque instead
2655 of queue_stop_reply.
2656 (handle_status): Don't call send_next_stop_reply, call
2657 notif_write_event instead.
2658 (kill_inferior_callback): Likewise.
2659 (detach_or_kill_inferior_callback): Likewise.
2660 (main): Call initialize_notif.
2661 (process_serial_event): Call QUEUE_is_empty.
2662 (handle_target_event): Call notif_push instead of push event.
2663 * server.h (push_event): Remove declaration.
2664
2665 2012-12-10 Tom Tromey <tromey@redhat.com>
2666
2667 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
2668 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
2669 macros.
2670 (.c.o): Rewrite.
2671 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
2672 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
2673 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
2674 (amd64-linux-ipa.o, ax.o): Rewrite.
2675 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
2676 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
2677 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
2678 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
2679 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
2680 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
2681 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
2682 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
2683 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
2684 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
2685 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
2686 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
2687 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
2688 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
2689 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
2690 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
2691 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
2692 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
2693 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
2694 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
2695 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
2696 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
2697 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
2698 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
2699 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
2700 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
2701 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
2702 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
2703 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
2704 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
2705 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
2706 (reg-tilegx.o): Remove.
2707 (all_object_files): New macro.
2708 Include .deps files.
2709 * aclocal.m4, configure: Rebuild.
2710 * acinclude.m4: Include depstand.m4, lead-dot.m4.
2711 * configure.ac: Invoke ZW_CREATE_DEPDIR,
2712 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
2713
2714 2012-12-05 Tom Tromey <tromey@redhat.com>
2715
2716 PR gdb/14917:
2717 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
2718
2719 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
2720
2721 * configure.ac: Check for linux/perf_event.h.
2722 * config.in: Regenerated.
2723 * configure: Regenerated.
2724
2725 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
2726
2727 * hostio.c (handle_readlink): Decrease buffer size
2728 parameter passed to readlink by one byte.
2729
2730 2012-11-26 Yao Qi <yao@codesourcery.com>
2731
2732 * configure.ac (build_warnings): Append '-Wempty-body'.
2733 * configure: Regenerated.
2734 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
2735 body.
2736
2737 2012-11-15 Pierre Muller <muller@sourceware.org>
2738
2739 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
2740 * config.in: Regenerate.
2741 * configure: Regenerate.
2742 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
2743 Use "gdb_wait.h" header instead of <sys/wait.h> header.
2744 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
2745 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
2746 header.
2747 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
2748 instead of <sys/wait.h> header.
2749 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
2750
2751 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
2752
2753 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
2754 (various make rules): Remove -DGDBSERVER
2755
2756 2012-11-09 Yao Qi <yao@codesourcery.com>
2757
2758 * spu-low.c (current_ptid): Move it to ..
2759 * gdbthread.h: ... here. New.
2760 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
2761 * server.c (myresume, process_serial_event): Likewise.
2762 * thread-db.c (thread_db_find_new_threads): Likewise.
2763 * tracepoint.c (run_inferior_command): Likewise.
2764
2765 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
2766
2767 * server.c (handle_search_memory_1): Include access length in
2768 warning message.
2769
2770 2012-09-05 Michael Brandt <michael.brandt@axis.com>
2771
2772 * linux-crisv32-low.c: Fix compile errors.
2773
2774 2012-09-04 Yao Qi <yao@codesourcery.com>
2775
2776 * tracepoint.c (cmd_qtsv): Adjust debug message.
2777 Don't check CUR_TPOINT.
2778
2779 2012-08-28 Yao Qi <yao@codesourcery.com>
2780
2781 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
2782 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
2783 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
2784 Remove declarations of xmalloc, xreallloc, xstrdup and
2785 freeargv.
2786 * Makefile.in (libiberty_h): New.
2787 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
2788 (linux-bfin-low.o): Append dependency 'libiberty.h'.
2789
2790 2012-08-23 Yao Qi <yao@codesourcery.com>
2791
2792 * server.h: Remove declaration of 'xsnprintf'.
2793
2794 2012-08-22 Keith Seitz <keiths@redhat.com>
2795
2796 * server.h: Include build-gnulib-gbserver/config.h.
2797 * gdbreplay.c: Likewise.
2798
2799 2012-08-08 Doug Evans <dje@google.com>
2800
2801 * Makefile.in (SFILES): Add gdb_vecs.c.
2802 (OBS): Add gdb_vecs.o.
2803 (gdb_vecs_h, host_defs_h): New variables.
2804 (thread-db.o): Add $(gdb_vecs_h) dependency.
2805 (gdb_vecs.o): New rule.
2806 * thread-db.c: #include "gdb_vecs.h".
2807 (thread_db_load_search): Use a vector to iterate over path elements.
2808 Handle text appearing after "$pdir".
2809
2810 * configure.ac: Add check for strstr.
2811 * config.in: Regenerate.
2812 * configure: Regenerate.
2813
2814 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
2815
2816 * hostio.c (handle_pread): If pread fails, fall back to attempting
2817 lseek/read.
2818 (handle_pwrite): Likewise for pwrite.
2819
2820 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
2821
2822 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
2823 between unsupported TYPE and unimplementable ADDR/LEN combination.
2824 (arm_insert_point): Act on new return value.
2825
2826 2012-07-31 Pedro Alves <palves@redhat.com>
2827
2828 * server.c (process_point_options): Only skip tokens if we find
2829 one that is unrecognized. Don't treat 'X' specially while
2830 skipping unrecognized tokens.
2831
2832 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
2833
2834 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
2835 to 4-byte-align HW breakpoint addresses for Thumb.
2836
2837 2012-07-27 Yao Qi <yao@codesourcery.com>
2838
2839 PR remote/14161.
2840
2841 * server.h: Declare gdb_agent_about_to_close.
2842 * target.c (kill_inferior): Include "agent.h".
2843 New. Send command 'kill'.
2844 * target.h (kill_inferior): Removed macro.
2845 * tracepoint.c (gdb_agent_about_to_close): New.
2846 (gdb_agent_helper_thread): Handle command 'close'.
2847 Wait endlessly until the inferior stops.
2848 Install gdb_agent_remove_socket to atexit hook.
2849 (agent_socket_name): New static variable.
2850 (gdb_agent_socket_init): Replace local variable 'name' with
2851 'agent_socket_name'.
2852 (gdb_agent_remove_socket): New.
2853
2854 2012-07-27 Yao Qi <yao@codesourcery.com>
2855
2856 * server.c (process_point_options): Stop at 'X' when parsing.
2857
2858 2012-07-19 Michael Eager <eager@eagercon.com>
2859
2860 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
2861 to hw_execute.
2862 * linux-x86-low.c (x86_insert_point, x86_remove_point):
2863 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
2864 hardware breakpoint.
2865
2866 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2867
2868 * gdbserver/linux-low.c (initialize_low): Call
2869 linux_ptrace_init_warnings.
2870
2871 2012-07-02 Doug Evans <dje@google.com>
2872
2873 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
2874 pointer to int.
2875
2876 2012-07-02 Stan Shebs <stan@codesourcery.com>
2877
2878 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
2879 (ax.o): Add it to build rule.
2880 (ax-ipa.o): Ditto.
2881 (OBS): Add format.o.
2882 (IPA_OBS): Add format.o.
2883 * server.c (handle_query): Claim support for breakpoint commands.
2884 (process_point_options): Add command case.
2885 (process_serial_event): Leave running if there are printfs in
2886 effect.
2887 * mem-break.h (any_persistent_commands): Declare.
2888 (add_breakpoint_commands): Declare.
2889 (gdb_no_commands_at_breakpoint): Declare.
2890 (run_breakpoint_commands): Declare.
2891 * mem-break.c (struct point_command_list): New struct.
2892 (struct breakpoint): New field command_list.
2893 (any_persistent_commands): New function.
2894 (add_commands_to_breakpoint): New function.
2895 (add_breakpoint_commands): New function.
2896 (gdb_no_commands_at_breakpoint): New function.
2897 (run_breakpoint_commands): New function.
2898 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
2899 locally.
2900 * ax.c: Include format.h.
2901 (ax_printf): New function.
2902 (gdb_eval_agent_expr): Add printf opcode.
2903
2904 2012-06-13 Yao Qi <yao@codesourcery.com>
2905
2906 * server.c (start_inferior): Remove duplicated writes to fields
2907 'last_resume_kind' and 'last_status' of 'current_inferior'.
2908
2909 2012-06-12 Yao Qi <yao@codesourcery.com>
2910 Pedro Alves <palves@redhat.com>
2911
2912 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
2913 comment.
2914 * server.c (handle_v_cont): Extend comment.
2915
2916 2012-06-11 Yao Qi <yao@codesourcery.com>
2917
2918 * linux-low.c (linux_attach): Add 'static'.
2919
2920 2012-06-06 Yao Qi <yao@codesourcery.com>
2921
2922 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
2923
2924 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2925
2926 Fix gcc -flto compilation warning.
2927 * server.c (main): Make variable multi_mode and attach volatile.
2928
2929 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2930
2931 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
2932 if the platform doesn't know about it.
2933
2934 2012-05-30 Jeff Kenton <jkenton@tilera.com>
2935
2936 * Makefile.in (SFILES): Add linux-tile-low.c.
2937 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
2938 * configure.srv: Handle tilegx-*-linux*.
2939 * linux-tile-low.c: New file.
2940
2941 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2942
2943 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
2944
2945 2012-05-24 Pedro Alves <palves@redhat.com>
2946
2947 PR gdb/7205
2948
2949 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
2950
2951 2012-05-24 Pedro Alves <palves@redhat.com>
2952
2953 PR gdb/7205
2954
2955 Replace target_signal with gdb_signal throughout.
2956
2957 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
2958
2959 * linux-low.c (linux_store_registers): Avoid the copying sequence
2960 when no data has been retrieved by ptrace.
2961
2962 2012-05-22 Will Deacon <will.deacon@arm.com>
2963
2964 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
2965 Include asm/ptrace.h.
2966 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
2967 already defined.
2968
2969 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
2970
2971 * linux-low.c (linux_store_registers): Don't re-retrieve data
2972 with ptrace that has already been obtained from /proc. Always
2973 copy any data retrieved with ptrace to the buffer supplied.
2974
2975 2012-05-11 Yao Qi <yao@codesourcery.com>
2976 Pedro Alves <palves@redhat.com>
2977
2978 * linux-low.c (enum stopping_threads_kind): New.
2979 (stopping_threads): Change type to `enum stopping_threads_kind'.
2980 (handle_extended_wait): If stopping and suspending threads, leave
2981 the new_lwp suspended too.
2982 (linux_wait_for_event): Adjust.
2983 (stop_all_lwps): Set `stopping_threads' to
2984 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
2985 whether we're suspending threads or just stopping them. Assert no
2986 recursion happens.
2987
2988 2012-04-29 Yao Qi <yao@codesourcery.com>
2989
2990 * server.h: Move some code to ...
2991 * gdbthread.h: ... here. New.
2992 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
2993 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
2994 (nto-low.o, win32-low.o): Likewise.
2995 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
2996 * regcache.c, remote-utils.c, server.c: Likewise.
2997 * target.c, tracepoint.c, win32-low.c: Likewise.
2998
2999 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3000
3001 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3002 (PTRACE_ARG4_TYPE): Likewise.
3003 (PTRACE_XFER_TYPE): Likewise.
3004 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3005 ptrace to PTRACE_ARG3_TYPE.
3006 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3007 (PTRACE_ARG4_TYPE): Likewise.
3008 (PTRACE_XFER_TYPE): Likewise.
3009 (linux_detach_one_lwp): Cast fourth argument of
3010 ptrace to long then PTRACE_ARG4_TYPE.
3011 (regsets_fetch_inferior_registers): Cast third argument of
3012 ptrace to long then PTRACE_ARG3_TYPE.
3013 (regsets_store_inferior_registers): Likewise.
3014
3015 2012-04-20 Pedro Alves <palves@redhat.com>
3016
3017 * configure: Regenerate.
3018
3019 2012-04-19 Pedro Alves <palves@redhat.com>
3020
3021 * Makefile.in (GNULIB_BUILDDIR): New.
3022 (LIBGNU, INCGNU, GNULIB_H): Adjust.
3023 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3024 (all, install-only, uninstall, clean-info, all-lib, clean): No
3025 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3026 (maintainer-clean realclean distclean): Use subdir_do.
3027 (subdir_do): New.
3028 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
3029 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
3030 * acinclude.m4: Include acx_configure_dir.m4.
3031 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3032 calls. Call AC_PROG_RANLIB. Configure gnulib using
3033 ACX_CONFIGURE_DIR.
3034 (GNULIB): New.
3035 (GNULIB_STDINT_H): Adjust.
3036 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3037 * gdbreplay.c: Include build-gnulib/config.h.
3038 * server.h: Likewise.
3039 * aclocal.m4: Regenerate.
3040 * config.in: Regenerate.
3041 * configure: Regenerate.
3042
3043 2012-04-19 Pedro Alves <palves@redhat.com>
3044
3045 * Makefile.in (LIBGNU, INCGNU): Adjust.
3046 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3047 (all, install-only, uninstall, clean-info, all-lib, clean)
3048 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3049 * configure.ac: Adjust AC_OUTPUT output.
3050 * aclocal.m4: Regenerate.
3051 * configure: Regenerate.
3052
3053 2012-04-19 Pedro Alves <palves@redhat.com>
3054
3055 * Makefile.in (generated_files): New.
3056 (server_h): Remove the explicit dependency on config.h, and depend
3057 on $generated_files.
3058
3059 2012-04-19 Pedro Alves <palves@redhat.com>
3060
3061 * Makefile.in (INCGNU): Add -Ignulib.
3062
3063 2012-04-19 Pedro Alves <palves@redhat.com>
3064
3065 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3066 (INCGNU): ... this, and spell out -I here.
3067 (GNULIB_LIB): Rename to ...
3068 (LIBGNU): ... this.
3069 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3070
3071 2012-04-19 Pedro Alves <palves@redhat.com>
3072
3073 * config.in: Regenerate.
3074
3075 2012-04-19 Pedro Alves <palves@redhat.com>
3076
3077 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3078 * server.h (memmem): Remove declaration.
3079 * config.in: Regenerate.
3080 * configure: Regenerate.
3081
3082 2012-04-19 Yao Qi <yao@codesourcery.com>
3083
3084 * Makefile.in (SFILES): Add common/vec.c.
3085 (OBS): Add vec.o.
3086 (vec.o): New rule.
3087
3088 2012-04-19 Yao Qi <yao@codesourcery.com>
3089
3090 * remote-utils.c (prepare_resume_reply): Replace with macro
3091 target_core_of_thread.
3092 * server.c (handle_qxfer_threads_proper): Likewise.
3093 * target.h (traget_core_of_thread): New macro.
3094
3095 2012-04-18 Pedro Alves <palves@redhat.com>
3096
3097 * aclocal.m4: Regenerate.
3098 * configure: Regenerate.
3099
3100 2012-04-16 Yao Qi <yao@codesourcery.com>
3101
3102 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3103 duplicated on address.
3104
3105 2012-04-16 Yao Qi <yao@codesourcery.com>
3106
3107 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3108 (struct tracepoint_action_ops) <send>: New field.
3109 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3110 (agent_expr_send, x_tracepoint_action_send): New.
3111 (l_tracepoint_action_send): New.
3112 (cmd_qtdp): Download and install tracepoint
3113 according to `use_agent'.
3114 (run_inferior_command): Add one more parameter `len'.
3115 Update callers.
3116 (tracepoint_send_agent): New.
3117 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3118
3119 2012-04-16 Yao Qi <yao@codesourcery.com>
3120
3121 * tracepoint.c (download_tracepoints): Moved to ...
3122 (cmd_qtstart): ... here.
3123
3124 2012-04-14 Yao Qi <yao@codesourcery.com>
3125
3126 * tracepoint.c: Include inttypes.h.
3127 (struct collect_memory_action): Use sized types.
3128 (struct tracepoint): Likewise.
3129 (cmd_qtdp, stop_tracing): Update print specifiers.
3130 (cmd_qtp, response_tracepoint): Likewise.
3131 (collect_data_at_tracepoint): Likewise.
3132 (collect_data_at_step): Likewise.
3133
3134 2012-04-14 Yao Qi <yao@codesourcery.com>
3135
3136 Import gnulib module inttypes.
3137 * aclocal.m4, config.in, configure: Regenerated.
3138
3139 2012-04-14 Yao Qi <yao@codesourcery.com>
3140
3141 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3142 Makefile and config.status at last.
3143
3144 2012-04-13 Yao Qi <yao@codesourcery.com>
3145
3146 * tracepoint.c: Include stdint.h unconditionally.
3147
3148 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3149
3150 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3151 on BFD_HAVE_SYS_PROCFS_TYPE.
3152 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3153 * configure: Regenerate.
3154 * config.in: Likewise.
3155
3156 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3157
3158 * Makefile.in (clean): Also remove x32.c x32-linux.c
3159 x32-avx.c x32-avx-linux.c.
3160 (x32.o): New target.
3161 (x32.c): Likewise.
3162 (x32-linux.o): Likewise.
3163 (x32-linux.c): Likewise.
3164 (x32-avx.o): Likewise.
3165 (x32-avx.c): Likewise.
3166 (x32-avx-linux.o): Likewise.
3167 (x32-avx-linux.c): Likewise.
3168
3169 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3170 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3171 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3172 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3173 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3174 i386/x32-avx-linux.xml.
3175
3176 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3177 (init_registers_x32_avx_linux): Likwise.
3178 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3179 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3180
3181 2012-04-13 Pedro Alves <palves@redhat.com>
3182
3183 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3184 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3185 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3186 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3187 the sub-make.
3188
3189 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3190
3191 * linux-x86-low.c (compat_x32_clock_t): New.
3192 (compat_x32_siginfo_t): Likewise.
3193 (compat_x32_siginfo_from_siginfo): Likewise.
3194 (siginfo_from_compat_x32_siginfo): Likewise.
3195 (linux_is_elf64): Likewise.
3196 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3197 and siginfo_from_compat_x32_siginfo for x32.
3198 (x86_arch_setup): Set linux_is_elf64.
3199
3200 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3201
3202 PR gdb/13969
3203 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3204 e_machine field.
3205 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3206 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3207 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3208 compatible with process.
3209
3210 2012-04-12 Yao Qi <yao@codesourcery.com>
3211
3212 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3213 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3214 (install-only, install-info, clean): Handle sub dir gnulib.
3215 (all-lib, am--refresh): New targets.
3216 (memmem.o): Remove target.
3217 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3218 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3219 (AC_REPLACE_FUNCS): Remove memmem.
3220 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3221 (AC_OUTPUT): Generate Makefile in gnulib/.
3222 * aclocal.m4, config.in, configure: Regenerated.
3223
3224 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3225
3226 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3227
3228 2012-04-05 Pedro Alves <palves@redhat.com>
3229
3230 -Werror=strict-aliasing
3231
3232 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3233 pointer.
3234
3235 2012-04-04 Pedro Alves <palves@redhat.com>
3236
3237 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3238 (sparc_store_gregset_from_stack, sparc_store_gregset)
3239 (sparc_breakpoint_at): Fix formatting.
3240
3241 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3242
3243 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3244 are available.
3245 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3246 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3247 * config.in: Regenerate.
3248 * configure: Likewise.
3249
3250 2012-03-29 Pedro Alves <palves@redhat.com>
3251
3252 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
3253 Correct ptrace arguments.
3254
3255 2012-03-28 Pedro Alves <palves@redhat.com>
3256
3257 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
3258 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
3259 (IA64_FR1_REGNUM): New defines.
3260 (ia64_fetch_register): New.
3261 (the_low_target): Install it.
3262 * linux-low.h (struct linux_target_ops) <fetch_register>: New
3263 field.
3264 * linux-low.c (linux_fetch_registers): Try the
3265 the_low_target.fetch_register hook first.
3266
3267 * linux-arm-low.c (the_low_target): Adjust.
3268 * linux-bfin-low.c (the_low_target): Adjust.
3269 * linux-cris-low.c (the_low_target): Adjust.
3270 * linux-crisv32-low.c (the_low_target): Adjust.
3271 * linux-m32r-low.c (the_low_target): Adjust.
3272 * linux-m68k-low.c (the_low_target): Adjust.
3273 * linux-mips-low.c (the_low_target): Adjust.
3274 * linux-ppc-low.c (the_low_target): Adjust.
3275 * linux-s390-low.c (the_low_target): Adjust.
3276 * linux-sh-low.c (the_low_target): Adjust.
3277 * linux-sparc-low.c (the_low_target): Adjust.
3278 * linux-tic6x-low.c (the_low_target): Adjust.
3279 * linux-x86-low.c (the_low_target): Adjust.
3280 * linux-xtensa-low.c (the_low_target): Adjust.
3281
3282 2012-03-26 Pedro Alves <palves@redhat.com>
3283
3284 * server.c (handle_qxfer_libraries): Don't bail early if
3285 the_target->qxfer_libraries_svr4 is not NULL.
3286
3287 2012-03-26 Pedro Alves <palves@redhat.com>
3288
3289 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
3290
3291 2012-03-23 Pedro Alves <palves@redhat.com>
3292
3293 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
3294 "library-list-svr4" element's start tag when the the DSO list is
3295 empty.
3296
3297 2012-03-23 Pedro Alves <palves@redhat.com>
3298
3299 * linux-low.c (read_one_ptr): Read the inferior's pointer through
3300 a variable whose type size is the same as the inferior's pointer
3301 size.
3302
3303 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
3304
3305 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
3306 struct siginfo.
3307 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
3308 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3309 * linux-low.h: Include <signal.h>.
3310 (struct siginfo): Remove forward declaration.
3311 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
3312 struct siginfo.
3313
3314 2012-03-21 Mike Frysinger <vapier@gentoo.org>
3315
3316 * .gitignore: Ignore more files.
3317
3318 2012-03-19 Pedro Alves <palves@redhat.com>
3319 Jan Kratochvil <jan.kratochvil@redhat.com>
3320
3321 * server.c (cont_thread, general_thread): Add describing comments.
3322 (start_inferior): Clear `cont_thread'.
3323 (handle_v_cont): Don't set `cont_thread' if resuming all threads
3324 of a process.
3325
3326 2012-03-15 Yao Qi <yao@codesourcery.com>
3327
3328 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
3329 handling to ...
3330 (cmd_qtdp): ... here.
3331
3332 2012-03-15 Yao Qi <yao@codesourcery.com>
3333
3334 * tracepoint.c (struct tracepoint_action_ops): New.
3335 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
3336 (m_tracepoint_action_download): New.
3337 (r_tracepoint_action_download): New.
3338 (x_tracepoint_action_download): New.
3339 (l_tracepoint_action_download): New.
3340 (add_tracepoint_action): Install `action->ops' according type.
3341 (download_tracepoint_1): Move code `download' function pointer
3342 of various tracepoint_action_ops.
3343
3344 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3345
3346 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
3347 linux_ptrace_attach_warnings.
3348
3349 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3350
3351 * Makefile.in (linux-ptrace.o): New.
3352 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
3353 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
3354 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
3355 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
3356 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
3357 of these targets.
3358 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
3359
3360 2012-03-08 Yao Qi <yao@codesourcery.com>
3361 Pedro Alves <palves@redhat.com>
3362
3363 Fix PR server/13392.
3364 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
3365 offset of JMP insn.
3366 * tracepoint.c (remove_tracepoint): New.
3367 (cmd_qtdp): Call remove_tracepoint when failed to install.
3368
3369 2012-03-07 Pedro Alves <palves@redhat.com>
3370
3371 * linux-low.c (get_detach_signal): New.
3372 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
3373 Pass on pending signals to PTRACE_DETACH. Check the result of the
3374 ptrace call.
3375 * server.c (program_signals, program_signals_p): New.
3376 (handle_general_set): Handle QProgramSignals.
3377 * server.h (program_signals, program_signals_p): Declare.
3378
3379 2012-03-05 Pedro Alves <palves@redhat.com>
3380 Jan Kratochvil <jan.kratochvil@redhat.com>
3381
3382 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
3383 New comment why.
3384
3385 2012-03-03 Yao Qi <yao@codesourcery.com>
3386
3387 * tracepoint.c (tracepoint_look_up_symbols): Update call to
3388 agent_look_up_symbols.
3389
3390 2012-03-03 Yao Qi <yao@codesourcery.com>
3391
3392 * Makefile.in (linux-low.o): Keep dependence on agent.h.
3393 (linux-x86-low.o): Likewise.
3394 * server.h: Remove in_process_agent_loaded.
3395 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
3396 common/agent.c.
3397 Update callers.
3398
3399 2012-03-03 Yao Qi <yao@codesourcery.com>
3400
3401 * tracepoint.c (gdb_agent_capability): New global.
3402 (in_process_agent_loaded_ust): Renamed to
3403 `in_process_agent_supports_ust'.
3404 Update callers.
3405 (in_process_agent_supports_ust): Call agent_capability_check.
3406 (clear_installed_tracepoints): Assert that agent supports
3407 agent.
3408
3409 2012-03-03 Yao Qi <yao@codesourcery.com>
3410
3411 * linux-low.c (linux_supports_agent): New.
3412 (linux_target_ops): Initialize field `supports_agent' with
3413 linux_supports_agent.
3414 * target.h (struct target_ops) <supports_agent>: New.
3415 (target_supports_agent): New macro.
3416 * server.c (handle_general_set): Handle packet 'QAgent'.
3417 (handle_query): Send `QAgent+'.
3418 * Makefile.in (server.o): Depends on agent.h.
3419
3420 2012-03-03 Yao Qi <yao@codesourcery.com>
3421
3422 * Makefile.in (OBS): Add agent.o.
3423 Add new rule for agent.o.
3424 Track dependence of tracepoint.c on agent.h.
3425 * tracepoint.c (run_inferior_command_1):
3426 (run_inferior_command): Call agent_run_command.
3427 (gdb_ust_connect_sync_socket): Deleted. Move it to
3428 common/agent.c.
3429 (resume_thread, stop_thread): Likewise.
3430 (gdb_ust_socket_init): Renamed to ...
3431 (gdb_agent_socket_init): ... New.
3432 (gdb_ust_thread): Renamed to ...
3433 (gdb_agent_helper_thread): ... New.
3434 (gdb_ust_init): Move some code to ...
3435 (gdb_agent_init): ... here. New.
3436 [HAVE_UST]: Call gdb_ust_init.
3437 (initialize_tracepoint_ftlib): Call gdb_agent_init.
3438 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
3439 * config.in, configure: Regenerated.
3440
3441 2012-03-02 Pedro Alves <palves@redhat.com>
3442
3443 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
3444 * linux-low.c (struct simple_pid_list): New.
3445 (stopped_pids): New a struct simple_pid_list pointer.
3446 (add_to_pid_list, pull_pid_from_list): New.
3447 (handle_extended_wait): Don't assume the first signal new children
3448 report is SIGSTOP. Adjust call to pull_pid_from_list.
3449 (linux_wait_for_lwp): Adjust.
3450
3451 2012-03-02 Yao Qi <yao@codesourcery.com>
3452
3453 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
3454 debug log.
3455
3456 2012-03-02 Yao Qi <yao@codesourcery.com>
3457
3458 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
3459 `stop_pc' and `tpoint'. Update caller.
3460
3461 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
3462
3463 * linux-low.h (linux_target_ops): Add regset_bitmap member.
3464 * linux-low.c (use_linux_regsets): New macro.
3465 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
3466 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
3467 (linux_register_in_regsets): New function.
3468 (usr_fetch_inferior_registers): Skip registers covered by
3469 regsets.
3470 (usr_store_inferior_registers): Likewise.
3471 (usr_fetch_inferior_registers): New macro.
3472 (usr_store_inferior_registers): Likewise.
3473 (linux_fetch_registers): Handle mixed regset/non-regset targets.
3474 (linux_store_registers): Likewise.
3475 * linux-mips-low.c (init_registers_mips_dsp_linux): New
3476 prototype.
3477 (init_registers_mips64_dsp_linux): Likewise.
3478 (init_registers_mips_linux): New macro.
3479 (init_registers_mips_dsp_linux): Likewise.
3480 (mips_dsp_num_regs): Likewise.
3481 (DSP_BASE, DSP_CONTROL): New fallback macros.
3482 (mips_base_regs): New macro.
3483 (mips_regmap): Use it. Fix the size.
3484 (mips_dsp_regmap): New variable.
3485 (mips_dsp_regset_bitmap): Likewise.
3486 (mips_arch_setup): New function.
3487 (mips_cannot_fetch_register): Use the_low_target.regmap rather
3488 than mips_regmap.
3489 (mips_cannot_store_register): Likewise.
3490 (the_low_target): Update .arch_setup, .num_regs and .regmap
3491 initializers. Add .regset_bitmap initializer.
3492 * linux-arm-low.c (the_low_target): Add .regset_bitmap
3493 initializer.
3494 * linux-bfin-low.c (the_low_target): Likewise.
3495 * linux-cris-low.c (the_low_target): Likewise.
3496 * linux-crisv32-low.c (the_low_target): Likewise.
3497 * linux-ia64-low.c (the_low_target): Likewise.
3498 * linux-m32r-low.c (the_low_target): Likewise.
3499 * linux-m68k-low.c (the_low_target): Likewise.
3500 * linux-ppc-low.c (the_low_target): Likewise.
3501 * linux-s390-low.c (the_low_target): Likewise.
3502 * linux-sh-low.c (the_low_target): Likewise.
3503 * linux-sparc-low.c (the_low_target): Likewise.
3504 * linux-tic6x-low.c (the_low_target): Likewise.
3505 * linux-x86-low.c (the_low_target): Likewise.
3506 * linux-xtensa-low.c (the_low_target): Likewise.
3507 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
3508 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
3509 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
3510 srv_xmlfiles.
3511 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
3512 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
3513
3514 2012-02-29 Yao Qi <yao@codesourcery.com>
3515 Pedro Alves <palves@redhat.com>
3516
3517 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
3518 `step_over_finished' is true.
3519
3520 2012-02-27 Pedro Alves <palves@redhat.com>
3521
3522 * linux-low.c (pid_is_stopped): Delete, moved to common/.
3523 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
3524
3525 2012-02-27 Pedro Alves <palves@redhat.com>
3526
3527 PR server/9684
3528 * linux-low.c (pid_is_stopped): New.
3529 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
3530
3531 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
3532
3533 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
3534 of conditions.
3535
3536 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
3537
3538 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
3539
3540 2012-02-24 Luis Machado <lgustavo@codesourcery>
3541
3542 * server.c (handle_query): Advertise support for target-side
3543 breakpoint condition evaluation.
3544 (process_point_options): New function.
3545 (process_serial_event): When inserting a breakpoint, check for
3546 a target-side condition that should be evaluated.
3547
3548 * mem-break.c: Include regcache.h and ax.h.
3549 (point_cond_list_t): New data structure.
3550 (breakpoint) <cond_list>: New field.
3551 (find_gdb_breakpoint_at): Make non-static.
3552 (delete_gdb_breakpoint_at): Clear any target-side
3553 conditions.
3554 (clear_gdb_breakpoint_conditions): New function.
3555 (add_condition_to_breakpoint): Likewise.
3556 (add_breakpoint_condition): Likewise.
3557 (gdb_condition_true_at_breakpoint): Likewise.
3558 (gdb_breakpoint_here): Return result directly instead
3559 of going through a local variable.
3560
3561 * mem-break.h (find_gdb_breakpoint_at): New prototype.
3562 (clear_gdb_breakpoint_conditions): Likewise.
3563 (add_breakpoint_condition): Likewise.
3564 (gdb_condition_true_at_breakpoint): Likewise.
3565
3566 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
3567 (need_step_over_p): Take target-side breakpoint condition into
3568 consideration.
3569
3570 2012-02-24 Luis Machado <lgustavo@codesourcery>
3571
3572 * server.h: Include tracepoint.h.
3573 (agent_mem_read, agent_get_trace_state_variable_value,
3574 agent_set_trace_state_variable_value,
3575 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
3576 get_set_tsv_func_addr): New prototypes.
3577
3578 * ax.h: New include file.
3579 * ax.c: New source file.
3580
3581 * tracepoint.c: Include ax.h.
3582 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
3583 agent_expr, eval_result_type): Move to ax.h.
3584 (parse_agent_expr): Rename to ...
3585 (gdb_parse_agent_expr): ... this, make it non-static and move
3586 to ax.h.
3587 (unparse_agent_expr) Rename to ...
3588 (gdb_unparse_agent_expr): ... this, make it non-static and move
3589 to ax.h.
3590 (eval_agent_expr): Rename to ...
3591 (eval_tracepoint_agent_expr): ... this.
3592 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
3593 forward declarations.
3594 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
3595 (agent_get_trace_state_variable_value): New function.
3596 (agent_set_trace_state_variable_value): New function.
3597 (cmd_qtdp): Call gdb_parse_agent_expr (...).
3598 (response_tracepoint): Call gdb_unparse_agent_expr (...).
3599 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
3600 (condition_true_at_tracepoint): Likewise.
3601 (parse_agent_expr): Rename to ...
3602 (gdb_parse_agent_expr): ... this and move to ax.c.
3603 (unparse_agent_expr): Rename to ...
3604 (gdb_unparse_agent_expr): ... this and move to ax.c.
3605 (gdb_agent_op_name): Move to ax.c.
3606 (eval_agent_expr): Rename to ...
3607 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
3608 and move to ax.c.
3609 (eval_tracepoint_agent_expr): New function.
3610 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
3611 non-static.
3612 (current_insn_ptr, emit_error, struct bytecode_address): Move to
3613 ax.c.
3614 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
3615 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
3616 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
3617 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
3618 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
3619 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
3620 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
3621 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
3622 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
3623 (compile_bytecodes): Remove forward declaration.
3624 (is_goto_target): Move to ax.c.
3625 (compile_bytecodes): Move to ax.c and call
3626 agent_get_trace_state_variable_value (...) and
3627 agent_set_trace_state_variable_value (...).
3628
3629 * Makefile.in: Update ax.c and IPA dependencies.
3630
3631 2012-02-24 Pedro Alves <palves@redhat.com>
3632
3633 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
3634 (cmd_bigqtbuffer_circular): ... this. Only handle
3635 'QTBuffer:circular:'.
3636 (handle_tracepoint_general_set): Adjust.
3637
3638 2012-02-16 Yao Qi <yao@codesourcery.com>
3639
3640 * inferiors.c: Move code to ...
3641 * dll.c: .... here. New.
3642 * server.h: Declare clear_dlls.
3643 * Makefile.in (SFILES): Add dll.c.
3644 (OBS): Add dll.o
3645 (dll.o): New rule.
3646
3647 2012-02-11 Yao Qi <yao@codesourcery.com>
3648
3649 * server.c: (handle_monitor_command): Add a new parameter
3650 `own_buf'.
3651 (handle_query): Update caller.
3652
3653 2012-02-09 Joel Brobecker <brobecker@adacore.com>
3654
3655 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
3656 * configure, config.in: Regenerate.
3657 * hostio.c: Provide an alternate implementation if HAVE_READLINK
3658 is not defined.
3659
3660 2012-02-02 Pedro Alves <palves@redhat.com>
3661
3662 Try SIGKILL first, then PTRACE_KILL.
3663 * linux-low.c (linux_kill_one_lwp): New.
3664 (linux_kill_one_lwp): Rename to ...
3665 (kill_one_lwp_callback): ... this. Use the new
3666 linux_kill_one_lwp.
3667
3668 2012-02-02 Pedro Alves <palves@redhat.com>
3669
3670 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
3671 inferior.
3672
3673 2012-01-27 Pedro Alves <palves@redhat.com>
3674
3675 * linux-low.c (linux_child_pid_to_exec_file): Delete.
3676 (elf_64_file_p): Make static.
3677 (linux_pid_exe_is_elf_64_file): New.
3678 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
3679 Delete declarations.
3680 (linux_pid_exe_is_elf_64_file): Declare.
3681 * linux-x86-low.c (x86_arch_setup): Use
3682 linux_pid_exe_is_elf_64_file.
3683
3684 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3685
3686 * linux-low.c (linux_wait_for_event_1): Rename to ...
3687 (linux_wait_for_event): ... here and merge it with former
3688 linux_wait_for_event - new variable wait_ptid, use it.
3689 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
3690
3691 2012-01-23 Pedro Alves <palves@redhat.com>
3692
3693 * server.c (main): Avoid yet another case of infinite loop while
3694 detaching/killing after a longjmp.
3695
3696 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
3697
3698 Code cleanup.
3699 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
3700
3701 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
3702
3703 * hostio.c (handle_readlink): New function.
3704 (handle_vFile): Call it to handle "vFile:readlink" packets.
3705
3706 2012-01-20 Pedro Alves <palves@redhat.com>
3707 Ulrich Weigand <ulrich.weigand@linaro.org>
3708
3709 * server.c (handle_v_requests): Only support vAttach and vRun to
3710 start multiple processes when in extended protocol mode.
3711
3712 2012-01-17 Pedro Alves <palves@redhat.com>
3713
3714 * tracepoint.c (initialize_tracepoint): Use mmap instead of
3715 memalign plus mprotect to allocate the scratch buffer.
3716
3717 2012-01-13 Pedro Alves <palves@redhat.com>
3718
3719 * server.c (attach_inferior): Clear `cont_thread'.
3720
3721 2012-01-13 Pedro Alves <palves@redhat.com>
3722
3723 * server.c (main): Avoid infinite loop while detaching/killing
3724 after a longjmp.
3725
3726 2012-01-09 Doug Evans <dje@google.com>
3727
3728 * server.c (start_inferior): Set last_ptid in --wrapper case.
3729
3730 2012-01-06 Yao Qi <yao@codesourcery.com>
3731
3732 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
3733 defined.
3734 [IN_PROCESS_AGENT] (debug_agent): New global variable.
3735
3736 2012-01-04 Yao Qi <yao@codesourcery.com>
3737
3738 * tracepoint.c (cmd_qtdp): Print debug message
3739 for static tracepoint.
3740
3741 2012-01-04 Yao Qi <yao@codesourcery.com>
3742
3743 * tracepoint.c (trace_vdebug): Differentiate debug message
3744 between gdbserver and IPA.
3745
3746 2012-01-03 Yao Qi <yao@codesourcery.com>
3747
3748 * tracepoint.c (tracepoint_was_hit): Don't collect for
3749 static tracepoint.
3750
3751 2012-01-02 Joel Brobecker <brobecker@adacore.com>
3752
3753 * terminal.h: Reformat copyright header.
3754
3755 2012-01-02 Joel Brobecker <brobecker@adacore.com>
3756
3757 * server.c (gdbserver_version): Update copyright year.
3758 * gdbreplay.c (gdbreplay_version): Likewise.
3759
3760 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
3761
3762 * linux-low.c (linux_create_inferior): Put empty if clause for write.
3763
3764 Revert:
3765 2011-12-18 Hui Zhu <teawater@gmail.com>
3766 * linux-low.c (linux_create_inferior): Save return value to ret.
3767
3768 2011-12-18 Hui Zhu <teawater@gmail.com>
3769
3770 * linux-low.c (linux_create_inferior): Save return value to ret.
3771
3772 2011-12-16 Doug Evans <dje@google.com>
3773
3774 * linux-low.c (linux_create_inferior): If stdio connection,
3775 redirect stdin from /dev/null, stdout to stderr.
3776 * remote-utils.c (remote_is_stdio): New static global.
3777 (remote_connection_is_stdio): New function.
3778 (remote_prepare): Handle stdio connection.
3779 (remote_open): Ditto.
3780 (remote_close): Don't close stdin for stdio connections.
3781 (read_prim,write_prim): New functions. Replace all calls to
3782 read/write to these.
3783 * server.c (main): Watch for "-" argument. Move call to
3784 remote_prepare before start_inferior.
3785 * server.h (STDIO_CONNECTION_NAME): New macro.
3786 (remote_connection_is_stdio): Declare.
3787
3788 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
3789 in debugging output.
3790
3791 2011-12-15 Yao Qi <yao@codesourcery.com>
3792
3793 * tracepoint.c: Include sys/syscall.h.
3794 (gdb_ust_thread): Remove preprocessor conditional.
3795
3796 2011-12-14 Pedro Alves <pedro@codesourcery.com>
3797
3798 * linux-low.c (linux_detach_one_lwp): Call
3799 the_low_target.prepare_to_resume before detaching.
3800
3801 2011-12-14 Yao Qi <yao@codesourcery.com>
3802
3803 * tracepoint.c (gdb_ust_thread): Don't ignore return value
3804 of write.
3805
3806 2011-12-14 Yao Qi <yao@codesourcery.com>
3807
3808 * i386-low.c (i386_low_stopped_data_address): Initialize local
3809 variable `control'.
3810
3811 2011-12-13 Pedro Alves <pedro@codesourcery.com>
3812
3813 PR remote/13492
3814
3815 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
3816 DR_CONTROL unless necessary. Extend comments.
3817 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
3818 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
3819
3820 2011-12-13 Yao Qi <yao@codesourcery.com>
3821
3822 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
3823 macros.
3824 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
3825
3826 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
3827
3828 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
3829 Print new debug message for such case.
3830
3831 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3832
3833 Fix overlapping memcpy.
3834 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
3835 the read_inferior_memory transfer.
3836 (delete_fast_tracepoint_jump): New variable buf. Use it for the
3837 write_inferior_memory transfer.
3838 (set_fast_tracepoint_jump): New variable buf. Use it for the
3839 read_inferior_memory and write_inferior_memory transfers.
3840 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
3841 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
3842 Use it for the write_inferior_memory transfer.
3843 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
3844 buffers.
3845
3846 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
3847
3848 * linux-low.c (fetch_register, store_register): Make code
3849 consistent, fix formatting.
3850
3851 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
3852
3853 * linux-low.c (usr_store_inferior_registers): Factor out code
3854 to handle individual registers into...
3855 (store_register): ... this new function.
3856
3857 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
3858
3859 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
3860 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
3861 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
3862 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
3863 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
3864 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
3865 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
3866 (srv_xmlfiles): Add new XML files.
3867
3868 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
3869 and <sys/uio.h>.
3870 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
3871 (init_registers_s390_linux32v1): Add prototype.
3872 (init_registers_s390_linux32v2): Likewise.
3873 (init_registers_s390_linux64v1): Likewise.
3874 (init_registers_s390_linux64v2): Likewise.
3875 (init_registers_s390x_linux64v1): Likewise.
3876 (init_registers_s390x_linux64v2): Likewise.
3877 (s390_num_regs): Increment to 52.
3878 (s390_regmap): Add orig_r2 register.
3879 (s390_num_regs_3264): Increment to 68.
3880 (s390_regmap_3264): Add orig_r2 register.
3881 (s390_collect_ptrace_register): Handle orig_r2 register.
3882 (s390_supply_ptrace_register): Likewise.
3883 (s390_fill_last_break): New function.
3884 (s390_store_last_break): Likewise.
3885 (s390_fill_system_call): New function.
3886 (s390_store_system_call): Likewise.
3887 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
3888 register sets.
3889 (s390_check_regset): New function.
3890 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
3891 NT_S390_SYSTEM_CALL regsets and use appropriate description.
3892 Update target_regsets for available register sets.
3893
3894 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
3895 Jan Kratochvil <jan.kratochvil@redhat.com>
3896
3897 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
3898 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
3899 New.
3900 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
3901 * linux-low.h (struct process_info_private): New member r_debug.
3902 * server.c (handle_qxfer_libraries): Call
3903 the_target->qxfer_libraries_svr4.
3904 (handle_qxfer_libraries_svr4): New function.
3905 (qxfer_packets): New entry "libraries-svr4".
3906 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
3907 * target.h (struct target_ops): New member qxfer_libraries_svr4.
3908 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
3909 PACKET_qXfer_libraries_svr4.
3910
3911 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
3912
3913 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
3914 PSW address/mask between 8-byte and 16-byte formats.
3915 (s390_supply_ptrace_register): Likewise.
3916 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
3917 basic addressing mode bit.
3918
3919 2011-11-24 Stan Shebs <stan@codesourcery.com>
3920
3921 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
3922
3923 2011-11-17 Stan Shebs <stan@codesourcery.com>
3924
3925 * tracepoint.c (struct tracepoint): New field traceframe_usage.
3926 (tracing_start_time): New global.
3927 (tracing_stop_time): New global.
3928 (tracing_user_name): New global.
3929 (tracing_notes): New global.
3930 (tracing_stop_note): New global.
3931 (cmd_qtstart): Set traceframe_usage, start_time.
3932 (stop_tracing): Set stop_time.
3933 (cmd_qtstatus): Report additional status.
3934 (cmd_qtp): New function.
3935 (handle_tracepoint_query): Call it.
3936 (cmd_qtnotes): New function.
3937 (handle_tracepoint_general_set): Call it.
3938 (get_timestamp): Rename from tsv_get_timestamp.
3939
3940 2011-11-14 Stan Shebs <stan@codesourcery.com>
3941 Kwok Cheung Yeung <kcy@codesourcery.com>
3942
3943 * linux-x86-low.c (small_jump_insn): New.
3944 (i386_install_fast_tracepoint_jump_pad): Add arguments for
3945 trampoline and error message, build a trampoline and issue a small
3946 jump instruction to it.
3947 (x86_install_fast_tracepoint_jump_pad): Add arguments for
3948 trampoline and error message.
3949 (x86_get_min_fast_tracepoint_insn_len): New.
3950 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
3951 * linux-low.h (struct linux_target_ops): Add arguments to
3952 install_fast_tracepoint_jump_pad operation, add new operation.
3953 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
3954 arguments.
3955 (linux_get_min_fast_tracepoint_insn_len): New function.
3956 (linux_target_op): Add new operation.
3957 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
3958 (gdb_trampoline_buffer_end): Ditto.
3959 (gdb_trampoline_buffer_error): Ditto.
3960 (struct ipa_sym_addresses): Add fields for new IPA variables.
3961 (symbol_list): Add entries for new IPA variables.
3962 (struct tracepoint): Add fields to hold the address range of the
3963 trampoline used by the tracepoint.
3964 (trampoline_buffer_head): New static variable.
3965 (trampoline_buffer_tail): Ditto.
3966 (claim_trampoline_space): New function.
3967 (have_fast_tracepoint_trampoline_buffer): New function.
3968 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
3969 structure.
3970 (install_fast_tracepoint): Ditto, also add error buffer argument.
3971 (cmd_qtminftpilen): New function.
3972 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
3973 (fast_tracepoint_from_trampoline_address): New function.
3974 (fast_tracepoint_collecting): Handle trampoline as part of jump
3975 pad space.
3976 (set_trampoline_buffer_space): New function.
3977 (initialize_tracepoint): Initialize new IPA variables.
3978 * target.h (struct target_ops): Add arguments to
3979 install_fast_tracepoint_jump_pad operation, add new
3980 get_min_fast_tracepoint_insn_len operation.
3981 (target_get_min_fast_tracepoint_insn_len): New.
3982 (install_fast_tracepoint_jump_pad): Add arguments.
3983 * server.h (IPA_BUFSIZ): Define.
3984 * linux-i386-ipa.c: Include extra header files.
3985 (initialize_fast_tracepoint_trampoline_buffer): New function.
3986 (initialize_low_tracepoint): Call it.
3987 * server.h (set_trampoline_buffer_space): Declare.
3988 (claim_trampoline_space): Ditto.
3989 (have_fast_tracepoint_trampoline_buffer): Ditto.
3990
3991 2011-11-14 Yao Qi <yao@codesourcery.com>
3992
3993 * server.c (handle_query): Handle InstallInTrace for qSupported.
3994 * tracepoint.c (add_tracepoint): Sort list.
3995 (install_tracepoint, download_tracepoint): New.
3996 (cmd_qtdp): Call them to install and download tracepoints.
3997 (sort_tracepoints): Removed.
3998 (cmd_qtstart): Update.
3999
4000 2011-11-14 Yao Qi <yao@codesourcery.com>
4001
4002 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4003 * mem-break.h: Declare.
4004 * tracepoint.c (cmd_qtstart): Move some code to ...
4005 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4006 New.
4007 (download_tracepoints): Move some code to ...
4008 (download_tracepoint_1): ... here. New.
4009
4010 2011-11-08 Yao Qi <yao@codesourcery.com>
4011
4012 * remote-utils.c (relocate_instruction): A comment fix.
4013
4014 2011-11-07 Joel Brobecker <brobecker@adacore.com>
4015
4016 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4017 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4018 dr_status_mirror and dr_control_mirror from debug_reg_state.
4019 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4020 (i386_initial_stuff): Remove use of deleted globals.
4021 (i386_get_thread_context, i386_set_thread_context,
4022 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4023 from debug_reg_state.
4024
4025 2011-11-05 Yao Qi <yao@codesourcery.com>
4026
4027 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4028 address as TPOINT's.
4029
4030 2011-11-02 Stan Shebs <stan@codesourcery.com>
4031
4032 * tracepoint.c (agent_mem_read_string): New function.
4033 (eval_agent_expr): Call it for tracenz.
4034 * server.c (handle_query): Report support for tracenz.
4035
4036 2011-11-02 Yao Qi <yao@codesourcery.com>
4037
4038 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4039
4040 2011-11-02 Yao Qi <yao@codesourcery.com>
4041
4042 * target.h: Fix a typo in comment.
4043
4044 2011-10-31 Pedro Alves <pedro@codesourcery.com>
4045
4046 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4047 clobber the breakpoints' shadows with fast tracepoint jumps.
4048 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4049 * target.c (write_inferior_memory): Also pass MYADDR down to
4050 check_mem_write.
4051
4052 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4053
4054 * configure.ac: Check support for personality routine.
4055 * configure: Regenerate.
4056 * config.in: Likewise.
4057 * linux-low.c: Include <sys/personality.h>.
4058 Define ADDR_NO_RANDOMIZE if necessary.
4059 (linux_create_inferior): Disable address space randomization when
4060 forking inferior, if requested.
4061 (linux_supports_disable_randomization): New function.
4062 (linux_target_ops): Install it.
4063 * server.h (disable_randomization): Declare.
4064 * server.c (disable_randomization): New global variable.
4065 (handle_general_set): Handle QDisableRandomization.
4066 (handle_query): Likewise for qSupported.
4067 (main): Support --disable-randomization and --no-disable-randomization
4068 command line arguments.
4069 * target.h (struct target_ops): Add supports_disable_randomization.
4070 (target_supports_disable_randomization): New macro.
4071
4072 2011-09-29 Mike Frysinger <vapier@gentoo.org>
4073
4074 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4075 ifdef check.
4076 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4077 [!PT_GETDSBT] (target_loadmap): New definition.
4078 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4079 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4080 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4081 and PT_GETDSBT to LINUX_LOADMAP.
4082 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4083 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4084
4085 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4086
4087 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4088 (arm_linux_hwbp_cap): New static variable.
4089 (arm_linux_get_hwbp_cap): Replace by ...
4090 (arm_linux_init_hwbp_cap): ... this new function.
4091 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4092 (arm_linux_get_hw_watchpoint_count): Likewise.
4093 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4094 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4095 (arm_prepare_to_resume): Use perror_with_name instead of error.
4096
4097 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4098
4099 * linux-arm-low.c: Include <signal.h>.
4100 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4101 (struct arm_linux_hwbp_cap): New data type.
4102 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4103 (struct arm_linux_hw_breakpoint): New data type.
4104 (MAX_BPTS, MAX_WPTS): Define.
4105 (struct arch_process_info, struct arch_lwp_info): New data types.
4106 (arm_linux_get_hwbp_cap): New function.
4107 (arm_linux_get_hw_breakpoint_count): Likewise.
4108 (arm_linux_get_hw_watchpoint_count): Likewise.
4109 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4110 (arm_hwbp_control_initialize): Likewise.
4111 (arm_hwbp_control_is_enabled): Likewise.
4112 (arm_hwbp_control_is_initialized): Likewise.
4113 (arm_hwbp_control_disable): Likewise.
4114 (arm_linux_hw_breakpoint_equal): Likewise.
4115 (arm_linux_hw_point_initialize): Likewise.
4116 (struct update_registers_data): New data structure.
4117 (update_registers_callback: New function.
4118 (arm_insert_point): Likewise.
4119 (arm_remove_point): Likewise.
4120 (arm_stopped_by_watchpoint): Likewise.
4121 (arm_stopped_data_address): Likewise.
4122 (arm_new_process): Likewise.
4123 (arm_new_thread): Likewise.
4124 (arm_prepare_to_resume): Likewise.
4125 (the_low_target): Register arm_insert_point, arm_remove_point,
4126 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4127 arm_new_thread, and arm_prepare_to_resume.
4128
4129 2011-09-15 Stan Shebs <stan@codesourcery.com>
4130
4131 * server.h (struct emit_ops): Add compare-goto fields.
4132 * tracepoint.c (gdb_agent_op_sizes): New table.
4133 (emit_eq_goto): New function.
4134 (emit_ne_goto): New function.
4135 (emit_lt_goto): New function.
4136 (emit_le_goto): New function.
4137 (emit_gt_goto): New function.
4138 (emit_ge_goto): New function.
4139 (is_goto_target): New function.
4140 (compile_bytecodes): Recognize special cases of compare-goto
4141 combinations and call specialized emitters for them.
4142 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4143 (amd64_emit_ne_goto): New function.
4144 (amd64_emit_lt_goto): New function.
4145 (amd64_emit_le_goto): New function.
4146 (amd64_emit_gt_goto): New function.
4147 (amd64_emit_ge_goto): New function.
4148 (amd64_emit_ops): Add the new functions.
4149 (i386_emit_eq_goto): New function.
4150 (i386_emit_ne_goto): New function.
4151 (i386_emit_lt_goto): New function.
4152 (i386_emit_le_goto): New function.
4153 (i386_emit_gt_goto): New function.
4154 (i386_emit_ge_goto): New function.
4155 (i386_emit_ops): Add the new functions.
4156
4157 2011-09-08 Stan Shebs <stan@codesourcery.com>
4158
4159 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4160 (i386_emit_epilogue): Restore %ebx.
4161
4162 2011-08-31 Jie Zhang <jzhang918@gmail.com>
4163
4164 * server.c (step_thread): Remove definition.
4165 (process_serial_event): Don't handle Hs.
4166 * server.h (step_thread): Remove declaration.
4167 * target.c (set_desired_inferior): Remove use of step_thread.
4168
4169 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
4170
4171 * linux-low.c: Include linux-procfs.h.
4172 (linux_attach_lwp_1): Update comments.
4173 (linux_attach): Scan for existing threads when attaching to a
4174 process that is the tgid.
4175 * Makefile.in: Update dependencies.
4176
4177 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
4178
4179 * configure.srv: Add linux-procfs.o dependencies.
4180
4181 2011-08-14 Yao Qi <yao@codesourcery.com>
4182
4183 * target.h (struct target_ops): Fix indent.
4184 * win32-low.c (win32_target_ops): Fix comment.
4185
4186 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
4187 Yao Qi <yao@codesourcery.com>
4188
4189 * Makefile.in (clean): Remove tic6x-*.c files.
4190 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4191 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4192 (tic6x-c64xp-linux.c): Likewise.
4193 * configure.srv: Add support for tic6x-*-uclinux.
4194 * linux-tic6x-low.c: New.
4195 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4196
4197 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
4198 Yao Qi <yao@codesourcery.com>
4199
4200 * target.h (struct target_ops): Add read_loadmap.
4201 * linux-low.c (struct target_loadseg): New type.
4202 (struct target_loadmap): New type.
4203 (linux_read_loadmap): New function.
4204 (linux_target_ops): Add linux_read_loadmap.
4205 * server.c (handle_query): Support qXfer:fdpic:read packet.
4206 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4207 to NULL.
4208
4209 2011-08-05 Eli Zaretskii <eliz@gnu.org>
4210
4211 * win32-low.c: Include <stdint.h>.
4212
4213 2011-07-22 Pedro Alves <pedro@codesourcery.com>
4214
4215 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4216 to the inferior here.
4217 (i386_remove_aligned_watchpoint): Ditto.
4218 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4219 fit part of the watchpoint in the debug registers.
4220 (i386_update_inferior_debug_regs): New.
4221 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4222 registers, and only update the inferior on success.
4223 (i386_low_remove_watchpoint): Ditto.
4224
4225 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4226
4227 * linux-low.c (compare_ints, unique, list_threads, show_process,
4228 linux_core_of_thread): Delete.
4229 (linux_target_ops): Change linux_core_of_thread to
4230 linux_common_core_of_thread.
4231 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4232 * utils.c (malloc_failure): Change type of argument.
4233 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4234 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4235 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4236 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4237 (IPA_OBJS): Add common-utils-ipa.o.
4238 (ptid_h, linux_osdata_h): New macros.
4239 (server_h): Add common/common-utils.h, common/xml-utils.h,
4240 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4241 common/ptid.h.
4242 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4243 ptid.o, buffer.o): New rules.
4244 (linux-low.o): Add common/linux-osdata.h as a dependency.
4245 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4246 * configure.ac: Add AC_HEADER_DIRENT check.
4247 * config.in: Regenerate.
4248 * configure: Regenerate.
4249 * remote-utils.c (xml_escape_text): Delete.
4250 (buffer_grow, buffer_free, buffer_init, buffer_finish,
4251 buffer_xml_printf): Move to common/buffer.c.
4252 * server.c (main): Remove call to initialize_inferiors.
4253 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
4254 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
4255 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
4256 internal_error, gdb_assert, gdb_assert_fail): Delete.
4257 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
4258 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
4259 common/buffer.h.
4260 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
4261 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
4262 initialize_inferiors): Delete.
4263
4264 2011-07-20 Pedro Alves <pedro@codesourcery.com>
4265
4266 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
4267 symbol error.
4268
4269 2011-05-31 Pedro Alves <pedro@codesourcery.com>
4270
4271 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
4272 assertion.
4273 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
4274
4275 2011-05-26 Yao Qi <yao@codesourcery.com>
4276
4277 * Makefile.in (thread-db.o): Track dependence to
4278 common/gdb_thread_db.h.
4279 * thread-db.c: include gdb_thread_db.h from right place.
4280
4281 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
4282
4283 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
4284 __FILE__ and __LINE__ to internal_error.
4285
4286 2011-05-13 Doug Evans <dje@google.com>
4287
4288 * thread-db.c (try_thread_db_load_from_sdir): New function.
4289 (try_thread_db_load_from_dir): New function.
4290 (thread_db_load_search): Handle $sdir, ignore $pdir.
4291 Remove trying of system directories if search of
4292 libthread-db-search-path fails, that is now done via $sdir.
4293
4294 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
4295
4296 * server.c (handle_query): Add EnableDisableTracepoints to the list
4297 of supported features.
4298 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
4299 tracepoints.
4300 (cmd_qtenable_disable): New.
4301 (cmd_qtstart): Install tracepoints even if disabled.
4302 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
4303 receiving a QTEnable or QTDisable packet.
4304 (gdb_collect): Skip data collection if fast tracepoint is disabled.
4305 (ust_marker_to_static_tracepoint): Do not ignore disabled static
4306 tracepoints.
4307 (gdb_probe): Skip data collection if static tracepoint is disabled.
4308
4309 2011-05-10 Doug Evans <dje@google.com>
4310
4311 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
4312
4313 2011-05-04 Doug Evans <dje@google.com>
4314
4315 * linux-low.c (linux_join): Skip process lookup.
4316 * spu-low.c (spu_join): Ditto.
4317 * server.c (join_inferiors_callback): Delete.
4318 (process_serial_event): For 'D' packet (detach) call join_inferior
4319 directly.
4320
4321 2011-05-04 Joseph Myers <joseph@codesourcery.com>
4322
4323 * README: Don't mention xscale*-*-linux*.
4324 * configure.srv (xscale*-*-linux*): Don't handle target.
4325
4326 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
4327
4328 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
4329 casting pointers.
4330 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
4331 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
4332 (i386_emit_void_call_2): Likewise.
4333
4334 2011-04-26 Yao Qi <yao@codesourcery.com>
4335
4336 * linux-low.c: Move common macros to linux-ptrace.h.
4337 Include linux-ptrace.h.
4338 * Makefile.in (linux_ptrace_h): New.
4339 (linux-low.o): Depends on linux-ptrace.h.
4340
4341 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4342
4343 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
4344 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
4345 (remote_prepare): New function with most of the TCP code from ...
4346 (remote_open): ... here. Detect PORT here unconditionally. Move also
4347 setting transport_is_reliable.
4348 * server.c (run_once): New variable.
4349 (gdbserver_usage): Document it.
4350 (main): Set run_once for `--once'. Call remote_prepare. Exit after
4351 the first run if RUN_ONCE.
4352 * server.h (run_once, remote_prepare): New declarations.
4353
4354 2011-04-19 Tom Tromey <tromey@redhat.com>
4355
4356 * win32-low.c (handle_load_dll): Remove duplicate "the".
4357
4358 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
4359
4360 Remove support for old Cygwin 1.5 versions.
4361 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
4362 function to avoid warning.
4363 (win32_add_one_solib): Use cygwin_conv_path function to avoid
4364 warning.
4365
4366 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
4367
4368 * gdbserver/server.h (Macro _): Define it if not available.
4369
4370 2011-03-14 Michael Snyder <msnyder@vmware.com>
4371
4372 * hostio.c (handle_close): Remove unnecessary null test.
4373
4374 2011-03-10 Joel Brobecker <brobecker@adacore.com>
4375
4376 * Makefile.in (maintainer-clean realclean distclean): Remove
4377 "make ... subdir_do" command.
4378
4379 2011-03-10 Michael Snyder <msnyder@vmware.com>
4380
4381 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
4382
4383 * server.c (handle_v_run): Free alloced buffer on early return.
4384
4385 2011-03-09 Yao Qi <yao@codesourcery.com>
4386
4387 Revert:
4388 2011-03-04 Yao Qi <yao@codesourcery.com>
4389
4390 * Makefile.in: Remove GNU make feature --directory.
4391
4392 2011-03-05 Yao Qi <yao@codesourcery.com>
4393
4394 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4395 (subdir_do): New make target. Copied from gdb/Makefile.
4396 (maintainer-clean, realclean, distclean, clean): Call corresponding
4397 make targets in common/Makefile.
4398
4399 2011-02-11 Yao Qi <yao@codesourcery.com>
4400
4401 * configure.ac: Call AC_PROG_RANLIB.
4402 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4403 * configure: Regenerate.
4404
4405 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4406
4407 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
4408
4409 2011-03-06 Yao Qi <yao@codesourcery.com>
4410
4411 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
4412
4413 2011-03-05 Yao Qi <yao@codesourcery.com>
4414
4415 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4416 (subdir_do): New make target. Copied from gdb/Makefile.
4417 (maintainer-clean, realclean, distclean, clean): Call corresponding
4418 make targets in common/Makefile.
4419
4420 2011-03-04 Yao Qi <yao@codesourcery.com>
4421
4422 * Makefile.in: Remove GNU make feature --directory.
4423
4424 2011-03-04 Michael Snyder <msnyder@vmware.com>
4425
4426 * server.c (queue_stop_reply): Call xmalloc not malloc.
4427
4428 2011-03-02 Michael Snyder <msnyder@vmware.com>
4429
4430 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
4431
4432 2011-02-28 Michael Snyder <msnyder@vmware.com>
4433
4434 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
4435 (cmd_qtframe): Ditto.
4436 (cmd_qtbuffer): Ditto.
4437 (cmd_bigqtbuffer): Ditto.
4438
4439 * utils.c (decimal2str): Initialize 'width' to nine, then
4440 don't mess with it.
4441
4442 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4443
4444 * hostio.c (require_data): Free *data, not data.
4445
4446 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4447
4448 * hostio.c (require_data): Use free, not xfree.
4449
4450 2011-02-27 Michael Snyder <msnyder@vmware.com>
4451
4452 * server.c (handle_query): Discard unused value.
4453
4454 * hostio.c (require_data): Free malloc memory before returning
4455 error.
4456
4457 2011-02-26 Michael Snyder <msnyder@vmware.com>
4458
4459 * linux-low.c (list_threads): Call closedir for dirent.
4460
4461 2011-02-27 Michael Snyder <msnyder@vmware.com>
4462
4463 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
4464 a case statement falls through.
4465
4466 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
4467
4468 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
4469 in comparison.
4470
4471 2011-02-26 Michael Snyder <msnyder@vmware.com>
4472
4473 * utils.c (decimal2str): Eliminate dead code and dead param.
4474 (pulongest): Drop dead param from call to decimal2str.
4475 (plongest): Ditto.
4476
4477 2011-02-24 Joel Brobecker <brobecker@adacore.com>
4478
4479 Revert the following patch (not approved yet):
4480 2011-02-21 Hui Zhu <teawater@gmail.com>
4481 * tracepoint.c (tp_printf): New function.
4482 (eval_agent_expr): Handle gdb_agent_op_printf.
4483
4484 2011-02-21 Hui Zhu <teawater@gmail.com>
4485
4486 * tracepoint.c (tp_printf): New function.
4487 (eval_agent_expr): Handle gdb_agent_op_printf.
4488
4489 2011-02-18 Tom Tromey <tromey@redhat.com>
4490
4491 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
4492 (tracepoint.o): Likewise.
4493 * tracepoint.c (enum gdb_agent_op): Use ax.def.
4494 (gdb_agent_op_names): Likewise.
4495
4496 2011-02-18 Tom Tromey <tromey@redhat.com>
4497
4498 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
4499 gdb_agent_op_rot>: New constants.
4500 (gdb_agent_op_names): Add pick and roll.
4501 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
4502 cases.
4503
4504 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4505
4506 * aclocal.m4: Regenerated with aclocal-1.11.1.
4507
4508 2011-02-14 Pedro Alves <pedro@codesourcery.com>
4509
4510 * server.c (handle_qxfer_traceframe_info): New.
4511 (qxfer_packets): Register "traceframe-info".
4512 (handle_query): Report support for qXfer:traceframe-info:read+.
4513 * tracepoint.c (match_blocktype): New.
4514 (traceframe_find_block_type): Rename to ...
4515 (traceframe_walk_blocks): ... this. Add callback filter argument,
4516 and use it.
4517 (traceframe_find_block_type): New, reimplemented on top of
4518 traceframe_walk_blocks.
4519 (build_traceframe_info_xml): New.
4520 (traceframe_read_info): New.
4521 * server.h (traceframe_read_info): Declare.
4522
4523 2011-02-11 Yao Qi <yao@codesourcery.com>
4524
4525 * configure.ac: Call AC_PROG_RANLIB.
4526 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4527 * configure: Regenerate.
4528
4529 2011-02-07 Pedro Alves <pedro@codesourcery.com>
4530
4531 * server.c (gdb_read_memory): Change return semantics to allow
4532 partial transfers.
4533 (handle_search_memory_1): Adjust.
4534 (process_serial_event) <'m' packet>: Handle partial transfers.
4535 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
4536
4537 2011-01-28 Pedro Alves <pedro@codesourcery.com>
4538
4539 * regcache.c (init_register_cache): Initialize
4540 regcache->register_status.
4541 (free_register_cache): Release regcache->register_status.
4542 (regcache_cpy): Copy register_status.
4543 (registers_to_string): Print 'x's for unavailable registers.
4544 (supply_register): Mark the register's status valid or
4545 unavailable, depending on whether a buffer was passed in or not.
4546 (supply_register_zeroed): New.
4547 (supply_regblock): Mark the registers' status valid or
4548 unavailable, depending on whether a buffer was passed in or not.
4549 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
4550 (struct regcache): New `register_status' field.
4551 (supply_register_zeroed): Declare.
4552 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
4553 supply_register_zeroed, rather than passing a NULL buffer to
4554 supply_register.
4555 * tracepoint.c (fetch_traceframe_registers): Update comment.
4556
4557 2011-01-28 Pedro Alves <pedro@codesourcery.com>
4558
4559 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
4560 buffer explicit.
4561
4562 2011-01-25 Pedro Alves <pedro@codesourcery.com>
4563
4564 * server.h (decode_xfer_write): Change prototype.
4565 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
4566 and don't extract the annex here.
4567 * server.c (decode_xfer_read): Remove `annex' parameter,
4568 and don't extract the annex here.
4569 (decode_xfer): New.
4570 (struct qxfer): New.
4571 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
4572 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
4573 (handle_qxfer_statictrace): New functions, abstracted out from
4574 handle_query, and made to use the struct qxfer interface.
4575 (handle_threads_qxfer_proper): Rename to ...
4576 (handle_qxfer_threads_proper): ... this.
4577 (handle_threads_qxfer): Rename to ...
4578 (handle_qxfer_threads): ... this. Adjust.
4579 (qxfer_packets): New array.
4580 (handle_qxfer): New function.
4581 (handle_query): Use handle_qxfer.
4582
4583 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
4584
4585 * gdbreplay.c: Shorten lines of >= 80 columns.
4586 * linux-low.c: Ditto.
4587 * linux-ppc-low.c: Ditto.
4588 * linux-s390-low.c: Ditto.
4589 * linux-sparc-low.c: Ditto.
4590 * linux-x86-low.c: Ditto.
4591 * linux-xtensa-low.c: Ditto.
4592 * mem-break.c: Ditto.
4593 * nto-low.c: Ditto.
4594 * regcache.h: Ditto.
4595 * remote-utils.c: Ditto.
4596 * server.c: Ditto.
4597 * server.h: Ditto.
4598 * thread-db.c: Ditto.
4599 * tracepoint.c: Ditto.
4600 * utils.c: Ditto.
4601 * win32-low.h: Ditto.
4602
4603 2011-01-05 Joel Brobecker <brobecker@adacore.com>
4604
4605 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
4606 update.
4607
4608 2011-01-01 Joel Brobecker <brobecker@adacore.com>
4609
4610 * server.c (gdbserver_version): Update copyright year in version
4611 output.
4612 * gdbreplay.c (gdbreplay_version): Ditto.
4613
4614 2010-12-29 Jie Zhang <jie.zhang@analog.com>
4615
4616 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
4617 * linux-bfin-low.c: New file.
4618 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
4619 PT_DATA_ADDR for BFIN targets.
4620 * Makefile.in (SFILES): Add linux-bfin-low.c.
4621 (clean): Remove reg-bfin.c.
4622 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
4623 * README: Mention supported Blackfin targets.
4624
4625 2010-12-23 Mike Frysinger <vapier@gentoo.org>
4626
4627 * .gitignore: New file.
4628
4629 2010-11-16 Mike Frysinger <vapier@gentoo.org>
4630
4631 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
4632
4633 2010-10-22 Jie Zhang <jie@codesourcery.com>
4634
4635 * Makefile.in: Add FLAGS_TO_PASS variable.
4636 (install): Remove dependency of install-only and recursively
4637 invoke make for install-only.
4638
4639 2010-10-04 Doug Evans <dje@google.com>
4640
4641 * Makefile.in (uninstall): Use $(DESTDIR).
4642
4643 2010-09-24 Pedro Alves <pedro@codesourcery.com>
4644
4645 PR gdb/11842
4646
4647 * linux-x86-low.c (compat_siginfo_from_siginfo)
4648 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
4649 si_code is < 0. Check for si_code == SI_TIMER before checking for
4650 si_code < 0.
4651
4652 2010-09-13 Joel Brobecker <brobecker@adacore.com>
4653
4654 * lynx-i386-low.c: New file.
4655 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
4656
4657 2010-09-13 Joel Brobecker <brobecker@adacore.com>
4658
4659 * lynx-low.c (ptrace_request_to_str): Remove handling for
4660 request values that have been removed in LynxOS 5.x.
4661
4662 2010-09-13 Joel Brobecker <brobecker@adacore.com>
4663
4664 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
4665 <ptrace.h>
4666
4667 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
4668
4669 * configure.ac: Add --enable-inprocess-agent option.
4670 * configure: Rebuilt.
4671
4672 2010-09-06 Yao Qi <yao@codesourcery.com>
4673
4674 * linux-low.c (linux_kill): Remove unused variable.
4675 (linux_stabilize_threads): Likewise.
4676 * server.c (start_inferior): Likewise.
4677 (queue_stop_reply_callback): Likewise.
4678 * tracepoint.c (do_action_at_tracepoint): Likewise.
4679
4680 2010-09-06 Yao Qi <yao@codesourcery.com>
4681
4682 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
4683 on return.
4684
4685 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4686
4687 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
4688
4689 2010-09-06 Pedro Alves <pedro@codesourcery.com>
4690
4691 * Makefile.in (install-only): Replace $IPA_DEPFILES with
4692 "$(IPA_DEPFILES)".
4693
4694 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4695
4696 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
4697 gdbserver/lynx-ppc-low.c: New files.
4698 * Makefile.in (lynx_low_h): New variable.
4699 (lynx-low.o, lynx-ppc-low.o): New rules.
4700 * configure.ac: On LynxOS, link with -lnetinet.
4701 * configure.srv: Add handling of powerpc-*-lynxos* targets.
4702 * configure: regenerate.
4703
4704 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4705
4706 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
4707 * configure.ac: Add check for vasprintf and vsnprintf.
4708 * configure, config.in: Regenerate.
4709 * server.h (vasprintf, vsnprintf): Add conditional declarations.
4710
4711 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4712
4713 * gdbreplay.c: Move include of alloca.h up, next to include of
4714 malloc.h.
4715 * server.h: Add include of malloc.h.
4716 * mem-break.c: Remove include of malloc.h.
4717 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
4718
4719 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4720
4721 * Makefile.in (memmem.o): Build with -Wno-error.
4722
4723 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4724
4725 * utils.c (xsnprintf): Make non-static.
4726 * server.h: Add xsnprintf declaration.
4727 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
4728 replace calls to snprintf by calls to xsnprintf throughout.
4729
4730 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4731
4732 * configure.ac: Add configure check for alloca.
4733 * configure, config.in: Regenerate.
4734 * server.h: Include alloca.h if it exists.
4735 * gdbreplay.c: Include alloca.h if it exists.
4736
4737 2010-08-28 Pedro Alves <pedro@codesourcery.com>
4738
4739 * linux-low.c (__SIGRTMIN): Define if not already defined.
4740 (linux_create_inferior): Check for __ANDROID__ rather than
4741 __SIGRTMIN.
4742 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
4743 are already deferred.
4744 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
4745 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
4746 stopped and already has a pending signal to report.
4747 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
4748 a pending signal to report or is moving out of a jump pad.
4749 (linux_init_signals): Check for __ANDROID__ rather than
4750 __SIGRTMIN.
4751
4752 2010-08-28 Pedro Alves <pedro@codesourcery.com>
4753
4754 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
4755 debug_threads check. Avoid a linear search when not doing debug
4756 output.
4757
4758 2010-08-27 Pedro Alves <pedro@codesourcery.com>
4759
4760 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
4761 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
4762 (struct file_handler) <fd>: Change type to gdb_fildes_t.
4763 (process_event): Change local fd's type to gdb_fildes_t.
4764 (create_file_handler): Adjust prototype.
4765 (delete_file_handler): Adjust prototype.
4766 (handle_file_event): Adjust prototype. Use pfildes.
4767 (create_file_event): Adjsut prototype.
4768 * remote-utils.c (remote_desc, listen_desc): Change type to
4769 gdb_fildes_t.
4770 * server.h: New gdb_fildes_t typedef.
4771 [USE_WIN32API]: Include winsock2.h.
4772 (delete_file_handler, add_file_handler): Adjust prototypes.
4773 (pfildes): Declare.
4774 * utils.c (pfildes): New.
4775
4776 2010-08-27 Pedro Alves <pedro@codesourcery.com>
4777
4778 * configure.ac (build_warnings): Add -Wno-char-subscripts.
4779 * configure: Regenerate.
4780
4781 2010-08-27 Pedro Alves <pedro@codesourcery.com>
4782
4783 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
4784 (linux_done_accessing_memory): ... this.
4785 (linux_target_ops): Adjust.
4786 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
4787 * nto-low.c (nto_target_ops): Adjust comment.
4788 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
4789 * spu-low.c (spu_target_ops): Adjust comment.
4790 * target.h (target_ops): Rename unprepare_to_access_memory field
4791 to done_accessing_memory.
4792 (unprepare_to_access_memory): Rename to ...
4793 (done_accessing_memory): ... this.
4794
4795 2010-08-26 Pedro Alves <pedro@codesourcery.com>
4796
4797 * linux-low.c (linux_prepare_to_access_memory): New.
4798 (linux_unprepare_to_access_memory): New.
4799 (linux_target_ops): Install them.
4800 * server.c (read_memory): Rename to ...
4801 (gdb_read_memory): ... this. Use
4802 prepare_to_access_memory/prepare_to_access_memory.
4803 (write_memory): Rename to ...
4804 (gdb_write_memory): ... this. Use
4805 prepare_to_access_memory/prepare_to_access_memory.
4806 (handle_search_memory_1): Adjust.
4807 (process_serial_event): Adjust.
4808 * target.h (struct target_ops): New fields
4809 prepare_to_access_memory and unprepare_to_access_memory.
4810 (prepare_to_access_memory, unprepare_to_access_memory): New.
4811 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
4812 prepare_to_access_memory/prepare_to_access_memory.
4813 * nto-low.c (nto_target_ops): Adjust.
4814 * spu-low.c (spu_target_ops): Adjust.
4815 * win32-low.c (win32_target_ops): Adjust.
4816
4817 2010-08-26 Pedro Alves <pedro@codesourcery.com>
4818
4819 * Makefile.in (WARN_CFLAGS): Get it from configure.
4820 (WERROR_CFLAGS): New.
4821 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
4822 * configure.ac: Introduce --enable-werror, which adds -Werror to
4823 the compiler command line. Enabled by default. Disable with
4824 --disable-werror. Add -Wdeclaration-after-statement
4825 Wpointer-arith and -Wformat-nonliteral to warning flags.
4826 * configure: Regenerate.
4827
4828 2010-08-26 Pedro Alves <pedro@codesourcery.com>
4829
4830 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
4831
4832 2010-08-26 Pedro Alves <pedro@codesourcery.com>
4833
4834 * gdbreplay.c (remote_error): New.
4835 (gdbchar): New.
4836 (expect): Use gdbchar. Check for error reading from GDB.
4837 Clarify sync error output.
4838 (play): Check for errors writing to GDB.
4839 * linux-low.c (sigchld_handler): Really ignore `write' errors.
4840 * remote-utils.c (getpkt): Check for errors writing to the remote
4841 descriptor.
4842
4843 2010-08-25 Pedro Alves <pedro@codesourcery.com>
4844
4845 * linux-low.c (linux_wait_1): Move non-debugging code out of
4846 `debug_threads' control.
4847
4848 2010-08-25 Pedro Alves <pedro@codesourcery.com>
4849
4850 * linux-low.c (linux_wait_1): Don't set last_status here.
4851 * server.c (push_event, queue_stop_reply_callback): Assert we're
4852 not pushing a TARGET_WAITKIND_IGNORE event.
4853 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
4854 (myresume, handle_target_event): Set the thread's last_resume_kind
4855 and last_status from the target returned status.
4856
4857 2010-08-25 Pedro Alves <pedro@codesourcery.com>
4858
4859 PR threads/10729
4860
4861 * linux-x86-low.c (update_debug_registers_callback): New.
4862 (i386_dr_low_set_addr): Use it.
4863 (i386_dr_low_get_addr): New.
4864 (i386_dr_low_set_control): Use update_debug_registers_callback.
4865 (i386_dr_low_get_control): New.
4866 (i386_dr_low_get_status): Adjust.
4867 * linux-low.c (linux_stop_lwp): New.
4868 * linux-low.h (linux_stop_lwp): Declare.
4869
4870 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
4871 argument instead of a i386_debug_reg_state.
4872 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
4873 a i386_debug_reg_state.
4874 (i386_insert_aligned_watchpoint): Adjust.
4875 (i386_remove_aligned_watchpoint): Adjust.
4876 (i386_low_stopped_data_address): Read the debug registers from the
4877 inferior instead of from the mirrors.
4878 * i386-low.h (struct i386_debug_reg_state): Extend comment.
4879 (i386_dr_low_get_addr): Declare.
4880 (i386_dr_low_get_control): Declare.
4881 (i386_dr_low_get_status): Change prototype.
4882
4883 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
4884 (i386_dr_low_get_addr): New.
4885 (i386_dr_low_get_control): New.
4886 (i386_dr_low_get_status): Adjust prototype. Return
4887 dr_status_mirror.
4888 (i386_initial_stuff): Clear dr_status_mirror and
4889 dr_control_mirror.
4890 (i386_get_thread_context): Adjust.
4891 (i386_set_thread_context): Adjust.
4892 (i386_thread_added): Adjust.
4893
4894 2010-08-24 Pedro Alves <pedro@codesourcery.com>
4895
4896 * linux-low.h (linux_thread_area): Delete declaration.
4897
4898 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
4899
4900 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
4901 after its termination.
4902
4903 2010-08-09 Pedro Alves <pedro@codesourcery.com>
4904
4905 * linux-low.c (gdb_wants_lwp_stopped): Delete.
4906 (gdb_wants_all_stopped): Delete.
4907 (linux_wait_1): Don't call them.
4908 * server.c (handle_v_cont): Tag all threads as want-stopped.
4909 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
4910 stopped as "client-wants-stopped".
4911
4912 2010-07-31 Pedro Alves <pedro@codesourcery.com>
4913
4914 * Makefile.in (signals_h): New.
4915 (server_h): Depend on it.
4916 (server.o): Don't depend on $(signals_def).
4917 (signals.o): Depend on $(signals_def).
4918
4919 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
4920
4921 * Makefile.in (signals_def): New.
4922 (server_h): Append include/gdb/signals.h and signals_def.
4923 (server.o): Append signals_def.
4924
4925 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4926
4927 * server.c (handle_target_event): Use target_signal_to_host for
4928 resume_info.sig initialization.
4929 * target.h (struct thread_resume) <sig>: New comment.
4930
4931 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
4932
4933 * server.c (handle_query): strcpy() the returned string from paddress()
4934 instead of sprintf().
4935 * utils.c (paddress): Return phex_nz().
4936
4937 2010-07-07 Joel Brobecker <brobecker@adacore.com>
4938
4939 * server.c (handle_v_cont): Call mourn_inferior if process
4940 just exited.
4941 (myresume): Likewise.
4942
4943 2010-07-01 Pedro Alves <pedro@codesourcery.com>
4944
4945 Static tracepoints, and integration with UST.
4946
4947 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
4948 * mem-break.c (uninsert_all_breakpoints)
4949 (reinsert_all_breakpoints): New.
4950 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
4951 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
4952 (gdb_agent_ust_loaded, helper_thread_id)
4953 (gdb_agent_helper_thread_id): New macros.
4954 (struct ipa_sym_addresses): Add addr_ust_loaded,
4955 addr_helper_thread_id, addr_cmd_buf.
4956 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
4957 (in_process_agent_loaded_ust): New.
4958 (write_e_ust_not_loaded): New.
4959 (maybe_write_ipa_ust_not_loaded): New.
4960 (struct collect_static_trace_data_action): New.
4961 (enum tracepoint_type) <static_tracepoint>: New.
4962 (struct tracepoint) <handle>: Mention static tracepoints.
4963 (struct static_tracepoint_ctx): New.
4964 (CMD_BUF_SIZE): New.
4965 (add_tracepoint_action): Handle static tracepoint actions.
4966 (unprobe_marker_at): New.
4967 (clear_installed_tracepoints): Handle static tracepoints.
4968 (cmd_qtdp): Handle static tracepoints.
4969 (probe_marker_at): New.
4970 (cmd_qtstart): Handle static tracepoints.
4971 (response_tracepoint): Handle static tracepoints.
4972 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
4973 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
4974 (get_context_regcache): Handle static tracepoints.
4975 (do_action_at_tracepoint): Handle static tracepoint actions.
4976 (traceframe_find_block_type): Handle static trace data blocks.
4977 (traceframe_read_sdata): New.
4978 (download_tracepoints): Download static tracepoint actions.
4979 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
4980 (GDB_PROBE_NAME): New.
4981 (ust_ops): New.
4982 (GET_UST_SYM): New.
4983 (USTF): New.
4984 (dlsym_ust): New.
4985 (ust_marker_to_static_tracepoint): New.
4986 (gdb_probe): New.
4987 (collect_ust_data_at_tracepoint): New.
4988 (gdb_ust_probe): New.
4989 (UNIX_PATH_MAX, SOCK_DIR): New.
4990 (gdb_ust_connect_sync_socket): New.
4991 (resume_thread, stop_thread): New.
4992 (run_inferior_command): New.
4993 (init_named_socket): New.
4994 (gdb_ust_socket_init): New.
4995 (cstr_to_hexstr): New.
4996 (next_st): New.
4997 (first_marker, next_marker): New.
4998 (response_ust_marker): New.
4999 (cmd_qtfstm, cmd_qtsstm): New.
5000 (unprobe_marker_at, probe_marker_at): New.
5001 (cmd_qtstmat, gdb_ust_thread): New.
5002 (gdb_ust_init): New.
5003 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5004 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5005 (ST_REGENTRY): New.
5006 (x86_64_st_collect_regmap): New.
5007 (X86_64_NUM_ST_COLLECT_GREGS): New.
5008 (AMD64_RIP_REGNUM): New.
5009 (supply_static_tracepoint_registers): New.
5010 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5011 (ST_REGENTRY): New.
5012 (i386_st_collect_regmap): New.
5013 (i386_NUM_ST_COLLECT_GREGS): New.
5014 (supply_static_tracepoint_registers): New.
5015 * server.c (handle_query): Handle qXfer:statictrace:read.
5016 <qSupported>: Report support for StaticTracepoints, and
5017 qXfer:statictrace:read features.
5018 * server.h (traceframe_read_sdata)
5019 (supply_static_tracepoint_registers): Declare.
5020 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5021 (unpack_varlen_hex): Include in IPA build.
5022 * Makefile.in (ustlibs, ustinc): New.
5023 (IPA_OBJS): Add remote-utils-ipa.o.
5024 ($(IPA_LIB)): Link -ldl and -lpthread.
5025 (UST_CFLAGS): New.
5026 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5027 * config.in, configure: Regenerate.
5028
5029 2010-06-20 Ian Lance Taylor <iant@google.com>
5030 Pedro Alves <pedro@codesourcery.com>
5031
5032 * linux-x86-low.c (always_true): Delete.
5033 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5034 trying to fool the compiler with always_true.
5035
5036 2010-06-20 Pedro Alves <pedro@codesourcery.com>
5037
5038 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5039 conditions in gdbserver.
5040
5041 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5042
5043 * spu-low.c (spu_read_memory): Wrap around local store limit.
5044 (spu_write_memory): Likewise.
5045
5046 2010-06-15 Pedro Alves <pedro@codesourcery.com>
5047
5048 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5049 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5050 LONGEST uses.
5051 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5052 uses.
5053 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5054 uses with LONGEST uses.
5055
5056 2010-06-14 Stan Shebs <stan@codesourcery.com>
5057 Pedro Alves <pedro@codesourcery.com>
5058
5059 Bytecode compiler.
5060
5061 * linux-x86-low.c: Include limits.h.
5062 (add_insns): New.
5063 (always_true): New.
5064 (EMIT_ASM): New.
5065 (EMIT_ASM32): New.
5066 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5067 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5068 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5069 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5070 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5071 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5072 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5073 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5074 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5075 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5076 (amd64_emit_void_call_2): New.
5077 (amd64_emit_ops): New.
5078 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5079 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5080 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5081 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5082 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5083 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5084 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5085 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5086 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5087 (i386_emit_stack_adjust, i386_emit_int_call_1)
5088 (i386_emit_void_call_2): New.
5089 (i386_emit_ops): New.
5090 (x86_emit_ops): New.
5091 (the_low_target): Install x86_emit_ops.
5092 * server.h (struct emit_ops): New.
5093 (get_raw_reg_func_addr): Declare.
5094 (current_insn_ptr, emit_error): Declare.
5095 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5096 (set_trace_state_variable_value): New defines.
5097 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5098 addr_get_trace_state_variable_value and
5099 addr_set_trace_state_variable_value.
5100 (symbol_list): New fields for get_raw_reg,
5101 get_trace_state_variable_value and set_trace_state_variable_value.
5102 (condfn): New typedef.
5103 (struct tracepoint): New field `compiled_cond'.
5104 (do_action_at_tracepoint): Clear compiled_cond.
5105 (get_trace_state_variable_value, set_trace_state_variable_value):
5106 Export in the IPA.
5107 (condition_true_at_tracepoint): If there's a compiled condition,
5108 run that.
5109 (current_insn_ptr, emit_error): New globals.
5110 (struct bytecode_address): New.
5111 (get_raw_reg_func_addr): New.
5112 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5113 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5114 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5115 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5116 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5117 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5118 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5119 (compile_tracepoint_condition, compile_bytecodes): New.
5120 * target.h (emit_ops): Forward declare.
5121 (struct target_ops): New field emit_ops.
5122 (target_emit_ops): New.
5123 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5124 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5125 * linux-low.c (linux_emit_ops): New.
5126 (linux_target_ops): Install it.
5127 * linux-low.h (struct linux_target_ops): New field emit_ops.
5128
5129 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5130
5131 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5132 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5133
5134 2010-06-01 Pedro Alves <pedro@codesourcery.com>
5135 Stan Shebs <stan@codesourcery.com>
5136
5137 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5138 (all): Depend on $(extra_libraries).
5139 (install-only): Install the IPA.
5140 (IPA_OBJS, IPA_LIB): New.
5141 (clean): Remove the IPA lib.
5142 (IPAGENT_CFLAGS): New.
5143 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5144 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5145 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5146 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5147 * configure.ac: Check for atomic builtins support in the compiler.
5148 (IPA_DEPFILES, extra_libraries): Define.
5149 * configure.srv (ipa_obj): Add description.
5150 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5151 (i[34567]86-*-linux*): Set ipa_obj.
5152 (x86_64-*-linux*): Set ipa_obj.
5153 * linux-low.c (stabilizing_threads): New.
5154 (supports_fast_tracepoints): New.
5155 (linux_detach): Stabilize threads before detaching.
5156 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5157 the lwp is either not stabilizing, or is moving out of a jump pad.
5158 (linux_fast_tracepoint_collecting): New.
5159 (maybe_move_out_of_jump_pad): New.
5160 (enqueue_one_deferred_signal): New.
5161 (dequeue_one_deferred_signal): New.
5162 (linux_wait_for_event_1): If moving out of a jump pad, defer
5163 pending signals to later.
5164 (linux_stabilize_threads): New.
5165 (linux_wait_1): Check if threads need moving out of jump pads, and
5166 do it if so.
5167 (stuck_in_jump_pad_callback): New.
5168 (move_out_of_jump_pad_callback): New.
5169 (lwp_running): New.
5170 (linux_resume_one_lwp): Handle moving out of jump pads.
5171 (linux_set_resume_request): Dequeue deferred signals.
5172 (need_step_over_p): Also step over fast tracepoint jumps.
5173 (start_step_over): Also uninsert fast tracepoint jumps.
5174 (finish_step_over): Also reinsert fast tracepoint jumps.
5175 (linux_install_fast_tracepoint_jump): New.
5176 (linux_target_ops): Install linux_stabilize_threads and
5177 linux_install_fast_tracepoint_jump_pad.
5178 * linux-low.h (linux_target_ops) <get_thread_area,
5179 install_fast_tracepoint_jump_pad>: New fields.
5180 (struct lwp_info) <collecting_fast_tracepoint,
5181 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5182 (linux_get_thread_area): Declare.
5183 * linux-x86-low.c (jump_insn): New.
5184 (x86_get_thread_area): New.
5185 (append_insns): New.
5186 (push_opcode): New.
5187 (amd64_install_fast_tracepoint_jump_pad): New.
5188 (i386_install_fast_tracepoint_jump_pad): New.
5189 (x86_install_fast_tracepoint_jump_pad): New.
5190 (the_low_target): Install x86_get_thread_area and
5191 x86_install_fast_tracepoint_jump_pad.
5192 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5193 (struct fast_tracepoint_jump): New.
5194 (fast_tracepoint_jump_insn): New.
5195 (fast_tracepoint_jump_shadow): New.
5196 (find_fast_tracepoint_jump_at): New.
5197 (fast_tracepoint_jump_here): New.
5198 (delete_fast_tracepoint_jump): New.
5199 (set_fast_tracepoint_jump): New.
5200 (uninsert_fast_tracepoint_jumps_at): New.
5201 (reinsert_fast_tracepoint_jumps_at): New.
5202 (set_breakpoint_at): Use write_inferior_memory.
5203 (uninsert_raw_breakpoint): Use write_inferior_memory.
5204 (check_mem_read): Mask out fast tracepoint jumps.
5205 (check_mem_write): Mask out fast tracepoint jumps.
5206 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5207 (set_fast_tracepoint_jump): Declare.
5208 (delete_fast_tracepoint_jump)
5209 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5210 (reinsert_fast_tracepoint_jumps_at): Declare.
5211 * regcache.c: Don't compile many functions when building the
5212 in-process agent library.
5213 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5214 the register buffer in the heap.
5215 (free_register_cache): If the register buffer isn't owned by the
5216 regcache, don't free it.
5217 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5218 pre-existing register caches.
5219 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5220 type.
5221 (convert_ascii_to_int): : Constify `from' parameter type.
5222 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5223 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5224 the needed buffer in-place.
5225 (relocate_instruction): New.
5226 * server.c (handle_query) <qSymbols>: If the target supports
5227 tracepoints, give it a chance of looking up symbols. Report
5228 support for fast tracepoints.
5229 (handle_status): Stabilize threads.
5230 (process_serial_event): Adjust.
5231 * server.h (struct fast_tracepoint_jump): Forward declare.
5232 (struct process_info) <fast_tracepoint_jumps>: New field.
5233 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5234 (decode_X_packet, decode_M_packet): Adjust.
5235 (relocate_instruction): Declare.
5236 (in_process_agent_loaded): Declare.
5237 (tracepoint_look_up_symbols): Declare.
5238 (struct fast_tpoint_collect_status): Declare.
5239 (fast_tracepoint_collecting): Declare.
5240 (force_unlock_trace_buffer): Declare.
5241 (handle_tracepoint_bkpts): Declare.
5242 (initialize_low_tracepoint)
5243 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5244 * target.h (struct target_ops) <stabilize_threads,
5245 install_fast_tracepoint_jump_pad>: New fields.
5246 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5247 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5248 [HAVE_STDINT_H]: Include stdint.h.
5249 (trace_debug_1): Rename to ...
5250 (trace_vdebug): ... this.
5251 (trace_debug): Rename to ...
5252 (trace_debug_1): ... this. Add `level' parameter.
5253 (trace_debug): New.
5254 (ATTR_USED, ATTR_NOINLINE): New.
5255 (IP_AGENT_EXPORT): New.
5256 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5257 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
5258 (about_to_request_buffer_space, trace_buffer_is_full)
5259 (stopping_tracepoint, expr_eval_result, error_tracepoint)
5260 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
5261 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
5262 (traceframe_write_count, traceframes_created)
5263 (trace_state_variables)
5264 New renaming defines.
5265 (struct ipa_sym_addresses): New.
5266 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
5267 (symbol_list): New.
5268 (ipa_sym_addrs): New.
5269 (all_tracepoint_symbols_looked_up): New.
5270 (in_process_agent_loaded): New.
5271 (write_e_ipa_not_loaded): New.
5272 (maybe_write_ipa_not_loaded): New.
5273 (tracepoint_look_up_symbols): New.
5274 (debug_threads) [IN_PROCESS_AGENT]: New.
5275 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
5276 (UNKNOWN_SIDE_EFFECTS): New.
5277 (stop_tracing): New.
5278 (flush_trace_buffer): New.
5279 (stop_tracing_bkpt): New.
5280 (flush_trace_buffer_bkpt): New.
5281 (read_inferior_integer): New.
5282 (read_inferior_uinteger): New.
5283 (read_inferior_data_pointer): New.
5284 (write_inferior_data_pointer): New.
5285 (write_inferior_integer): New.
5286 (write_inferior_uinteger): New.
5287 (struct collect_static_trace_data_action): Delete.
5288 (enum tracepoint_type): New.
5289 (struct tracepoint) <type>: New field `type'.
5290 <actions_str, step_actions, step_actions_str>: Only include in
5291 GDBserver.
5292 <orig_size, obj_addr_on_target, adjusted_insn_addr>
5293 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
5294 (tracepoints): Use IP_AGENT_EXPORT.
5295 (last_tracepoint): Don't include in the IPA.
5296 (stopping_tracepoint): Use IP_AGENT_EXPORT.
5297 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
5298 (alloced_trace_state_variables): New.
5299 (trace_state_variables): Use IP_AGENT_EXPORT.
5300 (traceframe_t): Delete unused variable.
5301 (circular_trace_buffer): Don't include in the IPA.
5302 (trace_buffer_start): Delete.
5303 (struct trace_buffer_control): New.
5304 (trace_buffer_free): Delete.
5305 (struct ipa_trace_buffer_control): New.
5306 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
5307 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
5308 New.
5309 (trace_buffer_ctrl): New.
5310 (TRACE_BUFFER_CTRL_CURR): New.
5311 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
5312 Reimplement as macros.
5313 (trace_buffer_wrap): Delete.
5314 (traceframe_write_count, traceframe_read_count)
5315 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
5316 (struct tracepoint_hit_ctx) <type>: New field.
5317 (struct fast_tracepoint_ctx): New.
5318 (memory_barrier): New.
5319 (cmpxchg): New.
5320 (record_tracepoint_error): Update atomically in the IPA.
5321 (clear_inferior_trace_buffer): New.
5322 (about_to_request_buffer_space): New.
5323 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
5324 updating the same buffer.
5325 (add_tracepoint): Default the tracepoint's type to trap
5326 tracepoint, and orig_size to -1.
5327 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
5328 internal variables.
5329 (create_trace_state_variable): New parameter `gdb'. Handle it.
5330 (clear_installed_tracepoints): Clear fast tracepoint jumps.
5331 (cmd_qtdp): Handle fast tracepoints.
5332 (cmd_qtdv): Adjust.
5333 (max_jump_pad_size): New.
5334 (gdb_jump_pad_head): New.
5335 (get_jump_space_head): New.
5336 (claim_jump_space): New.
5337 (sort_tracepoints): New.
5338 (MAX_JUMP_SIZE): New.
5339 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
5340 IPA.
5341 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
5342 support. Upload fast traceframes, and delete internal IPA
5343 breakpoints.
5344 (stop_tracing_handler): New.
5345 (flush_trace_buffer_handler): New.
5346 (cmd_qtstop): Upload fast tracepoints.
5347 (response_tracepoint): Handle fast tracepoints.
5348 (tracepoint_finished_step): Upload fast traceframes. Set the
5349 tracepoint hit context's tracepoint type.
5350 (handle_tracepoint_bkpts): New.
5351 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
5352 type. Add comment about fast tracepoints.
5353 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
5354 non-existing action_str field.
5355 (get_context_regcache): Handle fast tracepoints.
5356 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
5357 to the regcache.
5358 (fast_tracepoint_from_jump_pad_address): New.
5359 (fast_tracepoint_from_ipa_tpoint_address): New.
5360 (collecting_t): New.
5361 (force_unlock_trace_buffer): New.
5362 (fast_tracepoint_collecting): New.
5363 (collecting): New.
5364 (gdb_collect): New.
5365 (write_inferior_data_ptr): New.
5366 (target_tp_heap): New.
5367 (target_malloc): New.
5368 (download_agent_expr): New.
5369 (UALIGN): New.
5370 (download_tracepoints): New.
5371 (download_trace_state_variables): New.
5372 (upload_fast_traceframes): New.
5373 (IPA_FIRST_TRACEFRAME): New.
5374 (IPA_NEXT_TRACEFRAME_1): New.
5375 (IPA_NEXT_TRACEFRAME): New.
5376 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
5377 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
5378 (gdb_jump_pad_buffer_end): New.
5379 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
5380 (initialize_tracepoint): Adjust.
5381 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
5382 buffer. Initialize the low module.
5383 * utils.c (PREFIX, TOOLNAME): New.
5384 (malloc_failure): Use PREFIX.
5385 (error): In the IPA, an error causes an exit.
5386 (fatal, warning): Use PREFIX.
5387 (internal_error): Use TOOLNAME.
5388 (NUMCELLS): Increase to 10.
5389 * configure, config.in: Regenerate.
5390
5391 2010-06-01 Pedro Alves <pedro@codesourcery.com>
5392
5393 * server.c (handle_query) <qSupported>: Do two passes over the
5394 qSupported string to avoid nesting strtok.
5395
5396 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5397
5398 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
5399 (CDEPS): New.
5400 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
5401 -Wl,--dynamic-list.
5402 * configure: Regenerate.
5403 * proc-service.list: New.
5404
5405 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5406
5407 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
5408 New comment.
5409
5410 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
5411
5412 * gdbreplay.c (remote_open): Check error return from socket() call by
5413 its equality to -1 not by it being negative.
5414 * remote-utils.c (remote_open): Likewise.
5415
5416 2010-05-23 Pedro Alves <pedro@codesourcery.com>
5417
5418 * config.h: Regenerate.
5419
5420 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5421
5422 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
5423 doesn't provide PTRACE_GET_THREAD_AREA.
5424
5425 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5426
5427 * linux-m68k-low.c: Include <asm/ptrace.h>
5428 (ps_get_thread_area): Implement.
5429
5430 2010-05-03 Doug Evans <dje@google.com>
5431
5432 * event-loop.c (struct callback_event): New struct.
5433 (callback_list): New global.
5434 (append_callback_event, delete_callback_event): New functions.
5435 (process_callback): New function.
5436 (start_event_loop): Call it.
5437 * remote-utils.c (NOT_SCHEDULED): Define.
5438 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
5439 moved out of readchar.
5440 (readchar): Rewrite. Call reschedule before returning.
5441 (reset_readchar): New function.
5442 (remote_close): Call it.
5443 (process_remaining, reschedule): New functions.
5444 * server.h (callback_handler_func): New typedef.
5445 (append_callback_event, delete_callback_event): Declare.
5446
5447 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5448
5449 * proc-service.c (ps_pglobal_lookup): Use
5450 thread_db_look_up_one_symbol.
5451 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
5452 parameter. Use it instead of all_symbols_looked_up.
5453 * server.h (struct process_info) <all_symbols_looked_up>: Delete
5454 field.
5455 (all_symbols_looked_up): Don't declare.
5456 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
5457 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
5458 field.
5459 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
5460 Set all_symbols_looked_up here.
5461 (thread_db_look_up_one_symbol): New.
5462 (thread_db_get_tls_address): Adjust.
5463 (thread_db_load_search, try_thread_db_load_1): Always allocate the
5464 thread_db object on the heap, and tentatively set it in the
5465 process structure.
5466 (thread_db_init): Don't set all_symbols_looked_up here.
5467 * linux-low.h (thread_db_look_up_one_symbol): Declare.
5468
5469 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5470
5471 * linux-low.c (linux_kill, linux_detach): Adjust.
5472 (status_pending_p_callback): Remove redundant statement. Check
5473 for !TARGET_WAITIKIND_IGNORE, instead of
5474 TARGET_WAITKIND_STOPPED.
5475 (handle_tracepoints): Make sure LWP is locked. Adjust.
5476 (linux_wait_for_event_1): Adjust.
5477 (linux_cancel_breakpoints): New.
5478 (unsuspend_one_lwp): New.
5479 (unsuspend_all_lwps): New.
5480 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
5481 (send_sigstop_callback): Change return type to int, add new
5482 `except' parameter and handle it.
5483 (suspend_and_send_sigstop_callback): New.
5484 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
5485 pass them down. If SUSPEND, also increment the lwp's suspend
5486 count.
5487 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
5488 (need_step_over_p): Don't consider suspended LWPs.
5489 (start_step_over): Adjust.
5490 (proceed_one_lwp): Change return type to int, add new `except'
5491 parameter and handle it.
5492 (unsuspend_and_proceed_one_lwp): New.
5493 (proceed_all_lwps): Use find_inferior instead of
5494 for_each_inferior.
5495 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
5496 also decrement the suspend count of LWPs. Pass `except' down,
5497 instead of hacking its suspend count.
5498 (linux_pause_all): Add `freeze' parameter. Adjust.
5499 (linux_unpause_all): New.
5500 (linux_target_ops): Install linux_unpause_all.
5501 * server.c (handle_status): Adjust.
5502 * target.h (struct target_ops): New fields `unpause_all' and
5503 `cancel_breakpoints'. Add new parameter to `pause_all'.
5504 (pause_all): Add new `freeze' parameter.
5505 (unpause_all): New.
5506 (cancel_breakpoints): New.
5507 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
5508 cancel breakpoints.
5509 (cmd_qtstart): Pause threads.
5510 (stop_tracing): Pause threads, and cancel breakpoints.
5511 * win32-low.c (win32_target_ops): Adjust.
5512
5513 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5514
5515 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
5516 the inferior right away from here...
5517 (linux_wait_1): ... to here, and adjust to check the thread's
5518 last_resume_kind instead of the lwp's step or stop_expected flags.
5519
5520 2010-05-02 Pedro Alves <pedro@codesourcery.com>
5521
5522 * README: Use consistent `GDB' and `GDBserver' spellings.
5523
5524 2010-05-02 Pedro Alves <pedro@codesourcery.com>
5525
5526 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
5527 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
5528 (linux_detach_one_lwp): Assume the lwp is stopped.
5529 (any_thread_of): Delete.
5530 (linux_detach): Stop all lwps here. Don't blindly delete all
5531 breakpoints.
5532 (delete_lwp_callback): New.
5533 (linux_mourn): Delete all lwps of the process that is gone.
5534 (linux_wait_1): Don't delete the last lwp of the process here.
5535 * mem-break.h (mark_breakpoints_out): Declare.
5536 * mem-break.c (mark_breakpoints_out): New.
5537 (free_all_breakpoints): Use it.
5538 * server.c (handle_target_event): If the process is gone, mark
5539 breakpoints out.
5540 * thread-db.c (struct thread_db) <create_bp>: New field.
5541 (thread_db_enable_reporting): Fix prototype. Store a thread event
5542 breakpoint reference in the thread_db struct.
5543 (thread_db_load_search): Clear the thread_db object.
5544 (try_thread_db_load_1): Ditto.
5545 (switch_to_process): New.
5546 (disable_thread_event_reporting): Use it.
5547 (remove_thread_event_breakpoints): New.
5548 (thread_db_detach, thread_db_mourn): Use it.
5549
5550 2010-05-01 Pedro Alves <pedro@codesourcery.com>
5551
5552 * linux-low.c (linux_enable_event_reporting): New.
5553 (linux_wait_for_event_1, handle_extended_wait): Use it.
5554
5555 2010-04-30 Pedro Alves <pedro@codesourcery.com>
5556
5557 * linux-low.c (linux_kill_one_lwp, linux_kill)
5558 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
5559 (send_sigstop): Take an lwp_info as parameter instead. Queue a
5560 SIGSTOP even if the LWP is stopped.
5561 (send_sigstop_callback): New.
5562 (stop_all_lwps): Use send_sigstop_callback instead.
5563 (linux_resume_one_thread): Adjust.
5564 (proceed_one_lwp): Still proceed an LWP that the client has
5565 requested to stop, if we haven't reported it as stopped yet. Make
5566 sure that LWPs the client want stopped, have a pending SIGSTOP.
5567
5568 2010-04-26 Doug Evans <dje@google.com>
5569
5570 * server.c (handle_general_set): Make static.
5571
5572 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
5573 Print received char after testing for error/eof instead of before.
5574 (input_interrupt): Tweak comment.
5575
5576 2010-04-23 Doug Evans <dje@google.com>
5577
5578 * server.c (start_inferior): Print inferior argv if --debug.
5579
5580 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
5581
5582 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
5583 * nto-x86-low.c: Include server.h
5584
5585 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
5586
5587 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
5588 be consistent with other sources of this directory.
5589 (init_registers_amd64): Correct name of source file of this function
5590 in the comment.
5591
5592 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5593
5594 * configure.srv (x86_64-*-mingw*): New configuration for Windows
5595 64-bit executables.
5596
5597 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5598
5599 * win32-i386-low.c: Add 64-bit support.
5600 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
5601 (init_registers_amd64): Declare.
5602 (mappings): Add 64-bit version of array.
5603 (init_windows_x86): New function.
5604 (the_low_target): Change init_arch field to init_windows_x86.
5605
5606 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5607
5608 * win32-low.c: Adapt to support also 64-bit architecture.
5609 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
5610 (get_image_name): Use SIZE_T type for local variable `done'.
5611 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
5612 (toolhelp_get_dll_name): Idem.
5613 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
5614 Use uintptr_t typecast to avoid warning.
5615 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
5616 (handle_exception): Use phex_nz to avoid warning.
5617 (win32_wait): Remove unused local variable `process'.
5618
5619 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5620
5621 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
5622 `amd64-avx.o'.
5623
5624 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
5625
5626 * configure.ac: Use `ws2_32' library for srv_mingw.
5627 * configure: Regenerate.
5628 * gdbreplay.c: Include winsock2.h instead of winsock.h.
5629 * remote-utils.c: Likewise.
5630
5631 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
5632
5633 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
5634 if __x86_64__ is defined.
5635
5636 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
5637
5638 * configure: Regenerate.
5639
5640 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
5641
5642 * server.c (handle_query): Handle 'qGetTIBAddr' query.
5643 * target.h (target_ops): New get_tib_address field.
5644 * win32-low.h (win32_thread_info): Add thread_local_base field.
5645 * win32-low.c (child_add_thread): Add tlb argument.
5646 Set thread_local_base field to TLB.
5647 (get_child_debug_event): Adapt to child_add_thread change.
5648 (win32_get_tib_address): New function.
5649 (win32_target_ops): Set get_tib_address field to
5650 win32_get_tib_address.
5651 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
5652
5653 2010-04-12 Pedro Alves <pedro@codesourcery.com>
5654
5655 * linux-low.c (linux_mourn): Also remove the process.
5656 * server.c (handle_target_event): Don't remove the process here.
5657 * nto-low.c (nto_mourn): New.
5658 (nto_target_ops): Install it.
5659 * spu-low.c (spu_mourn): New.
5660 (spu_target_ops): Install it.
5661 * win32-low.c (win32_mourn): New.
5662 (win32_target_ops): Install it.
5663
5664 2010-04-12 Pedro Alves <pedro@codesourcery.com>
5665
5666 * server.h (buffer_xml_printf): Remove redundant `;'.
5667
5668 2010-04-12 Pedro Alves <pedro@codesourcery.com>
5669
5670 * regcache.c (set_register_cache): Invalidate regcaches before
5671 changing the register cache layout.
5672 (regcache_invalidate_one): Allow a NULL regcache.
5673 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
5674 regcaches before changing the register cache layout or the target
5675 regsets.
5676
5677 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
5678
5679 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
5680 variable warning on Linux/x86-64.
5681
5682 2010-04-11 Pedro Alves <pedro@codesourcery.com>
5683
5684 GDBserver disconnected tracing support.
5685
5686 * linux-low.c (linux_remove_process): Delete.
5687 (add_lwp): Don't set last_resume_kind here.
5688 (linux_kill): Use `mourn'.
5689 (linux_detach): Use `thread_db_detach', and `mourn'.
5690 (linux_mourn): New.
5691 (linux_attach_lwp_1): Adjust comment.
5692 (linux_attach): last_resume_kind moved the thread_info; adjust.
5693 (status_pending_p_callback): Adjust.
5694 (linux_wait_for_event_1): Adjust.
5695 (count_events_callback, select_singlestep_lwp_callback)
5696 (select_event_lwp_callback, cancel_breakpoints_callback)
5697 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
5698 (proceed_one_lwp): Adjust.
5699 (linux_async): Add debug output.
5700 (linux_thread_stopped): New.
5701 (linux_pause_all): New.
5702 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
5703 linux_pause_all.
5704 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
5705 (thread_db_free): Delete declaration.
5706 (thread_db_detach, thread_db_mourn): Declare.
5707 * thread-db.c (thread_db_init): Use thread_db_mourn.
5708 (thread_db_free): Delete, split in two.
5709 (disable_thread_event_reporting): New.
5710 (thread_db_detach): New.
5711 (thread_db_mourn): New.
5712
5713 * server.h (struct thread_info) <last_resume_kind>: New field.
5714 <attached>: Add comment.
5715 <gdb_detached>: New field.
5716 (handler_func): Change return type to int.
5717 (handle_serial_event, handle_target_event): Ditto.
5718 (gdb_connected): Declare.
5719 (tracing): Delete.
5720 (disconnected_tracing): Declare.
5721 (stop_tracing): Declare.
5722
5723 * server.c (handle_query) <qSupported>: Report support for
5724 disconnected tracing.
5725 (queue_stop_reply_callback): Account for running threads.
5726 (gdb_wants_thread_stopped): New.
5727 (gdb_wants_all_threads_stopped): New.
5728 (gdb_reattached_process): New.
5729 (handle_status): Clear the `gdb_detached' flag of all processes.
5730 In all-stop, stop all threads.
5731 (main): Be sure to leave tfind mode. Handle disconnected tracing.
5732 (process_serial_event): If the remote connection breaks, or if an
5733 exit was forced with "monitor exit", force an event loop exit.
5734 Handle disconnected tracing on detach.
5735 (handle_serial_event): Adjust.
5736 (handle_target_event): If GDB isn't connected, forward events back
5737 to the inferior, unless the last process exited, in which case,
5738 exit gdbserver. Adjust interface.
5739
5740 * remote-utils.c (remote_open): Don't block in accept. Instead
5741 register an event loop source on the listen socket file
5742 descriptor. Refactor bits into ...
5743 (listen_desc): ... this new global.
5744 (gdb_connected): ... this new function.
5745 (enable_async_notification): ... this new function.
5746 (handle_accept_event): ... this new function.
5747 (remote_close): Clear remote_desc.
5748
5749 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
5750
5751 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
5752 New fields.
5753 (mourn_inferior): Define.
5754 (target_process_qsupported): Avoid the dangling else problem.
5755 (thread_stopped): Define.
5756 (pause_all): Define.
5757 (target_waitstatus_to_string): Declare.
5758 * target.c (target_waitstatus_to_string): New.
5759
5760 * tracepoint.c (tracing): Make extern.
5761 (disconnected_tracing): New.
5762 (stop_tracing): Make extern. Handle tracing stops due to GDB
5763 disconnecting.
5764 (cmd_qtdisconnected): New.
5765 (cmd_qtstatus): Report disconnected tracing status in trace reply.
5766 (handle_tracepoint_general_set): Handle QTDisconnected.
5767
5768 * event-loop.c (event_handler_func): Change return type to int.
5769 (process_event): Bail out if the event handler wants the event
5770 loop to stop.
5771 (handle_file_event): Ditto.
5772 (start_event_loop): Bail out if the event handler wants the event
5773 loop to stop.
5774
5775 * nto-low.c (nto_target_ops): Adjust.
5776 * spu-low.c (spu_wait): Don't remove the process here.
5777 (spu_target_ops): Adjust.
5778 * win32-low.c (win32_wait): Don't remove the process here.
5779 (win32_target_ops): Adjust.
5780
5781 2010-04-11 Pedro Alves <pedro@codesourcery.com>
5782
5783 * regcache.c (realloc_register_cache): Invalidate inferior's
5784 regcache before recreating it.
5785
5786 2010-04-09 Pedro Alves <pedro@codesourcery.com>
5787
5788 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
5789
5790 2010-04-09 Stan Shebs <stan@codesourcery.com>
5791 Pedro Alves <pedro@codesourcery.com>
5792
5793 * server.h (LONGEST): New.
5794 (struct thread_info) <while_stepping>: New field.
5795 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
5796 Declare.
5797 (initialize_tracepoint, handle_tracepoint_general_set)
5798 (handle_tracepoint_query, tracepoint_finished_step)
5799 (tracepoint_was_hit, release_while_stepping_state_list):
5800 (current_traceframe): Declare.
5801 * server.c (handle_general_set): Handle tracepoint packets.
5802 (read_memory): New.
5803 (write_memory): New.
5804 (handle_search_memory_1): Use read_memory.
5805 (handle_query): Report support for conditional tracepoints, trace
5806 state variables, and tracepoint sources. Handle tracepoint
5807 queries.
5808 (main): Initialize the tracepoints module.
5809 (process_serial_event): Handle traceframe reads/writes.
5810
5811 * linux-low.c (handle_tracepoints): New.
5812 (linux_wait_1): Call it.
5813 (linux_resume_one_lwp): Handle while-stepping.
5814 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
5815 (linux_target_ops): Install them.
5816 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
5817 New field.
5818 * linux-x86-low.c (x86_supports_tracepoints): New.
5819 (the_low_target). Install it.
5820
5821 * mem-break.h (delete_breakpoint): Declare.
5822 * mem-break.c (delete_breakpoint): Make external.
5823
5824 * target.h (struct target_ops): Add `supports_tracepoints',
5825 `read_pc', and `write_pc' fields.
5826 (target_supports_tracepoints): Define.
5827 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
5828 (phex_nz): New.
5829
5830 * regcache.h (struct regcache) <registers_owned>: New field.
5831 (init_register_cache, regcache_cpy): Declare.
5832 (regcache_read_pc, regcache_write_pc): Declare.
5833 (register_cache_size): Declare.
5834 (supply_regblock): Declare.
5835 * regcache.c (init_register_cache): New.
5836 (new_register_cache): Use it.
5837 (regcache_cpy): New.
5838 (register_cache_size): New.
5839 (supply_regblock): New.
5840 (regcache_read_pc, regcache_write_pc): New.
5841
5842 * tracepoint.c: New.
5843
5844 * Makefile.in (OBS): Add tracepoint.o.
5845 (tracepoint.o): New rule.
5846
5847 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
5848
5849 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
5850 (i386-mmx.o): New.
5851 (i386-mmx.c): Likewise.
5852 (i386-mmx-linux.o): Likewise.
5853 (i386-mmx-linux.c): Likewise.
5854
5855 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
5856 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
5857 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
5858 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
5859
5860 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
5861 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
5862 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
5863
5864 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
5865
5866 * Makefile.in (clean): Updated.
5867 (i386-avx.o): New.
5868 (i386-avx.c): Likewise.
5869 (i386-avx-linux.o): Likewise.
5870 (i386-avx-linux.c): Likewise.
5871 (amd64-avx.o): Likewise.
5872 (amd64-avx.c): Likewise.
5873 (amd64-avx-linux.o): Likewise.
5874 (amd64-avx-linux.c): Likewise.
5875
5876 * configure.srv (srv_i386_regobj): Add i386-avx.o.
5877 (srv_i386_linux_regobj): Add i386-avx-linux.o.
5878 (srv_amd64_regobj): Add amd64-avx.o.
5879 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
5880 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
5881 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
5882 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
5883 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
5884 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
5885 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
5886
5887 * i387-fp.c: Include "i386-xstate.h".
5888 (i387_xsave): New.
5889 (i387_cache_to_xsave): Likewise.
5890 (i387_xsave_to_cache): Likewise.
5891 (x86_xcr0): Likewise.
5892
5893 * i387-fp.h (i387_cache_to_xsave): Likewise.
5894 (i387_xsave_to_cache): Likewise.
5895 (x86_xcr0): Likewise.
5896
5897 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
5898 * linux-crisv32-low.c (target_regsets): Likewise.
5899 * linux-m68k-low.c (target_regsets): Likewise.
5900 * linux-mips-low.c (target_regsets): Likewise.
5901 * linux-ppc-low.c (target_regsets): Likewise.
5902 * linux-s390-low.c (target_regsets): Likewise.
5903 * linux-sh-low.c (target_regsets): Likewise.
5904 * linux-sparc-low.c (target_regsets): Likewise.
5905 * linux-xtensa-low.c (target_regsets): Likewise.
5906
5907 * linux-low.c: Include <sys/uio.h>.
5908 (regsets_fetch_inferior_registers): Support nt_type.
5909 (regsets_store_inferior_registers): Likewise.
5910 (linux_process_qsupported): New.
5911 (linux_target_ops): Add linux_process_qsupported.
5912
5913 * linux-low.h (regset_info): Add nt_type.
5914 (linux_target_ops): Add process_qsupported.
5915
5916 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
5917 and <sys/uio.h>.
5918 (init_registers_i386_avx_linux): New.
5919 (init_registers_amd64_avx_linux): Likewise.
5920 (xmltarget_i386_linux_no_xml): Likewise.
5921 (xmltarget_amd64_linux_no_xml): Likewise.
5922 (PTRACE_GETREGSET): Likewise.
5923 (PTRACE_SETREGSET): Likewise.
5924 (x86_fill_xstateregset): Likewise.
5925 (x86_store_xstateregset): Likewise.
5926 (use_xml): Likewise.
5927 (x86_linux_update_xmltarget): Likewise.
5928 (x86_linux_process_qsupported): Likewise.
5929 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
5930 (x86_arch_setup): Don't call init_registers_amd64_linux nor
5931 init_registers_i386_linux here. Call
5932 x86_linux_update_xmltarget.
5933 (the_low_target): Add x86_linux_process_qsupported.
5934
5935 * server.c (handle_query): Call target_process_qsupported.
5936
5937 * target.h (target_ops): Add process_qsupported.
5938 (target_process_qsupported): New.
5939
5940 2010-04-03 Pedro Alves <pedro@codesourcery.com>
5941
5942 * inferiors.c (add_thread): Set last_status kind to
5943 TARGET_WAITKIND_IGNORE.
5944 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
5945 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
5946 (linux_wait_1): Move `thread' local definition to block that uses
5947 it. Don't NULL initialize `event_child'.
5948 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
5949 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
5950 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
5951
5952 2010-04-01 Pedro Alves <pedro@codesourcery.com>
5953
5954 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
5955 an extended waitstatus, or by a watchpoint.
5956 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
5957 thread was stepping or has been stopped by a watchpoint.
5958
5959 2010-04-01 Pedro Alves <pedro@codesourcery.com>
5960
5961 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
5962 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
5963 of another, then delete the previous, and validate all
5964 breakpoints.
5965 (validate_inserted_breakpoint): New.
5966 (delete_disabled_breakpoints): New.
5967 (validate_breakpoints): New.
5968 (check_mem_read): Validate breakpoints before trusting their
5969 shadow. Delete disabled breakpoints.
5970 (check_mem_write): Validate breakpoints before trusting they
5971 should be inserted. Delete disabled breakpoints.
5972 * mem-break.h (validate_breakpoints):
5973 * server.c (handle_query): Validate breakpoints when we see a
5974 qSymbol query.
5975
5976 2010-04-01 Pedro Alves <pedro@codesourcery.com>
5977
5978 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
5979 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
5980 if we could tell there's a GDB breakpoint at stop_pc.
5981 (need_step_over_p): Don't do a step over if we find a GDB
5982 breakpoint at the resume PC.
5983
5984 * mem-break.c (struct raw_breakpoint): New.
5985 (enum bkpt_type): New type `gdb_breakpoint'.
5986 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
5987 fields. New field `raw'.
5988 (find_raw_breakpoint_at): New.
5989 (set_raw_breakpoint_at): Handle refcounting. Create a raw
5990 breakpoint instead.
5991 (set_breakpoint_at): Adjust.
5992 (delete_raw_breakpoint): New.
5993 (release_breakpoint): New.
5994 (delete_breakpoint): Rename to...
5995 (delete_breakpoint_1): ... this. Add proc parameter. Use
5996 release_breakpoint. Return ENOENT.
5997 (delete_breakpoint): Reimplement.
5998 (find_breakpoint_at): Delete.
5999 (find_gdb_breakpoint_at): New.
6000 (delete_breakpoint_at): Delete.
6001 (set_gdb_breakpoint_at): New.
6002 (delete_gdb_breakpoint_at): New.
6003 (gdb_breakpoint_here): New.
6004 (set_reinsert_breakpoint): Use release_breakpoint.
6005 (uninsert_breakpoint): Rename to ...
6006 (uninsert_raw_breakpoint): ... this.
6007 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6008 (reinsert_raw_breakpoint): Change parameter type to
6009 raw_breakpoint.
6010 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6011 instead.
6012 (check_breakpoints): Adjust. Use release_breakpoint.
6013 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6014 (breakpoint_inserted_here): Ditto.
6015 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6016 Don't trust the breakpoint's shadow if it is not inserted.
6017 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6018 (delete_all_breakpoints): Adjust.
6019 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6020 use delete_breakpoint_1.
6021
6022 * mem-break.h (breakpoints_supported): Delete declaration.
6023 (set_gdb_breakpoint_at): Declare.
6024 (gdb_breakpoint_here): Declare.
6025 (delete_breakpoint_at): Delete.
6026 (delete_gdb_breakpoint_at): Declare.
6027
6028 * server.h (struct raw_breakpoint): Forward declare.
6029 (struct process_info): New field `raw_breakpoints'.
6030
6031 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6032 breakpoints.
6033
6034 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6035
6036 * linux-low.c (status_pending_p_callback): Fix comment.
6037 (linux_wait_for_event_1): Move most of the internal breakpoint
6038 handling from here...
6039 (linux_wait_1): ... to here.
6040 (count_events_callback): New.
6041 (select_singlestep_lwp_callback): New.
6042 (select_event_lwp_callback): New.
6043 (cancel_breakpoints_callback): New.
6044 (select_event_lwp): New.
6045 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6046 priority to all LWPs that have had events that should be reported
6047 to the client. Cancel breakpoints when about to reporting the
6048 event to the client, not while stopping lwps. No longer cancel
6049 finished single-steps here.
6050 (cancel_finished_single_step): Delete.
6051 (cancel_finished_single_steps): Delete.
6052
6053 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6054
6055 * mem-break.c (enum bkpt_type): New.
6056 (struct breakpoint): New field `type'.
6057 (set_breakpoint_at): Change return type to struct breakpoint
6058 pointer. Set type to `other_breakpoint' by default.
6059 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6060 in the breakpoint list.
6061 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6062 (reinsert_breakpoint): Rename to ...
6063 (reinsert_raw_breakpoint): ... this.
6064 (reinsert_breakpoints_at): Adjust.
6065 * mem-break.h (struct breakpoint): Declare.
6066 (set_breakpoint_at): Change return type to struct breakpoint
6067 pointer.
6068
6069 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6070
6071 * server.c (handle_query): Assign, not compare.
6072
6073 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6074
6075 Teach linux gdbserver to step-over-breakpoints.
6076
6077 * linux-low.c (can_hardware_single_step): New.
6078 (supports_breakpoints): New.
6079 (handle_extended_wait): If stopping threads, read the stop pc of
6080 the new cloned LWP.
6081 (get_pc): New.
6082 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6083 low target doesn't support retrieving the PC.
6084 (add_lwp): Set last_resume_kind to resume_continue.
6085 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6086 (linux_attach): Don't clear stop_expected. Set the lwp's
6087 last_resume_kind to resume_stop.
6088 (linux_detach_one_lwp): Don't check for removed breakpoints.
6089 (check_removed_breakpoint): Delete.
6090 (status_pending_p): Rename to ...
6091 (status_pending_p_callback): ... this. Don't check for removed
6092 breakpoints. Don't consider threads that are stopped from GDB's
6093 perspective.
6094 (linux_wait_for_lwp): Always read the stop_pc here.
6095 (cancel_breakpoint): New.
6096 (step_over_bkpt): New global.
6097 (linux_wait_for_event_1): Implement stepping over breakpoints.
6098 (gdb_wants_lwp_stopped): New.
6099 (gdb_wants_all_stopped): New.
6100 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6101 single-step traps here. Store the thread's last reported target
6102 wait status.
6103 (send_sigstop): Don't clear stop_expected. Always set it,
6104 instead.
6105 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6106 (cancel_finished_single_step): New.
6107 (cancel_finished_single_steps): New.
6108 (wait_for_sigstop): Don't cancel finished single-step traps here.
6109 (linux_resume_one_lwp): Don't check for removed breakpoints.
6110 Don't set `step' on non-hardware step archs.
6111 (linux_set_resume_request): Ignore resume_stop requests if already
6112 stopping or stopped. Set the lwp's last_resume_kind.
6113 (resume_status_pending_p): Don't check for removed breakpoints.
6114 (need_step_over_p): New.
6115 (start_step_over): New.
6116 (finish_step_over): New.
6117 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6118 requests. Clear the thread's last reported target waitstatus.
6119 Don't use the `suspended' flag. Don't consider pending breakpoints.
6120 (linux_resume): Start a step-over if necessary.
6121 (proceed_one_lwp): New.
6122 (proceed_all_lwps): New.
6123 (unstop_all_lwps): New.
6124 * linux-low.h (struct lwp_info): Rewrite comment for the
6125 `suspended' flag. Add the `stop_pc' field. Delete the
6126 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6127 Add `'last_resume_kind' and `need_step_over' fields.
6128 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6129 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6130 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6131 (set_raw_breakpoint_at): New.
6132 (set_breakpoint_at): Rewrite to use it.
6133 (reinsert_breakpoint_handler): Delete.
6134 (set_reinsert_breakpoint): New.
6135 (reinsert_breakpoint_by_bp): Delete.
6136 (delete_reinsert_breakpoints): New.
6137 (uninsert_breakpoint): Rewrite.
6138 (uninsert_breakpoints_at): New.
6139 (reinsert_breakpoint): Rewrite.
6140 (reinsert_breakpoints_at): New.
6141 (check_breakpoints): Rewrite.
6142 (breakpoint_here): New.
6143 (breakpoint_inserted_here): New.
6144 (check_mem_read): Adjust.
6145 * mem-break.h (breakpoints_supported, breakpoint_here)
6146 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6147 (reinsert_breakpoint_by_bp): Delete declaration.
6148 (delete_reinsert_breakpoints): Declare.
6149 (reinsert_breakpoint): Delete declaration.
6150 (reinsert_breakpoints_at): Declare.
6151 (uninsert_breakpoint): Delete declaration.
6152 (uninsert_breakpoints_at): Declare.
6153 (check_breakpoints): Adjust prototype.
6154 * server.h: Adjust include order.
6155 (struct thread_info): Declare here. Add a `last_status' field.
6156
6157 2010-03-23 Michael Snyder <msnyder@vmware.com>
6158
6159 * server.c (crc32): New function.
6160 (handle_query): Add handling for 'qCRC:' request.
6161
6162 2010-03-23 Pedro Alves <pedro@codesourcery.com>
6163
6164 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6165 lwp had been stopped by a watchpoint.
6166
6167 2010-03-16 Pedro Alves <pedro@codesourcery.com>
6168
6169 * server.h (internal_error): Declare.
6170 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6171 * utils.c (internal_error): New function.
6172
6173 2010-03-15 Andreas Schwab <schwab@redhat.com>
6174
6175 * configure.srv: Fix typo setting srv_regobj.
6176
6177 2010-03-15 Pedro Alves <pedro@codesourcery.com>
6178
6179 * linux-low.c (fetch_register): Avoid passing a non string literal
6180 format to `error'.
6181 (usr_store_inferior_registers): Ditto.
6182
6183 2010-03-14 Pedro Alves <pedro@codesourcery.com>
6184
6185 * linux-low.c (linux_write_memory): Bail out early if peeking
6186 memory failed.
6187
6188 2010-03-14 Pedro Alves <pedro@codesourcery.com>
6189
6190 * linux-low.h (struct lwp_info): New fields
6191 `stopped_by_watchpoint' and `stopped_data_address'.
6192 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6193 here, and cache them in the lwp object.
6194 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6195 directly.
6196 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6197 field.
6198 (linux_stopped_by_watchpoint): Rewrite.
6199 (linux_stopped_data_address): Rewrite.
6200
6201 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
6202
6203 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6204 switching the current inferior, not before.
6205
6206 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6207
6208 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6209 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6210 i386-linux.c and amd64-linux.c.
6211 (reg-i386.o): Removed.
6212 (reg-i386.c): Likewise.
6213 (reg-i386-linux.o): Likewise.
6214 (reg-i386-linux.c): Likewise.
6215 (reg-x86-64.o): Likewise.
6216 (reg-x86-64.c): Likewise.
6217 (reg-x86-64-linux.o): Likewise.
6218 (reg-x86-64-linux.c): Likewise.
6219 (i386.o): New.
6220 (i386.c): Likewise.
6221 (i386-linux.o): Likewise.
6222 (i386-linux.c): Likewise.
6223 (amd64.o): Likewise.
6224 (amd64.c): Likewise.
6225 (amd64-linux.o): Likewise.
6226 (amd64-linux.c): Likewise.
6227
6228 * configure.srv (srv_i386_regobj): New.
6229 (srv_i386_linux_regobj): Likewise.
6230 (srv_amd64_regobj): Likewise.
6231 (srv_amd64_linux_regobj): Likewise.
6232 (srv_i386_32bit_xmlfiles): Likewise.
6233 (srv_i386_64bit_xmlfiles): Likewise.
6234 (srv_i386_xmlfiles): Likewise.
6235 (srv_amd64_xmlfiles): Likewise.
6236 (srv_i386_linux_xmlfiles): Likewise.
6237 (srv_amd64_linux_xmlfiles): Likewise.
6238 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
6239 srv_xmlfiles to $srv_i386_xmlfiles.
6240 (i[34567]86-*-mingw32ce*): Likewise.
6241 (i[34567]86-*-mingw*): Likewise.
6242 (i[34567]86-*-nto*): Likewise.
6243 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6244 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
6245 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6246 (x86_64-*-linux*): Likewise.
6247
6248 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6249 (init_registers_amd64_linux): New.
6250 (x86_arch_setup): Replace init_registers_x86_64_linux with
6251 init_registers_amd64_linux.
6252
6253 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
6254
6255 * configure.ac: Check for libdl. If it is not available link against
6256 static libthread_db.
6257 * configure: Regenerate.
6258
6259 2010-02-22 Pedro Alves <pedro@codesourcery.com>
6260
6261 PR9605
6262
6263 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
6264 handing a read watchpoint.
6265 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
6266
6267 2010-02-12 Doug Evans <dje@google.com>
6268
6269 * linux-low.c (linux_supports_tracefork_flag): Document.
6270 (linux_look_up_symbols): Add comment.
6271
6272 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
6273
6274 * regcache.c (supply_register): Clear regcache if buf is NULL.
6275
6276 2010-02-02 Nicolas Roche <roche@sourceware.org>
6277 Joel Brobecker <brobecker@adacore.com>
6278
6279 * inferiors.c (find_inferior): Add function documentation.
6280 (unloaded_dll): Handle the case where the unloaded dll has not
6281 been previously registered in the dll list.
6282
6283 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6284
6285 * linux-arm-low.c (thumb_breakpoint_len): Delete.
6286 (thumb2_breakpoint): New.
6287 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
6288
6289 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6290
6291 * linux-low.c (get_stop_pc): Check for SIGTRAP.
6292 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
6293 breakpoints.
6294
6295 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6296
6297 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
6298
6299 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6300
6301 * linux-s390-low.c (s390_collect_ptrace_register)
6302 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
6303
6304 2010-01-21 Doug Evans <dje@google.com>
6305
6306 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
6307 (PTRACE_ARG4_TYPE): New macro.
6308 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
6309 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
6310 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
6311 (usr_store_inferior_registers): Ditto.
6312 (linux_read_memory, linux_write_memory): Ditto.
6313 (linux_test_for_tracefork): Ditto.
6314
6315 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
6316 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
6317
6318 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6319
6320 * proc-service.c (ps_lgetregs): Don't refetch registers from the
6321 target.
6322
6323 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6324
6325 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
6326 prototype to take a regcache. Adjust.
6327
6328 2010-01-20 Pedro Alves <pedro@codesourcery.com>
6329
6330 * regcache.h (struct thread_info): Forward declare.
6331 (struct regcache): New.
6332 (new_register_cache): Adjust prototype.
6333 (get_thread_regcache): Declare.
6334 (free_register_cache): Adjust prototype.
6335 (registers_to_string, registers_from_string): Ditto.
6336 (supply_register, supply_register_by_name, collect_register)
6337 (collect_register_as_string, collect_register_by_name): Ditto.
6338 * regcache.c (struct inferior_regcache_data): Delete.
6339 (get_regcache): Rename to ...
6340 (get_thread_regcache): ... this. Adjust. Switch inferior before
6341 fetching registers.
6342 (regcache_invalidate_one): Adjust.
6343 (regcache_invalidate): Fix prototype.
6344 (new_register_cache): Return the new register cache.
6345 (free_register_cache): Change prototype.
6346 (realloc_register_cache): Adjust.
6347 (registers_to_string): Change prototype to take a regcache. Adjust.
6348 (registers_from_string): Ditto.
6349 (register_data): Ditto.
6350 (supply_register): Ditto.
6351 (supply_register_by_name): Ditto.
6352 (collect_register): Ditto.
6353 (collect_register_as_string): Ditto.
6354 (collect_register_by_name): Ditto.
6355 * server.c (process_serial_event): Adjust.
6356 * linux-low.h (regset_fill_func, regset_store_func): Change
6357 prototype.
6358 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
6359 Change prototype.
6360 * linux-low.c (get_stop_pc): Adjust.
6361 (check_removed_breakpoint): Adjust.
6362 (linux_wait_for_event): Adjust.
6363 (linux_resume_one_lwp): Adjust.
6364 (fetch_register): Add regcache parameter. Adjust.
6365 (usr_store_inferior_registers): Ditto.
6366 (regsets_fetch_inferior_registers): Ditto.
6367 (regsets_store_inferior_registers): Ditto.
6368 (linux_fetch_registers, linux_store_registers): Ditto.
6369 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
6370 regcache. Adjust.
6371 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
6372 Ditto.
6373 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
6374 prototype to take a regcache.
6375 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
6376 * remote-utils.c (convert_ascii_to_int, outreg)
6377 (prepare_resume_reply): Change prototype to take a regcache.
6378 Adjust.
6379 * target.h (struct target_ops) <fetch_registers, store_registers>:
6380 Change prototype to take a regcache.
6381 (fetch_inferior_registers, store_inferior_registers): Change
6382 prototype to take a regcache. Adjust.
6383 * proc-service.c (ps_lgetregs): Adjust.
6384 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
6385 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
6386 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
6387 take a regcache. Adjust.
6388 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
6389 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
6390 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
6391 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
6392 * linux-cris-low.c (cris_get_pc, cris_set_pc)
6393 (cris_cannot_fetch_register):
6394 (cris_breakpoint_at): Change prototype to take a regcache.
6395 Adjust.
6396 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
6397 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
6398 to take a regcache. Adjust.
6399 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
6400 Adjust.
6401 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
6402 take a regcache. Adjust.
6403 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
6404 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
6405 (m68k_set_pc): Change prototype to take a regcache. Adjust.
6406 * linux-mips-low.c (mips_get_pc):
6407 (mips_set_pc): Change prototype to take a regcache. Adjust.
6408 (mips_reinsert_addr): Adjust.
6409 (mips_collect_register): Change prototype to take a regcache.
6410 Adjust.
6411 (mips_supply_register):
6412 (mips_collect_register_32bit, mips_supply_register_32bit)
6413 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6414 (mips_store_fpregset): Ditto.
6415 * linux-ppc-low.c (ppc_supply_ptrace_register)
6416 (ppc_supply_ptrace_register): Ditto.
6417 (parse_spufs_run): Adjust.
6418 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
6419 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
6420 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
6421 take a regcache. Adjust.
6422 * linux-s390-low.c (s390_collect_ptrace_register)
6423 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
6424 (s390_set_pc): Change prototype to take a regcache. Adjust.
6425 (s390_arch_setup): Adjust.
6426 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
6427 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
6428 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6429 (sparc_fill_gregset, sparc_store_gregset_from_stack)
6430 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
6431 regcache. Adjust.
6432 (sparc_breakpoint_at): Adjust.
6433 * linux-xtensa-low.c (xtensa_fill_gregset):
6434 (xtensa_store_gregset):
6435 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
6436 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
6437 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
6438 prototype to take a regcache. Adjust.
6439 * win32-arm-low.c (arm_fetch_inferior_register)
6440 (arm_store_inferior_register): Change prototype to take a
6441 regcache. Adjust.
6442 * win32-i386-low.c (i386_fetch_inferior_register)
6443 (i386_store_inferior_register): Change prototype to take a
6444 regcache. Adjust.
6445 * win32-low.c (child_fetch_inferior_registers)
6446 (child_store_inferior_registers): Change prototype to take a
6447 regcache. Adjust.
6448 (win32_wait): Adjust.
6449 (win32_fetch_inferior_registers): Change prototype to take a
6450 regcache. Adjust.
6451 (win32_store_inferior_registers): Adjust.
6452 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
6453 store_inferior_register>: Change prototype to take a regcache.
6454
6455 2010-01-20 Doug Evans <dje@google.com>
6456
6457 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
6458 #ifdef.
6459 (linux_wait_for_event1, linux_init_signals): Ditto.
6460 (W_STOPCODE): Provide definition if missing.
6461
6462 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
6463
6464 * linux-low.c (linux_core_of_thread): New.
6465 (compare_ints, show_process, list_threads): New.
6466 (linux_qxfer_osdata): Report threads and cores.
6467 (linux_target_op): Register linux_core_of_thread.
6468 * remote-utils.c (prepare_resume_reply): Report the core.
6469 (buffer_xml_printf): Support %d specifier.
6470 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
6471 New.
6472 (handle_query): Handle qXfer:threads. Announce availability
6473 thereof.
6474 * target.h (struct target_ops): New field core_of_thread.
6475
6476 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
6477
6478 * Makefile.in (clean): Remove new generated files.
6479 (reg-s390.o, reg-s390.c): Remove rules.
6480 (reg-s390x.o, reg-s390x.c): Likewise.
6481 (s390-linux32.o, s390-linux32.c): Add rules.
6482 (s390-linux64.o, s390-linux64.c): Likewise.
6483 (s390x-linux64.o, s390x-linux64.c): Likewise.
6484 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
6485 * linux-s390-low.c: Include <elf.h>.
6486 (HWCAP_S390_HIGH_GPRS): Define if undefined.
6487 (init_registers_s390): Remove prototype.
6488 (init_registers_s390x): Likewise.
6489 (init_registers_s390_linux32): Add prototype.
6490 (init_registers_s390_linux64): Likewise.
6491 (init_registers_s390x_linux64): Likewise.
6492 (s390_num_regs_3264): New define.
6493 (s390_regmap_3264): New global variable.
6494 (s390_cannot_fetch_register): Remove obsolete check.
6495 (s390_cannot_store_register): Likewise.
6496 (s390_collect_ptrace_register): Handle upper/lower register halves.
6497 (s390_supply_ptrace_register): Likewise.
6498 (s390_fill_gregset): Update to register number changes.
6499 (s390_get_hwcap): New routine.
6500 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
6501 Install appropriate regmap and register set.
6502
6503 2010-01-01 Joel Brobecker <brobecker@adacore.com>
6504
6505 * server.c (gdbserver_version): Update copyright year to 2010.
6506 * gdbreplay.c (gdbreplay_version): Likewise.
6507
6508 2009-12-28 Doug Evans <dje@google.com>
6509
6510 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
6511 elf/external.h. Include <elf.h> instead but only if necessary.
6512
6513 2009-12-28 Pedro Alves <pedro@codesourcery.com>
6514
6515 * linux-low.c (linux_remove_process): Remove `detaching'
6516 parameter. Don't release/detach from thread_db here.
6517 (linux_kill): Release/detach from thread_db here, ...
6518 (linux_detach): ... and here, before actually detaching.
6519 (linux_wait_1): ... and here, when a process exits.
6520 * thread-db.c (any_thread_of): New.
6521 (thread_db_free): Switch the current inferior to a thread of the
6522 passed in process.
6523
6524 2009-12-21 Doug Evans <dje@google.com>
6525
6526 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
6527
6528 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
6529 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
6530 warning ifndef __NR_tkill. Move setting of errno there too.
6531 Delete unnecessary resetting of errno after syscall.
6532 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
6533
6534 * configure.ac: Check for dladdr.
6535 * config.in: Regenerate.
6536 * configure: Regenerate.
6537 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
6538 (try_thread_db_load): Update.
6539
6540 * linux-low.c (my_waitpid): Delete unnecessary prototype.
6541
6542 2009-12-18 Doug Evans <dje@google.com>
6543
6544 * event-loop.c: Include unistd.h if it exists.
6545
6546 * linux-low.c (my_waitpid): Move definition away from being in
6547 between linux_tracefork_child/linux_test_for_tracefork.
6548
6549 * gdb_proc_service.h (psaddr_t): Fix type.
6550 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
6551 signature to match glibc.
6552
6553 2009-12-16 Doug Evans <dje@google.com>
6554
6555 * linux-low.c (linux_read_memory): Fix argument to read.
6556
6557 2009-11-26 Pedro Alves <pedro@codesourcery.com>
6558
6559 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
6560 events, don't leave current_inferior pointing at null.
6561
6562 2009-11-26 Pedro Alves <pedro@codesourcery.com>
6563
6564 * win32-low.c (LOG): Delete.
6565 (OUTMSG): Output to stderr.
6566 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
6567 on compile time LOG macro.
6568 (win32_wait): Fix debug output.
6569
6570 2009-11-26 Pedro Alves <pedro@codesourcery.com>
6571
6572 * win32-low.c (win32_add_one_solib): If the dll name is
6573 "ntdll.dll", prepend the system directory to the dll path.
6574
6575 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
6576
6577 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
6578
6579 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
6580 Vladimir Prus <vladimir@codesourcery.com>
6581
6582 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
6583 * configure.ac: Check for __mcoldfire__ and set
6584 gdb_cv_m68k_is_coldfire.
6585 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
6586 reg-cf.o and reg-m68k.o.
6587 * configure: Regenerated.
6588
6589 2009-11-16 Pedro Alves <pedro@codesourcery.com>
6590
6591 * linux-low.c (linux_remove_process): Add `detaching' parameter.
6592 Pass it to thread_db_free.
6593 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
6594 proper `detaching' argument to linux_remove_process.
6595 * linux-low.h (thread_db_free): Add `detaching' parameter.
6596 * thread-db.c (thread_db_init): Pass false as `detaching' argument
6597 to thread_db_free.
6598 (thread_db_free): Add `detaching' parameter. Only
6599 call td_ta_clear_event if detaching from process.
6600
6601 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
6602
6603 * thread-db.c (thread_db_free): Fix typo.
6604
6605 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
6606
6607 PR gdb/10838
6608 * thread-db.c (thread_db_free): Call td_ta_clear_event.
6609
6610 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
6611
6612 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
6613 with an i686 compiler.
6614 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
6615 needed.
6616 * configure: Rebuilt.
6617
6618 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
6619
6620 PR gdb/10783
6621
6622 * server.c (handle_search_memory_1): Correct read_addr initialization
6623 in loop for searching subsequent chunks.
6624
6625 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
6626
6627 * configure.ac: New --with-libthread-db option.
6628 * thread-db.c: Allow direct dependence on libthread_db.
6629 (thread_db_free): Adjust.
6630 * config.in: Regenerate.
6631 * configure: Likewise.
6632
6633 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
6634
6635 PR gdb/10757
6636 * thread-db.c (attach_thread): New function.
6637 (maybe_attach_thread): Return success/failure.
6638 (find_new_threads_callback): Adjust.
6639 (thread_db_find_new_threads): Loop until no new threads.
6640
6641 2009-10-13 Pedro Alves <pedro@codesourcery.com>
6642
6643 * proc-service.c (ps_lgetregs): Formatting.
6644
6645 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
6646
6647 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
6648 * configure.ac: Adjust.
6649 * linux-low.h (struct process_info_private): Move members to struct
6650 thread_db.
6651 (thread_db_free, thread_db_handle_monitor_command): New prototype.
6652 * linux-low.c (linux_remove_process): Adjust.
6653 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
6654 * server.c (handle_query): Move code ...
6655 (handle_monitor_command): ... here. New function.
6656 * target.h (struct target_ops): New member.
6657 * thread-db.c (struct thread_db): New.
6658 (libthread_db_search_path): New variable.
6659 (thread_db_create_event, thread_db_enable_reporting)
6660 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
6661 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
6662 (try_thread_db_load_1, dladdr_to_soname): New functions.
6663 (try_thread_db_load, thread_db_load_search): New functions.
6664 (thread_db_init): Search for libthread_db.
6665 (thread_db_free): New function.
6666 (thread_db_handle_monitor_command): Likewise.
6667 * config.in: Regenerate.
6668 * configure: Regenerate.
6669
6670 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6671
6672 * spu-low.c (spu_kill): Wait for inferior to terminate.
6673 Call clear_inferiors.
6674 (spu_detach): Call clear_inferiors.
6675
6676 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6677
6678 * aclocal.m4: Regenerate.
6679 * config.in: Likewise.
6680 * configure: Likewise.
6681
6682 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6683
6684 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
6685 (parse_spufs_run): New function.
6686 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
6687 (ppc_breakpoint_at): Handle SPU breakpoints.
6688
6689 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6690
6691 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
6692 (SPUFS_MAGIC): Define.
6693 (spu_enumerate_spu_ids): New function.
6694 (linux_qxfer_spu): New function.
6695 (linux_target_ops): Install linux_qxfer_spu.
6696
6697 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6698
6699 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
6700 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
6701 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
6702 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
6703 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
6704 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
6705 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
6706 (init_registers_powerpc_cell32l): Add prototype.
6707 (init_registers_powerpc_cell64l): Likewise.
6708 (ppc_arch_setup): Detect Cell/B.E. architecture.
6709
6710 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6711
6712 * Makefile.in (datarootdir): New variable.
6713
6714 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
6715
6716 * linux-low.c (linux_write_memory): Update debugging output.
6717 * Makefile.in (clean): Add new descriptions.
6718 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
6719 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
6720 * configure.srv: Add new files for arm*-*-linux*.
6721 * linux-arm-low.c: Add new declarations.
6722 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
6723 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
6724 (HWCAP_VFPv3D16): New.
6725 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
6726 instead of __IWMMXT__.
6727 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
6728 (arm_arch_setup): New.
6729 (target_regsets): Remove #ifdef. Add VFP regset.
6730 (the_low_target): Use arm_arch_setup.
6731
6732 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
6733
6734 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
6735 the main thread again.
6736
6737 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
6738
6739 Adding Neutrino gdbserver.
6740 * configure: Regenerated.
6741 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
6742 * configure.srv (i[34567]86-*-nto*): New target.
6743 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
6744 * remote-utils.c [__QNX__]: Include sys/iomgr.h
6745 (nto_comctrl) [__QNX__]: New function.
6746 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
6747
6748 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
6749
6750 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
6751 srv_tgtobj.
6752
6753 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
6754 Pedro Alves <pedro@codesourcery.com>
6755
6756 * win32-i386-low.c (i386_get_thread_context): Handle systems that
6757 don't support CONTEXT_EXTENDED_REGISTERS.
6758 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
6759 (the_low_target): Install them.
6760 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
6761 failing with ERROR_PIPE_NOT_CONNECTED.
6762
6763 2009-06-30 Doug Evans <dje@google.com>
6764 Pierre Muller <muller@ics.u-strasbg.fr>
6765
6766 Add h/w watchpoint support to x86-linux, win32-i386.
6767 * Makefile.in (SFILES): Add i386-low.c
6768 (i386_low_h): Define.
6769 (i386-low.o): Add dependencies.
6770 (linux-x86-low.o): Add i386-low.h dependency.
6771 (win32-i386-low.o): Ditto.
6772 * i386-low.c: New file.
6773 * i386-low.h: New file.
6774 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
6775 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
6776 * linux-low.c (linux_add_process): Initialize arch_private.
6777 (linux_remove_process): Free arch_private.
6778 (add_lwp): Initialize arch_private.
6779 (delete_lwp): Free arch_private.
6780 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
6781 provided.
6782 * linux-low.h (process_info_private): New member arch_private.
6783 (lwp_info): New member arch_private.
6784 (linux_target_ops): New members new_process, new_thread,
6785 prepare_to_resume.
6786 (ptid_of): New macro.
6787 * linux-x86-low.c: Include stddef.h, i386-low.h.
6788 (arch_process_info): New struct.
6789 (arch_lwp_info): New struct.
6790 (x86_linux_dr_get, x86_linux_dr_set): New functions.
6791 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
6792 (i386_dr_low_get_status): New function.
6793 (x86_insert_point, x86_remove_point): New functions.
6794 (x86_stopped_by_watchpoint): New function.
6795 (x86_stopped_data_address): New function.
6796 (x86_linux_new_process, x86_linux_new_thread): New functions.
6797 (x86_linux_prepare_to_resume): New function.
6798 (the_low_target): Add entries for insert_point, remove_point,
6799 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
6800 prepare_to_resume.
6801 * server.c (debug_hw_points): New global.
6802 (monitor_show_help): Document set debug-hw-points.
6803 (handle_query): Process "set debug-hw-points".
6804 * server.h (debug_hw_points): Declare.
6805 (paddress): Declare.
6806 * utils.c (NUMCELLS, CELLSIZE): New macros.
6807 (get_sell, xsnprintf, paddress): New functions.
6808 * win32-arm-low.c (the_low_target): Add entries for insert_point,
6809 remove_point, stopped_by_watchpoint, stopped_data_address.
6810 * win32-i386-low.c: Include i386-low.h.
6811 (debug_reg_state): Replaces dr.
6812 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
6813 (i386_dr_low_get_status): New function.
6814 (i386_insert_point, i386_remove_point): New functions.
6815 (i386_stopped_by_watchpoint): New function.
6816 (i386_stopped_data_address): New function.
6817 (i386_initial_stuff): Update.
6818 (get_thread_context,set_thread_context,i386_thread_added): Update.
6819 (the_low_target): Add entries for insert_point,
6820 remove_point, stopped_by_watchpoint, stopped_data_address.
6821 * win32-low.c (win32_insert_watchpoint): New function.
6822 (win32_remove_watchpoint): New function.
6823 (win32_stopped_by_watchpoint): New function.
6824 (win32_stopped_data_address): New function.
6825 (win32_target_ops): Add entries for insert_watchpoint,
6826 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
6827 * win32-low.h (win32_target_ops): New members insert_point,
6828 remove_point, stopped_by_watchpoint, stopped_data_address.
6829
6830 2009-06-25 Pedro Alves <pedro@codesourcery.com>
6831
6832 * server.c (process_serial_event): Re-return unsupported, not
6833 error, if the type isn't recognized. Re-allow supporting only
6834 insert or remove packets. Also call require_running for
6835 breakpoints. Add missing break statement to default case. Tidy.
6836 * target.h (struct target_ops): Rename insert_watchpoint to
6837 insert_point, and remove_watchpoint to remove_point.
6838
6839 * linux-low.h (struct linux_target_ops): Likewise.
6840 * linux-low.c (linux_insert_watchpoint): Rename to ...
6841 (linux_insert_point): ... this. Adjust.
6842 (linux_remove_watchpoint): Rename to ...
6843 (linux_remove_point): ... this. Adjust.
6844 (linux_target_ops): Adjust.
6845 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
6846 (cris_insert_point): ... this.
6847 (cris_remove_watchpoint): Rename to ...
6848 (cris_remove_point): ... this.
6849 (the_low_target): Adjust.
6850
6851 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
6852
6853 * server.c (handle_v_kill): Pass signal_pid to
6854 kill_inferior if multi_process is zero.
6855
6856 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
6857
6858 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
6859 * target.h (target_ops): Comment for *_watchpoint to make it clear
6860 the functions can get types '0' and '1'.
6861
6862 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
6863
6864 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
6865 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
6866 * regcache.c (get_regcache): Likewise.
6867 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
6868 * win32-low.c (child_fetch_inferior_registers): Remove check for
6869 regno 0.
6870
6871 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
6872 Pedro Alves <pedro@codesourcery.com>
6873
6874 * target.h (struct target_ops) <supports_multi_process>: New
6875 callback.
6876 (target_supports_multi_process): New.
6877 * server.c (handle_query): Even if GDB reports support, only
6878 enable multi-process if the target also supports it. Report
6879 multi-process support only if the target backend supports it.
6880 * linux-low.c (linux_supports_multi_process): New function.
6881 (linux_target_ops): Install it as target_supports_multi_process
6882 callback.
6883
6884 2009-05-24 Doug Evans <dje@google.com>
6885
6886 Global renaming of find_thread_pid to find_thread_ptid.
6887 * server.h (find_thread_ptid): Renamed from find_thread_pid.
6888 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
6889 All callers updated.
6890
6891 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
6892 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
6893 directly.
6894
6895 * linux-low.c (get_stop_pc): Print pc if debug_threads.
6896 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
6897 (linux_resume_one_lwp): Ditto.
6898
6899 2009-05-23 Doug Evans <dje@google.com>
6900
6901 * linux-low.c (linux_resume_one_lwp): Change type of first arg
6902 from struct inferior_list_entry * to struct lwp_info *.
6903 All callers updated.
6904
6905 2009-05-13 Doug Evans <dje@google.com>
6906
6907 * linux-x86-low.c: Don't include assert.h.
6908 (x86_siginfo_fixup): Use fatal, not assert.
6909 (x86_arch_setup): Fix comment.
6910
6911 2009-05-12 Doug Evans <dje@google.com>
6912
6913 Biarch support for i386/amd64 gdbserver.
6914 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
6915 Add linux-x86-low.c.
6916 (linux-i386-low.o, linux-x86-64-low.o): Delete.
6917 (linux-x86-low.o): Add.
6918 * linux-x86-64-low.c: Delete.
6919 * linux-i386-low.c: Delete.
6920 * linux-x86-low.c: New file.
6921 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
6922 linux-x86-low.o.
6923 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
6924 linux-x86-low.o.
6925 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
6926 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
6927 (linux_child_pid_to_exec_file): New function.
6928 (elf_64_header_p, elf_64_file_p): New functions.
6929 (siginfo_fixup): New function.
6930 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
6931 give target a chance to convert layout.
6932 * linux-low.h (linux_target_ops): New member siginfo_fixup.
6933 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
6934
6935 2009-05-07 Doug Evans <dje@google.com>
6936
6937 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
6938 (regsets_store_inferior_registers): Ditto.
6939
6940 2009-05-06 Pedro Alves <pedro@codesourcery.com>
6941
6942 PR server/10048
6943
6944 * linux-low.c (must_set_ptrace_flags): Delete.
6945 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
6946 of the global.
6947 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
6948 `lwp->must_set_ptrace_flags' instead.
6949 (linux_wait_for_event_1): Set ptrace options here.
6950 (linux_wait_1): ... not here.
6951
6952 2009-04-30 Doug Evans <dje@google.com>
6953
6954 * inferiors.c (started_inferior_callback): New function.
6955 (attached_inferior_callback): New function.
6956 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
6957 * server.c (print_started_pid, print_attached_pid): New functions.
6958 (detach_or_kill_for_exit): New function.
6959 (main): Call it instead of for_each_inferior (kill_inferior_callback).
6960 * server.h (have_started_inferiors_p): Declare.
6961 (have_attached_inferiors_p): Declare.
6962
6963 * inferiors.c (remove_process): Fix memory leak, free process.
6964 * linux-low.c (linux_remove_process): New function.
6965 (linux_kill): Call it instead of remove_process.
6966 (linux_detach, linux_wait_1): Ditto.
6967
6968 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
6969
6970 * configure.srv: Add x86 Windows CE target.
6971
6972 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
6973
6974 * inferiors.c (get_thread_process): Make global.
6975 * server.h (get_thread_process): Add prototype.
6976 * thread-db.c (find_one_thread): Use get_thread_process
6977 instead of current_process.
6978 (thread_db_get_tls_address): Do not crash if called when
6979 thread layer is not yet initialized.
6980
6981 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
6982
6983 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
6984 * spu-low.c (current_tid): Rename to ...
6985 (current_ptid): ... this.
6986 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
6987 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
6988 ptid_get_lwp (current_ptid) instead of current_tid.
6989 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
6990 instead of current_tid. Use find_process_pid to verify pid
6991 argument is valid. Pass proper argument to remove_process.
6992 (spu_thread_alive): Compare current_ptid instead of current_tid.
6993 (spu_resume): Likewise.
6994
6995 2009-04-02 Pedro Alves <pedro@codesourcery.com>
6996
6997 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
6998 variable.
6999
7000 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7001
7002 Implement the multiprocess extensions, and add linux multiprocess
7003 support.
7004
7005 * server.h (ULONGEST): Declare.
7006 (struct ptid, ptid_t): New.
7007 (minus_one_ptid, null_ptid): Declare.
7008 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7009 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7010 (struct inferior_list_entry): Change `id' type from unsigned from
7011 to ptid_t.
7012 (struct sym_cache, struct breakpoint, struct
7013 process_info_private): Forward declare.
7014 (struct process_info): Declare.
7015 (current_process): Declare.
7016 (all_processes): Declare.
7017 (initialize_inferiors): Declare.
7018 (add_thread): Adjust to use ptid_t.
7019 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7020 (add_process, remove_process, find_thread_pid): Declare.
7021 (find_inferior_id): Adjust to use ptid_t.
7022 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7023 (multi_process): Declare.
7024 (push_event): Adjust to use ptid_t.
7025 (read_ptid, write_ptid): Declare.
7026 (prepare_resume_reply): Adjust to use ptid_t.
7027 (clear_symbol_cache): Declare.
7028 * inferiors.c (all_processes): New.
7029 (null_ptid, minus_one_ptid): New.
7030 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7031 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7032 (add_thread): Change unsigned long to ptid. Remove gdb_id
7033 parameter. Adjust.
7034 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7035 (gdb_id_to_thread): Rename to ...
7036 (find_thread_pid): ... this. Change unsigned long to ptid.
7037 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7038 (loaded_dll, pull_pid_from_list): Adjust.
7039 (add_process, remove_process, find_process_pid)
7040 (get_thread_process, current_process, initialize_inferiors): New.
7041 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7042 (struct target_waitstatus) <related_pid>: Ditto.
7043 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7044 return type to int.
7045 (struct target_ops) <join>: Add `pid' argument.
7046 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7047 (struct target_ops) <wait>: Add `ptid' field. Change return type
7048 to ptid.
7049 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7050 (mywait): Add `ptid' argument. Change return type to ptid_t.
7051 (target_pid_to_str): Declare.
7052 * target.c (set_desired_inferior): Adjust to use ptids.
7053 (mywait): Add new `ptid' argument. Adjust.
7054 (target_pid_to_str): New.
7055 * mem-break.h (free_all_breakpoints): Declare.
7056 * mem-break.c (breakpoints): Delelete.
7057 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7058 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7059 to use per-process breakpoint list.
7060 (free_all_breakpoints): New.
7061 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7062 (symbol_cache, all_symbols_looked_up): Delete.
7063 (hexchars): New.
7064 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7065 read_ptid): New.
7066 (prepare_resume_reply): Change ptid argument's type from unsigned
7067 long to ptid_t. Adjust. Implement W;process and X;process.
7068 (free_sym_cache, clear_symbol_cache): New.
7069 (look_up_one_symbol): Adjust to per-process symbol cache. *
7070 * server.c (cont_thread, general_thread, step_thread): Change type
7071 to ptid_t.
7072 (attached): Delete.
7073 (multi_process): New.
7074 (last_ptid): Change type to ptid_t.
7075 (struct vstop_notif) <ptid>: Change type to ptid_t.
7076 (queue_stop_reply, push_event): Change `ptid' argument's type to
7077 ptid_t.
7078 (discard_queued_stop_replies): Add `pid' argument.
7079 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7080 changes. Don't reference the `attached' global.
7081 (attach_inferior): Adjust to mywait interface changes.
7082 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7083 features. Handle and report "multiprocess+". Handle
7084 "qAttached:PID".
7085 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7086 changes.
7087 (handle_v_kill): New.
7088 (handle_v_stopped): Adjust to use target_pid_to_str.
7089 (handle_v_requests): Allow multiple attaches and runs when
7090 multiprocess extensions are in effect. Handle "vKill".
7091 (myresume): Adjust to use ptids.
7092 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7093 (handle_status): Adjust to discard_queued_stop_replies interface
7094 change.
7095 (first_thread_of, kill_inferior_callback)
7096 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7097 (main): Call initialize_inferiors. Adjust to use ptids, killing
7098 and detaching from all inferiors. Handle multiprocess packet
7099 variants.
7100 * linux-low.h: Include gdb_proc_service.h.
7101 (struct process_info_private): New.
7102 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7103 <lwpid_of>: Use ptid_get_lwp.
7104 (get_lwp_thread): Adjust.
7105 (struct lwp_info): Add `dead' member.
7106 (find_lwp_pid): Declare.
7107 * linux-low.c (thread_db_active): Delete.
7108 (new_inferior): Adjust comment.
7109 (inferior_pid): Delete.
7110 (linux_add_process): New.
7111 (handle_extended_wait): Adjust.
7112 (add_lwp): Change unsigned long to ptid.
7113 (linux_create_inferior): Add process to processes table. Adjust
7114 to use ptids. Don't set new_inferior here.
7115 (linux_attach_lwp): Rename to ...
7116 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7117 it. Adjust to use ptids.
7118 (linux_attach_lwp): New.
7119 (linux_attach): Add process to processes table. Don't set
7120 new_inferior here.
7121 (struct counter): New.
7122 (second_thread_of_pid_p, last_thread_of_process_p): New.
7123 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7124 multiple processes.
7125 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7126 processes. Remove process from process table.
7127 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7128 to multiple processes.
7129 (any_thread_of): New.
7130 (linux_detach): Add `pid' argument, and handle it. Remove process
7131 from processes table.
7132 (linux_join): Add `pid' argument. Handle it.
7133 (linux_thread_alive): Change unsighed long argument to ptid_t.
7134 Consider dead lwps as not being alive.
7135 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7136 threads we're not interested in.
7137 (same_lwp, find_lwp_pid): New.
7138 (linux_wait_for_lwp): Change `pid' argument's type from int to
7139 ptid_t. Adjust.
7140 (linux_wait_for_event): Rename to ...
7141 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7142 from int to ptid_t. Adjust.
7143 (linux_wait_for_event): New.
7144 (linux_wait_1): Add `ptid' argument. Change return type to
7145 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7146 that exit from the process table.
7147 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7148 Adjust.
7149 (mark_lwp_dead): New.
7150 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7151 stopping all threads, mark its main lwp as dead.
7152 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7153 ptids.
7154 (fetch_register, usr_store_inferior_registers)
7155 (regsets_fetch_inferior_registers)
7156 (regsets_store_inferior_registers, linux_read_memory)
7157 (linux_write_memory): Inline `inferior_pid'.
7158 (linux_look_up_symbols): Adjust to use per-process
7159 `thread_db_active'.
7160 (linux_request_interrupt): Adjust to use ptids.
7161 (linux_read_auxv): Inline `inferior_pid'.
7162 (initialize_low): Don't reference thread_db_active.
7163 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7164 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7165 (ps_getpid): Return the pid of the current inferior.
7166 * thread-db.c (proc_handle, thread_agent): Delete.
7167 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7168 per-process data.
7169 (find_one_thread): Change argument type to ptid_t. Adjust to
7170 per-process data.
7171 (maybe_attach_thread): Adjust to per-process data and ptids.
7172 (thread_db_find_new_threads): Ditto.
7173 (thread_db_init): Ditto.
7174 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7175 processes table. Adjust to use ptids.
7176 (spu_kill, spu_detach): Adjust interface. Remove process from
7177 processes table.
7178 (spu_join, spu_thread_alive): Adjust interface.
7179 (spu_wait): Adjust interface. Remove process from processes
7180 table. Adjust to use ptids.
7181 * win32-low.c (current_inferior_tid): Delete.
7182 (current_inferior_ptid): New.
7183 (debug_event_ptid): New.
7184 (thread_rec): Take a ptid. Adjust.
7185 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7186 (child_delete_thread): Ditto.
7187 (do_initial_child_stuff): Add `attached' argument. Add process to
7188 processes table.
7189 (child_fetch_inferior_registers, child_store_inferior_registers):
7190 Adjust.
7191 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7192 (win32_attach): Pass 1 to do_initial_child_stuff.
7193 (win32_kill): Adjust interface. Remove process from processes
7194 table.
7195 (win32_detach): Ditto.
7196 (win32_join): Adjust interface.
7197 (win32_thread_alive): Take a ptid.
7198 (win32_resume): Adjust to use ptids.
7199 (get_child_debug_event): Ditto.
7200 (win32_wait): Adjust interface. Remove exiting process from
7201 processes table.
7202
7203 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7204
7205 Non-stop mode support.
7206
7207 * server.h (non_stop): Declare.
7208 (gdb_client_data, handler_func): Declare.
7209 (delete_file_handler, add_file_handler, start_event_loop):
7210 Declare.
7211 (handle_serial_event, handle_target_event, push_event)
7212 (putpkt_notif): Declare.
7213 * target.h (enum resume_kind): New.
7214 (struct thread_resume): Replace `step' field by `kind' field.
7215 (TARGET_WNOHANG): Define.
7216 (struct target_ops) <wait>: Add `options' argument.
7217 <supports_non_stop, async, start_non_stop>: New fields.
7218 (target_supports_non_stop, target_async): New.
7219 (start_non_stop): Declare.
7220 (mywait): Add `options' argument.
7221 * target.c (mywait): Add `options' argument. Print child exit
7222 notifications here.
7223 (start_non_stop): New.
7224 * server.c (non_stop, own_buf, mem_buf): New globals.
7225 (struct vstop_notif): New.
7226 (notif_queue): New global.
7227 (queue_stop_reply, push_event, discard_queued_stop_replies)
7228 (send_next_stop_reply): New.
7229 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7230 interface changes.
7231 (attach_inferior): In non-stop mode, don't wait for the target
7232 here.
7233 (handle_general_set): Handle QNonStop.
7234 (handle_query): When handling qC, return the current general
7235 thread, instead of the first thread of the list.
7236 (handle_query): If the backend supports non-stop mode, include
7237 QNonStop+ in the qSupported query response.
7238 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
7239 and non-stop mode.
7240 (handle_v_attach, handle_v_run): Handle non-stop mode.
7241 (handle_v_stopped): New.
7242 (handle_v_requests): Report support for vCont;t. Handle vStopped.
7243 (myresume): Adjust to use resume_kind. Handle non-stop.
7244 (queue_stop_reply_callback): New.
7245 (handle_status): Handle non-stop mode.
7246 (main): Clear non_stop flag on reconnection. Use the event-loop.
7247 Refactor serial protocol handling from here ...
7248 (process_serial_event): ... to this new function. When GDB
7249 selects any thread, select one here. In non-stop mode, wait until
7250 GDB acks all pending events before exiting.
7251 (handle_serial_event, handle_target_event): New.
7252 * remote-utils.c (remote_open): Install remote_desc in the event
7253 loop.
7254 (remote_close): Remove remote_desc from the event loop.
7255 (putpkt_binary): Rename to...
7256 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
7257 (putpkt_binary): New as wrapper around putpkt_binary_1.
7258 (putpkt_notif): New.
7259 (prepare_resume_reply): In non-stop mode, don't change the
7260 general_thread.
7261 * event-loop.c: New.
7262 * Makefile.in (OBJ): Add event-loop.o.
7263 (event-loop.o): New rule.
7264
7265 * linux-low.h (pid_of): Moved here.
7266 (lwpid_of): New.
7267 (get_lwp_thread): Use lwpid_of.
7268 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
7269 * linux-low.c (pid_of): Delete.
7270 (inferior_pid): Use lwpid_of.
7271 (linux_event_pipe): New.
7272 (target_is_async_p): New.
7273 (delete_lwp): New.
7274 (handle_extended_wait): Use lwpid_of.
7275 (add_lwp): Don't set lwpid field.
7276 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
7277 (linux_kill_one_lwp): If killing a running lwp, stop it first.
7278 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
7279 (linux_detach_one_lwp): If detaching from a running lwp, stop it
7280 first. Adjust to linux_wait_for_event interface changes. Use
7281 lwpid_of.
7282 (linux_detach): Don't delete the main lwp here.
7283 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
7284 (status_pending_p): Don't consider explicitly suspended lwps.
7285 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
7286 pointer. Add OPTIONS argument. Change return type to int. Use
7287 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
7288 (linux_wait_for_event): Take an integer pid instead of a lwp_info
7289 pointer. Add status pointer argument. Return a pid instead of a
7290 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
7291 changes. In non-stop mode, don't switch to a random thread.
7292 (linux_wait): Rename to...
7293 (linux_wait_1): ... this. Add target_options argument, and handle
7294 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
7295 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
7296 clean exit and signal exit code. Don't stop all threads in
7297 non-stop mode. In all-stop mode, only stop all threads when
7298 reporting a stop to GDB. Handle explicit thread stop requests.
7299 (async_file_flush, async_file_mark): New.
7300 (linux_wait): New.
7301 (send_sigstop): Use lwpid_of.
7302 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
7303 interface changes. In non-stop mode, don't switch to a random
7304 thread.
7305 (linux_resume_one_lwp): Use lwpid_of.
7306 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
7307 (linux_resume_one_thread): ... this. Handle resume_stop. In
7308 non-stop mode, don't look for pending flag in all threads.
7309 (resume_status_pending_p): Don't consider explicitly suspended
7310 threads.
7311 (my_waitpid): Reimplement. Emulate __WALL.
7312 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7313 Use lwpid_of.
7314 (sigchld_handler, linux_supports_non_stop, linux_async)
7315 (linux_start_non_stop): New.
7316 (linux_target_ops): Register linux_supports_non_stop, linux_async
7317 and linux_start_non_stop.
7318 (initialize_low): Install SIGCHLD handler.
7319 * thread-db.c (thread_db_create_event, find_one_thread)
7320 (thread_db_get_tls_address): Use lwpid_of.
7321 * win32-low.c (win32_detach): Adjust to use resume_kind.
7322 (win32_wait): Add `options' argument.
7323 * spu-low.c (spu_resume): Adjust to use resume_kind.
7324 (spu_wait): Add `options' argument.
7325
7326 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7327
7328 Decouple target code from remote protocol.
7329
7330 * target.h (enum target_waitkind): New.
7331 (struct target_waitstatus): New.
7332 (struct target_ops) <wait>: Return an unsigned long. Take a
7333 target_waitstatus pointer instead of a char pointer.
7334 (mywait): Likewise.
7335 * target.c (mywait): Change prototype to return an unsigned long.
7336 Take a target_waitstatus pointer instead of a char pointer. Adjust.
7337 * server.h (thread_from_wait, old_thread_from_wait): Delete
7338 declarations.
7339 (prepare_resume_reply): Change prototype to take a
7340 target_waitstatus.
7341 * server.c (thread_from_wait, old_thread_from_wait): Delete.
7342 (last_status, last_ptid): New.
7343 (start_inferior): Remove "statusptr" argument. Adjust. Return a
7344 pid instead of a signal.
7345 (attach_inferior): Remove "status" and "signal" parameters.
7346 Adjust.
7347 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
7348 not as an address.
7349 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
7350 (handle_v_requests, myresume): Remove "status" and "signal"
7351 parameters. Adjust.
7352 (handle_status): New.
7353 (main): Delete local `status'. Adjust.
7354 * remote-utils.c: Include target.h.
7355 (prepare_resume_reply): Change prototype to take a
7356 target_waitstatus. Adjust.
7357
7358 * linux-low.c (linux_wait): Adjust to new target_ops->wait
7359 interface.
7360 * spu-low.c (spu_wait): Adjust.
7361 * win32-low.c (enum target_waitkind, struct target_waitstatus):
7362 Delete.
7363 (win32_wait): Adjust.
7364
7365 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7366
7367 * target.h (struct thread_resume): Delete leave_stopped member.
7368 (struct target_ops): Add a `n' argument to the `resume' callback.
7369 * server.c (start_inferior): Adjust.
7370 (handle_v_cont, myresume): Adjust.
7371 * linux-low.c (check_removed_breakpoint): Adjust to resume
7372 interface change, and to removed leave_stopped field.
7373 (resume_ptr): Delete.
7374 (struct thread_resume_array): New.
7375 (linux_set_resume_request): Add new `arg' parameter. Adjust to
7376 resume interface change.
7377 (linux_continue_one_thread, linux_queue_one_thread)
7378 (resume_status_pending_p): Check if the resume field is NULL
7379 instead of checking the leave_stopped member.
7380 (linux_resume): Adjust to the target resume interface change.
7381 * spu-low.c (spu_resume): Adjust to the target resume interface
7382 change.
7383 * win32-low.c (win32_detach, win32_resume): Ditto.
7384
7385 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7386
7387 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
7388 flag.
7389 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
7390 pending.
7391 (linux_continue_one_thread): Only preserve the stepping flag if
7392 there's a pending breakpoint.
7393
7394 2009-03-31 Pedro Alves <pedro@codesourcery.com>
7395
7396 * server.c (main): After the inferior having exited, call
7397 remote_close before exiting gdbserver.
7398
7399 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
7400
7401 Fix size of FPSCR in Power 7 processors.
7402 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
7403 (PPC_FEATURE_HAS_DFP): New #define.
7404 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
7405 size of the FPSCR.
7406
7407 2009-03-23 Pedro Alves <pedro@codesourcery.com>
7408
7409 * server.c (handle_query) Whitespace and formatting.
7410
7411 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7412
7413 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
7414 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
7415 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
7416 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
7417 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
7418 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
7419 Makefile.in, configure.ac: Fix whitespace throughout.
7420 * configure: Regenerate.
7421
7422 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7423
7424 * inferiors.c (find_inferior): Make it safe for the callback
7425 function to delete the currently iterated inferior.
7426
7427 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7428
7429 * Makefile.in (linuw_low_h): Move higher.
7430 (thread-db.o): Depend on $(linux_low_h).
7431
7432 2009-03-17 Pedro Alves <pedro@codesourcery.com>
7433
7434 Rename "process" to "lwp" throughout.
7435
7436 * linux-low.c (all_processes): Rename to...
7437 (all_lwps): ... this.
7438 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
7439 (add_process): Rename to ...
7440 (add_lwp): ... this. Adjust.
7441 (linux_create_inferior): Adjust.
7442 (linux_attach_lwp): Adjust.
7443 (linux_attach): Adjust.
7444 (linux_kill_one_process): Rename to ...
7445 (linux_kill_one_lwp): ... this. Adjust.
7446 (linux_kill): Adjust.
7447 (linux_detach_one_process): Rename to ...
7448 (linux_detach_one_lwp): ... this. Adjust.
7449 (linux_detach): Adjust.
7450 (check_removed_breakpoint): Adjust.
7451 (status_pending_p): Adjust.
7452 (linux_wait_for_process): Rename to ...
7453 (linux_wait_for_lwp): ... this. Adjust.
7454 (linux_wait_for_event): Adjust.
7455 (send_sigstop): Adjust.
7456 (wait_for_sigstop): Adjust.
7457 (stop_all_processes): Rename to ...
7458 (stop_all_lwps): ... this.
7459 (linux_resume_one_process): Rename to ...
7460 (linux_resume_one_lwp): ... this. Adjust.
7461 (linux_set_resume_request, linux_continue_one_thread)
7462 (linux_queue_one_thread, resume_status_pending_p)
7463 (usr_store_inferior_registers, regsets_store_inferior_registers)
7464 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7465 Adjust.
7466 * linux-low.h (get_process): Rename to ...
7467 (get_lwp): ... this. Adjust.
7468 (get_thread_process): Rename to ...
7469 (get_thread_lwp): ... this. Adjust.
7470 (get_process_thread): Rename to ...
7471 (get_lwp_thread): ... this. Adjust.
7472 (struct process_info): Rename to ...
7473 (struct lwp_info): ... this.
7474 (all_processes): Rename to ...
7475 (all_lwps): ... this.
7476 * proc-service.c (ps_lgetregs): Adjust.
7477 * thread-db.c (thread_db_create_event, find_one_thread)
7478 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
7479
7480 2009-03-14 Pedro Alves <pedro@codesourcery.com>
7481
7482 * server.c (handle_query): Handle "qAttached".
7483
7484 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
7485
7486 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
7487 GPLv3, update license URL.
7488
7489 2009-03-01 Doug Evans <dje@google.com>
7490
7491 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
7492 (server_h): Add gdb_signals.h.
7493 (signals.o): Update.
7494 * server.h (target_signal_from_host,target_signal_to_host_p)
7495 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
7496
7497 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
7498
7499 * remote-utils.c (getpkt): Also generate remote-debug
7500 information if noack_mode is set.
7501
7502 2009-02-06 Pedro Alves <pedro@codesourcery.com>
7503
7504 * server.c (handle_query): Report qXfer:siginfo:read and
7505 qXfer:siginfo:write as supported and handle them.
7506 * target.h (struct target_ops) <qxfer_siginfo>: New field.
7507 * linux-low.c (linux_xfer_siginfo): New.
7508 (linux_target_ops): Set it.
7509
7510 2009-01-26 Pedro Alves <pedro@codesourcery.com>
7511
7512 * server.c (gdbserver_usage): Mention --remote-debug.
7513 (main): Accept '--remote-debug' switch.
7514
7515 2009-01-18 Doug Evans <dje@google.com>
7516
7517 * regcache.c (new_register_cache): No need to check result of xcalloc.
7518 * server.c (handle_search_memory): Back out calls to xmalloc,
7519 result is checked and error is returned to user upon failure.
7520 (handle_query): Ditto. Add more checks for result of malloc.
7521 (handle_v_cont): Check result of malloc, report error back to
7522 user upon failure.
7523 (handle_v_run): Ditto. Call freeargv.
7524 * server.h (freeargv): Declare.
7525 * utils.c (freeargv): New fn.
7526
7527 2009-01-15 Doug Evans <dje@google.com>
7528
7529 * gdbreplay.c (perror_with_name): Make arg const char *.
7530 * server.h (target_signal_to_name): Make return type const char *.
7531 * thread-db.c (thread_db_err_str): Make return type const char *.
7532 * utils.c (perror_with_name): Make arg const char *.
7533
7534 2009-01-14 Pedro Alves <pedro@codesourcery.com>
7535
7536 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
7537 when handling a EXIT_PROCESS_DEBUG_EVENT.
7538
7539 2009-01-06 Joel Brobecker <brobecker@adacore.com>
7540
7541 * gdbreplay.c (gdbreplay_version): Update copyright year.
7542 * server.c (gdbserver_version): Likewise.
7543
7544 2009-01-05 Doug Evans <dje@google.com>
7545
7546 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
7547 (handle_extended_wait): Improve comment.
7548
7549 2008-12-13 Doug Evans <dje@google.com>
7550
7551 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
7552 * server.h (ATTR_MALLOC): New macro.
7553 (xmalloc,xcalloc,xstrdup): Declare.
7554 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
7555 * inferiors.c: Ditto.
7556 * linux-low.c: Ditto.
7557 * mem-break.c: Ditto.
7558 * regcache.c: Ditto.
7559 * remote-utils.c: Ditto.
7560 * server.c: Ditto.
7561 * target.c: Ditto.
7562 * win32-low.c: Ditto.
7563
7564 2008-12-12 Doug Evans <dje@google.com>
7565
7566 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
7567 in debugging printf.
7568
7569 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
7570
7571 2008-12-09 Doug Evans <dje@google.com>
7572
7573 * linux-low.h (struct process_info): Delete member tid, unused.
7574 * thread-db.c (find_one_thread): Update.
7575 (maybe_attach_thread): Update.
7576
7577 2008-12-02 Pedro Alves <pedro@codesourcery.com>
7578
7579 * target.h (struct target_ops): Add qxfer_osdata member.
7580 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
7581 and dirent.h.
7582 (linux_qxfer_osdata): New functions.
7583 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
7584 callback.
7585 * server.c (handle_query): Handle "qXfer:osdata:read:".
7586 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
7587 (buffer_xml_printf): New functions.
7588 * server.h (struct buffer): New.
7589 (buffer_grow_str, buffer_grow_str0): New macros.
7590 (buffer_grow, buffer_free, buffer_init, buffer_finish)
7591 (buffer_xml_printf): Declare.
7592
7593 2008-11-24 Doug Evans <dje@google.com>
7594
7595 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
7596
7597 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
7598
7599 * server.c (handle_v_run): Always use the supplied argument list.
7600
7601 2008-11-19 Bob Wilson <bob.wilson@acm.org>
7602
7603 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
7604 (xtensa_regmap_table): Add entry for scompare1.
7605
7606 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
7607
7608 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
7609 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
7610 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
7611 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
7612 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
7613 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
7614 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
7615 XML target descriptions.
7616 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
7617 when inferior is running on an ISA 2.05 or later processor. Add
7618 special case to return offset for full 64-bit slot of FPSCR when
7619 in 32-bits.
7620
7621 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
7622
7623 * Makefile.in (SFILES, clean): Added sparc64 files.
7624 (reg-sparc64.o, reg-sparc64.c): New.
7625 * configure.srv (sparc*-*-linux*): New configuration.
7626 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
7627 syscall arguments for SPARC.
7628 (regsets_store_inferior_registers): Likewise.
7629 * linux-sparc-low.c: New file.
7630
7631 2008-10-21 Doug Evans <dje@google.com>
7632
7633 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
7634 (READLINE_DIR,READLINE_DEP): Delete.
7635 (INTERNAL_CFLAGS): Update.
7636 (LINTFLAGS): Update.
7637
7638 2008-10-10 Pedro Alves <pedro@codesourcery.com>
7639
7640 * server.c (handle_v_run): If GDB didn't specify an argv, use the
7641 whole argv from the last run, not just argv[0].
7642
7643 2008-09-08 Pedro Alves <pedro@codesourcery.com>
7644
7645 * regcache.c (new_register_cache): Return NULL if the register
7646 cache size isn't known yet.
7647 (free_register_cache): Avoid dereferencing a NULL regcache.
7648
7649 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
7650
7651 * configure.srv: Merge MIPS and MIPS64.
7652
7653 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
7654
7655 * Makefile.in (uninstall): Apply $(EXEEXT) too.
7656
7657 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
7658
7659 * Makefile.in: Add required vsx dependencies.
7660
7661 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
7662 Declare init_registers_powerpc_vsx32l.
7663 Declare init_registers_powerpc_vsx64l.
7664 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
7665 (ppc_arch_setup): Check for VSX in hwcap.
7666 (ppc_fill_vsxregset): New function.
7667 (ppc_store_vsxregset): New function.
7668 Add new VSX entry in regset_info target_regsets.
7669
7670 * configure.srv: Add new VSX dependencies.
7671
7672 2008-08-12 Pedro Alves <pedro@codesourcery.com>
7673
7674 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
7675 (remote_open): Set or clear transport_is_reliable.
7676 (putpkt_binary): Don't expect acks in noack mode.
7677 (getpkt): Don't send ack/nac in noack mode.
7678 * server.c (handle_general_set): Handle QStartNoAckMode.
7679 (handle_query): If connected by tcp pass QStartNoAckMode+ in
7680 qSupported.
7681 (main): Reset noack_mode on every connection.
7682 * server.h (noack_mode): Declare.
7683
7684 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7685
7686 * Makefile.in (GDBREPLAY_OBS): New variable.
7687 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
7688
7689 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
7690 Daniel Jacobowitz <dan@codesourcery.com>
7691
7692 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
7693 (usr_store_inferior_registers): Likewise.
7694 (regsets_store_inferior_registers): Likewise.
7695
7696 2008-07-31 Rolf Jansen <rj@surtec.com>
7697 Pedro Alves <pedro@codesourcery.com>
7698
7699 * configure.ac: Check for memmem declaration.
7700 * server.c [HAVE_MALLOC_H]: Include malloc.h.
7701 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
7702 (disable_packet_qfThreadInfo): Unconditionally compile.
7703 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
7704 * configure, config.in: Regenerate.
7705
7706 2008-07-28 Doug Kwan <dougkwan@google.com>
7707
7708 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
7709 (linux_write_memory): Remove declaration of errno.
7710
7711 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
7712
7713 * linux-low.c (handle_extended_wait): Do not use "status"
7714 variable uninitialized.
7715
7716 2008-07-07 Pedro Alves <pedro@codesourcery.com>
7717
7718 * server.c (handle_v_attach): Inhibit reporting dll changes.
7719
7720 2008-06-27 Pedro Alves <pedro@codesourcery.com>
7721
7722 * remote-utils.c (prepare_resume_reply): If requested, don't
7723 output "thread:TID" in the T stop reply.
7724
7725 * server.c (disable_packet_vCont, disable_packet_Tthread)
7726 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
7727 (handle_query): If requested, disable support for qC, qfThreadInfo
7728 and qsThreadInfo.
7729 (handle_v_requests): If requested, disable support for vCont.
7730 (gdbserver_show_disableable): New.
7731 (main): Handle --disable-packet and --disable-packet=LIST.
7732
7733 * server.h (disable_packet_vCont, disable_packet_Tthread)
7734 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
7735
7736 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
7737
7738 * server.c (gdbserver_usage): Mention --version.
7739
7740 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
7741
7742 * Makefile.in (gdbreplay.o): New rule.
7743
7744 2008-06-06 Joseph Myers <joseph@codesourcery.com>
7745
7746 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
7747 message, not gdbserver.
7748
7749 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
7750 Nathan Sidwell <nathan@codesourcery.com>
7751 Joseph Myers <joseph@codesourcery.com>
7752
7753 * acinclude.m4: Include ../../config/acx.m4.
7754 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
7755 * configure, config.in: Regenerate.
7756 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
7757 * server.c (gdbserver_version): Print PKGVERSION.
7758 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
7759 (main): Adjust gdbserver_usage calls.
7760 * gdbreplay.c (version, host_name): Add declarations.
7761 (gdbreplay_version, gdbreplay_usage): New.
7762 (main): Accept --version and --help options.
7763
7764 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
7765
7766 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
7767 (arm_breakpoint_at): Handle Thumb.
7768 (the_low_target): Add comment.
7769
7770 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
7771
7772 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
7773
7774 2008-05-09 Doug Evans <dje@google.com>
7775
7776 * server.h (decode_search_memory_packet): Declare.
7777 * remote-utils.c (decode_search_memory_packet): New fn.
7778 * server.c (handle_search_memory_1): New fn.
7779 (handle_search_memory): New fn.
7780 (handle_query): Process qSearch:memory packets.
7781
7782 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
7783
7784 * regcache.c (registers_length): Remove.
7785 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
7786 full register packet.
7787 * regcache.h (registers_length): Remove prototype.
7788 * server.h (PBUFSIZ): Define to 16384.
7789
7790 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
7791
7792 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
7793 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
7794 powerpc-64l.o, and powerpc-altivec64l.o.
7795 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
7796 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
7797 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
7798 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
7799 rs6000/power-linux.xml, and rs6000/power64-linux.xml
7800 to srv_xmlfiles.
7801
7802 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
7803 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
7804 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
7805 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
7806 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
7807 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
7808 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
7809 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
7810 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
7811 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
7812 (clean): Update.
7813
7814 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
7815 (init_registers_powerpc_32l): ... this new prototype.
7816 (init_registers_powerpc_32): Remove, replace by ...
7817 (init_registers_powerpc_altivec32l): ... this new prototype.
7818 (init_registers_powerpc_e500): Remove, replace by ...
7819 (init_registers_powerpc_e500l): ... this new prototype.
7820 (init_registers_ppc64): Remove, replace by ...
7821 (init_registers_powerpc_64l): ... this new prototype.
7822 (init_registers_powerpc_64): Remove, replace by ...
7823 (init_registers_powerpc_altivec64l): ... this new prototype.
7824 (ppc_num_regs): Set to 73.
7825 (PT_ORIG_R3, PT_TRAP): Define if necessary.
7826 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
7827 (ppc_cannot_store_register): Handle orig_r3 and trap.
7828 (ppc_arch_setup): Update init_registers_... calls.
7829 (ppc_fill_gregset): Handle orig_r3 and trap.
7830
7831 * inferiors.c (clear_inferiors): Reset current_inferior.
7832
7833 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
7834
7835 * acinclude.m4: Add override.m4.
7836 * configure: Regenerate.
7837
7838 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
7839
7840 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
7841 initial call to init_register_ppc64.
7842
7843 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
7844
7845 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
7846 single powerpc*-*-linux* case.
7847 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
7848
7849 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
7850
7851 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
7852 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
7853 from reg_xmlfiles.
7854 * linux-ppc-low.c: Include <elf.h>.
7855 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
7856 (ppc_hwcap): New global variable.
7857 (ppc_regmap): Remove __SPE__ #ifdef sections.
7858 (ppc_regmap_e500): New global variable.
7859 (ppc_cannot_store_register): Update __SPE__ special case.
7860 (ppc_get_hwcap): New function.
7861 (ppc_arch_setup): Use it to determine whether inferior supports
7862 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
7863 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
7864 Do not access registers if target does not support AltiVec.
7865 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
7866 Do not access registers if target does not support SPE.
7867 (target_regsets): Unconditionally include AltiVec and SPE regsets.
7868
7869 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
7870
7871 * linux-low.c (disabled_regsets, num_regsets): New.
7872 (use_regsets_p): Delete.
7873 (linux_wait_for_process): Clear disabled_regsets.
7874 (regsets_fetch_inferior_registers): Check and set it.
7875 (regsets_store_inferior_registers): Likewise.
7876 (linux_fetch_registers, linux_store_registers): Do not use
7877 use_regsets_p.
7878 (initialize_low): Allocate disabled_regsets.
7879
7880 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
7881
7882 * Makefile.in (LIBOBJS): New.
7883 (OBS): Use LIBOBJS.
7884 (memmem.o): New rule.
7885 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
7886 * configure: Regenerated.
7887
7888 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
7889
7890 * server.c (handle_query): Never return "unsupported" for
7891 qXfer:features:read queries.
7892
7893 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
7894
7895 * server.c (get_features_xml): Fix inverted condition.
7896 (handle_query): Always support qXfer:feature:read.
7897
7898 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
7899
7900 * server.c (wrapper_argv): New.
7901 (start_inferior): Handle wrapper_argv. If set, expect an extra
7902 trap.
7903 (gdbserver_usage): Document --wrapper.
7904 (main): Parse --wrapper.
7905
7906 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7907
7908 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
7909 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
7910 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
7911 (ppc_set_pc): Likewise.
7912 (ppc_arch_setup): New function.
7913 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
7914 of collect_register.
7915 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
7916
7917 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7918
7919 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
7920 instead of linux-ppc64-low.o.
7921 * linux-ppc64-low.c: Remove file.
7922 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
7923 (linux-ppc64-low.o): Remove rule.
7924
7925 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
7926 (init_registers_powerpc_64): Likewise.
7927 (ppc_regmap): Conditionally define depending on __powerpc64__.
7928 (ppc_cannot_store_register): Do not special-case "fpscr" when
7929 compiled on __powerpc64__.
7930 (ppc_collect_ptrace_register): New function.
7931 (ppc_supply_ptrace_register): New function.
7932 (ppc_breakpoint): Change type to "unsigned int".
7933 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
7934 (the_low_target): Conditionally provide initializers for the
7935 arch_setup member depending on __powerpc64__. Install
7936 collect_ptrace_register and supply_ptrace_register members.
7937
7938 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7939
7940 * regcache.h (gdbserver_xmltarget): Add extern declaration.
7941 * server.c (gdbserver_xmltarget): Define.
7942 (get_features_xml): Use it to replace "target.xml" and arch_string.
7943
7944 * configure.srv: Remove srv_xmltarget. Add XML files that were
7945 mentioned there to srv_xmlfiles instead. Remove conditional tests
7946 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
7947 srv_xmlfiles and srv_regobj to include all possible choices.
7948 * configure.ac (srv_xmltarget): Remove.
7949 (srv_xmlfiles): Do not add "target.xml".
7950 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
7951 checks for supplementary target information.
7952 * configure: Regenerate.
7953 * Makefile.in (XML_TARGET): Remove.
7954 (target.xml): Remove rule.
7955 (clean): Do not clean up target.xml.
7956 (.PRECIOUS): Do not mention target.xml.
7957
7958 * target.h (struct target_ops): Remove arch_string member.
7959 * linux-low.c (linux_arch_string): Remove.
7960 (linux_target_ops): Remove arch_string initializer.
7961 * linux-low.h (struct linux_target_ops): Remove arch_string member.
7962 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
7963 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
7964 * spu-low.c (spu_arch_string): Remove.
7965 (spu_target_ops): Remove arch_string initializer.
7966 * win32-low.c (win32_arch_string): Remove.
7967 (win32_target_ops): Remove arch_string initializer.
7968 * win32-low.h (struct win32_target_ops): Remove arch_string member.
7969 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
7970 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
7971
7972 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
7973
7974 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
7975 by collect_ptrace_register and supply_ptrace_register hooks.
7976 * linux-low.c (fetch_register): Use supply_ptrace_register callback
7977 instead of checking for the_low_target.left_pad_xfer.
7978 (usr_store_inferior_registers): Use collect_ptrace_register callback
7979 instead of checking for the_low_target.left_pad_xfer.
7980
7981 * linux-s390-low.c (s390_collect_ptrace_register): New function.
7982 (s390_supply_ptrace_register): Likewise.
7983 (s390_fill_gregset): Call s390_collect_ptrace_register.
7984 (the_low_target): Update.
7985
7986 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
7987 (ppc_supply_ptrace_register): Likewise.
7988 (the_low_target): Update.
7989
7990 * linux-i386-low.c (the_low_target): Update.
7991 * linux-x86-64-low.c (the_low_target): Update.
7992
7993 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
7994
7995 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
7996 reg-s390.o and reg-s390x.o.
7997
7998 * linux-low.c (new_inferior): New global variable.
7999 (linux_create_inferior, linux_attach): Set it.
8000 (linux_wait_for_process): Call the_low_target.arch_setup after the
8001 target has stopped for the first time.
8002 (initialize_low): Do not call the_low_target.arch_setup.
8003
8004 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8005 (s390_set_pc): Likewise.
8006 (s390_arch_setup): New function.
8007 (the_low_target): Use s390_arch_setup as arch_setup routine.
8008
8009 * regcache.c (realloc_register_cache): New function.
8010 (set_register_cache): Call it for each existing regcache.
8011
8012 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8013
8014 * server.h (init_registers): Remove prototype.
8015
8016 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8017 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8018 instead of init_registers ().
8019 * linux-arm-low.c (init_registers_arm): Add prototype.
8020 (init_registers_arm_with_iwmmxt): Likewise.
8021 (the_low_target): Add initializer for arch_setup field.
8022 * linux-cris-low.c (init_registers_cris): Add prototype.
8023 (the_low_target): Add initializer for arch_setup field.
8024 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8025 (the_low_target): Add initializer for arch_setup field.
8026 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8027 (the_low_target): Add initializer for arch_setup field.
8028 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8029 (the_low_target): Add initializer for arch_setup field.
8030 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8031 (the_low_target): Add initializer for arch_setup field.
8032 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8033 (the_low_target): Add initializer for arch_setup field.
8034 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8035 (init_registers_mips64_linux): Likewise.
8036 (the_low_target): Add initializer for arch_setup field.
8037 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8038 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8039 (the_low_target): Add initializer for arch_setup field.
8040 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8041 (init_registers_powerpc_64): Likewise.
8042 (the_low_target): Add initializer for arch_setup field.
8043 * linux-s390-low.c (init_registers_s390): Add prototype.
8044 (init_registers_s390x): Likewise.
8045 (the_low_target): Add initializer for arch_setup field.
8046 * linux-sh-low.c (init_registers_sh): Add prototype.
8047 (the_low_target): Add initializer for arch_setup field.
8048 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8049 (the_low_target): Add initializer for arch_setup field.
8050 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8051 (the_low_target): Add initializer for arch_setup field.
8052
8053 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8054 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8055 instead of init_registers ().
8056 * win32-arm-low.c (init_registers_arm): Add prototype.
8057 (the_low_target): Add initializer for arch_setup field.
8058 * win32-i386-low.c (init_registers_i386): Add prototype.
8059 (the_low_target): Add initializer for arch_setup field.
8060
8061 * spu-low.c (init_registers_spu): Add prototype.
8062 (initialize_low): Call initialie_registers_spu () instead of
8063 initialize_registers ().
8064
8065 2008-02-19 Pedro Alves <pedro@codesourcery.com>
8066
8067 * server.c (handle_v_requests): When handling the vRun and vAttach
8068 packets, if already debugging a process, don't kill it. Return an
8069 error instead.
8070
8071 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8072
8073 * server.c (handle_query): Correct length check.
8074
8075 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8076
8077 * win32-low.c (do_initial_child_stuff): Add process handle
8078 parameter. Set current_process_handle and current_process_id from the
8079 parameters. Clear globals.
8080 (win32_create_inferior): Don't set current_process_handle and
8081 current_process_id here. Instead pass them on the call to
8082 do_initial_child_stuff.
8083 (win32_attach): Likewise.
8084 (win32_clear_inferiors): New.
8085 (win32_kill): Don't close the current process handle or the
8086 current thread handle here. Instead call win32_clear_inferiors.
8087 (win32_detach): Don't open a new handle to the process. Call
8088 win32_clear_inferiors.
8089 (win32_join): Don't rely on current_process_handle; open a new
8090 handle using the process id.
8091 (win32_wait): Call win32_clear_inferiors when the inferior process
8092 has exited.
8093
8094 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8095
8096 * server.c (monitor_show_help): Add "exit".
8097
8098 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8099
8100 * Makefile.in (SFILES): Add linux-xtensa-low.c.
8101 (clean): Add reg-xtensa.c.
8102 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
8103 * configure.srv (xtensa*-*-linux*) New target.
8104 * linux-xtensa-low.c: New.
8105 * xtensa-xtregs.c: New.
8106
8107 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8108
8109 * hostio.c: Don't include errno.h.
8110 (errno_to_fileio_errno): Move to hostio-errno.
8111 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8112 error number outputting to the target->hostio_last_error callback.
8113 (hostio_packet_error): Use FILEIO_EINVAL directly.
8114 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8115 calls to hostio_error.
8116 * hostio-errno.c: New.
8117 * server.h (hostio_last_error_from_errno): Declare.
8118 * target.h (target_ops): Add hostio_last_error member.
8119 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8120 as hostio_last_error handler.
8121 * spu-low.c (spu_target_ops): Likewise.
8122 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8123 (wince_hostio_last_error): New functions.
8124 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8125 as hostio_last_error handler.
8126 (win32_target_ops) [!_WIN32_WCE]: Register
8127 hostio_last_error_from_errno as hostio_last_error handler.
8128 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8129 (hostio-errno.o): New rule.
8130 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8131 * configure.srv (srv_hostio_err_objs): New variable. Default to
8132 hostio-errno.o.
8133 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8134 * configure: Regenerate.
8135
8136 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8137
8138 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8139 (linux_kill, linux_detach): Clean up the process list.
8140 * remote-utils.c (remote_open): Improve port number parsing.
8141 (putpkt_binary, input_interrupt): Only send interrupts if the target
8142 is running.
8143 * server.c (extended_protocol): Make static.
8144 (attached): Define earlier.
8145 (exit_requested, response_needed, program_argv): New variables.
8146 (target_running): New.
8147 (start_inferior): Clear attached here.
8148 (attach_inferior): Set attached here.
8149 (require_running): Define.
8150 (handle_query): Use require_running and target_running. Implement
8151 "monitor exit".
8152 (handle_v_attach, handle_v_run): New.
8153 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8154 (gdbserver_usage): Update.
8155 (main): Redo argument parsing. Handle --debug and --multi. Handle
8156 --attach along with other options or after the port. Save
8157 program_argv. Support no initial program. Resynchronize
8158 communication with GDB after an error. Handle "monitor exit".
8159 Use require_running and target_running. Always allow the extended
8160 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8161 restart in extended mode.
8162 * README: Refer to the GDB manual. Update --attach usage.
8163
8164 2007-12-20 Andreas Schwab <schwab@suse.de>
8165
8166 * linux-low.c (STACK_SIZE): Define.
8167 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8168 (linux_test_for_tracefork): Likewise.
8169
8170 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8171
8172 * linux-low.c (linux_wait_for_event): Update messages. Do not
8173 reinsert auto-delete breakpoints.
8174 * mem-break.c (struct breakpoint): Change return type of handler to
8175 int.
8176 (set_breakpoint_at): Update handler type.
8177 (reinsert_breakpoint_handler): Return 1 instead of calling
8178 delete_breakpoint.
8179 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8180 setting a new one.
8181 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8182 * mem-break.h (set_breakpoint_at): Update handler type.
8183 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8184 * win32-low.c (auto_delete_breakpoint): New.
8185 (get_child_debug_event): Use it.
8186
8187 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8188
8189 * configure.ac: Check for pread and pwrite.
8190 * hostio.c (handle_pread): Fall back to lseek and read.
8191 (handle_pwrite): Fall back to lseek and write.
8192 * config.in, configure: Regenerated.
8193
8194 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8195
8196 * server.c (myresume): Add own_buf argument.
8197 (main): Update calls.
8198
8199 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8200
8201 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8202 * remote-utils.c (remote_open): Do not call disable_async_io.
8203 (block_async_io): Delete.
8204 (unblock_async_io): Make static.
8205 (initialize_async_io): New.
8206 * server.c (handle_v_cont): Handle async I/O here.
8207 (myresume): Likewise. Move other common resume tasks here...
8208 (main): ... from here. Call initialize_async_io. Disable async
8209 I/O before the main loop.
8210 * server.h (initialize_async_io): Declare.
8211 (block_async_io, unblock_async_io): Delete prototypes.
8212 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8213
8214 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8215
8216 * remote-utils.c (readchar): Allow binary data in received messages.
8217
8218 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8219
8220 * win32-low.c (attaching): New global.
8221 (win32_create_inferior): Clear the `attaching' global.
8222 (win32_attach): Set the `attaching' global.
8223 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8224 attaching. Only set a breakpoint at the entry point if not
8225 attaching.
8226
8227 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8228
8229 * server.c (main): Don't report dll events on the initial
8230 connection on attaches.
8231
8232 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8233
8234 * server.c (main): Relax numerical bases supported for the pid of
8235 the --attach command line argument.
8236
8237 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8238
8239 * win32-low.c (win32_attach): Call OpenProcess before
8240 DebugActiveProcess, not after. Add last error output to error
8241 call.
8242
8243 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8244
8245 * win32-low.c (win32_get_thread_context)
8246 (win32_set_thread_context): New functions.
8247 (thread_rec): Use win32_get_thread_context.
8248 (continue_one_thread, win32_resume): Use win32_set_thread_context.
8249 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8250 field.
8251
8252 2007-12-03 Leo Zayas
8253 Pedro Alves <pedro_alves@portugalmail.pt>
8254
8255 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
8256 global variables.
8257 (child_add_thread): Minor cleanup.
8258 (child_continue): Resume artificially suspended threads before
8259 calling ContinueDebugEvent.
8260 (suspend_one_thread): New.
8261 (fake_breakpoint_event): New.
8262 (get_child_debug_event): Change return type to int. Check here if
8263 gdb sent an interrupt request. If a soft interrupt was requested,
8264 fake a breakpoint event. Return 0 if there is no event to handle,
8265 and 1 otherwise.
8266 (win32_wait): Don't check here if gdb sent an interrupt request.
8267 Ensure there is a valid event to handle.
8268 (win32_request_interrupt): Add soft interruption method as last
8269 resort.
8270
8271 2007-12-03 Leo Zayas
8272 Pedro Alves <pedro_alves@portugalmail.pt>
8273
8274 * win32-low.h (win32_thread_info): Add descriptions to the
8275 structure members. Replace `suspend_count' counter by a
8276 `suspended' flag.
8277 * win32-low.c (thread_rec): Update condition of when to get the
8278 context from the inferior. Rely on ContextFlags being set if it
8279 has already been retrieved. Only suspend the inferior thread if
8280 we haven't already. Warn if that fails.
8281 (continue_one_thread): s/suspend_count/suspended/. Only call
8282 ResumeThread once. Warn if that fails.
8283
8284 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8285
8286 * win32-low.c (win32_wait): Don't read from the inferior when it
8287 has already exited.
8288
8289 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8290
8291 * Makefile.in (win32_low_h): New variable.
8292 (win32-low.o): Add dependency on $(win32_low_h).
8293 (win32-arm-low.o, win32-i386-low.o): New rules.
8294
8295 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8296
8297 * hostio.c: Correct copyright year.
8298
8299 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8300
8301 * Makefile.in (OBS): Add hostio.o.
8302 (hostio.o): New rule.
8303 * server.h (handle_vFile): Declare.
8304 * hostio.c: New file.
8305 * server.c (handle_v_requests): Take packet_len and new_packet_len
8306 for binary packets. Call handle_vFile.
8307 (main): Update call to handle_v_requests.
8308
8309 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
8310
8311 * linux-low.c: Include <sched.h>.
8312
8313 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
8314
8315 * linux-low.c (linux_tracefork_grandchild): New.
8316 (linux_tracefork_child): Use clone.
8317 (linux_test_for_tracefork): Use clone; allocate and free a stack.
8318
8319 2007-10-31 Joel Brobecker <brobecker@adacore.com>
8320
8321 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
8322
8323 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
8324
8325 * linux-low.c (handle_extended_wait): Handle unexpected signals.
8326
8327 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
8328
8329 * inferiors.c (change_inferior_id): Delete.
8330 (add_pid_to_list, pull_pid_from_list): New.
8331 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
8332 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
8333 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
8334 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
8335 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
8336 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
8337 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
8338 (using_threads): Always set to 1.
8339 (handle_extended_wait): New.
8340 (add_process): Do not set TID.
8341 (linux_create_inferior): Set must_set_ptrace_flags.
8342 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
8343 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
8344 (linux_thread_alive): Rename TID argument to LWPID.
8345 (linux_wait_for_process): Handle unknown processes. Do not use TID.
8346 (linux_wait_for_event): Do not use TID or check using_threads. Update
8347 call to dead_thread_notify. Call handle_extended_wait.
8348 (linux_create_inferior): Use PTRACE_SETOPTIONS.
8349 (send_sigstop): Delete sigstop_sent.
8350 (wait_for_sigstop): Avoid TID.
8351 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
8352 (linux_test_for_tracefork): New.
8353 (linux_lookup_signals): Use thread_db_active and
8354 linux_supports_tracefork_flag.
8355 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
8356 * linux-low.h (get_process_thread): Avoid TID.
8357 (struct process_ifo): Move thread_known and tid to the end. Remove
8358 sigstop_sent.
8359 (linux_attach_lwp, thread_db_init): Update prototypes.
8360 * server.h (change_inferior_id): Delete prototype.
8361 (add_pid_to_list, pull_pid_from_list): New prototypes.
8362 * thread-db.c (thread_db_use_events): New.
8363 (find_first_thread): Rename to...
8364 (find_one_thread): ...this. Update callers and messages. Do not
8365 call fatal. Check thread_db_use_events. Do not call
8366 change_inferior_id or new_thread_notify.
8367 (maybe_attach_thread): Update. Do not call new_thread_notify.
8368 (thread_db_init): Set thread_db_use_events. Check use_events.
8369 * utils.c (fatal, warning): Correct message prefix.
8370
8371 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
8372
8373 * Makefile.in (clean): Remove new files.
8374 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
8375 (powerpc-64.o, powerpc-64.c): New rules.
8376 * configure.srv: Use alternate register sets for powerpc64-*-linux*
8377 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
8378 with SPE.
8379 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
8380 SPE targets.
8381 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
8382 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
8383 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
8384 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
8385 (target_regsets): Add AltiVec and SPE register sets.
8386 * configure.ac: Check for AltiVec and SPE.
8387 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
8388 (ppc_fill_vrregset, ppc_store_vrregset): New.
8389 (target_regsets): Add AltiVec register set.
8390 * configure: Regenerated.
8391
8392 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
8393
8394 * linux-low.c (O_LARGEFILE): Define.
8395 (linux_read_memory): Use /proc/PID/mem.
8396 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
8397 * configure, config.in: Regenerated.
8398
8399 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8400
8401 * linux-low.c (linux_wait_for_event): Do not pass signals while
8402 single-stepping.
8403
8404 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8405
8406 * win32-low.c (create_process): New.
8407 (win32_create_inferior): Use create_process instead of
8408 CreateProcess. If create_process failed retry appending an ".exe"
8409 suffix. Store the GetLastError result immediatelly after
8410 create_process calls and use it on the call to error.
8411
8412 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8413
8414 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
8415
8416 2007-08-23 Joel Brobecker <brobecker@adacore.com>
8417
8418 * configure.ac: Switch license to GPLv3.
8419
8420 2007-08-01 Michael Snyder <msnyder@access-company.com>
8421
8422 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
8423
8424 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
8425
8426 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
8427 typedef.
8428 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
8429 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
8430 CloseToolhelp32Snapshot.
8431 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
8432 CloseToolhelp32Snapshot.
8433
8434 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
8435
8436 * server.c (main): Check for inferior exit before main loop.
8437
8438 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
8439
8440 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
8441 instead of on tmp_desc.
8442
8443 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
8444 Daniel Jacobowitz <dan@codesourcery.com>
8445
8446 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
8447 (add_thread): Minor cleanups.
8448 (clear_inferiors): Move lower in the file. Clear the DLL
8449 list.
8450 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
8451 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
8452 (xml_escape_text): New.
8453 * server.c (handle_query): Handle qXfer:libraries:read. Report it
8454 for qSupported.
8455 (handle_v_cont): Report errors.
8456 (gdbserver_version): Update.
8457 (main): Correct size of own_buf. Do not report initial DLL events.
8458 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
8459 (unloaded_dll, xml_escape_text): New.
8460 * win32-low.c (enum target_waitkind): Update comments.
8461 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
8462 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
8463 (win32_EnumProcessModules, win32_GetModuleInformation)
8464 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
8465 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
8466 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
8467 (win32_Module32First, win32_Module32Next, load_toolhelp)
8468 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
8469 (get_child_debug_event): Handle DLL events.
8470 (win32_wait): Likewise.
8471
8472 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
8473
8474 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
8475 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
8476
8477 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8478
8479 * win32-low.c (handle_output_debug_string): Ignore event if not
8480 waiting.
8481
8482 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8483
8484 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
8485
8486 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
8487
8488 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
8489
8490 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
8491
8492 * inferiors.c (change_inferior_id): Add comment.
8493 * linux-low.c (check_removed_breakpoint): Add an early
8494 prototype. Improve debug output.
8495 (linux_attach): Doc update.
8496 (linux_detach_one_process, linux_detach): Clean up before releasing
8497 each process.
8498 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
8499 * linux-low.h (struct process_info): Doc improvement.
8500 * mem-break.c (delete_all_breakpoints): New.
8501 * mem-break.h (delete_all_breakpoints): New prototype.
8502 * thread-db.c (find_first_thread): New.
8503 (thread_db_create_event): Call it instead of
8504 thread_db_find_new_threads. Clean up unused variables.
8505 (maybe_attach_thread): Remove first thread handling.
8506 (thread_db_find_new_threads): Use find_first_thread.
8507 (thread_db_get_tls_address): Likewise.
8508
8509 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
8510
8511 * thread-db.c (thread_db_find_new_threads): Add prototype.
8512 (thread_db_create_event): Check for the main thread before adding
8513 a new thread.
8514 (maybe_attach_thread): Only enable event reporting if TID == 0.
8515 (thread_db_get_tls_address): Check for new threads.
8516
8517 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
8518
8519 * linux-low.c (linux_create_inferior): Try execv before execvp.
8520 * spu-low.c (spu_create_inferior): Likewise.
8521
8522 2007-06-13 Mike Frysinger <vapier@gentoo.org>
8523
8524 * linux-low.c (linux_create_inferior): Change execv to execvp.
8525 * spu-low.c (spu_create_inferior): Likewies.
8526
8527 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
8528
8529 * Makefile.in (clean): Clean new files instead of deleted ones.
8530 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
8531 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
8532 rules.
8533 * configure.srv: Specify XML files and new regformats for MIPS and
8534 MIPS64 GNU/Linux.
8535 * linux-mips-low.c (mips_num_regs): Set to only used registers.
8536 (mips_regmap): Do not fetch $0. Remove unused registers. Add
8537 an entry for the restart register.
8538 (mips_cannot_fetch_register, mips_cannot_store_register)
8539 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
8540 register names to match the XML descriptions.
8541 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
8542 restart register instead of $0.
8543
8544 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8545 Markus Deuling <deuling@de.ibm.com>
8546
8547 * remote-utils.c (decode_xfer_write): New function.
8548 * server.h (decode_xfer_write): Add prototype.
8549 * server.c (handle_query): Add PACKET_LEN argument. Support
8550 qXfer:spu:read and qXfer:spu:write packets.
8551 (main): Pass packet_len to handle_query.
8552 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
8553 * target.h (target_ops): Add qxfer_spu.
8554
8555 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8556
8557 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
8558 accessing non-seekable spufs files.
8559
8560 2007-05-16 Markus Deuling <deuling@de.ibm.com>
8561
8562 * server.c (handle_query): Add reply for qC packet.
8563
8564 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8565 Leo Zayas <lerele@champenstudios@com>
8566
8567 * server.h (check_remote_input_interrupt_request): New function.
8568 * remote_utils.c (INVALID_DESCRIPTOR): New define.
8569 (remote_desc): Initialize with INVALID_DESCRIPTOR.
8570 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
8571 (check_remote_input_interrupt_request): New function.
8572 * server.h (check_remote_input_interrupt_request): Declare.
8573 * win32-low.c (winapi_DebugBreakProcess,
8574 winapi_GenerateConsoleCtrlEvent): New typedefs.
8575 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
8576 to 250 ms.
8577 (win32_wait): Check for remote interrupt request
8578 with check_remote_input_interrupt_request.
8579 (win32_request_interrupt): New function.
8580 (win32_target_op): Set request_interrupt to win32_request_interrupt.
8581
8582 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8583
8584 * win32-low.c (debug_registers_changed,
8585 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
8586 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
8587 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
8588 (thread_rec): Get context using the low target.
8589 (child_add_thread): Call thread_added on the low target,
8590 which does the same thing.
8591 (regptr): Delete.
8592 (do_initial_child_stuff): Remove debug registers references.
8593 Set context using the low target. Resume threads after
8594 setting the contexts.
8595 (child_continue): Remove dead variable. Remove debug
8596 registers references.
8597 (child_fetch_inferior_registers): Go through the low target.
8598 (do_child_store_inferior_registers): Remove.
8599 (child_store_inferior_registers): Go through the low target.
8600 (win32_resume): Remove debug registers references.
8601 Set context using the low target.
8602 (handle_exception): Change return type to void. Don't record
8603 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
8604 first chance exception.
8605 (get_child_debug_event): Change return type to void. Remove
8606 goto loop. Always return after waiting for debug event.
8607 (win32_wait): Convert to switch statement. Handle spurious
8608 events.
8609
8610 * win32-i386-low.c (debug_registers_changed,
8611 debug_registers_used): New.
8612 (initial_stuff): Rename to ...
8613 (i386_initial_stuff): ... this. Clear debug registers
8614 state variables.
8615 (store_debug_registers): Delete.
8616 (i386_get_thread_context): New.
8617 (load_debug_registers): Delete.
8618 (i386_set_thread_context): New.
8619 (i386_thread_added): New.
8620 (single_step): Rename to ...
8621 (i386_single_step): ... this.
8622 (do_fetch_inferior_registers): Rename to ...
8623 (i386_fetch_inferior_register): ... this.
8624 (i386_store_inferior_register): New.
8625 (the_low_target): Adapt to new interface.
8626
8627 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
8628 (arm_get_thread_context): New.
8629 (arm_set_thread_context): New.
8630 (regptr): New.
8631 (do_fetch_inferior_registers): Rename to ...
8632 (arm_fetch_inferior_register): ... this.
8633 (arm_store_inferior_register): New.
8634 (arm_wince_breakpoint): Reimplement as unsigned long.
8635 (arm_wince_breakpoint_len): Define.
8636 (the_low_target): Adapt to new interface.
8637
8638 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
8639 load_debug_registers. Add get_thread_context, set_thread_context,
8640 thread_added and store_inferior_register. Rename
8641 fetch_inferior_registers to fetch_inferior_register.
8642 (regptr): Remove declaration.
8643
8644 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8645
8646 * linux-low.c (linux_detach): Change return type to int. Return 0.
8647 * spu-low.c (spu_detach): Likewise.
8648
8649 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8650
8651 * target.h (target_ops): Change return type of detach to int.
8652 Add join.
8653 (join_inferior): New.
8654 * server.c (main): Don't skip detach support on mingw32.
8655 If the inferior doesn't support detaching return error.
8656 Call join_inferior instead of using waitpid.
8657 * linux-low.c (linux_join): New.
8658 (linux_target_op): Add linux_join.
8659 * spu-low.c (spu_join): New.
8660 (spu_target_ops): Add spu_join.
8661 * win32-low.c (win32_detach): Adapt to new interface.
8662 Reopen current_process_handle before detaching. Issue a child
8663 resume before detaching.
8664 (win32_join): New.
8665 (win32_target_op): Add win32_join.
8666
8667 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8668
8669 * win32-low.c (win32-attach): Fix return value.
8670 * target.h (target_ops): Describe ATTACH return values.
8671
8672 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8673
8674 * win32-low.c (GETPROCADDRESS): Define.
8675 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
8676 (winapi_DebugSetProcessKillOnExit): Likewise.
8677 (win32_create_inferior): Force usage of ansi CreateProcessA.
8678 (win32_attach): Use GETPROCADDRESS.
8679 (win32_detach): Likewise.
8680
8681 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8682
8683 * win32-low.c (win32_wait): Don't use WSTOPSIG.
8684
8685 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
8686
8687 * win32-low.c: Commit leftover changes from 2007-03-29.
8688
8689 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
8690
8691 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
8692 fields short instead of int. Add explicit padding.
8693 (i387_cache_to_fsave): Remove unnecessary casts.
8694 (i387_fsave_to_cache): Doc fix.
8695 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
8696
8697 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
8698
8699 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
8700 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
8701
8702 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
8703
8704 * configure.srv (arm*-*-mingw32ce*): Move near the other
8705 arm targets.
8706
8707 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
8708
8709 * configure.ac: Add errno checking.
8710 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
8711 sys/file.h and malloc.h.
8712 (AC_CHECK_DECLS): Add perror.
8713 (srv_mingwce): Handle.
8714 * configure.srv (i[34567]86-*-cygwin*): Add
8715 win32-i386-low.o to srv_tgtobj.
8716 (i[34567]86-*-mingw*): Likewise.
8717 (arm*-*-mingw32ce*): Add case.
8718 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
8719 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
8720 [__MINGW32CE__] (strerror): New function.
8721 [__MINGW32CE__] (errno): Define to GetLastError.
8722 [__MINGW32CE__] (COUNTOF): New macro.
8723 (remote_open): Remove extra close call.
8724 * mem-break.c (delete_breakpoint_at): New function.
8725 * mem-break.h (delete_breakpoint_at): Declare.
8726 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
8727 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
8728 [USE_WIN32API] (read, write): Add char* casts.
8729 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
8730 * server.h: Include wincecompat.h on Windows CE.
8731 [HAVE_ERRNO_H]: Check.
8732 (perror): Declare if not declared.
8733 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
8734 (perror_with_name): Remove errno declaration.
8735 * wincecompat.h: New.
8736 * wincecompat.c: New.
8737 * win32-low.h: New.
8738 * win32-arm-low.c: New.
8739 * win32-i386-low.c: New.
8740 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
8741 (OUTMSG2): Make it safe.
8742 (_T): New macro.
8743 (COUNTOF): New macro.
8744 (NUM_REGS): Get it from the low target.
8745 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
8746 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
8747 (thread_rec): Let low target handle debug registers.
8748 (child_add_thread): Likewise.
8749 (child_init_thread_list): Likewise.
8750 (continue_one_thread): Likewise.
8751 (regptr): New.
8752 (do_child_fetch_inferior_registers): Move to ...
8753 * win32-i386-low.c: ... here, and rename to ...
8754 (do_fetch_inferior_registers): ... this.
8755 * win32-low.c (child_fetch_inferior_registers):
8756 Go through the low target.
8757 (do_child_store_inferior_registers): Use regptr.
8758 (strwinerror): New function.
8759 (win32_create_inferior): Handle Windows CE.
8760 Use strwinerror instead of strerror on Windows error
8761 codes. Add program to the error output.
8762 Don't close the main thread handle on Windows CE.
8763 (win32_attach): Use coredll.dll on Windows CE.
8764 (win32_kill): Close current process and current
8765 thread handles.
8766 (win32_detach): Use coredll.dll on Windows CE.
8767 (win32_resume): Let low target handle debug registers, and
8768 step request.
8769 (handle_exception): Add/Remove initial breakpoint. Avoid
8770 non-existant WSTOPSIG on Windows CE.
8771 (win32_read_inferior_memory): Cast to remove warning.
8772 (win32_arch_string): Go through the low target.
8773 (initialize_low): Call set_breakpoint_data with the low
8774 target's breakpoint.
8775 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
8776 FOP_REGNUM, mappings): Move to ...
8777 * win32-i386-low.c: ... here.
8778 * win32-low.c (win32_thread_info): Move to ...
8779 * win32-low.h: ... here.
8780 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
8781 win32-arm-low.c and wincecompat.c.
8782 (all:): Add $EXEEXT.
8783 (install-only:): Likewise.
8784 (gdbserver:): Likewise.
8785 (gdbreplay:): Likewise.
8786 * config.in: Regenerate.
8787 * configure: Regenerate.
8788
8789 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
8790
8791 * win32-low.c: Rename typedef thread_info to
8792 win32_thread_info throughout.
8793
8794 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
8795
8796 * win32-i386-low.c: Rename to ...
8797 * win32-low.c: ... this.
8798 * configure.srv: Replace win32-i386-low.o with win32-low.o.
8799 * Makefile.in: Likewise.
8800
8801 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
8802
8803 * remote-utils.c (monitor_output): Constify msg parameter.
8804 * server.h (monitor_output): Likewise.
8805 * win32-i386-low.c (handle_output_debug_string): New.
8806 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
8807 handle_output_debug_string.
8808 (get_child_debug_event): Likewise.
8809
8810 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
8811
8812 * server.c (main): Correct strtoul check.
8813
8814 2007-03-27 Jon Ringle <jon@ringle.org>
8815
8816 * linux-low.c: Check __ARCH_HAS_MMU__ also.
8817
8818 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
8819
8820 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
8821
8822 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
8823
8824 * terminal.h: Check HAVE_SGTTY_H.
8825
8826 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
8827
8828 * remote-utils.c (remote_open): Print out the assigned port number.
8829
8830 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
8831
8832 * remote-utils.c (monitor_output): New function.
8833 * server.c (debug_threads): Define here.
8834 (monitor_show_help): New function.
8835 (handle_query): Handle qRcmd.
8836 (main): Do not handle 'd' packet.
8837 * server.h (debug_threads, remote_debug, monitor_output): Declare.
8838 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
8839 of debug_threads.
8840
8841 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8842
8843 * Makefile.in (EXEEXT): New.
8844 (clean): Use $(EXEEXT).
8845
8846 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8847
8848 * target.h (target_ops): Rename send_signal to request_interrupt,
8849 and remove enum target_signal parameter.
8850 * linux-low.c (linux_request_interrupt): Rename from
8851 linux_send_signal, and always send SIGINT.
8852 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
8853 and always send SIGINT.
8854 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
8855 of send_signal.
8856 (input_interrupt): Likewise.
8857
8858 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8859
8860 * server.c (get_features_xml): Check if target implemented
8861 arch_string.
8862 * win32-i386-low.c (win32_arch_string): New.
8863 (win32_target_ops): Add win32_arch_string as arch_string member.
8864
8865 2007-02-22 Markus Deuling <deuling@de.ibm.com>
8866
8867 * spu-low.c (spu_arch_string): New.
8868 (spu_target_ops): Add spu_arch_string.
8869
8870 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
8871
8872 * remote-utils.c: Remove HAVE_TERMINAL_H check.
8873 * configure.ac: Do not check for terminal.h.
8874 * configure, config.in: Regenerated.
8875
8876 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
8877
8878 * Makefile.in (OBS): Add $(XML_BUILTIN).
8879 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
8880 (clean): Update.
8881 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
8882 (arm-with-iwmmxt.c): New.
8883 * config.in, configure: Regenerate.
8884 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
8885 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
8886 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
8887 (arm*-*-linux*): Add iWMMXt and regset support.
8888 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
8889 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
8890 (arm_store_wmmxregset, target_regsets): New.
8891 * server.c (get_features_xml): Take annex argument. Check builtin
8892 XML documents.
8893 (handle_query): Handle multiple annexes.
8894
8895 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8896
8897 * remote-utils.c [USE_WIN32API] (read, write): Define.
8898 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
8899 write.
8900
8901 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
8902
8903 * linux-i386-low.c (the_low_target): Set arch_string.
8904 * linux-x86-64-low.c (the_low_target): Likewise.
8905 * linux-low.c (linux_arch_string): New.
8906 (linux_target_ops): Add it.
8907 * linux-low.h (struct linux_target_ops): Add arch_string.
8908 * server.c (write_qxfer_response): Use const void * for DATA.
8909 (get_features_xml): New.
8910 (handle_query): Handle qXfer:features:read. Report it for qSupported.
8911 * target.h (struct target_ops): Add arch_string method.
8912
8913 2007-01-03 Denis Pilat <denis.pilat@st.com>
8914 Daniel Jacobowitz <dan@codesourcery.com>
8915
8916 * linux-low.c (linux_kill): Handle being called with no threads.
8917 * win32-i386-low.c (win32_kill): Likewise.
8918 (get_child_debug_event): Clear current_process_handle.
8919
8920 2006-12-30 Denis PILAT <denis.pilat@st.com>
8921 Daniel Jacobowitz <dan@codesourcery.com>
8922
8923 * remote-utils.c (remote_open): Check the type of specified
8924 serial port devices before opening them.
8925 * server.c (main): Kill the inferior if an error occurs during
8926 the first remote_open.
8927
8928 2006-12-05 Markus Deuling <deuling@de.ibm.com>
8929
8930 * README: Update supported targets.
8931
8932 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
8933
8934 * Makefile.in (clean): Remove reg-mips64.c.
8935 (reg-mips64.c, reg-mips64.o): New rules.
8936 * configure.srv: Handle mips64. Include regset support for mips.
8937 * linux-mips-low.c (union mips_register): New.
8938 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
8939 (mips_breakpoint, mips_breakpoint_at): Use int.
8940 (mips_collect_register, mips_supply_register)
8941 (mips_collect_register_32bit, mips_supply_register_32bit)
8942 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8943 (mips_store_fpregset, target_regsets): New.
8944 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
8945
8946 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
8947
8948 * configure.srv: Add target "spu*-*-*".
8949 * Makefile.in (clean): Remove reg-spu.c.
8950 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
8951 * spu-low.c: New file.
8952
8953 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
8954
8955 * configure.ac: Correct td_thr_tls_get_addr test.
8956 * configure: Regenerated.
8957
8958 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
8959
8960 * linux-low.c (linux_wait_for_event): Reformat. Use the
8961 pass_signals array.
8962 * remote-utils.c (decode_address_to_semicolon): New.
8963 * server.c (pass_signals, handle_general_set): New.
8964 (handle_query): Mention QPassSignals for qSupported.
8965 (main): Call handle_general_set.
8966 * server.h (pass_signals, decode_address_to_semicolon): New.
8967
8968 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
8969
8970 * server.c (handle_query): Correct error handling for read_auxv.
8971
8972 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
8973
8974 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
8975 and srv_linux_thread_db to yes.
8976 * linux-s390-low.c (s390_fill_gregset): New function.
8977 (target_regsets): Define data structure.
8978
8979 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
8980
8981 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
8982 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
8983 * config.in, configure: Regenerated.
8984 * inferiors.c (gdb_id_to_thread): New function.
8985 (gdb_id_to_thread_id): Use it.
8986 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
8987 * linux-low.h (struct process_info): Add th member.
8988 (thread_db_get_tls_address): New prototype.
8989 * remote-utils.c (decode_address): Make non-static.
8990 * server.c (handle_query): Handle qGetTLSAddr.
8991 * server.h (gdb_id_to_thread, decode_address): New prototypes.
8992 * target.h (struct target_ops): Add get_tls_address.
8993 * thread-db.c (maybe_attach_thread): Save the thread handle.
8994 (thread_db_get_tls_address): New.
8995
8996 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
8997
8998 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
8999 (linux_resume_one_process): Take a siginfo_t *. Update all
9000 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9001 (struct pending_signals): Add a siginfo_t.
9002 (linux_wait_for_process): Always set last_status.
9003 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9004 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9005 * linux-low.h (struct process_info): Add last_status.
9006
9007 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9008
9009 * remote-utils.c (try_rle): New function.
9010 (putpkt_binary): Use it.
9011
9012 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9013
9014 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9015 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9016 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9017 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9018 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9019 point registers.
9020
9021 2006-08-08 Richard Sandiford <richard@codesourcery.com>
9022
9023 * server.c (terminal_fd): New variable.
9024 (old_foreground_pgrp): Likewise.
9025 (restore_old_foreground_pgrp): New function.
9026 (start_inferior): Record the terminal file descriptor in terminal_fd
9027 and its original foreground group in old_foreground_pgrp. Register
9028 restore_old_foreground_pgrp with atexit().
9029
9030 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9031
9032 * server.c (handle_query): Correct qPart to qXfer.
9033
9034 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9035
9036 * configure.ac: Check for more headers which are missing on
9037 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9038 * configure.srv: Add Cygwin and mingw32.
9039 * remote-utils.c: Don't include headers unconditionally which
9040 are missing on mingw32. Include <winsock.h> for mingw32.
9041 (remote_open): Adjust for mingw32 support. Flush
9042 standard error after writing to it.
9043 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9044 (unblock_async_io, enable_async_io, disable_async_io)
9045 (readchar, getpkt): Update for Winsock support.
9046 (prepare_resume_reply): Expect a protocol signal number.
9047 * server.c: Disable <sys/wait.h> on mingw32.
9048 (start_inferior): Adjust for mingw32 support. Flush
9049 standard error after writing to it.
9050 (attach_inferior): Likewise. Use protocol signal
9051 numbers.
9052 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9053 and names.
9054 * win32-i386-low.c: New file.
9055 * Makefile.in (XM_CLIBS): Set.
9056 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9057 (win32-i386-low.o): New dependency rule.
9058 * linux-low.c (linux_wait): Use target signal numbers.
9059 * target.h (struct target_ops): Doc fix.
9060 * server.h (target_signal_to_name): New prototype.
9061 * gdbreplay.c: Don't include headers unconditionally which
9062 are missing on mingw32. Include <winsock.h> for mingw32.
9063 (remote_close, remote_open): Adjust for Winsock support.
9064 * configure, config.in: Regenerated.
9065
9066 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9067
9068 * server.c (decode_xfer_read, write_qxfer_response): New.
9069 (handle_query): Take a packet length argument. Handle
9070 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9071 the qSupported response.
9072 (main): Update call to handle_query.
9073
9074 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9075
9076 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9077 (putpkt_binary): Renamed from putpkt and adjusted for binary
9078 data.
9079 (putpkt): New wrapper for putpkt_binary.
9080 (readchar): Don't mask off the high bit.
9081 (decode_X_packet): New function.
9082 * server.c (main): Call putpkt_binary if a handler sets the packet
9083 length. Save the length of the incoming packet. Handle 'X'.
9084 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9085
9086 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9087
9088 * server.c (handle_query): Handle qSupported.
9089
9090 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9091
9092 * remote-utils.c (all_symbols_looked_up): New variable.
9093 (look_up_one_symbol): Check it.
9094 * server.h (look_up_one_symbol): New declaration.
9095 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9096
9097 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9098
9099 * Makefile.in (linux-arm-low.o): Update dependencies.
9100 * linux-arm-low.c: Include "gdb_proc_service.h".
9101 (PTRACE_GET_THREAD_AREA): Define.
9102 (ps_get_thread_area): New function.
9103
9104 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9105
9106 * configure.srv (m68k*-*-uclinux*): New target.
9107 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9108 (linux_resume_one_process): Remove extraneous cast.
9109 (linux_read_offsets): New.
9110 (linux_target_op): Add linux_read_offsets on mmuless systems.
9111 * server.c (handle_query): Add qOffsets logic.
9112 * target.h (struct target_ops): Add read_offsets.
9113
9114 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9115
9116 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9117 (PTRACE_GET_THREAD_AREA): Define.
9118 (ps_get_thread_area): New function.
9119 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9120 (linux-x86-64-low.o): Update.
9121
9122 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9123
9124 * configure.ac: Remove checks for prfpregset_t.
9125 * gdb_proc_service.h: New file.
9126 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9127 new "gdb_proc_service.h".
9128 * proc-service.c: Likewise.
9129 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9130 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9131 * Makefile.in (gdb_proc_service_h): Updated.
9132 * configure, config.in: Regenerated.
9133
9134 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9135
9136 * remote-utils.c (prepare_resume_reply): Move declaration
9137 of gdb_id_from_wait to the top of the block.
9138
9139 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9140
9141 * linux-low.c (regsets_store_inferior_registers): Read the regset
9142 from the target before filling it.
9143
9144 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9145
9146 * server.c (attach_inferior): Return SIGTRAP for a successful
9147 attach.
9148
9149 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9150
9151 * Makefile.in (OBS): Add version.o.
9152 (STAGESTUFF): Delete.
9153 (version.o): Add dependencies.
9154 (version.c): Replace rule.
9155 (clean): Remove version.c.
9156 * server.c (gdbserver_version): New.
9157 (gdbserver_usage): Use printf.
9158 (main): Handle --version and --help.
9159 * server.h (version, host_name): Add declarations.
9160
9161 2005-12-23 Eli Zaretskii <eliz@gnu.org>
9162
9163 * linux-arm-low.c:
9164 * linux-arm-low.c:
9165 * inferiors.c:
9166 * i387-fp.h:
9167 * i387-fp.c:
9168 * gdbreplay.c:
9169 * regcache.c:
9170 * proc-service.c:
9171 * mem-break.h:
9172 * mem-break.c:
9173 * linux-x86-64-low.c:
9174 * linux-sh-low.c:
9175 * linux-s390-low.c:
9176 * linux-ppc64-low.c:
9177 * linux-ppc-low.c:
9178 * linux-mips-low.c:
9179 * linux-m68k-low.c:
9180 * linux-m32r-low.c:
9181 * linux-low.h:
9182 * linux-low.c:
9183 * linux-ia64-low.c:
9184 * linux-i386-low.c:
9185 * linux-crisv32-low.c:
9186 * thread-db.c:
9187 * terminal.h:
9188 * target.h:
9189 * target.c:
9190 * server.h:
9191 * server.c:
9192 * remote-utils.c:
9193 * regcache.h:
9194 * utils.c:
9195 * Makefile.in:
9196 * configure.ac:
9197 * gdbserver.1: Add (C) after Copyright. Update the FSF
9198 address.
9199
9200 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9201
9202 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9203 (arm_breakpoint_at): Recognize both breakpoints.
9204 (the_low_target): Use the correct breakpoint instruction.
9205
9206 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9207
9208 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9209 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9210 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9211 (the_low_target): Update.
9212
9213 2005-10-25 Andreas Schwab <schwab@suse.de>
9214
9215 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9216
9217 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9218 (ia64_num_regs): Reduce to 462.
9219
9220 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9221
9222 * acinclude.m4: Correct quoting.
9223 * aclocal.m4: Regenerated.
9224
9225 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9226 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9227 (thread_db_init): Call thread_db_err_str.
9228 * configure.ac: Check for TD_VERSION.
9229 * config.in, configure: Regenerated.
9230
9231 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9232
9233 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9234
9235 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9236
9237 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9238 is not available. Define HAVE_PTRACE_GETREGS if it is.
9239 * config.in, configure: Regenerated.
9240 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9241 * linux-i386-low.c, linux-m68k-low.c: Update to use
9242 HAVE_PTRACE_GETREGS.
9243 * linux-low.c (regsets_fetch_inferior_registers)
9244 (regsets_store_inferior_registers): Only return 0 if we processed
9245 GENERAL_REGS.
9246 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9247 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9248
9249 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9250
9251 * inferiors.c (struct thread_info): Add gdb_id.
9252 (add_thread): Add gdb_id argument.
9253 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
9254 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
9255 calls to add_thread.
9256 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
9257 * server.c (handle_query): Use thread_to_gdb_id.
9258 (handle_v_cont, main): Use gdb_id_to_thread_id.
9259 * server.h (add_thread): Update prototype.
9260 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
9261 prototypes.
9262
9263 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9264
9265 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
9266 left-padded registers.
9267 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
9268 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
9269
9270 2005-07-01 Steve Ellcey <sje@cup.hp.com>
9271
9272 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
9273 * configure: Regenerate.
9274 * config.in: Regenerate.
9275 * server.h (NEED_DECLARATION_STRERROR):
9276 Replace with !HAVE_DECL_STRERROR.
9277
9278 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
9279
9280 * linux-low.c (linux_wait, linux_send_signal): Don't test
9281 an unsigned long variable for > 0 if it could be MAX_ULONG.
9282 * server.c (myresume): Likewise.
9283 * target.c (set_desired_inferior): Likewise.
9284
9285 2005-06-13 Mark Kettenis <kettenis@gnu.org>
9286
9287 * configure.ac: Simplify and improve check for socklen_t.
9288 * configure, config.in: Regenerate.
9289
9290 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
9291
9292 * acconfig.h: Remove.
9293 * configure.ac: Add a test for socklen_t. Use three-argument
9294 AC_DEFINE throughout.
9295 * config.in: Regenerated using autoheader 2.59.
9296 * configure: Regenerated.
9297
9298 * gdbreplay.c (socklen_t): Provide a default.
9299 (remote_open): Use socklen_t.
9300 * remote-utils.c (socklen_t): Provide a default.
9301 (remote_open): Use socklen_t.
9302 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
9303 unsigned char.
9304
9305 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
9306 char for buffers.
9307 * linux-low.c (linux_read_memory, linux_write_memory)
9308 (linux_read_auxv): Likewise.
9309 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
9310 (check_mem_write): Likewise.
9311 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
9312 Likewise.
9313 * regcache.c (struct inferior_rgcache_data, registers_to_string)
9314 (registers_from_string, register_data): Likewise.
9315 * server.c (handle_query, main): Likewise.
9316 * server.h (convert_ascii_to_int, convert_int_to_ascii)
9317 (decode_M_packet): Likewise.
9318 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
9319 * target.h (struct target_ops): Update read_memory, write_memory,
9320 and read_auxv.
9321 (read_inferior_memory, write_inferior_memory): Update.
9322 * linux-low.h (struct linux_target_ops): Change type of breakpoint
9323 to unsigned char *.
9324 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
9325 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
9326 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
9327 linux-s390-low.c, linux-sh-low.c: Update for changes in
9328 read_inferior_memory and the_low_target->breakpoint.
9329
9330 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
9331
9332 * Makefile.in (SFILES): Add linux-ppc64-low.c.
9333 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
9334 * configure.srv: Add powerpc64-*-linux*.
9335 * linux-ppc64-low.c: New file.
9336
9337 2005-05-23 Orjan Friberg <orjanf@axis.com>
9338
9339 * linux-cris-low.c: New file with support for CRIS.
9340 * linux-crisv32-low.c: Ditto for CRISv32.
9341 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
9342 (clean): Add reg-cris.c and reg-crisv32.c.
9343 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
9344 reg-crisv32.o, and reg-crisv32.c to make rules.
9345 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
9346 recognized targets.
9347
9348 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
9349
9350 * linux-low.c (fetch_register): Ensure buffer size is a multiple
9351 of sizeof (PTRACE_XFER_TYPE).
9352 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
9353
9354 2005-05-12 Orjan Friberg <orjanf@axis.com>
9355
9356 * target.h (struct target_ops): Add insert_watchpoint,
9357 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
9358 pointers for hardware watchpoint support.
9359 * linux-low.h (struct linux_target_ops): Ditto.
9360 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
9361 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
9362 to linux_target_ops.
9363 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
9364 reply packet.
9365 * server.c (main): Recognize 'Z' and 'z' packets.
9366
9367 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
9368
9369 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
9370 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
9371 (the_low_target): Add new members.
9372
9373 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9374
9375 * proc-service.c (ps_lgetregs): Search all_processes instead of
9376 all_threads.
9377
9378 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9379
9380 * server.c (start_inferior): Change return type to int.
9381 (attach_inferior): Change sigptr to int *.
9382 (handle_v_cont, handle_v_requests): Change signal to int *.
9383 (main): Change signal to int.
9384
9385 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
9386
9387 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
9388 * configure.srv: Add m32r*-*-linux*.
9389 * linux-m32r-low.c: New file.
9390
9391 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
9392
9393 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
9394
9395 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9396
9397 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
9398 Take unsigned long arguments for PIDs.
9399 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
9400 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
9401 (wait_for_sigstop, linux_resume_one_process)
9402 (regsets_fetch_inferior_registers, linux_send_signal)
9403 (linux_read_auxv): Likewise. Update the types of variables holding
9404 PIDs. Update format string specifiers.
9405 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
9406 * remote-utils.c (prepare_resume_reply): Likewise.
9407 * server.c (cont_thread, general_thread, step_thread)
9408 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
9409 unsigned long.
9410 (handle_query): Update format specifiers.
9411 (handle_v_cont, main): Use strtoul for thread IDs.
9412 * server.h (struct inferior_list_entry): Use unsigned long for ID.
9413 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
9414 (general_thread, step_thread, thread_from_wait)
9415 (old_thread_from_wait): Update.
9416 * target.h (struct thread_resume): Use unsigned long for THREAD.
9417 (struct target_ops): Use unsigned long for arguments to attach and
9418 thread_alive.
9419
9420 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
9421
9422 * acinclude.m4: Include bfd/bfd.m4 directly.
9423 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
9424 <agriffis@toolchain.org>.
9425 * aclocal.m4, configure: Regenerated.
9426
9427 2005-01-07 Andrew Cagney <cagney@gnu.org>
9428
9429 * configure.ac: Rename configure.in, require autoconf 2.59.
9430 * configure: Re-generate.
9431
9432 2004-12-08 Daniel Jacobowitz <dan@debian.org>
9433
9434 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
9435 LIBS when finished.
9436 * aclocal.m4: Regenerated.
9437 * configure: Regenerated.
9438
9439 2004-11-21 Andreas Schwab <schwab@suse.de>
9440
9441 * linux-m68k-low.c (m68k_num_gregs): Define.
9442 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
9443 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
9444 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
9445 (m68k_breakpoint_at): New. Add to the_low_target.
9446
9447 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
9448 srv_linux_thread_db to yes.
9449
9450 2004-10-20 Joel Brobecker <brobecker@gnat.com>
9451
9452 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
9453 (ARCH_SET_FS): Likewise.
9454 (ARCH_GET_FS): Likewise.
9455 (ARCH_GET_GS): Likewise.
9456
9457 2004-10-16 Daniel Jacobowitz <dan@debian.org>
9458
9459 * linux-i386-low.c (ps_get_thread_area): New.
9460 * linux-x86-64-low.c (ps_get_thread_area): New.
9461 * linux-low.c: Include <sys/syscall.h>.
9462 (linux_kill_one_process): Don't kill the first thread here.
9463 (linux_kill): Kill the first thread here.
9464 (kill_lwp): New function.
9465 (send_sigstop, linux_send_signal): Use it.
9466 * proc-service.c: Clean up #ifdefs.
9467 (fpregset_info): Delete.
9468 (ps_lgetregs): Update and enable implementation.
9469 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
9470 implementations.
9471 * remote-utils.c (struct sym_cache, symbol_cache): New.
9472 (input_interrupt): Print a clearer message.
9473 (async_io_enabled): New variable.
9474 (enable_async_io, disable_async_io): Use it. Update comments.
9475 (look_up_one_symbol): Use the symbol cache.
9476 * thread-db.c (thread_db_look_up_symbols): New function.
9477 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
9478
9479 2004-10-16 Daniel Jacobowitz <dan@debian.org>
9480
9481 * configure.in: Test for -rdynamic.
9482 * configure: Regenerated.
9483 * Makefile (INTERNAL_LDFLAGS): New.
9484 (gdbserver, gdbreplay): Use it.
9485
9486 2004-09-02 Andrew Cagney <cagney@gnu.org>
9487
9488 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
9489
9490 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
9491
9492 * linux-low.c (linux_wait): Clear all_processes list also.
9493
9494 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
9495
9496 * linux-low.c: Include <errno.h>. Remove extern declaration of
9497 errno.
9498
9499 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
9500
9501 * gdbreplay.c, server.h, utils.c: Update copyright years.
9502
9503 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9504
9505 * server.c (main): Print child status or termination signal from
9506 variable 'signal', not 'sig'.
9507
9508 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9509
9510 * linux-low.c (linux_read_memory): Change return type to
9511 int. Check for and return error from ptrace().
9512 * target.c (read_inferior_memory): Change return type to int. Pass
9513 back return status from the_target->read_memory().
9514 * target.h (struct target_ops): Adapt *read_memory() prototype.
9515 Update comment.
9516 (read_inferior_memory): Adapt prototype.
9517 * server.c (main): Return an error packet if
9518 read_inferior_memory() returns an error.
9519
9520 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
9521
9522 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
9523 Unify with other clean targets.
9524
9525 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9526
9527 * server.c (handle_v_cont): Call set_desired_inferior.
9528
9529 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9530
9531 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
9532
9533 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9534
9535 * linux-low.c (linux_wait): Unblock async I/O.
9536 (linux_resume): Block and enable async I/O.
9537 * remote-utils.c (block_async_io, unblock_async_io): New functions.
9538 * server.h (block_async_io, unblock_async_io): Add prototypes.
9539
9540 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9541
9542 * remote-utils.c (remote_open): Print a status notice after
9543 opening a TCP port.
9544 * server.c (attach_inferior): Print a status notice after
9545 attaching.
9546
9547 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9548
9549 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
9550
9551 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
9552
9553 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
9554 error packet.
9555 * server.c, target.h: Update copyright years.
9556
9557 2004-02-25 Roland McGrath <roland@redhat.com>
9558
9559 * target.h (struct target_ops): New member `read_auxv'.
9560 * server.c (handle_query): Handle qPart:auxv:read: query using that.
9561 * linux-low.c (linux_read_auxv): New function.
9562 (linux_target_ops): Initialize `read_auxv' member to that.
9563
9564 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
9565
9566 Committed by Jim Blandy <jimb@redhat.com>.
9567
9568 * linux-s390-low.c (s390_num_regs): Update.
9569 (s390_regmap): Remove control registers. Use __s390x__ predefine
9570 instead of GPR_SIZE to distiguish s390 and s390x targets.
9571
9572 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
9573
9574 * linux-low.c: Update copyright year.
9575 (check_removed_breakpoint): Clear pending_is_breakpoint.
9576 (linux_set_resume_request, linux_queue_one_thread)
9577 (resume_status_pending_p): New functions.
9578 (linux_continue_one_thread): Use process->resume.
9579 (linux_resume): Only resume threads if there are no pending events.
9580 * linux-low.h (struct process_info): Add resume request
9581 pointer.
9582
9583 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
9584
9585 * regcache.c (new_register_cache): Clear the allocated register
9586 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
9587
9588 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
9589
9590 * linux-low.c (linux_resume): Take a struct thread_resume *
9591 argument.
9592 (linux_wait): Update call.
9593 (resume_ptr): New static variable.
9594 (linux_continue_one_thread): Renamed from
9595 linux_continue_one_process. Use resume_ptr.
9596 (linux_resume): Use linux_continue_one_thread.
9597 * server.c (handle_v_cont, handle_v_requests): New functions.
9598 (myresume): New function.
9599 (main): Handle 'v' case.
9600 * target.h (struct thread_resume): New type.
9601 (struct target_ops): Change argument of "resume" to struct
9602 thread_resume *.
9603 (myresume): Delete macro.
9604
9605 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
9606
9607 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
9608 (uninstall): Support DESTDIR.
9609
9610 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
9611
9612 * configure.srv: Add xscale*linux copy of arm*linux entry.
9613
9614 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
9615
9616 * linux-arm-low.c (arm_reinsert_addr): New function.
9617 (the_low_target): Add arm_reinsert_addr.
9618
9619 2003-07-08 Mark Kettenis <kettenis@gnu.org>
9620
9621 * mem-break.c: Remove whitespace at end of file.
9622
9623 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
9624
9625 * configure.in: Check whether we need to prototype strerror.
9626 * server.h: Optionally prototype strerror.
9627 * gdbreplay.c (perror_with_name): Use strerror.
9628 * linux-low.c (linux_attach_lwp): Use strerror.
9629 * utils.c (perror_with_name): Use strerror.
9630 * config.in, configure: Regenerated.
9631
9632 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
9633
9634 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
9635 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
9636
9637 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
9638
9639 * Makefile.in (SFILES): Update.
9640 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
9641 low-sun3.c: Remove files.
9642
9643 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
9644
9645 * linux-low.c: Move comment to linux_thread_alive where it belonged.
9646 (linux_detach_one_process, linux_detach): New functions.
9647 (linux_target_ops): Add linux_detach.
9648 * server.c (main): Handle 'D' packet.
9649 * target.h (struct target_ops): Add "detach" member.
9650 (detach_inferior): Define.
9651
9652 2003-06-13 Mark Kettenis <kettenis@gnu.org>
9653
9654 From Kelley Cook <kelleycook@wideopenwest.com>:
9655 * configure.srv: Accept i[34567]86 variants.
9656
9657 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
9658
9659 * linux-low.c (linux_wait_for_event): Correct comment typos.
9660 (linux_resume_one_process): Call check_removed_breakpoint.
9661 (linux_send_signal): New function.
9662 (linux_target_ops): Add linux_send_signal.
9663 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
9664 of kill.
9665 * target.h (struct target_ops): Add send_signal.
9666
9667 2003-05-29 Jim Blandy <jimb@redhat.com>
9668
9669 * linux-low.c (usr_store_inferior_registers): Transfer buf in
9670 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
9671 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
9672 away part of the register's value.
9673
9674 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
9675
9676 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
9677 (linux_wait_for_event, linux_init_signals): Likewise.
9678
9679 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
9680
9681 * configure.in: Check for stdlib.h.
9682 * configure: Regenerated.
9683 * config.in: Regenerated.
9684
9685 2003-01-04 Andreas Schwab <schwab@suse.de>
9686
9687 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
9688
9689 2003-01-02 Andrew Cagney <ac131313@redhat.com>
9690
9691 * Makefile.in: Remove obsolete code.
9692
9693 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
9694
9695 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
9696 defined(PT_FPR0_HI).
9697
9698 2002-11-17 Stuart Hughes <seh@zee2.com>
9699
9700 * linux-arm-low.c (arm_num_regs): Increase.
9701 (arm_regmap): Include status register.
9702
9703 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
9704
9705 * linux-low.c (register_addr): Remove incorrect -1 check.
9706
9707 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
9708
9709 * linux-low.c (linux_create_inferior): Call setpgid. Return
9710 the new PID.
9711 (unstopped_p, linux_signal_pid): Remove.
9712 (linux_target_ops): Remove linux_signal_pid.
9713 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
9714 global instead of target method.
9715 * target.h (struct target_ops): Remove signal_pid. Update comment
9716 for create_inferior.
9717 * server.c (signal_pid): New variable.
9718 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
9719 gdbserver. Set the child to be the foreground process group.
9720 (attach_inferior): Set signal_pid.
9721
9722 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
9723
9724 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
9725
9726 2002-08-20 Jim Blandy <jimb@redhat.com>
9727
9728 * Makefile.in (LDFLAGS): Allow the configure script to establish a
9729 default for this.
9730
9731 2002-08-01 Andrew Cagney <cagney@redhat.com>
9732
9733 * Makefile.in: Make chill references obsolete.
9734
9735 2002-07-24 Kevin Buettner <kevinb@redhat.com>
9736
9737 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
9738 * configure: Regenerate.
9739 * config.in: Regenerate.
9740
9741 2002-07-09 David O'Brien <obrien@FreeBSD.org>
9742
9743 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
9744 (perror_with_name, remote_close, remote_open, expect, play): Static.
9745
9746 2002-07-04 Michal Ludvig <mludvig@suse.cz>
9747
9748 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
9749 byte offsets instead of an array of indexes.
9750 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
9751
9752 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
9753
9754 * regcache.c: Add comment.
9755
9756 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
9757
9758 * thread-db.c: New file.
9759 * proc-service.c: New file.
9760 * acinclude.m4: New file.
9761 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
9762 proc-service.o, and thread-db.o.
9763 (linux-low.o): Add USE_THREAD_DB.
9764 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
9765 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
9766 * aclocal.m4: Regenerated.
9767 * config.in: Regenerated.
9768 * configure: Regenerated.
9769 * configure.in: Check for proc_service.h, sys/procfs.h,
9770 thread_db.h, and linux/elf.h headrs.
9771 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
9772 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
9773 Check for -lthread_db and thread support.
9774 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
9775 PowerPC, and SuperH.
9776 * i387-fp.c: Constify arguments.
9777 * i387-fp.h: Likewise.
9778 * inferiors.c: (struct thread_info): Renamed from
9779 `struct inferior_info'. Remove PID member. Use generic inferior
9780 list header. All uses updated.
9781 (inferiors, signal_pid): Removed.
9782 (all_threads): New variable.
9783 (get_thread): Define.
9784 (add_inferior_to_list): New function.
9785 (for_each_inferior): New function.
9786 (change_inferior_id): New function.
9787 (add_inferior): Removed.
9788 (remove_inferior): New function.
9789 (add_thread): New function.
9790 (free_one_thread): New function.
9791 (remove_thread): New function.
9792 (clear_inferiors): Use for_each_inferior and free_one_thread.
9793 (find_inferior): New function.
9794 (find_inferior_id): New function.
9795 (inferior_target_data): Update argument type.
9796 (set_inferior_target_data): Likewise.
9797 (inferior_regcache_data): Likewise.
9798 (set_inferior_regcache_data): Likewise.
9799 * linux-low.c (linux_bp_reinsert): Remove.
9800 (all_processes, stopping_threads, using_thrads)
9801 (struct pending_signals, debug_threads, pid_of): New.
9802 (inferior_pid): Replace with macro.
9803 (struct inferior_linux_data): Remove.
9804 (get_stop_pc, add_process): New functions.
9805 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
9806 Use add_process and add_thread.
9807 (linux_attach_lwp): New function, based on old linux_attach. Use
9808 add_process and add_thread. Set stop_expected for new threads.
9809 (linux_attach): New function.
9810 (linux_kill_one_process): New function.
9811 (linux_kill): Kill all LWPs.
9812 (linux_thread_alive): Use find_inferior_id.
9813 (check_removed_breakpoints, status_pending_p): New functions.
9814 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
9815 Update. Use WNOHANG. Wait for cloned processes also. Update process
9816 struct for the found process.
9817 (linux_wait_for_event): New function.
9818 (linux_wait): Use it. Support LWPs.
9819 (send_sigstop, wait_for_sigstop, stop_all_processes)
9820 (linux_resume_one_process, linux_continue_one_process): New functions.
9821 (linux_resume): Support LWPs.
9822 (REGISTER_RAW_SIZE): Remove.
9823 (fetch_register): Use register_size instead. Call supply_register.
9824 (usr_store_inferior_registers): Likewise. Call collect_register.
9825 Fix recursive case.
9826 (regsets_fetch_inferior_registers): Improve error message.
9827 (regsets_store_inferior_registers): Add debugging.
9828 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
9829 (unstopped_p, linux_signal_pid): New functions.
9830 (linux_target_ops): Add linux_signal_pid.
9831 (linux_init_signals): New function.
9832 (initialize_low): Call it. Initialize using_threads.
9833 * regcache.c (inferior_regcache_data): Add valid
9834 flag.
9835 (get_regcache): Fetch registers lazily. Add fetch argument
9836 and update all callers.
9837 (regcache_invalidate_one, regcache_invalidate): New
9838 functions.
9839 (new_register_cache): Renamed from create_register_cache.
9840 Return the new regcache.
9841 (free_register_cache): Change argument to a void *.
9842 (registers_to_string, registers_from_string): Call get_regcache
9843 with fetch flag set.
9844 (register_data): Make static. Pass fetch flag to get_regcache.
9845 (supply_register): Call get_regcache with fetch flag clear.
9846 (collect_register): Call get_regcache with fetch flag set.
9847 (collect_register_as_string): New function.
9848 * regcache.h: Update.
9849 * remote-utils.c (putpkt): Flush after debug output and use
9850 stderr.
9851 Handle input interrupts while waiting for an ACK.
9852 (input_interrupt): Use signal_pid method.
9853 (getpkt): Flush after debug output and use stderr.
9854 (outreg): Use collect_register_as_string.
9855 (new_thread_notify, dead_thread_notify): New functions.
9856 (prepare_resume_reply): Check using_threads. Set thread_from_wait
9857 and general_thread.
9858 (look_up_one_symbol): Flush after debug output.
9859 * server.c (step_thread, server_waiting): New variables.
9860 (start_inferior): Don't use signal_pid. Update call to mywait.
9861 (attach_inferior): Update call to mywait.
9862 (handle_query): Handle qfThreadInfo and qsThreadInfo.
9863 (main): Don't fetch/store registers explicitly. Use
9864 set_desired_inferior. Support proposed ``Hs'' packet. Update
9865 calls to mywait.
9866 * server.h: Update.
9867 (struct inferior_list, struct_inferior_list_entry): New.
9868 * target.c (set_desired_inferior): New.
9869 (write_inferior_memory): Constify.
9870 (mywait): New function.
9871 * target.h: Update.
9872 (struct target_ops): New signal_pid method.
9873 (mywait): Removed macro, added prototype.
9874
9875 * linux-low.h (regset_func): Removed.
9876 (regset_fill_func, regset_store_func): New.
9877 (enum regset_type): New.
9878 (struct regset_info): Add type field. Use new operation types.
9879 (struct linux_target_ops): stop_pc renamed to get_pc.
9880 Add decr_pc_after_break and breakpoint_at.
9881 (get_process, get_thread_proess, get_process_thread)
9882 (strut process_info, all_processes, linux_attach_lwp)
9883 (thread_db_init): New.
9884
9885 * linux-arm-low.c (arm_get_pc, arm_set_pc,
9886 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
9887 (the_low_target): Add new members.
9888 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
9889 (i386_store_fpxregset): Constify.
9890 (target_regsets): Add new kind identifier.
9891 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
9892 (i386_set_pc): Add debugging.
9893 (i386_breakpoint_at): New function.
9894 (the_low_target): Add new members.
9895 * linux-mips-low.c (mips_get_pc, mips_set_pc)
9896 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
9897 (mips_breakpoint_at): New.
9898 (the_low_target): Add new members.
9899 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
9900 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
9901 (the_low_target): Add new members.
9902 * linux-sh-low.c (sh_get_pc, sh_set_pc)
9903 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
9904 (the_low_target): Add new members.
9905 * linux-x86-64-low.c (target_regsets): Add new kind
9906 identifier.
9907
9908 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
9909
9910 From Martin Pool <mbp@samba.org>:
9911 * server.c (gdbserver_usage): New function.
9912 (main): Call it.
9913
9914 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
9915
9916 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
9917 stop_at -> stop_pc.
9918
9919 2002-05-04 Andrew Cagney <ac131313@redhat.com>
9920
9921 * Makefile.in: Remove obsolete code.
9922
9923 2002-04-24 Michal Ludvig <mludvig@suse.cz>
9924
9925 * linux-low.c (regsets_fetch_inferior_registers),
9926 (regsets_store_inferior_registers): Removed cast to int from
9927 ptrace() calls.
9928 * regcache.h: Added declaration of struct inferior_info.
9929
9930 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
9931
9932 * inferiors.c (struct inferior_info): Add regcache_data.
9933 (add_inferior): Call create_register_cache.
9934 (clear_inferiors): Call free_register_cache.
9935 (inferior_regcache_data, set_inferior_regcache_data): New functions.
9936 * regcache.c (struct inferior_regcache_data): New.
9937 (registers): Remove.
9938 (get_regcache): New function.
9939 (create_register_cache, free_register_cache): New functions.
9940 (set_register_cache): Don't initialize the register cache here.
9941 (registers_to_string, registers_from_string, register_data): Call
9942 get_regcache.
9943 * regcache.h: Add prototypes.
9944 * server.h: Likewise.
9945
9946 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
9947
9948 * mem-break.c: New file.
9949 * mem-break.h: New file.
9950 * Makefile.in: Add mem-break.o rule; update server.h
9951 dependencies.
9952 * inferiors.c (struct inferior_info): Add target_data
9953 member.
9954 (clear_inferiors): Free target_data member if set.
9955 (inferior_target_data, set_inferior_target_data): New functions.
9956 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
9957 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
9958 * linux-low.c (linux_bp_reinsert): New variable.
9959 (struct inferior_linux_data): New.
9960 (linux_create_inferior): Use set_inferior_target_data.
9961 (linux_attach): Likewise. Call add_inferior.
9962 (linux_wait_for_one_inferior): New function.
9963 (linux_wait): Call it.
9964 (linux_write_memory): Add const.
9965 (initialize_low): Call set_breakpoint_data.
9966 * linux-low.h (struct linux_target_ops): Add breakpoint
9967 handling members.
9968 * server.c (attach_inferior): Remove extra add_inferior
9969 call.
9970 * server.h: Include mem-break.h. Update inferior.c
9971 prototypes.
9972 * target.c (read_inferior_memory)
9973 (write_inferior_memory): New functions.
9974 * target.h (read_inferior_memory)
9975 (write_inferior_memory): Change macros to prototypes.
9976 (struct target_ops): Update comments. Add const to write_memory
9977 definition.
9978
9979 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
9980
9981 * linux-low.c (usr_store_inferior_registers): Support
9982 registers which are allowed to fail to store.
9983 * linux-low.h (linux_target_ops): Likewise.
9984 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
9985 (ppc_cannot_store_register): FPSCR may not be storable.
9986
9987 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
9988
9989 * server.h: Include <string.h> if HAVE_STRING_H.
9990 * ChangeLog: Correct paths in last ChangeLog entry.
9991
9992 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
9993
9994 * linux-low.h: Remove obsolete prototypes.
9995 (struct linux_target_ops): New.
9996 (extern the_low_target): New.
9997 * linux-low.c (num_regs, regmap): Remove declarations.
9998 (register_addr): Use the_low_target explicitly.
9999 (fetch_register): Likewise.
10000 (usr_fetch_inferior_registers): Likewise.
10001 (usr_store_inferior_registers): Likewise.
10002 * linux-arm-low.c (num_regs): Remove.
10003 (arm_num_regs): Define.
10004 (arm_regmap): Renamed from regmap, made static.
10005 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10006 made static.
10007 (arm_cannot_store_register): Renamed from cannot_store_register,
10008 made static.
10009 (the_low_target): New.
10010 * linux-i386-low.c (num_regs): Remove.
10011 (i386_num_regs): Define.
10012 (i386_regmap): Renamed from regmap, made static.
10013 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10014 made static.
10015 (i386_cannot_store_register): Renamed from cannot_store_register,
10016 made static.
10017 (the_low_target): New.
10018 * linux-ia64-low.c (num_regs): Remove.
10019 (ia64_num_regs): Define.
10020 (ia64_regmap): Renamed from regmap, made static.
10021 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10022 made static.
10023 (ia64_cannot_store_register): Renamed from cannot_store_register,
10024 made static.
10025 (the_low_target): New.
10026 * linux-m68k-low.c (num_regs): Remove.
10027 (m68k_num_regs): Define.
10028 (m68k_regmap): Renamed from regmap, made static.
10029 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10030 made static.
10031 (m68k_cannot_store_register): Renamed from cannot_store_register,
10032 made static.
10033 (the_low_target): New.
10034 * linux-mips-low.c (num_regs): Remove.
10035 (mips_num_regs): Define.
10036 (mips_regmap): Renamed from regmap, made static.
10037 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10038 made static.
10039 (mips_cannot_store_register): Renamed from cannot_store_register,
10040 made static.
10041 (the_low_target): New.
10042 * linux-ppc-low.c (num_regs): Remove.
10043 (ppc_num_regs): Define.
10044 (ppc_regmap): Renamed from regmap, made static.
10045 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10046 made static.
10047 (ppc_cannot_store_register): Renamed from cannot_store_register,
10048 made static.
10049 (the_low_target): New.
10050 * linux-s390-low.c (num_regs): Remove.
10051 (s390_num_regs): Define.
10052 (s390_regmap): Renamed from regmap, made static.
10053 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10054 made static.
10055 (s390_cannot_store_register): Renamed from cannot_store_register,
10056 made static.
10057 (the_low_target): New.
10058 * linux-sh-low.c (num_regs): Remove.
10059 (sh_num_regs): Define.
10060 (sh_regmap): Renamed from regmap, made static.
10061 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10062 made static.
10063 (sh_cannot_store_register): Renamed from cannot_store_register,
10064 made static.
10065 (the_low_target): New.
10066 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10067 (the_low_target): New.
10068
10069 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10070
10071 * Makefile.in: Add stamp-h target.
10072 * configure.in: Create stamp-h.
10073 * configure: Regenerated.
10074
10075 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10076
10077 * inferiors.c: New file.
10078 * target.c: New file.
10079 * target.h: New file.
10080 * Makefile.in: Add target.o and inferiors.o. Update
10081 dependencies.
10082 * linux-low.c (inferior_pid): New static variable,
10083 moved from server.c.
10084 (linux_create_inferior): Renamed from create_inferior.
10085 Call add_inferior. Return 0 on success instead of a PID.
10086 (linux_attach): Renamed from myattach.
10087 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10088 (linux_thread_alive): Renamed from mythread_alive.
10089 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10090 child dies.
10091 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10092 (regsets_store_inferior_registers): Correct error message.
10093 Add missing ``return 0''.
10094 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10095 (linux_store_registers): Renamed from store_inferior_registers.
10096 (linux_read_memory): Renamed from read_inferior_memory.
10097 (linux_write_memory): Renamed from write_inferior_memory.
10098 (linux_target_ops): New structure.
10099 (initialize_low): Call set_target_ops ().
10100 * remote-utils.c (unhexify): New function.
10101 (hexify): New function.
10102 (input_interrupt): Send signals to ``signal_pid''.
10103 * server.c (inferior_pid): Remove.
10104 (start_inferior): Update create_inferior call.
10105 (attach_inferior): Call add_inferior.
10106 (handle_query): New function.
10107 (main): Call handle_query for `q' packets.
10108 * server.h: Include "target.h". Remove obsolete prototypes.
10109 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10110
10111 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10112
10113 * Makefile.in: Add WARN_CFLAGS. Update configury
10114 dependencies.
10115 * configure.in: Check for <string.h>
10116 * configure: Regenerate.
10117 * config.in: Regenerate.
10118 * gdbreplay.c: Include needed system headers.
10119 (remote_open): Remove strchr prototype.
10120 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10121 * regcache.c (supply_register): Change buf argument to const void *.
10122 (supply_register_by_name): Likewise.
10123 (collect_register): Change buf argument to void *.
10124 (collect_register_by_name): Likewise.
10125 * regcache.h: Add missing prototypes.
10126 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10127 * server.c (handle_query): New function.
10128 (attached): New static variable, moved out of main.
10129 (main): Quiet longjmp clobber warnings.
10130 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10131 * utils.c (error): Remove NORETURN.
10132 (fatal): Likewise.