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