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