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