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