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