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