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