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