S390: Add vector register support to gdb
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-03-01 Pedro Alves <palves@redhat.com>
2
3 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4 parameter.
5
6 2015-02-27 Pedro Alves <palves@redhat.com>
7
8 * linux-x86-low.c (u_debugreg_offset): New function.
9 (x86_linux_dr_get, x86_linux_dr_set): Use it.
10
11 2015-02-27 Pedro Alves <palves@redhat.com>
12
13 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
14 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
15 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
16 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
17 (ps_lsetfpregs, ps_getpid)
18 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
19 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
20 (ps_lsetxregs, ps_plog): Declare.
21
22 2015-02-27 Pedro Alves <palves@redhat.com>
23
24 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
25 IP_AGENT_EXPORT_FUNC.
26 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
27 IP_AGENT_EXPORT_FUNC.
28 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
29 (IP_AGENT_EXPORT): Delete.
30 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
31 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
32 (gdb_trampoline_buffer_error, collecting, gdb_collect)
33 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
34 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
35 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
36 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
37 (traceframe_read_count, traceframe_write_count)
38 (traceframes_created, trace_state_variables, get_raw_reg)
39 (get_trace_state_variable_value, set_trace_state_variable_value)
40 (ust_loaded, helper_thread_id, cmd_buf): Use
41 IPA_SYM_EXPORTED_NAME.
42 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
43 (tracepoints) Use IP_AGENT_EXPORT_VAR.
44 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
45 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
46 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
47 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
48 EXTERN_C_PUSH/EXTERN_C_POP.
49 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
50 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
51 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
52 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
53 (traceframe_write_count, traceframe_read_count)
54 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
55 (about_to_request_buffer_space, get_trace_state_variable_value)
56 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
57 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
58 EXTERN_C_PUSH/EXTERN_C_POP.
59 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
60 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
61 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
62 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
63 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
64 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
65 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
66 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
67 Define.
68 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
69 (IP_AGENT_EXPORT_VAR_DECL): Define.
70 (tracing): Declare.
71 (gdb_agent_get_raw_reg): Declare.
72
73 2015-02-27 Tom Tromey <tromey@redhat.com>
74 Pedro Alves <palves@redhat.com>
75
76 Rename symbols whose names are reserved C++ keywords throughout.
77
78 2015-02-27 Pedro Alves <palves@redhat.com>
79
80 * Makefile.in (COMPILER): New, get it from autoconf.
81 (CXX): Get from autoconf instead.
82 (COMPILE.pre): Use COMPILER.
83 (CC-LD): Rename to ...
84 (CC_LD): ... this. Use COMPILER.
85 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
86 (CXX_FOR_TARGET): Default to g++ instead of gcc.
87 * acinclude.m4: Include build-with-cxx.m4.
88 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
89 Disable -Werror by default if building in C++ mode.
90 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
91 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
92 the C++ compiler. Save/restore CXXFLAGS too.
93 * configure: Regenerate.
94
95 2015-02-27 Pedro Alves <palves@redhat.com>
96
97 * acinclude.m4: Include libiberty.m4.
98 * configure.ac: Call libiberty_INIT.
99 * config.in, configure: Regenerate.
100
101 2015-02-26 Pedro Alves <palves@redhat.com>
102
103 * linux-low.c (linux_wait_1): When incrementing the PC past a
104 program breakpoint always use the_low_target.breakpoint_len as
105 increment, rather than the maximum between that and
106 the_low_target.decr_pc_after_break.
107
108 2015-02-23 Pedro Alves <palves@redhat.com>
109
110 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
111 thread was doing a step-over; always adjust the PC if
112 we stepped over a permanent breakpoint.
113 (linux_wait_1): If we stepped over breakpoint that was on top of a
114 permanent breakpoint, manually advance the PC past it.
115
116 2015-02-23 Pedro Alves <palves@redhat.com>
117
118 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
119 modes.
120 (x86_fill_gregset, x86_store_gregset): Use it when handling
121 $orig_eax.
122
123 2015-02-20 Pedro Alves <palves@redhat.com>
124
125 * thread-db.c: Include "nat/linux-procfs.h".
126 (thread_db_init): Skip listing new threads if the kernel supports
127 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
128
129 2015-02-20 Pedro Alves <palves@redhat.com>
130
131 * linux-low.c (status_pending_p_callback): Use ptid_match.
132
133 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
134
135 PR breakpoints/16812
136 * linux-low.c (wstatus_maybe_breakpoint): Remove.
137 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
138 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
139
140 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
141
142 PR breakpoints/15956
143 * tracepoint.c (cmd_qtinit): Add check for current_thread.
144
145 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
146
147 * linux-low.c (linux_low_btrace_conf): Print size.
148 * server.c (handle_btrace_conf_general_set): New.
149 (hanle_general_set): Call handle_btrace_conf_general_set.
150 (handle_query): Report Qbtrace-conf:bts:size as supported.
151
152 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
153
154 * linux-low.c (linux_low_enable_btrace): Update parameters.
155 (linux_low_btrace_conf): New.
156 (linux_target_ops)<to_btrace_conf>: Initialize.
157 * server.c (current_btrace_conf): New.
158 (handle_btrace_enable): Rename to ...
159 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
160 to target_enable_btrace. Update comment. Update users.
161 (handle_qxfer_btrace_conf): New.
162 (qxfer_packets): Add btrace-conf entry.
163 (handle_query): Report qXfer:btrace-conf:read as supported packet.
164 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
165 (target_ops)<read_btrace_conf>: New.
166 (target_enable_btrace): Update parameters.
167 (target_read_btrace_conf): New.
168
169 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
170
171 * server.c (handle_btrace_general_set): Remove call to
172 target_supports_btrace.
173 (supported_btrace_packets): New.
174 (handle_query): Call supported_btrace_packets.
175 * target.h: include btrace-common.h.
176 (btrace_target_info): Removed.
177 (supports_btrace, target_supports_btrace): Update parameters.
178
179 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
180
181 * Makefile.in (SFILES): Add common/btrace-common.c.
182 (OBS): Add common/btrace-common.o.
183 (btrace-common.o): Add build rules.
184 * linux-low: Include btrace-common.h.
185 (linux_low_read_btrace): Use struct btrace_data. Call
186 btrace_data_init and btrace_data_fini.
187
188 2015-02-06 Pedro Alves <palves@redhat.com>
189
190 * thread-db.c (find_new_threads_callback): Add debug output.
191
192 2015-02-04 Pedro Alves <palves@redhat.com>
193
194 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
195 (resume_stopped_resumed_lwps): New function.
196 (linux_wait_for_event_filtered): Use it.
197
198 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
199
200 * Makefile.in (SFILES): Add linux-personality.c.
201 (linux-personality.o): New rule.
202 * configure.srv (srv_linux_obj): Add linux-personality.o to the
203 list of objects to be built.
204 * linux-low.c: Include nat/linux-personality.h.
205 (linux_create_inferior): Remove code to disable address space
206 randomization (moved to ../nat/linux-personality.c). Create
207 cleanup to disable address space randomization.
208
209 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
210
211 * Makefile.in (posix-strerror.o): New rule.
212 (mingw-strerror.o): Likewise.
213 * configure: Regenerated.
214 * configure.ac: Source file ../common/common.host. Initialize new
215 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
216
217 2015-01-14 Yao Qi <yao@codesourcery.com>
218
219 * Makefile.in (SFILES): Add nat/ppc-linux.c.
220 (ppc-linux.o): New rule.
221 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
222 * configure.ac: AC_CHECK_FUNCS(getauxval).
223 * config.in: Re-generated.
224 * configure: Re-generated.
225 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
226 ppc64_64bit_inferior_p
227
228 2015-01-14 Yao Qi <yao@codesourcery.com>
229
230 * linux-ppc-low.c: Include "nat/ppc-linux.h".
231 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
232 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
233 (PT_ORIG_R3, PT_TRAP): Likewise.
234 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
235 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
236 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
237
238 2015-01-10 Joel Brobecker <brobecker@adacore.com>
239
240 * i387-fp.c (i387_cache_to_xsave): In look over
241 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
242 zmmh_low_space field by use of zmmh_high_space.
243
244 2015-01-09 Pedro Alves <palves@redhat.com>
245
246 * linux-low.c (step_over_bkpt): Move higher up in the file.
247 (handle_extended_wait): Don't store the stop_pc here.
248 (get_stop_pc): Adjust comments and rename to ...
249 (check_stopped_by_breakpoint): ... this. Record whether the LWP
250 stopped for a software breakpoint or hardware breakpoint.
251 (thread_still_has_status_pending_p): New function.
252 (status_pending_p_callback): Use
253 thread_still_has_status_pending_p. If the event is no longer
254 interesting, resume the LWP.
255 (handle_tracepoints): Add assert.
256 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
257 (wstatus_maybe_breakpoint): New function.
258 (cancel_breakpoint): Delete function.
259 (check_stopped_by_watchpoint): New function, factored out from
260 linux_low_filter_event.
261 (lp_status_maybe_breakpoint): Delete function.
262 (linux_low_filter_event): Remove filter_ptid argument.
263 Leave thread group exits pending here. Store the LWP's stop PC.
264 Always leave events pending.
265 (linux_wait_for_event_filtered): Pull all events out of the
266 kernel, and leave them all pending.
267 (count_events_callback, select_event_lwp_callback): Consider all
268 events.
269 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
270 (select_event_lwp): Only give preference to the stepping LWP in
271 all-stop mode. Adjust comments.
272 (ignore_event): New function.
273 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
274 references to cancel_breakpoints. Adjust to renames. Also give
275 equal priority to all LWPs that have had events in non-stop mode.
276 If reporting a software breakpoint event, unadjust the LWP's PC.
277 (linux_wait): If linux_wait_1 returned an ignored event, retry.
278 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
279 Adjust.
280 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
281 (resume_status_pending_p): Use thread_still_has_status_pending_p.
282 (linux_stopped_by_watchpoint): Adjust.
283 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
284 * linux-low.h (enum lwp_stop_reason): New.
285 (struct lwp_info) <stop_pc>: Adjust comment.
286 <stopped_by_watchpoint>: Delete field.
287 <stop_reason>: New field.
288 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
289 * mem-break.c (software_breakpoint_inserted_here)
290 (hardware_breakpoint_inserted_here): New function.
291 * mem-break.h (software_breakpoint_inserted_here)
292 (hardware_breakpoint_inserted_here): Declare.
293 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
294 (cancel_breakpoints): Delete.
295 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
296 (upload_fast_traceframes): Remove references to
297 cancel_breakpoints.
298
299 2015-01-09 Pedro Alves <palves@redhat.com>
300
301 * thread-db.c (find_new_threads_callback): Ignore thread if the
302 kernel thread ID is -1.
303
304 2015-01-09 Pedro Alves <palves@redhat.com>
305
306 * linux-low.c (linux_attach_fail_reason_string): Move to
307 nat/linux-ptrace.c, and rename.
308 (linux_attach_lwp): Update comment.
309 (attach_proc_task_lwp_callback): New function.
310 (linux_attach): Adjust to rename and use
311 linux_proc_attach_tgid_threads.
312 (linux_attach_fail_reason_string): Delete declaration.
313
314 2015-01-01 Joel Brobecker <brobecker@adacore.com>
315
316 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
317 * server.c (gdbserver_version): Likewise.
318
319 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
320
321 * remote-utils.c: Include ctype.h.
322 (input_interrupt): Explicitly handle the case when the char
323 received is the NUL byte. Improve the printing of non-ASCII
324 characters.
325
326 2014-12-16 Joel Brobecker <brobecker@adacore.com>
327
328 * linux-low.c (linux_low_filter_event): Update call to
329 linux_enable_event_reporting following the addition of
330 a new parameter to that function.
331
332 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
333
334 PR server/17457
335 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
336 (AARCH64_FPCR_REGNO): Likewise.
337 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
338 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
339 (aarch64_store_fpregset): Likewise.
340
341 2014-12-15 Joel Brobecker <brobecker@adacore.com>
342
343 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
344 Remove FIXME comment about assumption about N.
345
346 2014-12-13 Joel Brobecker <brobecker@adacore.com>
347
348 * configure.ac: If large-file support is disabled in GDBserver,
349 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
350 * configure: Regenerate.
351
352 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
353
354 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
355 warning upon ENODATA from ptrace.
356 * linux-s390-low.c (s390_store_tdb): New.
357 (s390_regsets): Add regset for NT_S390_TDB.
358
359 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
360
361 * linux-low.c (regsets_store_inferior_registers): Skip regsets
362 without a fill_function.
363 * linux-s390-low.c (s390_fill_last_break): Remove.
364 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
365 (s390_arch_setup): Use regset's size instead of fill_function for
366 loop end condition.
367
368 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
369
370 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
371 the regset's store function when ptrace returned an error.
372 * regcache.c (get_thread_regcache): Invalidate register cache
373 before fetching inferior's registers.
374
375 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
376
377 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
378 while-loop as for-loop.
379 (regsets_store_inferior_registers): Likewise.
380
381 2014-11-28 Yao Qi <yao@codesourcery.com>
382
383 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
384 * config.in, configure: Re-generate.
385 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
386 is defined.
387
388 2014-11-21 Yao Qi <yao@codesourcery.com>
389
390 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
391 (AC_CHECK_HEADERS): Remove malloc.h.
392 * configure: Re-generated.
393 * config.in: Re-generated.
394 * server.h: Don't include alloca.h and malloc.h.
395 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
396 Don't include malloc.h.
397
398 2014-11-17 Joel Brobecker <brobecker@adacore.com>
399
400 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
401 corresponding ERRNO check in same block.
402
403 2014-11-12 Pedro Alves <palves@redhat.com>
404
405 * server.c (cont_thread): Update comment.
406 (start_inferior, attach_inferior): No longer clear cont_thread.
407 (handle_v_cont): No longer set cont_thread.
408 (captured_main): Clear cont_thread each time a GDB connects.
409
410 2014-11-12 Pedro Alves <palves@redhat.com>
411
412 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
413 thread, and don't resume all threads if the Hc thread has exited.
414
415 2014-11-12 Pedro Alves <palves@redhat.com>
416
417 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
418 the process group instead of to a specific LWP.
419
420 2014-10-15 Pedro Alves <palves@redhat.com>
421
422 PR server/17487
423 * win32-arm-low.c (arm_set_thread_context): Remove current_event
424 parameter.
425 (arm_set_thread_context): Delete.
426 (the_low_target): Adjust.
427 * win32-i386-low.c (debug_registers_changed)
428 (debug_registers_used): Delete.
429 (update_debug_registers_callback): New function.
430 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
431 needing to update their debug registers.
432 (win32_get_current_dr): New function.
433 (x86_dr_low_get_addr, x86_dr_low_get_control)
434 (x86_dr_low_get_status): Fetch the debug register from the thread
435 record's context.
436 (i386_initial_stuff): Adjust.
437 (i386_get_thread_context): Remove current_event parameter. Don't
438 clear debug_registers_changed nor copy DR values to
439 debug_reg_state.
440 (i386_set_thread_context): Delete.
441 (i386_prepare_to_resume): New function.
442 (i386_thread_added): Mark the thread as needing to update irs
443 debug registers.
444 (the_low_target): Remove i386_set_thread_context and install
445 i386_prepare_to_resume.
446 * win32-low.c (win32_get_thread_context): Adjust.
447 (win32_set_thread_context): Use SetThreadContext
448 directly.
449 (win32_prepare_to_resume): New function.
450 (win32_require_context): New function, factored out from ...
451 (thread_rec): ... this.
452 (continue_one_thread): Call win32_prepare_to_resume on each thread
453 we're about to continue.
454 (win32_resume): Call win32_prepare_to_resume on the event thread.
455 * win32-low.h (struct win32_thread_info)
456 <debug_registers_changed>: New field.
457 (struct win32_target_ops): Change prototype of set_thread_context,
458 delete set_thread_context and add prepare_to_resume.
459 (win32_require_context): New declaration.
460
461 2014-10-08 Gary Benson <gbenson@redhat.com>
462
463 * server.h: Do not include common-exceptions.h.
464
465 2014-10-08 Gary Benson <gbenson@redhat.com>
466
467 * server.h: Do not include cleanups.h.
468
469 2014-09-30 James Hogan <james.hogan@imgtec.com>
470
471 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
472 mips64-dsp-linux.c.
473
474 2014-09-23 Yao Qi <yao@codesourcery.com>
475
476 * linux-low.c (lp_status_maybe_breakpoint): New function.
477 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
478 (count_events_callback): Likewise.
479 (select_event_lwp_callback): Likewise.
480 (cancel_breakpoints_callback): Likewise.
481
482 2014-09-19 Don Breazeal <donb@codesourcery.com>
483
484 * linux-low.c (handle_extended_wait): Call
485 linux_ptrace_get_extended_event.
486 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
487 linux_is_extended_waitstatus.
488
489 2014-09-16 Joel Brobecker <brobecker@adacore.com>
490
491 * Makefile.in (CPPFLAGS): Define.
492 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
493 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
494
495 2014-09-16 Gary Benson <gbenson@redhat.com>
496
497 * inferiors.h (current_inferior): Renamed as...
498 (current_thread): New variable. All uses updated.
499 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
500 (maybe_move_out_of_jump_pad): Likewise.
501 (cancel_breakpoint): Likewise.
502 (linux_low_filter_event): Likewise.
503 (wait_for_sigstop): Likewise.
504 (linux_resume_one_lwp): Likewise.
505 (need_step_over_p): Likewise.
506 (start_step_over): Likewise.
507 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
508 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
509 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
510 and save_inferior as saved_thread.
511 * regcache.c (get_thread_regcache): Renamed saved_inferior as
512 saved_thread.
513 (regcache_invalidate_thread): Likewise.
514 * remote-utils.c (prepare_resume_reply): Likewise.
515 * thread-db.c (thread_db_get_tls_address): Likewise.
516 (disable_thread_event_reporting): Likewise.
517 (remove_thread_event_breakpoints): Likewise.
518 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
519 as saved_thread.
520 * target.h (set_desired_inferior): Renamed as...
521 (set_desired_thread): New declaration. All uses updated.
522 * server.c (myresume): Updated comment to reference thread instead
523 of inferior.
524 (handle_serial_event): Likewise.
525 (handle_target_event): Likewise.
526
527 2014-09-12 Tom Tromey <tromey@redhat.com>
528 Gary Benson <gbenson@redhat.com>
529
530 * regcache.h: Include common-regcache.h.
531 (regcache_read_pc): Don't declare.
532 * regcache.c (get_thread_regcache_for_ptid): New function.
533
534 2014-09-11 Tom Tromey <tromey@redhat.com>
535 Gary Benson <gbenson@redhat.com>
536
537 * symbol.c: New file.
538 * Makefile.in (SFILES): Add symbol.c.
539 (OBS): Add symbol.o.
540
541 2014-09-11 Gary Benson <gbenson@redhat.com>
542
543 * target.c (target_stop_ptid, target_continue_ptid): New
544 functions.
545
546 2014-09-11 Tom Tromey <tromey@redhat.com>
547 Gary Benson <gbenson@redhat.com>
548
549 * target.h: Include target/target.h.
550 * target.c (target_read_memory, target_read_uint32)
551 (target_write_memory): New functions.
552
553 2014-09-11 Gary Benson <gbenson@redhat.com>
554
555 * server.h (debug_hw_points): Don't declare.
556 * server.c (debug_hw_points): Don't define. Replace all uses
557 with show_debug_regs.
558 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
559 all uses with show_debug_regs.
560
561 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
562
563 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
564 endianness into account.
565 (ppc_supply_ptrace_register): Likewise.
566
567 2014-09-03 James Hogan <james.hogan@imgtec.com>
568
569 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
570 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
571
572 2014-09-03 Gary Benson <gbenson@redhat.com>
573
574 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
575 ALL_DEBUG_ADDRESS_REGISTERS.
576
577 2014-09-02 Gary Benson <gbenson@redhat.com>
578
579 * i386-low.h: Renamed as...
580 * x86-low.h: New file. All type, function and variable name
581 prefixes changed from "i386_" to "x86_". All references updated.
582 * i386-low.c: Renamed as...
583 * x86-low.c: New file. All type, function and variable name
584 prefixes changed from "i386_" to "x86_". All references updated.
585
586 2014-09-02 Gary Benson <gbenson@redhat.com>
587
588 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
589 (x86_linux_new_thread): Likewise.
590
591 2014-08-29 Gary Benson <gbenson@redhat.com>
592
593 * server.h (setjmp.h): Do not include.
594 (toplevel): Do not declare.
595 (common-exceptions.h): Include.
596 (cleanups.h): Likewise.
597 * server.c (toplevel): Do not define.
598 (exit_code): New static global.
599 (detach_or_kill_for_exit_cleanup): New function.
600 (main): New function. Original main renamed to...
601 (captured_main): New function.
602 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
603
604 2014-08-29 Gary Benson <gbenson@redhat.com>
605
606 * Makefile.in (SFILES): Add common/common-exceptions.c.
607 (OBS): Add common-exceptions.o.
608 (common-exceptions.o): New rule.
609 * utils.c (prepare_to_throw_exception): New function.
610
611 2014-08-29 Gary Benson <gbenson@redhat.com>
612
613 * config.in: Regenerate.
614 * configure: Likewise.
615
616 2014-08-29 Gary Benson <gbenson@redhat.com>
617
618 * Makefile.in (SFILES): Add common/cleanups.c.
619 (OBS): cleanups.o.
620 (cleanups.o): New rule.
621
622 2014-08-29 Gary Benson <gbenson@redhat.com>
623
624 * utils.c (internal_vwarning): New function.
625
626 2014-08-28 Gary Benson <gbenson@redhat.com>
627
628 * utils.h (fatal): Remove declaration.
629 * utils.c (fatal): Remove function.
630
631 2014-08-28 Gary Benson <gbenson@redhat.com>
632
633 * tracepoint.c (gdb_agent_init): Replace fatal with
634 perror_with_name.
635 (initialize_tracepoint): Likewise.
636
637 2014-08-28 Gary Benson <gbenson@redhat.com>
638
639 * remote-utils.c (remote_prepare): Replace fatal with error.
640
641 2014-08-28 Gary Benson <gbenson@redhat.com>
642
643 * linux-low.c (linux_async): Replace fatal with warning.
644 Tidy up and return.
645 (linux_start_non_stop): Return -1 if linux_async failed.
646
647 2014-08-28 Gary Benson <gbenson@redhat.com>
648
649 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
650 gdb_assert.
651 (i386_dr_low_get_addr): Remove vague comment.
652 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
653 gdb_assert.
654
655 2014-08-28 Gary Benson <gbenson@redhat.com>
656
657 * inferiors.c (get_thread_process): Replace check with gdb_assert.
658 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
659 internal_error.
660 (linux_resume_one_lwp): Likewise.
661 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
662 gdb_assert.
663 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
664 with internal_error.
665 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
666 (init_register_cache): Replace fatal with gdb_assert_not_reached.
667 (find_register_by_name): Replace fatal with internal_error.
668 (find_regno): Likewise.
669 * tdesc.c (init_target_desc): Replace check with gdb_assert.
670 * thread-db.c (thread_db_create_event): Likewise.
671 (thread_db_load_search): Likewise.
672 (try_thread_db_load_1): Likewise.
673 * tracepoint.c (get_jump_space_head): Replace fatal with
674 internal_error.
675 (claim_trampoline_space): Likewise.
676 (have_fast_tracepoint_trampoline_buffer): Likewise.
677 (cmd_qtstart): Likewise.
678 (stop_tracing): Likewise.
679 (fast_tracepoint_collecting): Likewise.
680 (target_malloc): Likewise.
681 (download_tracepoint): Likewise.
682 (download_trace_state_variables): Replace check with gdb_assert.
683 (upload_fast_traceframes): Replace fatal with internal_error.
684
685 2014-08-19 Tom Tromey <tromey@redhat.com>
686 Gary Benson <gbenson@redhat.com>
687
688 * Makefile.in (SFILES): Add common/common-debug.c.
689 (OBS): Add common-debug.o.
690 (common-debug.o): New rule.
691 * debug.h (debug_printf): Don't declare.
692 * debug.c (debug_printf): Renamed and rewritten as...
693 (debug_vprintf): New function.
694
695 2014-08-19 Gary Benson <gbenson@redhat.com>
696
697 * utils.h: Do not include print-utils.h.
698
699 2014-08-19 Tom Tromey <tromey@redhat.com>
700 Gary Benson <gbenson@redhat.com>
701
702 * server.h: Add static assertion.
703 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
704
705 2014-08-19 Tom Tromey <tromey@redhat.com>
706 Gary Benson <gbenson@redhat.com>
707
708 * Makefile.in (SFILES): Add common/errors.c.
709 (OBS): Add errors.o.
710 (IPA_OBS): Add errors-ipa.o.
711 (errors.o): New rule.
712 (errors-ipa.o): Likewise.
713 * utils.h (perror_with_name, error, warning): Don't declare.
714 * utils.c (warning): Renamed and rewritten as...
715 (vwarning): New function.
716 (error): Renamed and rewritten as...
717 (verror): New function.
718 (internal_error): Renamed and rewritten as...
719 (internal_verror): New function.
720
721 2014-08-07 Gary Benson <gbenson@redhat.com>
722
723 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
724 * configure: Regenerate.
725 * config.in: Likewise.
726 * server.h: Do not include errno.h.
727 * event-loop.c: Likewise.
728 * hostio-errno.c: Likewise.
729 * linux-low.c: Likewise.
730 * remote-utils.c: Likewise.
731 * spu-low.c: Likewise.
732 * utils.c: Likewise.
733 * gdbreplay.c: Unconditionally include errno.h.
734
735 2014-08-07 Gary Benson <gbenson@redhat.com>
736
737 * server.h: Do not include string.h.
738 * event-loop.c: Likewise.
739 * linux-low.c: Likewise.
740 * regcache.c: Likewise.
741 * remote-utils.c: Likewise.
742 * spu-low.c: Likewise.
743 * utils.c: Likewise.
744
745 2014-08-07 Gary Benson <gbenson@redhat.com>
746
747 * server.h: Do not include gdb_assert.h.
748
749 2014-08-07 Gary Benson <gbenson@redhat.com>
750
751 * server.h: Do not include common-utils.h.
752
753 2014-08-07 Gary Benson <gbenson@redhat.com>
754
755 * server.h: Do not include ptid.h.
756 * notif.h: Likewise.
757
758 2014-08-07 Gary Benson <gbenson@redhat.com>
759
760 * server.h: Do not include gdb_locale.h.
761
762 2014-08-07 Gary Benson <gbenson@redhat.com>
763
764 * server.h: Do not include gdb/signals.h.
765 * win32-low.c: Likewise.
766
767 2014-08-07 Gary Benson <gbenson@redhat.com>
768
769 * server.h: Do not include pathmax.h.
770
771 2014-08-07 Gary Benson <gbenson@redhat.com>
772
773 * server.h: Do not include libiberty.h.
774 * linux-bfin-low.c: Likewise.
775
776 2014-08-07 Gary Benson <gbenson@redhat.com>
777
778 * server.h: Do not include ansidecl.h.
779
780 2014-08-07 Gary Benson <gbenson@redhat.com>
781
782 * linux-x86-low.c: Do not include stddef.h.
783 * lynx-ppc-low.c: Likewise.
784 * tracepoint.c: Likewise.
785
786 2014-08-07 Gary Benson <gbenson@redhat.com>
787
788 * server.h: Do not include stdarg.h.
789 * nto-low.c: Likewise.
790
791 2014-08-07 Gary Benson <gbenson@redhat.com>
792
793 * server.h: Do not include stdlib.h.
794 * inferiors.c: Likewise.
795 * linux-low.c: Likewise.
796 * regcache.c: Likewise.
797 * spu-low.c: Likewise.
798 * tracepoint.c: Likewise.
799 * utils.c: Likewise.
800
801 2014-08-07 Gary Benson <gbenson@redhat.com>
802
803 * server.h: Do not include stdio.h.
804 * linux-low.c: Likewise.
805 * remote-utils.c: Likewise.
806 * spu-low.c: Likewise.
807 * utils.c: Likewise.
808 * wincecompat.c: Likewise.
809
810 2014-08-06 Gary Benson <gbenson@redhat.com>
811
812 * regcache.c (init_register_cache): Move conditionals inside if.
813
814 2014-08-06 Gary Benson <gbenson@redhat.com>
815
816 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
817
818 2014-07-31 Gary Benson <gbenson@redhat.com>
819
820 * ax.h: Do not include server.h.
821 * gdbthread.h: Likewise.
822 * lynx-low.h: Likewise.
823 * notif.h: Likewise.
824
825 2014-07-30 Gary Benson <gbenson@redhat.com>
826
827 * server.h: Include common-defs.h.
828 Do not include config.h or build-gnulib-gdbserver/config.h.
829
830 2014-07-30 Gary Benson <gbenson@redhat.com>
831
832 * hostio-errno.c: Move server.h to top of includes list.
833 * inferiors.c: Likewise.
834 * linux-x86-low.c: Likewise.
835 * notif.c: Include server.h.
836
837 2014-07-24 Tom Tromey <tromey@redhat.com>
838 Gary Benson <gbenson@redhat.com>
839
840 * server.h (CORE_ADDR): Now unsigned.
841
842 2014-07-16 Pedro Alves <palves@redhat.com>
843
844 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
845
846 2014-07-15 Pedro Alves <palves@redhat.com>
847
848 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
849 copy.
850
851 2014-07-11 Pedro Alves <palves@redhat.com>
852
853 * linux-low.c (kill_wait_lwp): New function, based on
854 kill_one_lwp_callback, but use my_waitpid directly.
855 (kill_one_lwp_callback, linux_kill): Use it.
856
857 2014-06-23 Pedro Alves <palves@redhat.com>
858
859 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
860 before setting DR0..DR3.
861
862 2014-06-20 Gary Benson <gbenson@redhat.com>
863
864 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
865 * configure: Regenerated.
866 * config.in: Likewise.
867
868 2014-06-20 Gary Benson <gbenson@redhat.com>
869
870 * Makefile.in (SFILES): Update locations for files moved
871 from common to nat.
872 (object file files): Reordered.
873
874 2014-06-20 Gary Benson <gbenson@redhat.com>
875
876 * i386-low.h (i386_dr_low_can_set_addr): Removed.
877 (i386_dr_low_set_addr): Likewise.
878 (i386_dr_low_get_addr): Likewise.
879 (i386_dr_low_can_set_control): Likewise.
880 (i386_dr_low_set_control): Likewise.
881 (i386_dr_low_get_control): Likewise.
882 (i386_dr_low_get_status): Likewise.
883 (i386_get_debug_register_length): Likewise.
884 * linux-x86-low.c (i386_dr_low_set_addr):
885 Changed signature. Made static.
886 (i386_dr_low_get_addr): Likewise.
887 (i386_dr_low_set_control): Likewise.
888 (i386_dr_low_get_control): Likewise.
889 (i386_dr_low_get_status): Likewise.
890 (i386_dr_low): New global variable.
891 * win32-i386-low.c (i386_dr_low_set_addr):
892 Changed signature. Made static.
893 (i386_dr_low_get_addr): Likewise.
894 (i386_dr_low_set_control): Likewise.
895 (i386_dr_low_get_control): Likewise.
896 (i386_dr_low_get_status): Likewise.
897 (i386_dr_low): New global variable.
898
899 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
900
901 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
902 * Makefile.in (AR, AR_FLAGS): Define.
903 * configure: Regenerate.
904
905 2014-06-19 Gary Benson <gbenson@redhat.com>
906
907 * Makefile.in (i386-dregs.o): New rule.
908 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
909 * i386-low.c (target.h): Remove include.
910 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
911 (DR_CONTROL_SHIFT): Likewise.
912 (DR_CONTROL_SIZE): Likewise.
913 (DR_RW_EXECUTE): Likewise.
914 (DR_RW_WRITE): Likewise.
915 (DR_RW_READ): Likewise.
916 (DR_RW_IORW): Likewise.
917 (DR_LEN_1): Likewise.
918 (DR_LEN_2): Likewise.
919 (DR_LEN_4): Likewise.
920 (DR_LEN_8): Likewise.
921 (DR_LOCAL_ENABLE_SHIFT): Likewise.
922 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
923 (DR_ENABLE_SIZE): Likewise.
924 (DR_LOCAL_SLOWDOWN): Likewise.
925 (DR_GLOBAL_SLOWDOWN): Likewise.
926 (DR_CONTROL_RESERVED): Likewise.
927 (I386_DR_CONTROL_MASK): Likewise.
928 (I386_DR_VACANT): Likewise.
929 (I386_DR_LOCAL_ENABLE): Likewise.
930 (I386_DR_GLOBAL_ENABLE): Likewise.
931 (I386_DR_DISABLE): Likewise.
932 (I386_DR_SET_RW_LEN): Likewise.
933 (I386_DR_GET_RW_LEN): Likewise.
934 (I386_DR_WATCH_HIT): Likewise.
935 (i386_wp_op_t): Likewise.
936 (i386_show_dr): Likewise.
937 (i386_length_and_rw_bits): Likewise.
938 (i386_insert_aligned_watchpoint): Likewise.
939 (i386_remove_aligned_watchpoint): Likewise.
940 (i386_handle_nonaligned_watchpoint): Likewise.
941 i386_update_inferior_debug_regs(): Likewise.
942 (i386_dr_insert_watchpoint): Likewise.
943 (i386_dr_remove_watchpoint): Likewise.
944 (i386_dr_region_ok_for_watchpoint): Likewise.
945 (i386_dr_stopped_data_address): Likewise.
946 (i386_dr_stopped_by_watchpoint): Likewise.
947
948 2014-06-19 Gary Benson <gbenson@redhat.com>
949
950 * i386-low.c (i386_dr_show): Renamed to
951 i386_show_dr and made static. All uses updated.
952 (i386_dr_length_and_rw_bits): Renamed to
953 i386_length_and_rw_bits and made static.
954 All uses updated.
955 (i386_dr_insert_aligned_watchpoint): Renamed to
956 i386_insert_aligned_watchpoint and made static.
957 All uses updated.
958 (i386_dr_remove_aligned_watchpoint): Renamed to
959 i386_remove_aligned_watchpoint and made static.
960 All uses updated.
961 (i386_dr_update_inferior_debug_regs): Renamed to
962 i386_update_inferior_debug_regs and made static.
963 All uses updated.
964
965 2014-06-18 Gary Benson <gbenson@redhat.com>
966
967 * i386-low.h (i386_dr_low_can_set_addr): New macro.
968 (i386_dr_low_can_set_control): Likewise.
969 (i386_get_debug_register_length): Likewise.
970 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
971 (i386_dr_low_can_set_control): Likewise.
972 (i386_get_debug_register_length): Likewise.
973
974 2014-06-17 Gary Benson <gbenson@redhat.com>
975
976 * i386-low.h (i386-dregs.h): New include.
977 (DR_FIRSTADDR): Now in i386-dregs.h.
978 (DR_LASTADDR): Likewise.
979 (DR_NADDR): Likewise.
980 (DR_STATUS): Likewise.
981 (DR_CONTROL): Likewise.
982 (i386_debug_reg_state): Likewise.
983 (i386_dr_insert_watchpoint): Likewise.
984 (i386_dr_remove_watchpoint): Likewise.
985 (i386_dr_region_ok_for_watchpoint): Likewise.
986 (i386_dr_stopped_data_address): Likewise.
987 (i386_dr_stopped_by_watchpoint): Likewise.
988 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
989
990 2014-06-18 Gary Benson <gbenson@redhat.com>
991
992 * i386-low.h (i386_low_insert_watchpoint): Renamed to
993 i386_dr_insert_watchpoint.
994 (i386_low_remove_watchpoint): Renamed to
995 i386_dr_remove_watchpoint.
996 (i386_low_region_ok_for_watchpoint): Renamed to
997 i386_dr_region_ok_for_watchpoint.
998 (i386_low_stopped_data_address): Renamed to
999 i386_dr_stopped_data_address.
1000 (i386_low_stopped_by_watchpoint): Renamed to
1001 i386_dr_stopped_by_watchpoint.
1002 * i386-low.c (i386_show_dr): Renamed to
1003 i386_dr_show and made nonstatic. All uses updated.
1004 (i386_length_and_rw_bits): Renamed to
1005 i386_dr_length_and_rw_bits and made nonstatic.
1006 All uses updated.
1007 (i386_insert_aligned_watchpoint): Renamed to
1008 i386_dr_insert_aligned_watchpoint and made nonstatic.
1009 All uses updated.
1010 (i386_remove_aligned_watchpoint): Renamed to
1011 i386_dr_remove_aligned_watchpoint and made nonstatic.
1012 All uses updated.
1013 (i386_update_inferior_debug_regs): Renamed to
1014 i386_dr_update_inferior_debug_regs and made nonstatic.
1015 All uses updated.
1016 (i386_low_insert_watchpoint): Renamed to
1017 i386_dr_insert_watchpoint. All uses updated.
1018 (i386_low_remove_watchpoint): Renamed to
1019 i386_dr_remove_watchpoint. All uses updated.
1020 (i386_low_region_ok_for_watchpoint): Renamed to
1021 i386_dr_region_ok_for_watchpoint. All uses updated.
1022 (i386_low_stopped_data_address): Renamed to
1023 i386_dr_stopped_data_address. All uses updated.
1024 (i386_low_stopped_by_watchpoint): Renamed to
1025 i386_dr_stopped_by_watchpoint. All uses updated.
1026
1027 2014-06-18 Gary Benson <gbenson@redhat.com>
1028
1029 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1030 (i386_dr_low_can_set_control): Likewise.
1031 (i386_insert_aligned_watchpoint): New check.
1032
1033 2014-06-18 Gary Benson <gbenson@redhat.com>
1034
1035 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1036 Renamed to state.
1037
1038 2014-06-18 Gary Benson <gbenson@redhat.com>
1039
1040 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1041 instead of fatal and error.
1042 (i386_handle_nonaligned_watchpoint): Likewise.
1043
1044 2014-06-18 Gary Benson <gbenson@redhat.com>
1045
1046 * i386-low.c (i386_get_debug_register_length): New macro.
1047 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1048 (i386_show_dr): Use debug_printf instead of fprintf. Use
1049 phex to format values.
1050
1051 2014-06-18 Gary Benson <gbenson@redhat.com>
1052
1053 * i386-low.h: Comment changes.
1054 * i386-low.c: Likewise.
1055
1056 2014-06-18 Gary Benson <gbenson@redhat.com>
1057
1058 * i386-low.c: Whitespace changes.
1059
1060 2014-06-12 Tom Tromey <tromey@redhat.com>
1061
1062 * utils.c (freeargv): Remove.
1063
1064 2014-06-12 Tom Tromey <tromey@redhat.com>
1065
1066 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1067 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1068 (parse_debug_format_options): Likewise.
1069 (gdbserver_usage): Likewise.
1070 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1071 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1072 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1073 against libiberty.
1074 ($(LIBGNU)): Depend on libiberty.
1075 (all-lib): Recurse into all subdirs.
1076 (install-only): Invoke "install" target in subdirs.
1077 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1078 targets.
1079 * configure: Rebuild.
1080 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1081 for vasprintf, vsnprintf, or gettimeofday.
1082 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1083 srv_tgtobj.
1084
1085 2014-06-05 Joel Brobecker <brobecker@adacore.com>
1086
1087 * development.sh: Delete.
1088 * Makefile.in (config.status): Adjust dependency on development.sh.
1089 * configure.ac: Adjust development.sh source call.
1090 * configure: Regenerate.
1091
1092 2014-06-02 Pedro Alves <palves@redhat.com>
1093
1094 * ax.c (gdb_free_agent_expr): New function.
1095 * ax.h (gdb_free_agent_expr): New declaration.
1096 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1097 list.
1098 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1099 static.
1100 (clear_breakpoint_conditions_and_commands): New function.
1101 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1102 (clear_breakpoint_conditions_and_commands): New declaration.
1103
1104 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1105
1106 * linux-aarch64-low.c (asm/ptrace.h): Include.
1107
1108 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1109
1110 Fix TLS access for -static -pthread.
1111 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1112 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1113 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1114
1115 2014-05-20 Pedro Alves <palves@redhat.com>
1116
1117 * linux-aarch64-low.c (aarch64_insert_point)
1118 (aarch64_remove_point): No longer check whether the type is
1119 supported here. Adjust to new interface.
1120 (the_low_target): Install aarch64_supports_z_point_type as
1121 supports_z_point_type method.
1122 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1123 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1124 instead of a Z packet char. Adjust.
1125 (arm_supports_z_point_type): New function.
1126 (arm_insert_point, arm_remove_point): Adjust to new interface.
1127 (the_low_target): Install arm_supports_z_point_type.
1128 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1129 (cris_insert_point, cris_remove_point): Adjust to new interface.
1130 Don't check whether the type is supported here.
1131 (the_low_target): Install cris_supports_z_point_type.
1132 * linux-low.c (linux_supports_z_point_type): New function.
1133 (linux_insert_point, linux_remove_point): Adjust to new interface.
1134 * linux-low.h (struct linux_target_ops) <insert_point,
1135 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1136 raw_breakpoint pointer parameter.
1137 <supports_z_point_type>: New method.
1138 * linux-mips-low.c (mips_supports_z_point_type): New function.
1139 (mips_insert_point, mips_remove_point): Adjust to new interface.
1140 Use mips_supports_z_point_type.
1141 (the_low_target): Install mips_supports_z_point_type.
1142 * linux-ppc-low.c (the_low_target): Install NULL as
1143 supports_z_point_type method.
1144 * linux-s390-low.c (the_low_target): Install NULL as
1145 supports_z_point_type method.
1146 * linux-sparc-low.c (the_low_target): Install NULL as
1147 supports_z_point_type method.
1148 * linux-x86-low.c (x86_supports_z_point_type): New function.
1149 (x86_insert_point): Adjust to new insert_point interface. Use
1150 insert_memory_breakpoint. Adjust to new
1151 i386_low_insert_watchpoint interface.
1152 (x86_remove_point): Adjust to remove_point interface. Use
1153 remove_memory_breakpoint. Adjust to new
1154 i386_low_remove_watchpoint interface.
1155 (the_low_target): Install x86_supports_z_point_type.
1156 * lynx-low.c (lynx_target_ops): Install NULL as
1157 supports_z_point_type callback.
1158 * nto-low.c (nto_supports_z_point_type): New.
1159 (nto_insert_point, nto_remove_point): Adjust to new interface.
1160 (nto_target_ops): Install nto_supports_z_point_type.
1161 * mem-break.c: Adjust intro comment.
1162 (struct raw_breakpoint) <raw_type, size>: New fields.
1163 <inserted>: Update comment.
1164 <shlib_disabled>: Delete field.
1165 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1166 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1167 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1168 (raw_bkpt_type_to_target_hw_bp_type): New function.
1169 (find_enabled_raw_code_breakpoint_at): New function.
1170 (find_raw_breakpoint_at): New type and size parameters. Use them.
1171 (insert_memory_breakpoint): New function, based off
1172 set_raw_breakpoint_at.
1173 (remove_memory_breakpoint): New function.
1174 (set_raw_breakpoint_at): Reimplement.
1175 (set_breakpoint): New, based on set_breakpoint_at.
1176 (set_breakpoint_at): Reimplement.
1177 (delete_raw_breakpoint): Go through the_target->remove_point
1178 instead of assuming memory breakpoints.
1179 (find_gdb_breakpoint_at): Delete.
1180 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1181 (find_gdb_breakpoint): New function.
1182 (set_gdb_breakpoint_at): Delete.
1183 (z_type_supported): New function.
1184 (set_gdb_breakpoint_1): New function, loosely based off
1185 set_gdb_breakpoint_at.
1186 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1187 (delete_gdb_breakpoint_at): Delete.
1188 (delete_gdb_breakpoint_1): New function, loosely based off
1189 delete_gdb_breakpoint_at.
1190 (delete_gdb_breakpoint): New function.
1191 (clear_gdb_breakpoint_conditions): Rename to ...
1192 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1193 breakpoint.
1194 (add_condition_to_breakpoint): Make static.
1195 (add_breakpoint_condition): Take a struct breakpoint pointer
1196 instead of an address. Adjust.
1197 (gdb_condition_true_at_breakpoint): Rename to ...
1198 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1199 z_type parameter.
1200 (gdb_condition_true_at_breakpoint): Reimplement.
1201 (add_breakpoint_commands): Take a struct breakpoint pointer
1202 instead of an address. Adjust.
1203 (gdb_no_commands_at_breakpoint): Rename to ...
1204 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1205 parameter. Return true if no breakpoint was found. Change debug
1206 output.
1207 (gdb_no_commands_at_breakpoint): Reimplement.
1208 (run_breakpoint_commands): Rename to ...
1209 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1210 and change return type to boolean.
1211 (run_breakpoint_commands): New function.
1212 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1213 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1214 breakpoint. Go through the_target->remove_point instead of
1215 assuming memory breakpoint.
1216 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1217 software and hardware breakpoints.
1218 (reinsert_raw_breakpoint): Go through the_target->insert_point
1219 instead of assuming memory breakpoint.
1220 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1221 software and hardware breakpoints.
1222 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1223 Check both software and hardware breakpoints.
1224 (validate_inserted_breakpoint): Assert the breakpoint is a
1225 software breakpoint. Set the inserted flag to -1 instead of
1226 setting shlib_disabled.
1227 (delete_disabled_breakpoints): Adjust.
1228 (validate_breakpoints): Only validate software breakpoints.
1229 Adjust to inserted flag change.
1230 (check_mem_read, check_mem_write): Skip breakpoint types other
1231 than software breakpoints. Adjust to inserted flag change.
1232 * mem-break.h (enum raw_bkpt_type): New enum.
1233 (raw_breakpoint, struct process_info): Forward declare.
1234 (Z_packet_to_target_hw_bp_type): Delete declaration.
1235 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1236 (set_gdb_breakpoint, delete_gdb_breakpoint)
1237 (clear_breakpoint_conditions): New declarations.
1238 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1239 (breakpoint_inserted_here): Update comment.
1240 (add_breakpoint_condition, add_breakpoint_commands): Replace
1241 address parameter with a breakpoint pointer parameter.
1242 (gdb_breakpoint_here): Update comment.
1243 (delete_gdb_breakpoint_at): Delete.
1244 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1245 * server.c (process_point_options): Take a struct breakpoint
1246 pointer instead of an address. Adjust.
1247 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1248 delete_gdb_breakpoint.
1249 * spu-low.c (spu_target_ops): Install NULL as
1250 supports_z_point_type method.
1251 * target.h: Include mem-break.h.
1252 (struct target_ops) <prepare_to_access_memory>: Update comment.
1253 <supports_z_point_type>: New field.
1254 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1255 instead of a char. Also take a raw breakpoint pointer.
1256 * win32-arm-low.c (the_low_target): Install NULL as
1257 supports_z_point_type.
1258 * win32-i386-low.c (i386_supports_z_point_type): New function.
1259 (i386_insert_point, i386_remove_point): Adjust to new interface.
1260 (the_low_target): Install i386_supports_z_point_type.
1261 * win32-low.c (win32_supports_z_point_type): New function.
1262 (win32_insert_point, win32_remove_point): Adjust to new interface.
1263 (win32_target_ops): Install win32_supports_z_point_type.
1264 * win32-low.h (struct win32_target_ops):
1265 <supports_z_point_type>: New method.
1266 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1267 instead of a char. Also take a raw breakpoint pointer.
1268
1269 2014-05-20 Pedro Alves <palves@redhat.com>
1270
1271 * mem-break.h: Include break-common.h.
1272 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1273 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1274 (Z_packet_to_target_hw_bp_type): New declaration.
1275 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1276 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1277 (Z_PACKET_ACCESS_WP): Delete macros.
1278 (Z_packet_to_hw_type): Delete function.
1279 * i386-low.h: Don't include break-common.h here.
1280 (Z_packet_to_hw_type): Delete declaration.
1281 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1282 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1283 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1284 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1285 * linux-aarch64-low.c: Don't include break-common.h here.
1286 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1287 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1288 (Z_packet_to_target_hw_bp_type): Delete function.
1289 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1290 function.
1291 (mips_insert_point, mips_remove_point): Use
1292 Z_packet_to_target_hw_bp_type.
1293
1294 2014-05-20 Pedro Alves <palves@redhat.com>
1295
1296 * linux-aarch64-low.c: Include break-common.h.
1297 (enum target_point_type): Delete.
1298 (Z_packet_to_point_type): Rename to ...
1299 (Z_packet_to_target_hw_bp_type): ... this, and return a
1300 target_hw_bp_type instead.
1301 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1302 instead of an enum target_point_type.
1303 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1304 breakpoint type.
1305 (aarch64_dr_state_insert_one_point)
1306 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1307 (aarch64_handle_aligned_watchpoint)
1308 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1309 Take an enum target_hw_bp_type instead of an enum
1310 target_point_type.
1311 (aarch64_supports_z_point_type): New function.
1312 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1313 use Z_packet_to_target_hw_bp_type.
1314
1315 2014-05-20 Joel Brobecker <brobecker@adacore.com>
1316
1317 * configure.ac: Only use -Werror by default when DEVELOPMENT
1318 is true.
1319 * configure: Regenerate.
1320
1321 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1322
1323 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1324 * linux-x86-low.c (X86_64_USER_REGS): New.
1325 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1326
1327 2014-04-28 Yao Qi <yao@codesourcery.com>
1328
1329 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1330 name.
1331
1332 2014-04-25 Pedro Alves <palves@redhat.com>
1333
1334 PR server/16255
1335 * linux-low.c (linux_attach_fail_reason_string): New function.
1336 (linux_attach_lwp): Delete.
1337 (linux_attach_lwp_1): Rename to ...
1338 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1339 argument. Remove "initial" parameter. Return int instead of
1340 void. Don't error or warn here.
1341 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1342 failure to attach to the tgid. Call warning when failing to
1343 attach to an lwp.
1344 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1345 argument. Remove "initial" parameter. Return int instead of
1346 void. Don't error or warn here.
1347 (linux_attach_fail_reason_string): New declaration.
1348 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1349 interface change. Use linux_attach_fail_reason_string.
1350
1351 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
1352 Walfred Tedeschi <walfred.tedeschi@intel.com>
1353
1354 * Makefile.in: Added rules to handle new files
1355 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1356 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1357 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1358 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1359 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1360 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1361 x32-avx512-linux.o.
1362 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1363 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1364 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1365 i386/x32-avx512.xml.
1366 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1367 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1368 i386/x32-avx512-linux.xml.
1369 * i387-fp.c (num_avx512_k_registers): New constant for number
1370 of K registers.
1371 (num_avx512_zmmh_low_registers): New constant for number of
1372 lower ZMM registers (0-15).
1373 (num_avx512_zmmh_high_registers): New constant for number of
1374 higher ZMM registers (16-31).
1375 (num_avx512_ymmh_registers): New contant for number of higher
1376 YMM registers (ymm16-31 added by avx521 on x86_64).
1377 (num_avx512_xmm_registers): New constant for number of higher
1378 XMM registers (xmm16-31 added by AVX512 on x86_64).
1379 (struct i387_xsave): Add space for AVX512 registers.
1380 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1381 Add code to handle AVX512 registers.
1382 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1383 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1384 prototypei from generated file.
1385 (tdesc_amd64_avx512_linux): Likewise.
1386 (init_registers_x32_avx512_linux): Likewise.
1387 (tdesc_x32_avx512_linux): Likewise.
1388 (init_registers_i386_avx512_linux): Likewise.
1389 (tdesc_i386_avx512_linux): Likewise.
1390 (x86_64_regmap): Add AVX512 registers.
1391 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1392 mask.
1393 (initialize_low_arch): Add code to initialize AVX512 registers.
1394
1395 2014-04-23 Pedro Alves <palves@redhat.com>
1396
1397 * mem-break.c (find_gdb_breakpoint_at): Make static.
1398 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1399
1400 2014-04-23 Pedro Alves <palves@redhat.com>
1401
1402 * i386-low.c: Don't include break-common.h here.
1403 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1404 prototype to take target_hw_bp_type as argument instead of a Z
1405 packet char.
1406 * i386-low.h: Include break-common.h here.
1407 (Z_packet_to_hw_type): Declare.
1408 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1409 prototypes.
1410 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1411 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1412 (x86_remove_point): Convert the packet number to a
1413 target_hw_bp_type before calling i386_low_remove_watchpoint.
1414 * win32-i386-low.c (i386_insert_point): Convert the packet number
1415 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1416 (i386_remove_point): Convert the packet number to a
1417 target_hw_bp_type before calling i386_low_remove_watchpoint.
1418
1419 2014-04-23 Pedro Alves <palves@redhat.com>
1420
1421 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1422
1423 2014-04-10 Pedro Alves <palves@redhat.com>
1424
1425 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1426 Check if the condition or command is NULL before checking if the
1427 breakpoint is known. On success, return true.
1428 * mem-break.h (add_breakpoint_condition): Document return.
1429 (add_breakpoint_commands): Add describing comment.
1430 * server.c (skip_to_semicolon): New function.
1431 (process_point_options): Use it.
1432
1433 2014-04-09 Pedro Alves <palves@redhat.com>
1434
1435 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1436 to lwpid_of.
1437
1438 2014-02-27 Pedro Alves <palves@redhat.com>
1439
1440 PR 12702
1441 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1442 macros.
1443 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1444 output.
1445 (last_thread_of_process_p): Take a PID argument instead of a
1446 thread pointer.
1447 (linux_wait_for_lwp): Delete.
1448 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1449 functions.
1450 (linux_low_filter_event): New function, party factored out from
1451 linux_wait_for_event.
1452 (linux_wait_for_event): Rename to ...
1453 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1454 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1455 sigsuspend. Check for zombie leaders.
1456 (linux_wait_for_event): Reimplement as wrapper around
1457 linux_wait_for_event_filtered.
1458 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1459 a normal or signal exit is seen, it's the whole process exiting.
1460 (wait_for_sigstop): No longer a for_each_inferior callback.
1461 Rewrite on top of linux_wait_for_event_filtered.
1462 (stop_all_lwps): Call wait_for_sigstop directly.
1463 * server.c (resume, handle_target_event): Handle
1464 TARGET_WAITKIND_NO_RESUMED.
1465
1466 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1467
1468 * win32-low.c (psapi_get_dll_name,
1469 * win32_CreateToolhelp32Snapshot): Delete.
1470 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1471 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1472 Delete.
1473 (handle_load_dll): Add function description.
1474 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1475
1476 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1477
1478 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1479 Add comment.
1480 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1481 base address when calling win32_add_one_solib.
1482 (handle_load_dll): Delete local variable load_addr.
1483 Remove 0x1000 offset applied to DLL base address when calling
1484 win32_add_one_solib.
1485 (handle_unload_dll): Add comment.
1486
1487 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1488
1489 * win32-low.c (win32_add_all_dlls): Renames
1490 win32_ensure_ntdll_loaded. Rewrite function documentation.
1491 Adjust implementation to always load all DLLs.
1492 Add 0x1000 offset to DLL base address when calling
1493 win32_add_one_solib.
1494 (child_initialization_done): New static global.
1495 (do_initial_child_stuff): Set child_initialization_done to
1496 zero during child initialization, and 1 after. Replace call
1497 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1498 Add comment.
1499 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1500 (handle_unload_dll): Add function documentation.
1501 (get_child_debug_event): Ignore load and unload DLL events
1502 during child initialization.
1503
1504 2014-02-20 Doug Evans <dje@google.com>
1505
1506 Remove global all_lwps.
1507 * inferiors.h (ptid_of): Move here from linux-low.h.
1508 (pid_of, lwpid_of): Ditto.
1509 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1510 parameter is a struct thread_info * now.
1511 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1512 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1513 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1514 directly.
1515 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1516 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1517 * linux-arm-low.c (update_registers_callback): Update, "entry"
1518 parameter is a struct thread_info * now.
1519 Fetch lwpid from current_inferior directly.
1520 (arm_insert_point): Pass &all_threads to find_inferior instead of
1521 &all_lwps.
1522 (arm_remove_point): Ditto.
1523 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1524 (arm_prepare_to_resume): Fetch pid from thread.
1525 (arm_read_description): Fetch lwpid from current_inferior directly.
1526 * linux-low.c (all_lwps): Delete.
1527 (delete_lwp): Delete call to remove_inferior.
1528 (handle_extended_wait): Fetch lwpid from thread.
1529 (add_lwp): Don't set lwp->entry.id. Remove call to
1530 add_inferior_to_list.
1531 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1532 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1533 (kill_one_lwp_callback): Ditto.
1534 (linux_kill): Don't dereference NULL pointer.
1535 Fetch ptid,lwpid from thread.
1536 (get_detach_signal): Fetch ptid from thread.
1537 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1538 Simplify call to regcache_invalidate_thread.
1539 (delete_lwp_callback): Update, "entry" parameter is a
1540 struct thread_info * now. Fetch pid from thread.
1541 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1542 (status_pending_p_callback): Update, "entry" parameter is a
1543 struct thread_info * now. Fetch ptid from thread.
1544 (find_lwp_pid): Update, "entry" parameter is a
1545 struct thread_info * now.
1546 (linux_wait_for_lwp): Fetch pid from thread.
1547 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1548 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1549 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1550 (dequeue_one_deferred_signal): Ditto.
1551 (cancel_breakpoint): Fetch ptid from current_inferior.
1552 (linux_wait_for_event): Pass &all_threads to find_inferior,
1553 not &all_lwps. Fetch ptid, lwpid from thread.
1554 (count_events_callback): Update, "entry" parameter is a
1555 struct thread_info * now.
1556 (select_singlestep_lwp_callback): Ditto.
1557 (select_event_lwp_callback): Ditto.
1558 (cancel_breakpoints_callback): Ditto.
1559 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1560 not &all_lwps.
1561 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1562 (unsuspend_one_lwp): Update, "entry" parameter is a
1563 struct thread_info * now.
1564 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1565 not &all_lwps.
1566 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1567 Fetch lwpid from thread, not lwp.
1568 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1569 Pass &all_threads to find_inferior, not &all_lwps.
1570 (send_sigstop): Fetch lwpid from thread, not lwp.
1571 (send_sigstop_callback): Update, "entry" parameter is a
1572 struct thread_info * now.
1573 (suspend_and_send_sigstop_callback): Ditto.
1574 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1575 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1576 struct thread_info * now.
1577 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1578 from thread, lwp.
1579 (lwp_running): Update, "entry" parameter is a
1580 struct thread_info * now.
1581 (stop_all_lwps): Fetch ptid from thread.
1582 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1583 (linux_resume_one_lwp): Fetch lwpid from thread.
1584 (linux_set_resume_request): Update, "entry" parameter is a
1585 struct thread_info * now. Fetch pid, lwpid from thread.
1586 (resume_status_pending_p): Update, "entry" parameter is a
1587 struct thread_info * now.
1588 (need_step_over_p): Ditto. Fetch lwpid from thread.
1589 (start_step_over): Fetch lwpid from thread.
1590 (linux_resume_one_thread): Update, "entry" parameter is a
1591 struct thread_info * now. Fetch lwpid from thread.
1592 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1593 (proceed_one_lwp): Update, "entry" parameter is a
1594 struct thread_info * now. Fetch lwpid from thread.
1595 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1596 struct thread_info * now.
1597 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1598 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1599 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1600 directly.
1601 (regsets_store_inferior_registers): Ditto.
1602 (fetch_register, store_register): Ditto.
1603 (linux_read_memory, linux_write_memory): Ditto.
1604 (linux_request_interrupt): Ditto.
1605 (linux_read_auxv): Ditto.
1606 (linux_xfer_siginfo): Ditto.
1607 (linux_qxfer_spu): Ditto.
1608 (linux_qxfer_libraries_svr4): Ditto.
1609 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1610 moved to inferiors.h.
1611 (get_lwp): Delete.
1612 (get_thread_lwp): Update.
1613 (struct lwp_info): Delete member "entry". Simplify comment for
1614 member "thread".
1615 (all_lwps): Delete.
1616 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1617 current_inferior directly.
1618 (update_watch_registers_callback): Update, "entry" parameter is a
1619 struct thread_info * now. Fetch pid from thread.
1620 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1621 (mips_insert_point): Fetch lwpid from current_inferior.
1622 Pass &all_threads to find_inferior, not &all_lwps.
1623 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1624 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1625 directly.
1626 (mips_stopped_data_address): Ditto.
1627 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1628 directly.
1629 * linux-tile-low.c (tile_arch_setup): Ditto.
1630 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1631 (update_debug_registers_callback): Update, "entry" parameter is a
1632 struct thread_info * now. Fetch pid from thread.
1633 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1634 Pass &all_threads to find_inferior, not &all_lwps.
1635 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1636 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1637 Pass &all_threads to find_inferior, not &all_lwps.
1638 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1639 (i386_dr_low_get_status): Ditto.
1640 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1641 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1642 (x86_linux_read_description): Ditto.
1643 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1644
1645 2014-02-20 Doug Evans <dje@google.com>
1646
1647 * inferiors.c (get_first_inferior): Fix buglet.
1648
1649 2014-02-19 Doug Evans <dje@google.com>
1650
1651 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1652 * inferiors.c (add_thread): Change result type to struct thread_info *.
1653 All callers updated.
1654 (add_lwp): Call add_thread here instead of in callers.
1655 All callers updated.
1656 * linux-low.h (get_lwp_thread): Rewrite.
1657 (struct lwp_info): New member "thread".
1658
1659 2014-02-19 Doug Evans <dje@google.com>
1660
1661 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1662 All callers updated.
1663
1664 2014-02-19 Doug Evans <dje@google.com>
1665
1666 * inferiors.c (add_thread): Fix whitespace.
1667
1668 2014-02-19 Doug Evans <dje@google.com>
1669
1670 * dll.c (clear_dlls): Replace accessing list implemention details
1671 with API function.
1672 * gdbthread.h (get_first_thread): Declare.
1673 * inferiors.c (for_each_inferior_with_data): New function.
1674 (get_first_thread): New function.
1675 (find_thread_ptid): Simplify.
1676 (get_first_inferior): New function.
1677 (clear_list): Delete.
1678 (one_inferior_p): New function.
1679 (clear_inferior_list): New function.
1680 (clear_inferiors): Update.
1681 * inferiors.h (for_each_inferior_with_data): Declare.
1682 (clear_inferior_list): Declare.
1683 (one_inferior_p): Declare.
1684 (get_first_inferior): Declare.
1685 * linux-low.c (linux_wait_for_event): Replace accessing list
1686 implemention details with API function.
1687 * server.c (target_running): Ditto.
1688 (accumulate_file_name_length): New function.
1689 (emit_dll_description): New function.
1690 (handle_qxfer_libraries): Replace accessing list implemention
1691 details with API function.
1692 (handle_qxfer_threads_worker): New function.
1693 (handle_qxfer_threads_proper): Replace accessing list implemention
1694 details with API function.
1695 (handle_query): Ditto.
1696 (visit_actioned_threads_callback_ftype): New typedef.
1697 (visit_actioned_threads_data): New struct.
1698 (visit_actioned_threads): Rewrite to be find_inferior callback.
1699 (resume): Call find_inferior.
1700 (handle_status): Replace accessing list implemention
1701 details with API function.
1702 (process_serial_event): Replace accessing list implemention details
1703 with API function.
1704 * target.c (set_desired_inferior): Replace accessing list implemention
1705 details with API function.
1706 * tracepoint.c (same_process_p): New function.
1707 (gdb_agent_about_to_close): Replace accessing list implemention
1708 details with API function.
1709 * win32-low.c (child_delete_thread): Replace accessing list
1710 implemention details with API function.
1711 (match_dll_by_basename): New function.
1712 (dll_is_loaded_by_basename): New function.
1713 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1714 details call to dll_is_loaded_by_basename.
1715
1716 2014-02-19 Doug Evans <dje@google.com>
1717
1718 * dll.h (struct dll_info): Add comment.
1719 * gdbthread.h (struct thread_info): Add comment.
1720 (current_ptid): Simplify.
1721 * inferiors.c (add_process): Update.
1722 (remove_process): Update.
1723 * inferiors.h (struct process_info): Rename member "head" to "entry".
1724 * linux-low.c (delete_lwp): Update.
1725 (add_lwp): Update.
1726 (last_thread_of_process_p): Update.
1727 (kill_one_lwp_callback, linux_kill): Update.
1728 (status_pending_p_callback): Update.
1729 (wait_for_sigstop): Update. Simplify read of ptid.
1730 (start_step_over): Update.
1731 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1732 (get_lwp_thread): Update.
1733 (struct lwp_info): Rename member "head" to "entry".
1734 * regcache.h (inferior_list_entry): Delete.
1735 * server.c (kill_inferior_callback): Update.
1736 (detach_or_kill_inferior_callback): Update.
1737 (print_started_pid): Update.
1738 (print_attached_pid): Update.
1739 (process_serial_event): Simplify read of ptid.
1740 * thread-db.c (thread_db_create_event): Update.
1741 (thread_db_get_tls_address): Update.
1742 * win32-low.c (current_inferior_ptid): Simplify.
1743
1744 2014-02-19 Tom Tromey <tromey@redhat.com>
1745
1746 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1747 argument.
1748 (target_supports_btrace): Update.
1749
1750 2014-02-14 Yao Qi <yao@codesourcery.com>
1751
1752 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1753 (rsp-low-ipa.o): New target.
1754
1755 2014-02-12 Tom Tromey <tromey@redhat.com>
1756
1757 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1758 convert_ascii_to_int.
1759 * regcache.c (registers_to_string): Likewise.
1760 * remote-utils.c (decode_M_packet): Likewise.
1761 * server.c (process_serial_event): Likewise.
1762
1763 2014-02-12 Tom Tromey <tromey@redhat.com>
1764
1765 * server.c (handle_query, handle_v_run): Use hex2bin, not
1766 unhexify.
1767 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1768
1769 2014-02-12 Tom Tromey <tromey@redhat.com>
1770
1771 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1772 convert_int_to_ascii.
1773 * regcache.c (registers_to_string, collect_register_as_string):
1774 Likewise.
1775 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1776 Likewise.
1777 * server.c (process_serial_event): Likewise.
1778 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1779 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1780
1781 2014-02-12 Tom Tromey <tromey@redhat.com>
1782
1783 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1784 bin2hex, not hexify.
1785 * tracepoint.c (cmd_qtstatus): Likewise.
1786
1787 2014-02-12 Tom Tromey <tromey@redhat.com>
1788
1789 * remote-utils.c (monitor_output): Pass explicit length to
1790 hexify.
1791
1792 2014-02-12 Tom Tromey <tromey@redhat.com>
1793
1794 * tracepoint.c: Include rsp-low.h.
1795 * server.c: Include rsp-low.h.
1796 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1797 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1798 declare.
1799 * remote-utils.c: Include rsp-low.h.
1800 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1801 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1802 (convert_int_to_ascii, convert_ascii_to_int): Move to
1803 common/rsp-low.c.
1804 * regcache.c: Include rsp-low.h.
1805 * ax.c: Include rsp-low.h.
1806 * Makefile.in (SFILES): Add common/rsp-low.c.
1807 (OBS): Add rsp-low.o.
1808 (rsp-low.o): New target.
1809
1810 2014-02-12 Tom Tromey <tromey@redhat.com>
1811
1812 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1813 Include print-utils.h.
1814 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1815 (plongest, thirty_two, phex_nz): Remove.
1816 * Makefile.in (SFILES): Add common/print-utils.c.
1817 (OBS): Add print-utils.o.
1818 (print-utils-ipa.o): New target.
1819 (print-utils.o): New target.
1820 (IPA_OBJS): Add print-utils-ipa.o.
1821
1822 2014-02-06 Tom Tromey <tromey@redhat.com>
1823
1824 * Makefile.in (SFILES): Fix indentation.
1825
1826 2014-02-05 Doug Evans <dje@google.com>
1827
1828 * linux-low.c (linux_wait_for_event): Improve comment.
1829 (linux_wait_1): Keep current_inferior in sync with event_child.
1830
1831 2014-01-22 Doug Evans <dje@google.com>
1832
1833 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1834
1835 2014-01-22 Doug Evans <dje@google.com>
1836
1837 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1838 * configure: Regenerate.
1839 * config.in: Regenerate.
1840 * Makefile.in (SFILES): Add debug.c.
1841 (OBS): Add debug.o.
1842 * debug.c: New file.
1843 * debug.h: New file.
1844 * linux-aarch64-low.c (*): Update all debugging printfs to use
1845 debug_printf instead of fprintf.
1846 * linux-arm-low.c (*): Ditto.
1847 * linux-cris-low.c (*): Ditto.
1848 * linux-crisv32-low.c (*): Ditto.
1849 * linux-m32r-low.c (*): Ditto.
1850 * linux-sparc-low.c (*): Ditto.
1851 * linux-x86.c (*): Ditto.
1852 * linux-low.c (*): Ditto.
1853 (linux_wait_1): Add calls to debug_enter, debug_exit.
1854 (linux_wait): Remove redundant debugging printf.
1855 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1856 (linux_resume, unstop_all_lwps): Ditto.
1857 * mem-break.c (*): Update all debugging printfs to use
1858 debug_printf instead of fprintf.
1859 * remote-utils.c (*): Ditto.
1860 * thread-db.c (*): Ditto.
1861 * server.c #include <ctype.h>, "gdb_vecs.h".
1862 (debug_threads): Moved to debug.c.
1863 (*): Update all debugging printfs to use debug_printf instead of
1864 fprintf.
1865 (start_inferior): Replace call to fflush with call to debug_flush.
1866 (monitor_show_help): Mention set debug-format.
1867 (parse_debug_format_options): New function.
1868 (handle_monitor_command): Handle "monitor set debug-format".
1869 (gdbserver_usage): Mention --debug-format.
1870 (main): Parse --debug-format.
1871 * server.h (debug_threads): Declaration moved to debug.h.
1872 #include "debug.h".
1873 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1874 trace_debug_1 that uses debug_printf.
1875 (tracepoint_look_up_symbols): Update all debugging printfs to use
1876 debug_printf instead of fprintf.
1877
1878 2014-01-20 Baruch Siach <baruch@tkos.co.il>
1879
1880 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1881 sys/ptrace.h.
1882
1883 2014-01-17 Pedro Alves <palves@redhat.com>
1884
1885 PR build/16445
1886 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1887 defined after including gdb_proc_service.h.
1888
1889 2014-01-16 Doug Evans <dje@google.com>
1890
1891 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1892 (match_dll): Use it.
1893
1894 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
1895
1896 * target.h (target_ops) <read_btrace>: Change parameters and
1897 return type to allow error reporting.
1898 * server.c (handle_qxfer_btrace): Support delta reads. Pass
1899 trace reading errors on.
1900 * linux-low.c (linux_low_read_btrace): Pass trace reading
1901 errors on.
1902 (linux_low_disable_btrace): New.
1903
1904 2014-01-15 Doug Evans <dje@google.com>
1905
1906 * inferiors.c (thread_id_to_gdb_id): Delete.
1907 * inferiors.h (thread_id_to_gdb_id): Delete.
1908
1909 2014-01-13 Eli Zaretskii <eliz@gnu.org>
1910
1911 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
1912 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
1913 versions.
1914
1915 2014-01-08 Pedro Alves <palves@redhat.com>
1916
1917 * server.c (handle_status): Don't discard previous queued stop
1918 replies or thread's pending status here.
1919 (main) <disconnection>: Do it here instead.
1920
1921 2014-01-08 Pedro Alves <palves@redhat.com>
1922
1923 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
1924 * server.c (visit_actioned_threads, handle_pending_status): New
1925 function.
1926 (handle_v_cont): Factor out parts to ...
1927 (resume): ... this new function. If in all-stop, and a thread
1928 being resumed has a pending status, report it without actually
1929 resuming.
1930 (myresume): Adjust to use the new 'resume' function.
1931 (clear_pending_status_callback, set_pending_status_callback)
1932 (find_status_pending_thread_callback): New functions.
1933 (handle_status): Handle the case of multiple threads having
1934 interesting statuses to report. Report threads' real last signal
1935 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
1936 with an interesting thread to report the status for, instead of
1937 always reporting the status of the first thread.
1938
1939 2014-01-01 Joel Brobecker <brobecker@adacore.com>
1940
1941 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
1942 * gdbreplay.c (gdbreplay_version): Likewise.
1943
1944 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
1945
1946 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
1947 iov.iov_len with the real length in use.
1948
1949 2013-12-13 Joel Brobecker <brobecker@adacore.com>
1950
1951 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
1952 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
1953 for all targets that use win32-low.c.
1954 * win32-low.c (win32_ensure_ntdll_loaded): New function.
1955 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
1956
1957 2013-12-13 Pedro Alves <palves@redhat.com>
1958
1959 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
1960 if equal to TARGET_WAITKIND_LOADED.
1961 * win32-low.c (cached_status): New static global.
1962 (win32_wait): Add declaration.
1963 (do_initial_child_stuff): Flush all initial pending debug events
1964 up to the initial breakpoint.
1965 (win32_wait): If CACHED_STATUS was set, return that instead
1966 of doing a real wait. Remove the code resuming the execution
1967 of the inferior after receiving a TARGET_WAITKIND_LOADED event
1968 during the initial phase. Also remove the code changing
1969 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
1970 TARGET_WAITKIND_STOPPED.
1971
1972 2013-12-11 Yao Qi <yao@codesourcery.com>
1973
1974 * notif.c (handle_notif_ack): Return 0 if no notification
1975 matches.
1976
1977 2013-11-20 Doug Evans <dje@google.com>
1978
1979 * linux-low.c (linux_set_resume_request): Fix comment.
1980
1981 2013-11-20 Doug Evans <dje@google.com>
1982
1983 * linux-low.c (resume_status_pending_p): Tweak comment.
1984
1985 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1986
1987 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
1988 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
1989 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
1990 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
1991 (srv_amd64_regobj): Add amd64-mpx.o.
1992 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
1993 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
1994 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
1995 * i387-fp.c (num_pl_bnd_register) Added constant.
1996 (num_pl_bnd_cfg_registers) Added constant.
1997 (struct i387_xsave) Added reserved area and MPX fields.
1998 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
1999 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2000 function.
2001 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2002 (init_registers_amd64_mpx_linux): Declare new function.
2003 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2004 (x86_64_regmap): Add MPX registers.
2005 (x86_linux_read_description): Add MPX case.
2006 (initialize_low_arch): Initialize MPX targets.
2007
2008 2013-11-18 Tom Tromey <tromey@redhat.com>
2009
2010 * configure: Rebuild.
2011 * configure.ac: Don't check for stdlib.h.
2012 * gdbreplay.c: Unconditionally include stdlib.h.
2013
2014 2013-11-18 Tom Tromey <tromey@redhat.com>
2015
2016 * config.in: Rebuild.
2017 * configure: Rebuild.
2018 * configure.ac: Don't use AC_HEADER_DIRENT.
2019
2020 2013-11-18 Tom Tromey <tromey@redhat.com>
2021
2022 * server.h: Don't check HAVE_STRING_H.
2023 * gdbreplay.c: Don't check HAVE_STRING_H.
2024 * configure: Rebuild.
2025
2026 2013-11-18 Tom Tromey <tromey@redhat.com>
2027
2028 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2029 LIBGNU.
2030
2031 2013-11-08 Tom Tromey <tromey@redhat.com>
2032
2033 * configure, config.in: Rebuild.
2034 * configure.ac: Remove unused configury.
2035
2036 2013-11-08 Tom Tromey <tromey@redhat.com>
2037
2038 * acinclude.m4: Include common.m4, codeset.m4.
2039 * configure, config.in: Rebuild.
2040 * configure.ac: Use GDB_AC_COMMON.
2041
2042 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2043
2044 * linux-s390-low.c (HWCAP_S390_TE): New define.
2045 (s390_arch_setup): Consider the TE field in the HWCAP for
2046 determining 'have_regset_tdb'.
2047
2048 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2049
2050 PR gdb/16014
2051 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2052 call to sizeof.
2053
2054 2013-10-02 Pedro Alves <palves@redhat.com>
2055
2056 * server.c (process_serial_event): Don't output "GDBserver
2057 exiting" if GDB is connected through stdio.
2058 * target.c (mywait): Likewise, be silent if GDB is connected
2059 through stdio.
2060
2061 2013-10-01 Joel Brobecker <brobecker@adacore.com>
2062
2063 * lynx-low.c (lynx_add_threads_after_attach): New function.
2064 (lynx_attach): Remove call to add_thread. Add call to
2065 lynx_add_threads_after_attach instead.
2066
2067 2013-09-28 Mike Frysinger <vapier@gentoo.org>
2068
2069 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2070 * config.in, configure: Regenerated.
2071
2072 2013-09-18 Yao Qi <yao@codesourcery.com>
2073
2074 PR server/15959
2075 * server.c (start_inferior): Clear 'resume_info'.
2076
2077 2013-09-16 Jiong Wang <jiwang@tilera.com>
2078
2079 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2080 for each register.
2081
2082 2013-09-16 Jiong Wang <jiwang@tilera.com>
2083
2084 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2085 linux-tile-low.o to srv_tgtobj.
2086
2087 2013-09-16 Will Newton <will.newton@linaro.org>
2088
2089 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2090 out regs.
2091
2092 2013-09-06 Pedro Alves <palves@redhat.com>
2093
2094 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2095 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2096 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2097 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2098 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2099 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2100
2101 2013-09-06 Pedro Alves <palves@redhat.com>
2102
2103 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2104 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2105
2106 2013-09-06 Pedro Alves <palves@redhat.com>
2107
2108 * linux-amd64-ipa.c: Include tracepoint.h.
2109 * linux-i386-ipa.c: Include tracepoint.h.
2110
2111 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2112
2113 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2114 (ps_get_thread_area): New function.
2115
2116 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2117
2118 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2119 (initialize_low_arch): Call init_registers_crisv32 rather than
2120 init_register_crisv32.
2121
2122 2013-09-05 Pedro Alves <palves@redhat.com>
2123
2124 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2125 to ...
2126 * hostio.h: ... this new file.
2127 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2128 win32-low.c: Include hostio.h.
2129
2130 2013-09-05 Pedro Alves <palves@redhat.com>
2131
2132 * server.h (gdb_client_data, handler_func, callback_handler_func)
2133 (delete_file_handler, add_file_handler, append_callback_event)
2134 (delete_callback_event, start_event_loop, initialize_event_loop):
2135 Move to event-loop.h and include it.
2136 * event-loop.h: New file.
2137
2138 2013-09-05 Pedro Alves <palves@redhat.com>
2139
2140 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2141 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2142 (loaded_dll, unloaded_dll): Move to ...
2143 * dll.h: ... this new file.
2144 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2145
2146 2013-09-05 Pedro Alves <palves@redhat.com>
2147
2148 * server.h (current_process, get_thread_process, all_processes)
2149 (add_inferior_to_list, for_each_inferior, current_inferior)
2150 (remove_inferior, add_process, remove_process, find_process_pid)
2151 (have_started_inferiors_p, have_attached_inferiors_p)
2152 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2153 (clear_inferiors, find_inferior, find_inferior_id)
2154 (inferior_target_data, set_inferior_target_data)
2155 (inferior_regcache_data, set_inferior_regcache_data): Move to
2156 inferiors.h, and include it.
2157 * inferiors.h: New file.
2158
2159 2013-09-05 Pedro Alves <palves@redhat.com>
2160
2161 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2162 Move ...
2163 * ax.h: ... here.
2164
2165 2013-09-05 Pedro Alves <palves@redhat.com>
2166
2167 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2168 tracepoint.h.
2169 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2170 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2171 (handle_tracepoint_general_set, handle_tracepoint_query)
2172 (tracepoint_finished_step, tracepoint_was_hit)
2173 (release_while_stepping_state_list, current_traceframe)
2174 (in_readonly_region, traceframe_read_mem)
2175 (fetch_traceframe_registers, traceframe_read_sdata)
2176 (traceframe_read_info, struct fast_tpoint_collect_status)
2177 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2178 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2179 (supply_fast_tracepoint_registers)
2180 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2181 (ipa_tdesc, claim_trampoline_space)
2182 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2183 (agent_mem_read, agent_get_trace_state_variable_value)
2184 (agent_set_trace_state_variable_value, agent_tsv_read)
2185 (agent_mem_read_string, get_raw_reg_func_addr)
2186 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2187 * tracepoint.h: ... this new file.
2188
2189 2013-09-05 Pedro Alves <palves@redhat.com>
2190
2191 * server.h (perror_with_name, error, fatal, warning, paddress)
2192 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2193 include it.
2194 * utils.h: New file.
2195
2196 2013-09-05 Pedro Alves <palves@redhat.com>
2197
2198 * server.h (remote_debug, noack_mode, transport_is_reliable)
2199 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2200 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2201 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2202 (write_enn, initialize_async_io, enable_async_io)
2203 (disable_async_io, check_remote_input_interrupt_request)
2204 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2205 (dead_thread_notify, prepare_resume_reply)
2206 (decode_address_to_semicolon, decode_address, decode_m_packet)
2207 (decode_M_packet, decode_X_packet, decode_xfer_write)
2208 (decode_search_memory_packet, unhexify, hexify)
2209 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2210 (look_up_one_symbol, relocate_instruction)
2211 (monitor_output): Move to remote-utils.h, and include it.
2212 * remote-utils.h: New file.
2213
2214 2013-09-05 Pedro Alves <palves@redhat.com>
2215
2216 * server.h (_): Delete.
2217
2218 2013-09-02 Pedro Alves <palves@redhat.com>
2219
2220 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2221 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2222 allocated.
2223 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2224
2225 2013-09-02 Pierre Muller <muller@sourceware.org>
2226
2227 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2228 or WriteProcessMemory complete successfully and handle
2229 ERROR_PARTIAL_COPY error.
2230
2231 2013-09-02 Pedro Alves <palves@redhat.com>
2232
2233 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2234 error instead of EIO.
2235
2236 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2237
2238 PR server/15604
2239 * linux-low.c: Include filestuff.h.
2240 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2241 * lynx-low.c: Include filestuff.h.
2242 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2243 * server.c: Include filestuff.h.
2244 (main): Call notice_open_fds.
2245 * spu-low.c: Include filestuff.h.
2246 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2247
2248 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
2249
2250 * Makefile.in: Explain why ../target and ../nat are not
2251 listed as include file search paths.
2252 (linux-waitpid.o): New object file rule.
2253 * configure.srv (srv_native_linux_obj): New variable.
2254 Replace all occurrences of linux native object files with
2255 $srv_native_linux_obj.
2256 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2257 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2258 (linux_enable_event_reporting): Remove declaration.
2259 (my_waitpid): Moved to common/linux-waitpid.c.
2260 (linux_wait_for_event): Pass ptid when calling
2261 linux_enable_event_reporting.
2262 (linux_supports_tracefork_flag): Remove.
2263 (linux_enable_event_reporting): Likewise.
2264 (linux_tracefork_grandchild): Remove.
2265 (STACK_SIZE): Moved to common/linux-ptrace.c.
2266 (linux_tracefork_child): Remove.
2267 (linux_test_for_tracefork): Remove.
2268 (linux_look_up_symbols): Call linux_supports_traceclone.
2269 (initialize_low): Remove call to linux_test_for_tracefork.
2270 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2271 common/linux-ptrace.h.
2272 (PTRACE_TYPE_ARG4): Likewise.
2273 Include linux-ptrace.h.
2274
2275 2013-08-21 Pedro Alves <palves@redhat.com>
2276
2277 * config.in: Renegerate.
2278
2279 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
2280
2281 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2282 (SFILES): Remove $(srcdir)/common/target-common.c and
2283 add $(srcdir)/target/waitstatus.c.
2284 (OBS): Remove target-common.o and add waitstatus.o.
2285 (server_h): Remove $(srcdir)/../common/target-common.h and
2286 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2287 and $(srcdir)/../target/waitstatus.h.
2288 (target-common.o): Remove.
2289 (waitstatus.o): New target object file.
2290 * target.h: Do not include target-common.h and
2291 include target/resume.h, target/wait.h and
2292 target/waitstatus.h.
2293
2294 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
2295
2296 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2297 to PTRACE_TYPE_ARG3.
2298 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2299 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2300 PTRACE_TYPE_ARG4.
2301 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2302 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2303
2304 2013-07-27 Jie Zhang <jie@codesourcery.com>
2305 Daniel Jacobowitz <dan@codesourcery.com>
2306 Yao Qi <yao@codesourcery.com>
2307
2308 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2309 (mips-linux-watch.o): New rule.
2310 (mips_linux_watch_h): New variable.
2311 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2312 srv_tgtobj.
2313 * linux-mips-low.c: Include mips-linux-watch.h.
2314 (struct arch_process_info, struct arch_lwp_info): New.
2315 (update_watch_registers_callback): New function.
2316 (mips_linux_new_process, mips_linux_new_thread) New functions.
2317 (mips_linux_prepare_to_resume, mips_insert_point): New
2318 functions.
2319 (mips_remove_point, mips_stopped_by_watchpoint): New
2320 functions.
2321 (rsp_bp_type_to_target_hw_bp_type): New function.
2322 (mips_stopped_data_address): New function.
2323 (the_low_target): Add watchpoint support functions.
2324
2325 2013-07-27 Yao Qi <yao@codesourcery.com>
2326
2327 * i386-low.c: Include break-common.h.
2328 (enum target_hw_bp_type): Remove.
2329
2330 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
2331
2332 * Makefile.in (SFILES): /common/target-common.c.
2333 (OBS): Add target-common.o.
2334 (server_h): Add $(srcdir)/../common/target-common.h.
2335 (target-common.o): New target.
2336 * server.c (queue_stop_reply_callback): Free
2337 status string after use.
2338 * target.c (target_waitstatus_to_string): Remove.
2339 * target.h: Include target-common.h.
2340 (resume_kind): Likewise.
2341 (target_waitkind): Likewise.
2342 (target_waitstatus): Likewise.
2343 (TARGET_WNOHANG): Likewise.
2344
2345 2013-07-04 Yao Qi <yao@codesourcery.com>
2346
2347 * Makefile.in (host_alias): Use @host_noncanonical@.
2348 (target_alias): Use @target_noncanonical@.
2349 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2350 ACX_NONCANONICAL_HOST.
2351 * configure: Regenerated.
2352
2353 Revert:
2354 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2355
2356 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2357 * configure: Rebuild.
2358 * Makefile.in (version_host, version_target): Get from configure.
2359 (version.c): Use $(version_host) and $(version_target).
2360
2361 2013-07-03 Pedro Alves <palves@redhat.com>
2362
2363 * Makefile.in (config.status): Depend on development.sh.
2364 * acinclude.m4: Include libmcheck.m4.
2365 * configure: Regenerate.
2366
2367 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2368
2369 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2370 attribute inside the parentheses.
2371 (winapi_DebugSetProcessKillOnExit): Ditto.
2372 (winapi_DebugBreakProcess): Ditto.
2373 (winapi_GenerateConsoleCtrlEvent): Ditto.
2374
2375 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2376
2377 * notif.h (notif_event): Add a dummy member to avoid compiler
2378 errors.
2379
2380 2013-07-01 Pedro Alves <palves@redhat.com>
2381
2382 * hostio.c (HOSTIO_PATH_MAX): Define.
2383 (require_filename, handle_open, handle_unlink, handle_readlink):
2384 Use it.
2385
2386 2013-07-01 Pedro Alves <palves@redhat.com>
2387
2388 * server.h: Include "pathmax.h".
2389 * linux-low.c: Don't include sys/param.h.
2390 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2391 MAXPATHLEN.
2392 * win32-low.c: Don't include sys/param.h.
2393 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2394
2395 2013-07-01 Pedro Alves <palves@redhat.com>
2396
2397 * event-loop.c: Don't check HAVE_UNISTD_H before including
2398 <unistd.h>.
2399 * gdbreplay.c: Likewise.
2400 * remote-utils.c: Likewise.
2401 * server.c: Likewise.
2402 * configure.ac: Don't check for unistd.h.
2403 * configure: Regenerate.
2404
2405 2013-06-28 Tom Tromey <tromey@redhat.com>
2406
2407 * Makefile.in (version.c): Use version.in, not
2408 common/version.in.
2409
2410 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2411
2412 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2413 * configure: Rebuild.
2414 * Makefile.in (version_host, version_target): Get from configure.
2415 (version.c): Use $(version_host) and $(version_target).
2416
2417 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2418
2419 Fix trace-status to output user name without trailing colon.
2420 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2421
2422 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2423
2424 Fix trace-status to output proper start-time and stop-time.
2425 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2426 output start time and stop time in hex as gdb expects.
2427
2428 2013-06-26 Pedro Alves <pedro@codesourcery.com>
2429
2430 * tracepoint.c (build_traceframe_info_xml): Output trace state
2431 variables present in the trace buffer.
2432
2433 2013-06-24 Tom Tromey <tromey@redhat.com>
2434
2435 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2436 create-version.sh.
2437 (version.o): Remove.
2438 * gdbreplay.c: Include version.h.
2439 (version, host_name): Don't declare.
2440 * server.h: Include version.h.
2441 (version, host_name): Don't declare.
2442
2443 2013-06-12 Pedro Alves <palves@redhat.com>
2444
2445 * linux-x86-low.c (linux_is_elf64): Delete global.
2446 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2447 with local linux_pid_exe_is_elf_64_file use.
2448
2449 2013-06-11 Pedro Alves <palves@redhat.com>
2450
2451 * linux-low.c (regset_disabled, disable_regset): New functions.
2452 (regsets_fetch_inferior_registers)
2453 (regsets_store_inferior_registers): Use them.
2454 (initialize_regsets_info); Don't allocate the disabled_regsets
2455 array here.
2456 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2457 comment.
2458
2459 2013-06-11 Pedro Alves <palves@redhat.com>
2460
2461 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2462 xmalloc.
2463
2464 2013-06-11 Pedro Alves <palves@redhat.com>
2465
2466 * linux-x86-low.c (initialize_low_arch): Call
2467 init_registers_x32_avx_linux.
2468
2469 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2470
2471 Fix compatibility with Android Bionic.
2472 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2473 it is not empty.
2474
2475 2013-06-07 Pedro Alves <palves@redhat.com>
2476
2477 PR server/14823
2478 * Makefile.in (OBS): Add tdesc.o.
2479 (IPA_OBJS): Add tdesc-ipa.o.
2480 (tdesc-ipa.o): New rule.
2481 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2482 interface.
2483 * linux-low.c (new_inferior): Delete.
2484 (disabled_regsets, num_regsets): Delete.
2485 (linux_add_process): Adjust to set the new per-process
2486 new_inferior flag.
2487 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2488 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2489 was a stop. When calling arch_setup, switch the current inferior
2490 to the thread that got an event.
2491 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2492 (regsets_fetch_inferior_registers)
2493 (regsets_store_inferior_registers): New regsets_info parameter.
2494 Adjust to use it.
2495 (linux_register_in_regsets): New regs_info parameter. Adjust to
2496 use it.
2497 (register_addr, fetch_register, store_register): New usrregs_info
2498 parameter. Adjust to use it.
2499 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2500 parameter regs_info. Adjust to use it.
2501 (linux_fetch_registers): Get the current inferior's regs_info, and
2502 adjust to use it.
2503 (linux_store_registers): Ditto.
2504 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2505 (initialize_low): Don't initialize the target_regsets here. Call
2506 initialize_low_arch.
2507 * linux-low.h (target_regsets): Delete declaration.
2508 (struct regsets_info): New.
2509 (struct usrregs_info): New.
2510 (struct regs_info): New.
2511 (struct process_info_private) <new_inferior>: New field.
2512 (struct linux_target_ops): Delete the num_regs, regmap, and
2513 regset_bitmap fields. New field regs_info.
2514 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2515 * i387-fp.c (num_xmm_registers): Delete.
2516 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2517 calls to new interface.
2518 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2519 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2520 Infer the number of xmm registers from the regcache's target
2521 description.
2522 * i387-fp.h (num_xmm_registers): Delete.
2523 * inferiors.c (add_thread): Don't install the thread's regcache
2524 here.
2525 * proc-service.c (gregset_info): Fetch the current inferior's
2526 regs_info. Adjust to use it.
2527 * regcache.c: Include tdesc.h.
2528 (register_bytes, reg_defs, num_registers)
2529 (gdbserver_expedite_regs): Delete.
2530 (get_thread_regcache): If the thread doesn't have a regcache yet,
2531 create one, instead of aborting gdbserver.
2532 (regcache_invalidate_one): Rename to ...
2533 (regcache_invalidate_thread): ... this.
2534 (regcache_invalidate_one): New.
2535 (regcache_invalidate): Only invalidate registers of the current
2536 process.
2537 (init_register_cache): Add target_desc parameter, and use it.
2538 (new_register_cache): Ditto. Assert the target description has a
2539 non zero registers_size.
2540 (regcache_cpy): Add assertions. Adjust.
2541 (realloc_register_cache, set_register_cache): Delete.
2542 (registers_to_string, registers_from_string): Adjust.
2543 (find_register_by_name, find_regno, find_register_by_number)
2544 (register_cache_size): Add target_desc parameter, and use it.
2545 (free_register_cache_thread, free_register_cache_thread_one)
2546 (regcache_release, register_cache_size): New.
2547 (register_size): Add target_desc parameter, and use it.
2548 (register_data, supply_register, supply_register_zeroed)
2549 (supply_regblock, supply_register_by_name, collect_register)
2550 (collect_register_as_string, collect_register_by_name): Adjust.
2551 * regcache.h (struct target_desc): Forward declare.
2552 (struct regcache) <tdesc>: New field.
2553 (init_register_cache, new_register_cache): Add target_desc
2554 parameter.
2555 (regcache_invalidate_thread): Declare.
2556 (regcache_invalidate_one): Delete declaration.
2557 (regcache_release): Declare.
2558 (find_register_by_number, register_cache_size, register_size)
2559 (find_regno): Add target_desc parameter.
2560 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2561 declarations.
2562 * remote-utils.c: Include tdesc.h.
2563 (outreg, prepare_resume_reply): Adjust.
2564 * server.c: Include tdesc.h.
2565 (gdbserver_xmltarget): Delete declaration.
2566 (get_features_xml, process_serial_event): Adjust.
2567 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2568 declare.
2569 (struct process_info) <tdesc>: New field.
2570 (ipa_tdesc): Declare.
2571 * tdesc.c: New file.
2572 * tdesc.h: New file.
2573 * tracepoint.c: Include tdesc.h.
2574 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2575 (get_context_regcache): Adjust to pass ipa_tdesc down.
2576 (do_action_at_tracepoint): Adjust to get the register cache size
2577 from the context regcache's description.
2578 (traceframe_walk_blocks): Adjust to get the register cache size
2579 from the current trace frame's description.
2580 (traceframe_get_pc): Adjust to get current trace frame's
2581 description and pass it down.
2582 (gdb_collect): Adjust to get the register cache size from the
2583 IPA's description.
2584 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2585 (gdbserver_xmltarget): Delete.
2586 (initialize_low_tracepoint): Set the ipa's target description.
2587 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2588 (initialize_low_tracepoint): Set the ipa's target description.
2589 * linux-x86-low.c: Include tdesc.h.
2590 [__x86_64__] (is_64bit_tdesc): New.
2591 (ps_get_thread_area, x86_get_thread_area): Use it.
2592 (i386_cannot_store_register): Rename to ...
2593 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2594 (i386_cannot_fetch_register): Rename to ...
2595 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2596 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2597 to new interface.
2598 (target_regsets): Rename to ...
2599 (x86_regsets): ... this.
2600 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2601 interface.
2602 (x86_siginfo_fixup): Use is_64bit_tdesc.
2603 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2604 (tdesc_x32_avx_linux, tdesc_x32_linux)
2605 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2606 Declare.
2607 (x86_linux_update_xmltarget): Delete.
2608 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2609 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2610 (AMD64_LINUX_USER64_CS): New.
2611 (x86_linux_read_description): New, based on
2612 x86_linux_update_xmltarget.
2613 (same_process_callback): New.
2614 (x86_arch_setup_process_callback): New.
2615 (x86_linux_update_xmltarget): New.
2616 (x86_regsets_info): New.
2617 (amd64_linux_regs_info): New.
2618 (i386_linux_usrregs_info): New.
2619 (i386_linux_regs_info): New.
2620 (x86_linux_regs_info): New.
2621 (x86_arch_setup): Reimplement.
2622 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2623 (x86_emit_ops): Ditto.
2624 (the_low_target): Adjust. Install x86_linux_regs_info,
2625 x86_cannot_fetch_register, and x86_cannot_store_register.
2626 (initialize_low_arch): New.
2627 * linux-ia64-low.c (tdesc_ia64): Declare.
2628 (ia64_fetch_register): Adjust.
2629 (ia64_usrregs_info, regs_info): New globals.
2630 (ia64_regs_info): New function.
2631 (the_low_target): Adjust.
2632 (initialize_low_arch): New function.
2633 * linux-sparc-low.c (tdesc_sparc64): Declare.
2634 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2635 Adjust.
2636 (sparc_arch_setup): New function.
2637 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2638 (the_low_target): Adjust.
2639 (initialize_low_arch): New function.
2640 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2641 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2642 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2643 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2644 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2645 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2646 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2647 (tdesc_powerpc_isa205_vsx64l): Declare.
2648 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2649 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2650 (ppc_set_pc, ppc_get_hwcap): Adjust.
2651 (ppc_usrregs_info): Forward declare.
2652 (!__powerpc64__) ppc_regmap_adjusted: New global.
2653 (ppc_arch_setup): Adjust to the current process'es target
2654 description.
2655 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2656 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2657 (ppc_store_evrregset): Adjust.
2658 (target_regsets): Rename to ...
2659 (ppc_regsets): ... this, and make static.
2660 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2661 (ppc_regs_info): New function.
2662 (the_low_target): Adjust.
2663 (initialize_low_arch): New function.
2664 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2665 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2666 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2667 (tdesc_s390x_linux64v2): Declare.
2668 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2669 (s390_fill_gregset, s390_store_last_break): Adjust.
2670 (target_regsets): Rename to ...
2671 (s390_regsets): ... this, and make static.
2672 (s390_get_pc, s390_set_pc): Adjust.
2673 (s390_get_hwcap): New target_desc parameter, and use it.
2674 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2675 (s390_arch_setup): Adjust to set the current process'es target
2676 description. Don't adjust the regmap.
2677 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2678 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2679 (regs_info_3264): New globals.
2680 (s390_regs_info): New function.
2681 (the_low_target): Adjust.
2682 (initialize_low_arch): New function.
2683 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2684 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2685 [__mips64] (init_registers_mips_linux)
2686 (init_registers_mips_dsp_linux): Delete defines.
2687 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2688 (have_dsp): New global.
2689 (mips_read_description): New, based on mips_arch_setup.
2690 (mips_arch_setup): Reimplement.
2691 (get_usrregs_info): New function.
2692 (mips_cannot_fetch_register, mips_cannot_store_register)
2693 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2694 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2695 (target_regsets): Rename to ...
2696 (mips_regsets): ... this, and make static.
2697 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2698 (dsp_regs_info, regs_info): New globals.
2699 (mips_regs_info): New function.
2700 (the_low_target): Adjust.
2701 (initialize_low_arch): New function.
2702 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2703 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2704 Declare.
2705 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2706 (arm_read_description): New, with bits factored from
2707 arm_arch_setup.
2708 (arm_arch_setup): Reimplement.
2709 (target_regsets): Rename to ...
2710 (arm_regsets): ... this, and make static.
2711 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2712 (arm_regs_info): New function.
2713 (the_low_target): Adjust.
2714 (initialize_low_arch): New function.
2715 * linux-m68k-low.c (tdesc_m68k): Declare.
2716 (target_regsets): Rename to ...
2717 (m68k_regsets): ... this, and make static.
2718 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2719 (m68k_regs_info): New function.
2720 (m68k_arch_setup): New function.
2721 (the_low_target): Adjust.
2722 (initialize_low_arch): New function.
2723 * linux-sh-low.c (tdesc_sharch): Declare.
2724 (target_regsets): Rename to ...
2725 (sh_regsets): ... this, and make static.
2726 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2727 (sh_regs_info, sh_arch_setup): New functions.
2728 (the_low_target): Adjust.
2729 (initialize_low_arch): New function.
2730 * linux-bfin-low.c (tdesc_bfin): Declare.
2731 (bfin_arch_setup): New function.
2732 (bfin_usrregs_info, regs_info): New globals.
2733 (bfin_regs_info): New function.
2734 (the_low_target): Adjust.
2735 (initialize_low_arch): New function.
2736 * linux-cris-low.c (tdesc_cris): Declare.
2737 (cris_arch_setup): New function.
2738 (cris_usrregs_info, regs_info): New globals.
2739 (cris_regs_info): New function.
2740 (the_low_target): Adjust.
2741 (initialize_low_arch): New function.
2742 * linux-cris-low.c (tdesc_crisv32): Declare.
2743 (cris_arch_setup): New function.
2744 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2745 (cris_regs_info): New function.
2746 (the_low_target): Adjust.
2747 (initialize_low_arch): New function.
2748 * linux-m32r-low.c (tdesc_m32r): Declare.
2749 (m32r_arch_setup): New function.
2750 (m32r_usrregs_info, regs_info): New globals.
2751 (m32r_regs_info): Adjust.
2752 (initialize_low_arch): New function.
2753 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2754 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2755 (tic6x_usrregs_info): Forward declare.
2756 (tic6x_read_description): New function, based on ...
2757 (tic6x_arch_setup): ... this. Reimplement.
2758 (target_regsets): Rename to ...
2759 (tic6x_regsets): ... this, and make static.
2760 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2761 (tic6x_regs_info): New function.
2762 (the_low_target): Adjust.
2763 (initialize_low_arch): New function.
2764 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2765 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2766 (target_regsets): Rename to ...
2767 (xtensa_regsets): ... this, and make static.
2768 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2769 globals.
2770 (xtensa_arch_setup, xtensa_regs_info): New functions.
2771 (the_low_target): Adjust.
2772 (initialize_low_arch): New function.
2773 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2774 (nios2_arch_setup): Set the current process'es tdesc.
2775 (target_regsets): Rename to ...
2776 (nios2_regsets): ... this.
2777 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2778 (nios2_regs_info): New function.
2779 (the_low_target): Adjust.
2780 (initialize_low_arch): New function.
2781 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2782 (aarch64_arch_setup): Set the current process'es tdesc.
2783 (target_regsets): Rename to ...
2784 (aarch64_regsets): ... this.
2785 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2786 (aarch64_regs_info): New function.
2787 (the_low_target): Adjust.
2788 (initialize_low_arch): New function.
2789 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2790 globals.
2791 (target_regsets): Rename to ...
2792 (tile_regsets): ... this.
2793 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2794 (tile_regs_info): New function.
2795 (tile_arch_setup): Set the current process'es tdesc.
2796 (the_low_target): Adjust.
2797 (initialize_low_arch): New function.
2798 * spu-low.c (tdesc_spu): Declare.
2799 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2800 * win32-arm-low.c (tdesc_arm): Declare.
2801 (arm_arch_setup): New function.
2802 (the_low_target): Install arm_arch_setup instead of
2803 init_registers_arm.
2804 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2805 (init_windows_x86): Rename to ...
2806 (i386_arch_setup): ... this. Set `win32_tdesc'.
2807 (the_low_target): Adjust.
2808 * win32-low.c (win32_tdesc): New global.
2809 (child_add_thread): Don't create the thread cache here.
2810 (do_initial_child_stuff): Set the new process'es tdesc.
2811 * win32-low.h (struct target_desc): Forward declare.
2812 (win32_tdesc): Declare.
2813 * lynx-i386-low.c (tdesc_i386): Declare global.
2814 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2815 * lynx-low.c (lynx_tdesc): New global.
2816 (lynx_add_process): Set the new process'es tdesc.
2817 * lynx-low.h (struct target_desc): Forward declare.
2818 (lynx_tdesc): Declare global.
2819 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2820 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2821 * nto-low.c (nto_tdesc): New global.
2822 (do_attach): Set the new process'es tdesc.
2823 * nto-low.h (struct target_desc): Forward declare.
2824 (nto_tdesc): Declare.
2825 * nto-x86-low.c (tdesc_i386): Declare.
2826 (nto_x86_arch_setup): Set `nto_tdesc'.
2827
2828 2013-06-04 Gary Benson <gbenson@redhat.com>
2829
2830 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2831 to qSupported response when appropriate.
2832 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2833 with nonzero-length annex.
2834 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2835 arguments supplied in annex.
2836
2837 2013-05-31 Doug Evans <dje@google.com>
2838
2839 PR server/15594
2840 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2841 64 bits in 64-cross-32 environment.
2842
2843 2013-05-28 Pedro Alves <palves@redhat.com>
2844
2845 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2846 (aarch64-without-fpu.c): Delete rule.
2847 * configure.srv (aarch64*-*-linux*): Remove references to
2848 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2849 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2850 declaration.
2851
2852 2013-05-24 Pedro Alves <palves@redhat.com>
2853
2854 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2855 instead of strchr/decode_address. Error if the range isn't split
2856 with a ','. Don't assume there's be a ':' in the action.
2857
2858 2013-05-23 Yao Qi <yao@codesourcery.com>
2859 Pedro Alves <palves@redhat.com>
2860
2861 * linux-low.c (lwp_in_step_range): New function.
2862 (linux_wait_1): If the thread was range stepping and stopped
2863 outside the stepping range, report the stop to GDB. Otherwise,
2864 continue stepping. Add range stepping debug output.
2865 (linux_set_resume_request): Copy the step range from the resume
2866 request to the lwp.
2867 (linux_supports_range_stepping): New.
2868 (linux_target_ops) <supports_range_stepping>: Set to
2869 linux_supports_range_stepping.
2870 * linux-low.h (struct linux_target_ops)
2871 <supports_range_stepping>: New field.
2872 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2873 * linux-x86-low.c (x86_supports_range_stepping): New.
2874 (the_low_target) <supports_range_stepping>: Set to
2875 x86_supports_range_stepping.
2876 * server.c (handle_v_cont): Handle 'r' action.
2877 (handle_v_requests): Append ";r" if the target supports range
2878 stepping.
2879 * target.h (struct thread_resume) <step_range_start,
2880 step_range_end>: New fields.
2881 (struct target_ops) <supports_range_stepping>:
2882 New field.
2883 (target_supports_range_stepping): New macro.
2884
2885 2013-05-17 Joel Brobecker <brobecker@adacore.com>
2886
2887 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2888 confusion in comment.
2889
2890 2013-05-17 Joel Brobecker <brobecker@adacore.com>
2891
2892 * lynx-low.c (struct process_info_private): New type.
2893 (lynx_add_process): New function.
2894 (lynx_create_inferior, lynx_attach): Replace calls to
2895 add_process by calls to lynx_add_process.
2896 (lynx_resume): If PTID is null, then try using
2897 current_process()->private->last_wait_event_ptid.
2898 Add comments.
2899 (lynx_clear_inferiors): Delete. The contents of that function
2900 has been inlined in lynx_mourn;
2901 (lynx_wait_1): Save the ptid in the process's private data.
2902 (lynx_mourn): Free the process' private data. Replace call
2903 to lynx_clear_inferiors by call to clear_inferiors.
2904
2905 2013-05-17 Yao Qi <yao@codesourcery.com>
2906
2907 * i386-low.c (i386_length_and_rw_bits): Move the comment to
2908 the right place.
2909
2910 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
2911
2912 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
2913 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
2914 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
2915 PT_TEXT_END_ADDR guards. Update comments.
2916 (linux_target_op) <read_offsets>: Conditionally define to
2917 linux_read_offsets if the target is UCLIBC and if it defines
2918 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
2919
2920 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
2921 Andrew Jenner <andrew@codesourcery.com>
2922
2923 * Makefile.in (SFILES): Add linux-nios2-low.c.
2924 (clean): Add action to delete nios2-linux.c.
2925 (nios2-linux.c): New rule.
2926 * configure.srv: Add nios2*-*-linux*.
2927 * linux-nios2-low.c: New.
2928
2929 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
2930
2931 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
2932
2933 2013-04-25 Hui Zhu <hui@codesourcery.com>
2934
2935 PR gdb/15186
2936 * ax.c (ax_printf): Add fflush.
2937
2938 2013-04-22 Tom Tromey <tromey@redhat.com>
2939
2940 * Makefile.in (SFILES): Add filestuff.c.
2941 (OBS): Add filestuff.o.
2942 (filestuff.o): New target.
2943 * config.in, configure: Rebuild.
2944 * configure.ac: Check for fdwalk, pipe2.
2945
2946 2013-04-17 Pedro Alves <palves@redhat.com>
2947
2948 * configure.ac (USE_THREAD_DB): Delete variable.
2949 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
2950 Don't AC_SUBST USE_THREAD_DB.
2951 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
2952 * config.in, configure: Regenerate.
2953
2954 2013-04-16 Pedro Alves <palves@redhat.com>
2955
2956 * linux-low.h (struct lwp_info) <thread_known>: Move under
2957 the USE_THREAD_DB #ifdef.
2958
2959 2013-04-16 Pedro Alves <palves@redhat.com>
2960
2961 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
2962 (linux-low.o): Delete rule.
2963 * linux-low.h: Always include "gdb_thread_db.h" instead of
2964 conditionally including thread_db.h.
2965 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
2966 HAVE_THREAD_DB_H.
2967
2968 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2969
2970 * Makefile.in (install-only): Fix make install regression.
2971
2972 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
2973
2974 Convert man pages to texinfo, new gdbinit.5 texinfo page.
2975 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
2976 installation.
2977 * gdbserver.1: Remove.
2978
2979 2013-03-22 Pedro Alves <palves@redhat.com>
2980
2981 * linux-low.c (handle_extended_wait): Don't call
2982 linux_enable_event_reporting.
2983
2984 2013-03-15 Tony Theodore <tonyt@logyst.com>
2985
2986 PR build/9098:
2987 * Makefile.in (SHELL): Use @SHELL@.
2988
2989 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
2990
2991 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
2992 compiler warning.
2993
2994 2013-03-13 Joel Brobecker <brobecker@adacore.com>
2995
2996 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
2997 Remove extraneous NULL element.
2998
2999 2013-03-13 Yao Qi <yao@codesourcery.com>
3000
3001 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3002 'V' block in trace frame.
3003
3004 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3005
3006 * target.h (struct target_ops): Add btrace ops.
3007 (target_supports_btrace): New macro.
3008 (target_enable_btrace): New macro.
3009 (target_disable_btrace): New macro.
3010 (target_read_btrace): New macro.
3011 * gdbthread.h (struct thread_info): Add btrace field.
3012 * server.c: Include btrace-common.h.
3013 (handle_btrace_general_set): New function.
3014 (handle_btrace_enable): New function.
3015 (handle_btrace_disable): New function.
3016 (handle_general_set): Call handle_btrace_general_set.
3017 (handle_qxfer_btrace): New function.
3018 (struct qxfer qxfer_packets[]): Add btrace entry.
3019 * inferiors.c (remove_thread): Disable btrace.
3020 * linux-low: Include linux-btrace.h.
3021 (linux_low_enable_btrace): New function.
3022 (linux_low_read_btrace): New function.
3023 (linux_target_ops): Add btrace ops.
3024 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3025 Add srv_linux_btrace=yes.
3026 (x86_64-*-linux*): Add linux-btrace.o.
3027 Add srv_linux_btrace=yes.
3028 * configure.ac: Define HAVE_LINUX_BTRACE.
3029 * config.in: Regenerated.
3030 * configure: Regenerated.
3031
3032 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3033
3034 * server.c (handle_qxfer): Preserve error message if -3 is
3035 returned.
3036 (qxfer): Document the -3 return value.
3037
3038 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3039
3040 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3041 (linux_btrace_h): New variable.
3042 (linux-btrace.o): New rule.
3043
3044 2013-03-08 Stan Shebs <stan@codesourcery.com>
3045 Hafiz Abid Qadeer <abidh@codesourcery.com>
3046
3047 * tracepoint.c (trace_buffer_size): New global.
3048 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3049 (init_trace_buffer): Change to one-argument function. Allocate
3050 trace buffer memory.
3051 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3052 handle QTBuffer:size packet.
3053 (cmd_bigqtbuffer_size): New function.
3054 (initialize_tracepoint): Call init_trace_buffer with
3055 DEFAULT_TRACE_BUFFER_SIZE.
3056 * server.c (handle_query): Add QTBuffer:size in the
3057 supported packets.
3058
3059 2013-03-07 Yao Qi <yao@codesourcery.com>
3060
3061 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3062 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3063 of -1.
3064 (cmd_qtsp): Adjust condition. Do post increment.
3065 Set cur_action and cur_step_action back to 0.
3066
3067 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3068
3069 PR server/15236
3070 * linux-low.c (linux_write_memory): Return early success if LEN is
3071 zero.
3072
3073 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
3074
3075 * configure.srv: Add x86_64-*-cygwin* as target.
3076
3077 2013-02-28 Tom Tromey <tromey@redhat.com>
3078
3079 * configure.ac: Invoke AC_SYS_LARGEFILE.
3080 * configure, config.in: Rebuild.
3081
3082 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
3083
3084 * win32-low.c: Throughout, fix format strings and casts of
3085 printf-like functions to avoid type related warnings on all
3086 platforms.
3087 (get_child_debug_event): Print dwDebugEventCode as hex since
3088 that's how it's usually documented.
3089
3090 2013-02-28 Yao Qi <yao@codesourcery.com>
3091
3092 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3093 pulongest.
3094
3095 2013-02-27 Jiong Wang <jiwang@tilera.com>
3096
3097 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3098 (reg-tilegx32.c): New rule.
3099 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3100 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3101 different register info initializer according to elf class.
3102 (init_registers_tilgx32): New function. The tilegx32 register info
3103 initializer.
3104 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3105 (tile_store_gregset): Likewise.
3106
3107 2013-02-27 Yao Qi <yao@codesourcery.com>
3108
3109 * server.c (process_point_options): Print debug message when
3110 debug_threads is true.
3111
3112 2013-02-26 Yao Qi <yao@codesourcery.com>
3113
3114 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3115
3116 2013-02-19 Pedro Alves <palves@redhat.com>
3117 Kai Tietz <ktietz@redhat.com>
3118
3119 PR gdb/15161
3120
3121 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3122 instead of strtoul to extract address from packet.
3123 (process_serial_event) <'z'>: Likewise.
3124
3125 2013-02-18 Yao Qi <yao@codesourcery.com>
3126
3127 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3128
3129 2013-02-14 Pedro Alves <palves@redhat.com>
3130
3131 Plug memory leak.
3132
3133 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3134 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3135
3136 2013-02-14 Pedro Alves <palves@redhat.com>
3137
3138 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3139
3140 2013-02-14 Pedro Alves <palves@redhat.com>
3141
3142 * tracepoint.c (save_string): Delete.
3143 (add_tracepoint_action): Use savestring instead of save_string.
3144
3145 2013-02-12 Pedro Alves <palves@redhat.com>
3146
3147 * linux-xtensa-low.c: Ditto.
3148 * xtensa-xtregs.c: Ditto.
3149
3150 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3151
3152 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3153 thread_db.
3154
3155 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3156
3157 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3158 aarch64_num_wp_regs and aarch64_num_bp_regs to
3159 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3160
3161 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3162
3163 * linux-aarch64-low.c (ps_get_thread_area): Replace
3164 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3165
3166 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3167 Marcus Shawcroft <marcus.shawcroft@arm.com>
3168 Nigel Stephens <nigel.stephens@arm.com>
3169 Yufeng Zhang <yufeng.zhang@arm.com>
3170
3171 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3172 (aarch64.c, aarch64-without-fpu.c): New targets.
3173 * configure.srv (aarch64*-*-linux*): New.
3174 * linux-aarch64-low.c: New file.
3175
3176 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3177
3178 * linux-low.c (handle_extended_wait, linux_create_inferior)
3179 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3180 (dequeue_one_deferred_signal, linux_resume_one_thread)
3181 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3182 (linux_tracefork_grandchild, linux_test_for_tracefork)
3183 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3184 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3185 where the argument is 0.
3186
3187 2013-01-25 Yao Qi <yao@codesourcery.com>
3188
3189 * event-loop.c: Include "queue.h".
3190 (gdb_event_p): New typedef.
3191 (struct gdb_event) <next_event>: Remove.
3192 (event_queue): Change to QUEUE(gdb_event_p).
3193 (async_queue_event): Remove.
3194 (gdb_event_xfree): New.
3195 (initialize_event_loop): New.
3196 (process_event): Use API from QUEUE.
3197 (wait_for_event): Likewise.
3198 * server.c (main): Call initialize_event_loop.
3199 * server.h (initialize_event_loop): Declare.
3200
3201 2013-01-18 Yao Qi <yao@codesourcery.com>
3202
3203 * ax.h (struct eval_agent_expr_context): New.
3204 (gdb_eval_agent_expr): Update declaration.
3205 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3206 TFRAME. Add new argument CTX.
3207 * server.h (struct eval_agent_expr_context): Declare.
3208 (agent_mem_read, agent_tsv_read): Update declaration.
3209 (agent_mem_read_string): Likewise.
3210 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3211 (add_traceframe_block): Add new argument TPOINT.
3212 Increase TPOINT->traceframe_usage.
3213 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3214 eval_tracepoint_agent_expr.
3215 (condition_true_at_tracepoint): Likewise.
3216 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3217 (agent_mem_read_string, agent_tsv_read): Likewise.
3218
3219 2013-01-16 Yao Qi <yao@codesourcery.com>
3220
3221 * linux-low.c (linux_resume_one_lwp): Don't check
3222 'lwp->bp_reinsert != 0'.
3223
3224 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3225 Pedro Alves <palves@redhat.com>
3226
3227 * lynx-low.c (ptrace_request_to_str): Define a temporary
3228 macro and use it to simplify this function's implementation.
3229
3230 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3231
3232 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3233 sets errno.
3234
3235 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3236
3237 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3238
3239 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3240
3241 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3242
3243 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3244
3245 * lynx-low.c (lynx_resume): Use the resume_info parameter
3246 to determine the ptid for the lynx_ptrace call, unless
3247 it is equal to minus_one_ptid, in which case we use the
3248 ptid of the current_inferior.
3249 (lynx_wait_1): After having received a thread create/exit
3250 event, resume the inferior's execution using the signaling
3251 thread's ptid, rather than the old ptid.
3252
3253 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3254
3255 * lynx-low.c (lynx_resume): Delete variable ret.
3256
3257 2013-01-01 Joel Brobecker <brobecker@adacore.com>
3258
3259 * gdbreplay.c (gdbreplay_version): Update copyright year.
3260 * server.c (gdbserver_version): Likewise.
3261
3262 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3263
3264 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3265 new thread.
3266
3267 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3268
3269 * lynx-low.c (ptrace_request_to_str): Add handling for
3270 PTRACE_GETTRACESIG.
3271
3272 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3273
3274 * lynx-low.c (lynx_attach): Delete variable new_process.
3275
3276 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3277
3278 * lynx-low.c (lynx_create_inferior): Delete variable
3279 new_process.
3280
3281 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3282
3283 * lynx-low.c (ptrace_request_to_str): Do not handle
3284 PTRACE_GETTHREADLIST if this macro does not exist.
3285
3286 2012-12-15 Yao Qi <yao@codesourcery.com>
3287
3288 * Makefile.in (OBS): Add notif.o.
3289 * notif.c, notif.h: New.
3290 * server.c: Include "notif.h".
3291 (struct vstop_notif) <next>: Remove.
3292 <base>: New field.
3293 (queue_stop_reply): Update.
3294 (push_event, send_next_stop_reply): Remove.
3295 (discard_queued_stop_replies): Update.
3296 (notif_stop): New variable.
3297 (handle_v_stopped): Remove.
3298 (handle_v_requests): Don't call handle_v_stopped. Call
3299 handle_ack_notif instead.
3300 (queue_stop_reply_callback): Call notif_event_enque instead
3301 of queue_stop_reply.
3302 (handle_status): Don't call send_next_stop_reply, call
3303 notif_write_event instead.
3304 (kill_inferior_callback): Likewise.
3305 (detach_or_kill_inferior_callback): Likewise.
3306 (main): Call initialize_notif.
3307 (process_serial_event): Call QUEUE_is_empty.
3308 (handle_target_event): Call notif_push instead of push event.
3309 * server.h (push_event): Remove declaration.
3310
3311 2012-12-10 Tom Tromey <tromey@redhat.com>
3312
3313 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3314 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3315 macros.
3316 (.c.o): Rewrite.
3317 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3318 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3319 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3320 (amd64-linux-ipa.o, ax.o): Rewrite.
3321 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3322 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3323 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3324 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3325 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3326 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3327 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3328 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3329 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3330 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3331 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3332 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3333 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3334 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3335 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3336 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3337 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3338 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3339 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3340 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3341 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3342 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3343 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3344 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3345 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3346 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3347 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3348 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3349 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3350 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3351 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3352 (reg-tilegx.o): Remove.
3353 (all_object_files): New macro.
3354 Include .deps files.
3355 * aclocal.m4, configure: Rebuild.
3356 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3357 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3358 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3359
3360 2012-12-05 Tom Tromey <tromey@redhat.com>
3361
3362 PR gdb/14917:
3363 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3364
3365 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
3366
3367 * configure.ac: Check for linux/perf_event.h.
3368 * config.in: Regenerated.
3369 * configure: Regenerated.
3370
3371 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3372
3373 * hostio.c (handle_readlink): Decrease buffer size
3374 parameter passed to readlink by one byte.
3375
3376 2012-11-26 Yao Qi <yao@codesourcery.com>
3377
3378 * configure.ac (build_warnings): Append '-Wempty-body'.
3379 * configure: Regenerated.
3380 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3381 body.
3382
3383 2012-11-15 Pierre Muller <muller@sourceware.org>
3384
3385 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3386 * config.in: Regenerate.
3387 * configure: Regenerate.
3388 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3389 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3390 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3391 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3392 header.
3393 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3394 instead of <sys/wait.h> header.
3395 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3396
3397 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3398
3399 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3400 (various make rules): Remove -DGDBSERVER
3401
3402 2012-11-09 Yao Qi <yao@codesourcery.com>
3403
3404 * spu-low.c (current_ptid): Move it to ..
3405 * gdbthread.h: ... here. New.
3406 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3407 * server.c (myresume, process_serial_event): Likewise.
3408 * thread-db.c (thread_db_find_new_threads): Likewise.
3409 * tracepoint.c (run_inferior_command): Likewise.
3410
3411 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
3412
3413 * server.c (handle_search_memory_1): Include access length in
3414 warning message.
3415
3416 2012-09-05 Michael Brandt <michael.brandt@axis.com>
3417
3418 * linux-crisv32-low.c: Fix compile errors.
3419
3420 2012-09-04 Yao Qi <yao@codesourcery.com>
3421
3422 * tracepoint.c (cmd_qtsv): Adjust debug message.
3423 Don't check CUR_TPOINT.
3424
3425 2012-08-28 Yao Qi <yao@codesourcery.com>
3426
3427 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3428 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3429 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3430 Remove declarations of xmalloc, xreallloc, xstrdup and
3431 freeargv.
3432 * Makefile.in (libiberty_h): New.
3433 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3434 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3435
3436 2012-08-23 Yao Qi <yao@codesourcery.com>
3437
3438 * server.h: Remove declaration of 'xsnprintf'.
3439
3440 2012-08-22 Keith Seitz <keiths@redhat.com>
3441
3442 * server.h: Include build-gnulib-gbserver/config.h.
3443 * gdbreplay.c: Likewise.
3444
3445 2012-08-08 Doug Evans <dje@google.com>
3446
3447 * Makefile.in (SFILES): Add gdb_vecs.c.
3448 (OBS): Add gdb_vecs.o.
3449 (gdb_vecs_h, host_defs_h): New variables.
3450 (thread-db.o): Add $(gdb_vecs_h) dependency.
3451 (gdb_vecs.o): New rule.
3452 * thread-db.c: #include "gdb_vecs.h".
3453 (thread_db_load_search): Use a vector to iterate over path elements.
3454 Handle text appearing after "$pdir".
3455
3456 * configure.ac: Add check for strstr.
3457 * config.in: Regenerate.
3458 * configure: Regenerate.
3459
3460 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3461
3462 * hostio.c (handle_pread): If pread fails, fall back to attempting
3463 lseek/read.
3464 (handle_pwrite): Likewise for pwrite.
3465
3466 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3467
3468 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3469 between unsupported TYPE and unimplementable ADDR/LEN combination.
3470 (arm_insert_point): Act on new return value.
3471
3472 2012-07-31 Pedro Alves <palves@redhat.com>
3473
3474 * server.c (process_point_options): Only skip tokens if we find
3475 one that is unrecognized. Don't treat 'X' specially while
3476 skipping unrecognized tokens.
3477
3478 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3479
3480 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3481 to 4-byte-align HW breakpoint addresses for Thumb.
3482
3483 2012-07-27 Yao Qi <yao@codesourcery.com>
3484
3485 PR remote/14161.
3486
3487 * server.h: Declare gdb_agent_about_to_close.
3488 * target.c (kill_inferior): Include "agent.h".
3489 New. Send command 'kill'.
3490 * target.h (kill_inferior): Removed macro.
3491 * tracepoint.c (gdb_agent_about_to_close): New.
3492 (gdb_agent_helper_thread): Handle command 'close'.
3493 Wait endlessly until the inferior stops.
3494 Install gdb_agent_remove_socket to atexit hook.
3495 (agent_socket_name): New static variable.
3496 (gdb_agent_socket_init): Replace local variable 'name' with
3497 'agent_socket_name'.
3498 (gdb_agent_remove_socket): New.
3499
3500 2012-07-27 Yao Qi <yao@codesourcery.com>
3501
3502 * server.c (process_point_options): Stop at 'X' when parsing.
3503
3504 2012-07-19 Michael Eager <eager@eagercon.com>
3505
3506 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
3507 to hw_execute.
3508 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3509 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3510 hardware breakpoint.
3511
3512 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3513
3514 * gdbserver/linux-low.c (initialize_low): Call
3515 linux_ptrace_init_warnings.
3516
3517 2012-07-02 Doug Evans <dje@google.com>
3518
3519 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3520 pointer to int.
3521
3522 2012-07-02 Stan Shebs <stan@codesourcery.com>
3523
3524 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3525 (ax.o): Add it to build rule.
3526 (ax-ipa.o): Ditto.
3527 (OBS): Add format.o.
3528 (IPA_OBS): Add format.o.
3529 * server.c (handle_query): Claim support for breakpoint commands.
3530 (process_point_options): Add command case.
3531 (process_serial_event): Leave running if there are printfs in
3532 effect.
3533 * mem-break.h (any_persistent_commands): Declare.
3534 (add_breakpoint_commands): Declare.
3535 (gdb_no_commands_at_breakpoint): Declare.
3536 (run_breakpoint_commands): Declare.
3537 * mem-break.c (struct point_command_list): New struct.
3538 (struct breakpoint): New field command_list.
3539 (any_persistent_commands): New function.
3540 (add_commands_to_breakpoint): New function.
3541 (add_breakpoint_commands): New function.
3542 (gdb_no_commands_at_breakpoint): New function.
3543 (run_breakpoint_commands): New function.
3544 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3545 locally.
3546 * ax.c: Include format.h.
3547 (ax_printf): New function.
3548 (gdb_eval_agent_expr): Add printf opcode.
3549
3550 2012-06-13 Yao Qi <yao@codesourcery.com>
3551
3552 * server.c (start_inferior): Remove duplicated writes to fields
3553 'last_resume_kind' and 'last_status' of 'current_inferior'.
3554
3555 2012-06-12 Yao Qi <yao@codesourcery.com>
3556 Pedro Alves <palves@redhat.com>
3557
3558 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3559 comment.
3560 * server.c (handle_v_cont): Extend comment.
3561
3562 2012-06-11 Yao Qi <yao@codesourcery.com>
3563
3564 * linux-low.c (linux_attach): Add 'static'.
3565
3566 2012-06-06 Yao Qi <yao@codesourcery.com>
3567
3568 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3569
3570 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3571
3572 Fix gcc -flto compilation warning.
3573 * server.c (main): Make variable multi_mode and attach volatile.
3574
3575 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3576
3577 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3578 if the platform doesn't know about it.
3579
3580 2012-05-30 Jeff Kenton <jkenton@tilera.com>
3581
3582 * Makefile.in (SFILES): Add linux-tile-low.c.
3583 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3584 * configure.srv: Handle tilegx-*-linux*.
3585 * linux-tile-low.c: New file.
3586
3587 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3588
3589 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3590
3591 2012-05-24 Pedro Alves <palves@redhat.com>
3592
3593 PR gdb/7205
3594
3595 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
3596
3597 2012-05-24 Pedro Alves <palves@redhat.com>
3598
3599 PR gdb/7205
3600
3601 Replace target_signal with gdb_signal throughout.
3602
3603 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3604
3605 * linux-low.c (linux_store_registers): Avoid the copying sequence
3606 when no data has been retrieved by ptrace.
3607
3608 2012-05-22 Will Deacon <will.deacon@arm.com>
3609
3610 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3611 Include asm/ptrace.h.
3612 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3613 already defined.
3614
3615 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3616
3617 * linux-low.c (linux_store_registers): Don't re-retrieve data
3618 with ptrace that has already been obtained from /proc. Always
3619 copy any data retrieved with ptrace to the buffer supplied.
3620
3621 2012-05-11 Yao Qi <yao@codesourcery.com>
3622 Pedro Alves <palves@redhat.com>
3623
3624 * linux-low.c (enum stopping_threads_kind): New.
3625 (stopping_threads): Change type to `enum stopping_threads_kind'.
3626 (handle_extended_wait): If stopping and suspending threads, leave
3627 the new_lwp suspended too.
3628 (linux_wait_for_event): Adjust.
3629 (stop_all_lwps): Set `stopping_threads' to
3630 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3631 whether we're suspending threads or just stopping them. Assert no
3632 recursion happens.
3633
3634 2012-04-29 Yao Qi <yao@codesourcery.com>
3635
3636 * server.h: Move some code to ...
3637 * gdbthread.h: ... here. New.
3638 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3639 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3640 (nto-low.o, win32-low.o): Likewise.
3641 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3642 * regcache.c, remote-utils.c, server.c: Likewise.
3643 * target.c, tracepoint.c, win32-low.c: Likewise.
3644
3645 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3646
3647 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3648 (PTRACE_ARG4_TYPE): Likewise.
3649 (PTRACE_XFER_TYPE): Likewise.
3650 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3651 ptrace to PTRACE_ARG3_TYPE.
3652 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3653 (PTRACE_ARG4_TYPE): Likewise.
3654 (PTRACE_XFER_TYPE): Likewise.
3655 (linux_detach_one_lwp): Cast fourth argument of
3656 ptrace to long then PTRACE_ARG4_TYPE.
3657 (regsets_fetch_inferior_registers): Cast third argument of
3658 ptrace to long then PTRACE_ARG3_TYPE.
3659 (regsets_store_inferior_registers): Likewise.
3660
3661 2012-04-20 Pedro Alves <palves@redhat.com>
3662
3663 * configure: Regenerate.
3664
3665 2012-04-19 Pedro Alves <palves@redhat.com>
3666
3667 * Makefile.in (GNULIB_BUILDDIR): New.
3668 (LIBGNU, INCGNU, GNULIB_H): Adjust.
3669 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3670 (all, install-only, uninstall, clean-info, all-lib, clean): No
3671 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3672 (maintainer-clean realclean distclean): Use subdir_do.
3673 (subdir_do): New.
3674 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
3675 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
3676 * acinclude.m4: Include acx_configure_dir.m4.
3677 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3678 calls. Call AC_PROG_RANLIB. Configure gnulib using
3679 ACX_CONFIGURE_DIR.
3680 (GNULIB): New.
3681 (GNULIB_STDINT_H): Adjust.
3682 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3683 * gdbreplay.c: Include build-gnulib/config.h.
3684 * server.h: Likewise.
3685 * aclocal.m4: Regenerate.
3686 * config.in: Regenerate.
3687 * configure: Regenerate.
3688
3689 2012-04-19 Pedro Alves <palves@redhat.com>
3690
3691 * Makefile.in (LIBGNU, INCGNU): Adjust.
3692 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3693 (all, install-only, uninstall, clean-info, all-lib, clean)
3694 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3695 * configure.ac: Adjust AC_OUTPUT output.
3696 * aclocal.m4: Regenerate.
3697 * configure: Regenerate.
3698
3699 2012-04-19 Pedro Alves <palves@redhat.com>
3700
3701 * Makefile.in (generated_files): New.
3702 (server_h): Remove the explicit dependency on config.h, and depend
3703 on $generated_files.
3704
3705 2012-04-19 Pedro Alves <palves@redhat.com>
3706
3707 * Makefile.in (INCGNU): Add -Ignulib.
3708
3709 2012-04-19 Pedro Alves <palves@redhat.com>
3710
3711 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3712 (INCGNU): ... this, and spell out -I here.
3713 (GNULIB_LIB): Rename to ...
3714 (LIBGNU): ... this.
3715 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3716
3717 2012-04-19 Pedro Alves <palves@redhat.com>
3718
3719 * config.in: Regenerate.
3720
3721 2012-04-19 Pedro Alves <palves@redhat.com>
3722
3723 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3724 * server.h (memmem): Remove declaration.
3725 * config.in: Regenerate.
3726 * configure: Regenerate.
3727
3728 2012-04-19 Yao Qi <yao@codesourcery.com>
3729
3730 * Makefile.in (SFILES): Add common/vec.c.
3731 (OBS): Add vec.o.
3732 (vec.o): New rule.
3733
3734 2012-04-19 Yao Qi <yao@codesourcery.com>
3735
3736 * remote-utils.c (prepare_resume_reply): Replace with macro
3737 target_core_of_thread.
3738 * server.c (handle_qxfer_threads_proper): Likewise.
3739 * target.h (traget_core_of_thread): New macro.
3740
3741 2012-04-18 Pedro Alves <palves@redhat.com>
3742
3743 * aclocal.m4: Regenerate.
3744 * configure: Regenerate.
3745
3746 2012-04-16 Yao Qi <yao@codesourcery.com>
3747
3748 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3749 duplicated on address.
3750
3751 2012-04-16 Yao Qi <yao@codesourcery.com>
3752
3753 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3754 (struct tracepoint_action_ops) <send>: New field.
3755 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3756 (agent_expr_send, x_tracepoint_action_send): New.
3757 (l_tracepoint_action_send): New.
3758 (cmd_qtdp): Download and install tracepoint
3759 according to `use_agent'.
3760 (run_inferior_command): Add one more parameter `len'.
3761 Update callers.
3762 (tracepoint_send_agent): New.
3763 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3764
3765 2012-04-16 Yao Qi <yao@codesourcery.com>
3766
3767 * tracepoint.c (download_tracepoints): Moved to ...
3768 (cmd_qtstart): ... here.
3769
3770 2012-04-14 Yao Qi <yao@codesourcery.com>
3771
3772 * tracepoint.c: Include inttypes.h.
3773 (struct collect_memory_action): Use sized types.
3774 (struct tracepoint): Likewise.
3775 (cmd_qtdp, stop_tracing): Update print specifiers.
3776 (cmd_qtp, response_tracepoint): Likewise.
3777 (collect_data_at_tracepoint): Likewise.
3778 (collect_data_at_step): Likewise.
3779
3780 2012-04-14 Yao Qi <yao@codesourcery.com>
3781
3782 Import gnulib module inttypes.
3783 * aclocal.m4, config.in, configure: Regenerated.
3784
3785 2012-04-14 Yao Qi <yao@codesourcery.com>
3786
3787 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3788 Makefile and config.status at last.
3789
3790 2012-04-13 Yao Qi <yao@codesourcery.com>
3791
3792 * tracepoint.c: Include stdint.h unconditionally.
3793
3794 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3795
3796 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3797 on BFD_HAVE_SYS_PROCFS_TYPE.
3798 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3799 * configure: Regenerate.
3800 * config.in: Likewise.
3801
3802 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3803
3804 * Makefile.in (clean): Also remove x32.c x32-linux.c
3805 x32-avx.c x32-avx-linux.c.
3806 (x32.o): New target.
3807 (x32.c): Likewise.
3808 (x32-linux.o): Likewise.
3809 (x32-linux.c): Likewise.
3810 (x32-avx.o): Likewise.
3811 (x32-avx.c): Likewise.
3812 (x32-avx-linux.o): Likewise.
3813 (x32-avx-linux.c): Likewise.
3814
3815 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3816 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3817 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3818 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3819 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3820 i386/x32-avx-linux.xml.
3821
3822 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3823 (init_registers_x32_avx_linux): Likwise.
3824 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3825 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3826
3827 2012-04-13 Pedro Alves <palves@redhat.com>
3828
3829 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3830 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3831 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3832 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3833 the sub-make.
3834
3835 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3836
3837 * linux-x86-low.c (compat_x32_clock_t): New.
3838 (compat_x32_siginfo_t): Likewise.
3839 (compat_x32_siginfo_from_siginfo): Likewise.
3840 (siginfo_from_compat_x32_siginfo): Likewise.
3841 (linux_is_elf64): Likewise.
3842 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3843 and siginfo_from_compat_x32_siginfo for x32.
3844 (x86_arch_setup): Set linux_is_elf64.
3845
3846 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3847
3848 PR gdb/13969
3849 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3850 e_machine field.
3851 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3852 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3853 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3854 compatible with process.
3855
3856 2012-04-12 Yao Qi <yao@codesourcery.com>
3857
3858 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3859 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3860 (install-only, install-info, clean): Handle sub dir gnulib.
3861 (all-lib, am--refresh): New targets.
3862 (memmem.o): Remove target.
3863 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3864 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3865 (AC_REPLACE_FUNCS): Remove memmem.
3866 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3867 (AC_OUTPUT): Generate Makefile in gnulib/.
3868 * aclocal.m4, config.in, configure: Regenerated.
3869
3870 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3871
3872 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3873
3874 2012-04-05 Pedro Alves <palves@redhat.com>
3875
3876 -Werror=strict-aliasing
3877
3878 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3879 pointer.
3880
3881 2012-04-04 Pedro Alves <palves@redhat.com>
3882
3883 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3884 (sparc_store_gregset_from_stack, sparc_store_gregset)
3885 (sparc_breakpoint_at): Fix formatting.
3886
3887 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3888
3889 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3890 are available.
3891 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3892 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3893 * config.in: Regenerate.
3894 * configure: Likewise.
3895
3896 2012-03-29 Pedro Alves <palves@redhat.com>
3897
3898 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
3899 Correct ptrace arguments.
3900
3901 2012-03-28 Pedro Alves <palves@redhat.com>
3902
3903 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
3904 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
3905 (IA64_FR1_REGNUM): New defines.
3906 (ia64_fetch_register): New.
3907 (the_low_target): Install it.
3908 * linux-low.h (struct linux_target_ops) <fetch_register>: New
3909 field.
3910 * linux-low.c (linux_fetch_registers): Try the
3911 the_low_target.fetch_register hook first.
3912
3913 * linux-arm-low.c (the_low_target): Adjust.
3914 * linux-bfin-low.c (the_low_target): Adjust.
3915 * linux-cris-low.c (the_low_target): Adjust.
3916 * linux-crisv32-low.c (the_low_target): Adjust.
3917 * linux-m32r-low.c (the_low_target): Adjust.
3918 * linux-m68k-low.c (the_low_target): Adjust.
3919 * linux-mips-low.c (the_low_target): Adjust.
3920 * linux-ppc-low.c (the_low_target): Adjust.
3921 * linux-s390-low.c (the_low_target): Adjust.
3922 * linux-sh-low.c (the_low_target): Adjust.
3923 * linux-sparc-low.c (the_low_target): Adjust.
3924 * linux-tic6x-low.c (the_low_target): Adjust.
3925 * linux-x86-low.c (the_low_target): Adjust.
3926 * linux-xtensa-low.c (the_low_target): Adjust.
3927
3928 2012-03-26 Pedro Alves <palves@redhat.com>
3929
3930 * server.c (handle_qxfer_libraries): Don't bail early if
3931 the_target->qxfer_libraries_svr4 is not NULL.
3932
3933 2012-03-26 Pedro Alves <palves@redhat.com>
3934
3935 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
3936
3937 2012-03-23 Pedro Alves <palves@redhat.com>
3938
3939 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
3940 "library-list-svr4" element's start tag when the the DSO list is
3941 empty.
3942
3943 2012-03-23 Pedro Alves <palves@redhat.com>
3944
3945 * linux-low.c (read_one_ptr): Read the inferior's pointer through
3946 a variable whose type size is the same as the inferior's pointer
3947 size.
3948
3949 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
3950
3951 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
3952 struct siginfo.
3953 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
3954 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3955 * linux-low.h: Include <signal.h>.
3956 (struct siginfo): Remove forward declaration.
3957 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
3958 struct siginfo.
3959
3960 2012-03-21 Mike Frysinger <vapier@gentoo.org>
3961
3962 * .gitignore: Ignore more files.
3963
3964 2012-03-19 Pedro Alves <palves@redhat.com>
3965 Jan Kratochvil <jan.kratochvil@redhat.com>
3966
3967 * server.c (cont_thread, general_thread): Add describing comments.
3968 (start_inferior): Clear `cont_thread'.
3969 (handle_v_cont): Don't set `cont_thread' if resuming all threads
3970 of a process.
3971
3972 2012-03-15 Yao Qi <yao@codesourcery.com>
3973
3974 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
3975 handling to ...
3976 (cmd_qtdp): ... here.
3977
3978 2012-03-15 Yao Qi <yao@codesourcery.com>
3979
3980 * tracepoint.c (struct tracepoint_action_ops): New.
3981 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
3982 (m_tracepoint_action_download): New.
3983 (r_tracepoint_action_download): New.
3984 (x_tracepoint_action_download): New.
3985 (l_tracepoint_action_download): New.
3986 (add_tracepoint_action): Install `action->ops' according type.
3987 (download_tracepoint_1): Move code `download' function pointer
3988 of various tracepoint_action_ops.
3989
3990 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3991
3992 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
3993 linux_ptrace_attach_warnings.
3994
3995 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3996
3997 * Makefile.in (linux-ptrace.o): New.
3998 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
3999 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4000 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4001 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4002 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4003 of these targets.
4004 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4005
4006 2012-03-08 Yao Qi <yao@codesourcery.com>
4007 Pedro Alves <palves@redhat.com>
4008
4009 Fix PR server/13392.
4010 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4011 offset of JMP insn.
4012 * tracepoint.c (remove_tracepoint): New.
4013 (cmd_qtdp): Call remove_tracepoint when failed to install.
4014
4015 2012-03-07 Pedro Alves <palves@redhat.com>
4016
4017 * linux-low.c (get_detach_signal): New.
4018 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4019 Pass on pending signals to PTRACE_DETACH. Check the result of the
4020 ptrace call.
4021 * server.c (program_signals, program_signals_p): New.
4022 (handle_general_set): Handle QProgramSignals.
4023 * server.h (program_signals, program_signals_p): Declare.
4024
4025 2012-03-05 Pedro Alves <palves@redhat.com>
4026 Jan Kratochvil <jan.kratochvil@redhat.com>
4027
4028 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4029 New comment why.
4030
4031 2012-03-03 Yao Qi <yao@codesourcery.com>
4032
4033 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4034 agent_look_up_symbols.
4035
4036 2012-03-03 Yao Qi <yao@codesourcery.com>
4037
4038 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4039 (linux-x86-low.o): Likewise.
4040 * server.h: Remove in_process_agent_loaded.
4041 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4042 common/agent.c.
4043 Update callers.
4044
4045 2012-03-03 Yao Qi <yao@codesourcery.com>
4046
4047 * tracepoint.c (gdb_agent_capability): New global.
4048 (in_process_agent_loaded_ust): Renamed to
4049 `in_process_agent_supports_ust'.
4050 Update callers.
4051 (in_process_agent_supports_ust): Call agent_capability_check.
4052 (clear_installed_tracepoints): Assert that agent supports
4053 agent.
4054
4055 2012-03-03 Yao Qi <yao@codesourcery.com>
4056
4057 * linux-low.c (linux_supports_agent): New.
4058 (linux_target_ops): Initialize field `supports_agent' with
4059 linux_supports_agent.
4060 * target.h (struct target_ops) <supports_agent>: New.
4061 (target_supports_agent): New macro.
4062 * server.c (handle_general_set): Handle packet 'QAgent'.
4063 (handle_query): Send `QAgent+'.
4064 * Makefile.in (server.o): Depends on agent.h.
4065
4066 2012-03-03 Yao Qi <yao@codesourcery.com>
4067
4068 * Makefile.in (OBS): Add agent.o.
4069 Add new rule for agent.o.
4070 Track dependence of tracepoint.c on agent.h.
4071 * tracepoint.c (run_inferior_command_1):
4072 (run_inferior_command): Call agent_run_command.
4073 (gdb_ust_connect_sync_socket): Deleted. Move it to
4074 common/agent.c.
4075 (resume_thread, stop_thread): Likewise.
4076 (gdb_ust_socket_init): Renamed to ...
4077 (gdb_agent_socket_init): ... New.
4078 (gdb_ust_thread): Renamed to ...
4079 (gdb_agent_helper_thread): ... New.
4080 (gdb_ust_init): Move some code to ...
4081 (gdb_agent_init): ... here. New.
4082 [HAVE_UST]: Call gdb_ust_init.
4083 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4084 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4085 * config.in, configure: Regenerated.
4086
4087 2012-03-02 Pedro Alves <palves@redhat.com>
4088
4089 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4090 * linux-low.c (struct simple_pid_list): New.
4091 (stopped_pids): New a struct simple_pid_list pointer.
4092 (add_to_pid_list, pull_pid_from_list): New.
4093 (handle_extended_wait): Don't assume the first signal new children
4094 report is SIGSTOP. Adjust call to pull_pid_from_list.
4095 (linux_wait_for_lwp): Adjust.
4096
4097 2012-03-02 Yao Qi <yao@codesourcery.com>
4098
4099 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4100 debug log.
4101
4102 2012-03-02 Yao Qi <yao@codesourcery.com>
4103
4104 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4105 `stop_pc' and `tpoint'. Update caller.
4106
4107 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4108
4109 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4110 * linux-low.c (use_linux_regsets): New macro.
4111 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4112 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4113 (linux_register_in_regsets): New function.
4114 (usr_fetch_inferior_registers): Skip registers covered by
4115 regsets.
4116 (usr_store_inferior_registers): Likewise.
4117 (usr_fetch_inferior_registers): New macro.
4118 (usr_store_inferior_registers): Likewise.
4119 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4120 (linux_store_registers): Likewise.
4121 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4122 prototype.
4123 (init_registers_mips64_dsp_linux): Likewise.
4124 (init_registers_mips_linux): New macro.
4125 (init_registers_mips_dsp_linux): Likewise.
4126 (mips_dsp_num_regs): Likewise.
4127 (DSP_BASE, DSP_CONTROL): New fallback macros.
4128 (mips_base_regs): New macro.
4129 (mips_regmap): Use it. Fix the size.
4130 (mips_dsp_regmap): New variable.
4131 (mips_dsp_regset_bitmap): Likewise.
4132 (mips_arch_setup): New function.
4133 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4134 than mips_regmap.
4135 (mips_cannot_store_register): Likewise.
4136 (the_low_target): Update .arch_setup, .num_regs and .regmap
4137 initializers. Add .regset_bitmap initializer.
4138 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4139 initializer.
4140 * linux-bfin-low.c (the_low_target): Likewise.
4141 * linux-cris-low.c (the_low_target): Likewise.
4142 * linux-crisv32-low.c (the_low_target): Likewise.
4143 * linux-ia64-low.c (the_low_target): Likewise.
4144 * linux-m32r-low.c (the_low_target): Likewise.
4145 * linux-m68k-low.c (the_low_target): Likewise.
4146 * linux-ppc-low.c (the_low_target): Likewise.
4147 * linux-s390-low.c (the_low_target): Likewise.
4148 * linux-sh-low.c (the_low_target): Likewise.
4149 * linux-sparc-low.c (the_low_target): Likewise.
4150 * linux-tic6x-low.c (the_low_target): Likewise.
4151 * linux-x86-low.c (the_low_target): Likewise.
4152 * linux-xtensa-low.c (the_low_target): Likewise.
4153 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4154 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4155 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4156 srv_xmlfiles.
4157 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4158 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4159
4160 2012-02-29 Yao Qi <yao@codesourcery.com>
4161 Pedro Alves <palves@redhat.com>
4162
4163 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4164 `step_over_finished' is true.
4165
4166 2012-02-27 Pedro Alves <palves@redhat.com>
4167
4168 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4169 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4170
4171 2012-02-27 Pedro Alves <palves@redhat.com>
4172
4173 PR server/9684
4174 * linux-low.c (pid_is_stopped): New.
4175 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4176
4177 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
4178
4179 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4180 of conditions.
4181
4182 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4183
4184 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4185
4186 2012-02-24 Luis Machado <lgustavo@codesourcery>
4187
4188 * server.c (handle_query): Advertise support for target-side
4189 breakpoint condition evaluation.
4190 (process_point_options): New function.
4191 (process_serial_event): When inserting a breakpoint, check for
4192 a target-side condition that should be evaluated.
4193
4194 * mem-break.c: Include regcache.h and ax.h.
4195 (point_cond_list_t): New data structure.
4196 (breakpoint) <cond_list>: New field.
4197 (find_gdb_breakpoint_at): Make non-static.
4198 (delete_gdb_breakpoint_at): Clear any target-side
4199 conditions.
4200 (clear_gdb_breakpoint_conditions): New function.
4201 (add_condition_to_breakpoint): Likewise.
4202 (add_breakpoint_condition): Likewise.
4203 (gdb_condition_true_at_breakpoint): Likewise.
4204 (gdb_breakpoint_here): Return result directly instead
4205 of going through a local variable.
4206
4207 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4208 (clear_gdb_breakpoint_conditions): Likewise.
4209 (add_breakpoint_condition): Likewise.
4210 (gdb_condition_true_at_breakpoint): Likewise.
4211
4212 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4213 (need_step_over_p): Take target-side breakpoint condition into
4214 consideration.
4215
4216 2012-02-24 Luis Machado <lgustavo@codesourcery>
4217
4218 * server.h: Include tracepoint.h.
4219 (agent_mem_read, agent_get_trace_state_variable_value,
4220 agent_set_trace_state_variable_value,
4221 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4222 get_set_tsv_func_addr): New prototypes.
4223
4224 * ax.h: New include file.
4225 * ax.c: New source file.
4226
4227 * tracepoint.c: Include ax.h.
4228 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4229 agent_expr, eval_result_type): Move to ax.h.
4230 (parse_agent_expr): Rename to ...
4231 (gdb_parse_agent_expr): ... this, make it non-static and move
4232 to ax.h.
4233 (unparse_agent_expr) Rename to ...
4234 (gdb_unparse_agent_expr): ... this, make it non-static and move
4235 to ax.h.
4236 (eval_agent_expr): Rename to ...
4237 (eval_tracepoint_agent_expr): ... this.
4238 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4239 forward declarations.
4240 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4241 (agent_get_trace_state_variable_value): New function.
4242 (agent_set_trace_state_variable_value): New function.
4243 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4244 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4245 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4246 (condition_true_at_tracepoint): Likewise.
4247 (parse_agent_expr): Rename to ...
4248 (gdb_parse_agent_expr): ... this and move to ax.c.
4249 (unparse_agent_expr): Rename to ...
4250 (gdb_unparse_agent_expr): ... this and move to ax.c.
4251 (gdb_agent_op_name): Move to ax.c.
4252 (eval_agent_expr): Rename to ...
4253 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4254 and move to ax.c.
4255 (eval_tracepoint_agent_expr): New function.
4256 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
4257 non-static.
4258 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4259 ax.c.
4260 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4261 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4262 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4263 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4264 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4265 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4266 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4267 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4268 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4269 (compile_bytecodes): Remove forward declaration.
4270 (is_goto_target): Move to ax.c.
4271 (compile_bytecodes): Move to ax.c and call
4272 agent_get_trace_state_variable_value (...) and
4273 agent_set_trace_state_variable_value (...).
4274
4275 * Makefile.in: Update ax.c and IPA dependencies.
4276
4277 2012-02-24 Pedro Alves <palves@redhat.com>
4278
4279 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4280 (cmd_bigqtbuffer_circular): ... this. Only handle
4281 'QTBuffer:circular:'.
4282 (handle_tracepoint_general_set): Adjust.
4283
4284 2012-02-16 Yao Qi <yao@codesourcery.com>
4285
4286 * inferiors.c: Move code to ...
4287 * dll.c: .... here. New.
4288 * server.h: Declare clear_dlls.
4289 * Makefile.in (SFILES): Add dll.c.
4290 (OBS): Add dll.o
4291 (dll.o): New rule.
4292
4293 2012-02-11 Yao Qi <yao@codesourcery.com>
4294
4295 * server.c: (handle_monitor_command): Add a new parameter
4296 `own_buf'.
4297 (handle_query): Update caller.
4298
4299 2012-02-09 Joel Brobecker <brobecker@adacore.com>
4300
4301 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4302 * configure, config.in: Regenerate.
4303 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4304 is not defined.
4305
4306 2012-02-02 Pedro Alves <palves@redhat.com>
4307
4308 Try SIGKILL first, then PTRACE_KILL.
4309 * linux-low.c (linux_kill_one_lwp): New.
4310 (linux_kill_one_lwp): Rename to ...
4311 (kill_one_lwp_callback): ... this. Use the new
4312 linux_kill_one_lwp.
4313
4314 2012-02-02 Pedro Alves <palves@redhat.com>
4315
4316 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4317 inferior.
4318
4319 2012-01-27 Pedro Alves <palves@redhat.com>
4320
4321 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4322 (elf_64_file_p): Make static.
4323 (linux_pid_exe_is_elf_64_file): New.
4324 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4325 Delete declarations.
4326 (linux_pid_exe_is_elf_64_file): Declare.
4327 * linux-x86-low.c (x86_arch_setup): Use
4328 linux_pid_exe_is_elf_64_file.
4329
4330 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4331
4332 * linux-low.c (linux_wait_for_event_1): Rename to ...
4333 (linux_wait_for_event): ... here and merge it with former
4334 linux_wait_for_event - new variable wait_ptid, use it.
4335 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4336
4337 2012-01-23 Pedro Alves <palves@redhat.com>
4338
4339 * server.c (main): Avoid yet another case of infinite loop while
4340 detaching/killing after a longjmp.
4341
4342 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4343
4344 Code cleanup.
4345 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4346
4347 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4348
4349 * hostio.c (handle_readlink): New function.
4350 (handle_vFile): Call it to handle "vFile:readlink" packets.
4351
4352 2012-01-20 Pedro Alves <palves@redhat.com>
4353 Ulrich Weigand <ulrich.weigand@linaro.org>
4354
4355 * server.c (handle_v_requests): Only support vAttach and vRun to
4356 start multiple processes when in extended protocol mode.
4357
4358 2012-01-17 Pedro Alves <palves@redhat.com>
4359
4360 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4361 memalign plus mprotect to allocate the scratch buffer.
4362
4363 2012-01-13 Pedro Alves <palves@redhat.com>
4364
4365 * server.c (attach_inferior): Clear `cont_thread'.
4366
4367 2012-01-13 Pedro Alves <palves@redhat.com>
4368
4369 * server.c (main): Avoid infinite loop while detaching/killing
4370 after a longjmp.
4371
4372 2012-01-09 Doug Evans <dje@google.com>
4373
4374 * server.c (start_inferior): Set last_ptid in --wrapper case.
4375
4376 2012-01-06 Yao Qi <yao@codesourcery.com>
4377
4378 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4379 defined.
4380 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4381
4382 2012-01-04 Yao Qi <yao@codesourcery.com>
4383
4384 * tracepoint.c (cmd_qtdp): Print debug message
4385 for static tracepoint.
4386
4387 2012-01-04 Yao Qi <yao@codesourcery.com>
4388
4389 * tracepoint.c (trace_vdebug): Differentiate debug message
4390 between gdbserver and IPA.
4391
4392 2012-01-03 Yao Qi <yao@codesourcery.com>
4393
4394 * tracepoint.c (tracepoint_was_hit): Don't collect for
4395 static tracepoint.
4396
4397 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4398
4399 * terminal.h: Reformat copyright header.
4400
4401 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4402
4403 * server.c (gdbserver_version): Update copyright year.
4404 * gdbreplay.c (gdbreplay_version): Likewise.
4405
4406 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4407
4408 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4409
4410 Revert:
4411 2011-12-18 Hui Zhu <teawater@gmail.com>
4412 * linux-low.c (linux_create_inferior): Save return value to ret.
4413
4414 2011-12-18 Hui Zhu <teawater@gmail.com>
4415
4416 * linux-low.c (linux_create_inferior): Save return value to ret.
4417
4418 2011-12-16 Doug Evans <dje@google.com>
4419
4420 * linux-low.c (linux_create_inferior): If stdio connection,
4421 redirect stdin from /dev/null, stdout to stderr.
4422 * remote-utils.c (remote_is_stdio): New static global.
4423 (remote_connection_is_stdio): New function.
4424 (remote_prepare): Handle stdio connection.
4425 (remote_open): Ditto.
4426 (remote_close): Don't close stdin for stdio connections.
4427 (read_prim,write_prim): New functions. Replace all calls to
4428 read/write to these.
4429 * server.c (main): Watch for "-" argument. Move call to
4430 remote_prepare before start_inferior.
4431 * server.h (STDIO_CONNECTION_NAME): New macro.
4432 (remote_connection_is_stdio): Declare.
4433
4434 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4435 in debugging output.
4436
4437 2011-12-15 Yao Qi <yao@codesourcery.com>
4438
4439 * tracepoint.c: Include sys/syscall.h.
4440 (gdb_ust_thread): Remove preprocessor conditional.
4441
4442 2011-12-14 Pedro Alves <pedro@codesourcery.com>
4443
4444 * linux-low.c (linux_detach_one_lwp): Call
4445 the_low_target.prepare_to_resume before detaching.
4446
4447 2011-12-14 Yao Qi <yao@codesourcery.com>
4448
4449 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4450 of write.
4451
4452 2011-12-14 Yao Qi <yao@codesourcery.com>
4453
4454 * i386-low.c (i386_low_stopped_data_address): Initialize local
4455 variable `control'.
4456
4457 2011-12-13 Pedro Alves <pedro@codesourcery.com>
4458
4459 PR remote/13492
4460
4461 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4462 DR_CONTROL unless necessary. Extend comments.
4463 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4464 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4465
4466 2011-12-13 Yao Qi <yao@codesourcery.com>
4467
4468 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4469 macros.
4470 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4471
4472 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4473
4474 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4475 Print new debug message for such case.
4476
4477 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4478
4479 Fix overlapping memcpy.
4480 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4481 the read_inferior_memory transfer.
4482 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4483 write_inferior_memory transfer.
4484 (set_fast_tracepoint_jump): New variable buf. Use it for the
4485 read_inferior_memory and write_inferior_memory transfers.
4486 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4487 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4488 Use it for the write_inferior_memory transfer.
4489 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4490 buffers.
4491
4492 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4493
4494 * linux-low.c (fetch_register, store_register): Make code
4495 consistent, fix formatting.
4496
4497 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4498
4499 * linux-low.c (usr_store_inferior_registers): Factor out code
4500 to handle individual registers into...
4501 (store_register): ... this new function.
4502
4503 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4504
4505 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4506 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4507 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4508 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4509 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4510 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4511 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4512 (srv_xmlfiles): Add new XML files.
4513
4514 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4515 and <sys/uio.h>.
4516 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4517 (init_registers_s390_linux32v1): Add prototype.
4518 (init_registers_s390_linux32v2): Likewise.
4519 (init_registers_s390_linux64v1): Likewise.
4520 (init_registers_s390_linux64v2): Likewise.
4521 (init_registers_s390x_linux64v1): Likewise.
4522 (init_registers_s390x_linux64v2): Likewise.
4523 (s390_num_regs): Increment to 52.
4524 (s390_regmap): Add orig_r2 register.
4525 (s390_num_regs_3264): Increment to 68.
4526 (s390_regmap_3264): Add orig_r2 register.
4527 (s390_collect_ptrace_register): Handle orig_r2 register.
4528 (s390_supply_ptrace_register): Likewise.
4529 (s390_fill_last_break): New function.
4530 (s390_store_last_break): Likewise.
4531 (s390_fill_system_call): New function.
4532 (s390_store_system_call): Likewise.
4533 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4534 register sets.
4535 (s390_check_regset): New function.
4536 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4537 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4538 Update target_regsets for available register sets.
4539
4540 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4541 Jan Kratochvil <jan.kratochvil@redhat.com>
4542
4543 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4544 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4545 New.
4546 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4547 * linux-low.h (struct process_info_private): New member r_debug.
4548 * server.c (handle_qxfer_libraries): Call
4549 the_target->qxfer_libraries_svr4.
4550 (handle_qxfer_libraries_svr4): New function.
4551 (qxfer_packets): New entry "libraries-svr4".
4552 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4553 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4554 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4555 PACKET_qXfer_libraries_svr4.
4556
4557 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4558
4559 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4560 PSW address/mask between 8-byte and 16-byte formats.
4561 (s390_supply_ptrace_register): Likewise.
4562 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4563 basic addressing mode bit.
4564
4565 2011-11-24 Stan Shebs <stan@codesourcery.com>
4566
4567 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4568
4569 2011-11-17 Stan Shebs <stan@codesourcery.com>
4570
4571 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4572 (tracing_start_time): New global.
4573 (tracing_stop_time): New global.
4574 (tracing_user_name): New global.
4575 (tracing_notes): New global.
4576 (tracing_stop_note): New global.
4577 (cmd_qtstart): Set traceframe_usage, start_time.
4578 (stop_tracing): Set stop_time.
4579 (cmd_qtstatus): Report additional status.
4580 (cmd_qtp): New function.
4581 (handle_tracepoint_query): Call it.
4582 (cmd_qtnotes): New function.
4583 (handle_tracepoint_general_set): Call it.
4584 (get_timestamp): Rename from tsv_get_timestamp.
4585
4586 2011-11-14 Stan Shebs <stan@codesourcery.com>
4587 Kwok Cheung Yeung <kcy@codesourcery.com>
4588
4589 * linux-x86-low.c (small_jump_insn): New.
4590 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4591 trampoline and error message, build a trampoline and issue a small
4592 jump instruction to it.
4593 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4594 trampoline and error message.
4595 (x86_get_min_fast_tracepoint_insn_len): New.
4596 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4597 * linux-low.h (struct linux_target_ops): Add arguments to
4598 install_fast_tracepoint_jump_pad operation, add new operation.
4599 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4600 arguments.
4601 (linux_get_min_fast_tracepoint_insn_len): New function.
4602 (linux_target_op): Add new operation.
4603 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4604 (gdb_trampoline_buffer_end): Ditto.
4605 (gdb_trampoline_buffer_error): Ditto.
4606 (struct ipa_sym_addresses): Add fields for new IPA variables.
4607 (symbol_list): Add entries for new IPA variables.
4608 (struct tracepoint): Add fields to hold the address range of the
4609 trampoline used by the tracepoint.
4610 (trampoline_buffer_head): New static variable.
4611 (trampoline_buffer_tail): Ditto.
4612 (claim_trampoline_space): New function.
4613 (have_fast_tracepoint_trampoline_buffer): New function.
4614 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4615 structure.
4616 (install_fast_tracepoint): Ditto, also add error buffer argument.
4617 (cmd_qtminftpilen): New function.
4618 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4619 (fast_tracepoint_from_trampoline_address): New function.
4620 (fast_tracepoint_collecting): Handle trampoline as part of jump
4621 pad space.
4622 (set_trampoline_buffer_space): New function.
4623 (initialize_tracepoint): Initialize new IPA variables.
4624 * target.h (struct target_ops): Add arguments to
4625 install_fast_tracepoint_jump_pad operation, add new
4626 get_min_fast_tracepoint_insn_len operation.
4627 (target_get_min_fast_tracepoint_insn_len): New.
4628 (install_fast_tracepoint_jump_pad): Add arguments.
4629 * server.h (IPA_BUFSIZ): Define.
4630 * linux-i386-ipa.c: Include extra header files.
4631 (initialize_fast_tracepoint_trampoline_buffer): New function.
4632 (initialize_low_tracepoint): Call it.
4633 * server.h (set_trampoline_buffer_space): Declare.
4634 (claim_trampoline_space): Ditto.
4635 (have_fast_tracepoint_trampoline_buffer): Ditto.
4636
4637 2011-11-14 Yao Qi <yao@codesourcery.com>
4638
4639 * server.c (handle_query): Handle InstallInTrace for qSupported.
4640 * tracepoint.c (add_tracepoint): Sort list.
4641 (install_tracepoint, download_tracepoint): New.
4642 (cmd_qtdp): Call them to install and download tracepoints.
4643 (sort_tracepoints): Removed.
4644 (cmd_qtstart): Update.
4645
4646 2011-11-14 Yao Qi <yao@codesourcery.com>
4647
4648 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4649 * mem-break.h: Declare.
4650 * tracepoint.c (cmd_qtstart): Move some code to ...
4651 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4652 New.
4653 (download_tracepoints): Move some code to ...
4654 (download_tracepoint_1): ... here. New.
4655
4656 2011-11-08 Yao Qi <yao@codesourcery.com>
4657
4658 * remote-utils.c (relocate_instruction): A comment fix.
4659
4660 2011-11-07 Joel Brobecker <brobecker@adacore.com>
4661
4662 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4663 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4664 dr_status_mirror and dr_control_mirror from debug_reg_state.
4665 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4666 (i386_initial_stuff): Remove use of deleted globals.
4667 (i386_get_thread_context, i386_set_thread_context,
4668 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4669 from debug_reg_state.
4670
4671 2011-11-05 Yao Qi <yao@codesourcery.com>
4672
4673 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4674 address as TPOINT's.
4675
4676 2011-11-02 Stan Shebs <stan@codesourcery.com>
4677
4678 * tracepoint.c (agent_mem_read_string): New function.
4679 (eval_agent_expr): Call it for tracenz.
4680 * server.c (handle_query): Report support for tracenz.
4681
4682 2011-11-02 Yao Qi <yao@codesourcery.com>
4683
4684 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4685
4686 2011-11-02 Yao Qi <yao@codesourcery.com>
4687
4688 * target.h: Fix a typo in comment.
4689
4690 2011-10-31 Pedro Alves <pedro@codesourcery.com>
4691
4692 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4693 clobber the breakpoints' shadows with fast tracepoint jumps.
4694 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4695 * target.c (write_inferior_memory): Also pass MYADDR down to
4696 check_mem_write.
4697
4698 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4699
4700 * configure.ac: Check support for personality routine.
4701 * configure: Regenerate.
4702 * config.in: Likewise.
4703 * linux-low.c: Include <sys/personality.h>.
4704 Define ADDR_NO_RANDOMIZE if necessary.
4705 (linux_create_inferior): Disable address space randomization when
4706 forking inferior, if requested.
4707 (linux_supports_disable_randomization): New function.
4708 (linux_target_ops): Install it.
4709 * server.h (disable_randomization): Declare.
4710 * server.c (disable_randomization): New global variable.
4711 (handle_general_set): Handle QDisableRandomization.
4712 (handle_query): Likewise for qSupported.
4713 (main): Support --disable-randomization and --no-disable-randomization
4714 command line arguments.
4715 * target.h (struct target_ops): Add supports_disable_randomization.
4716 (target_supports_disable_randomization): New macro.
4717
4718 2011-09-29 Mike Frysinger <vapier@gentoo.org>
4719
4720 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4721 ifdef check.
4722 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4723 [!PT_GETDSBT] (target_loadmap): New definition.
4724 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4725 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4726 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4727 and PT_GETDSBT to LINUX_LOADMAP.
4728 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4729 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4730
4731 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4732
4733 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4734 (arm_linux_hwbp_cap): New static variable.
4735 (arm_linux_get_hwbp_cap): Replace by ...
4736 (arm_linux_init_hwbp_cap): ... this new function.
4737 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4738 (arm_linux_get_hw_watchpoint_count): Likewise.
4739 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4740 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4741 (arm_prepare_to_resume): Use perror_with_name instead of error.
4742
4743 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4744
4745 * linux-arm-low.c: Include <signal.h>.
4746 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4747 (struct arm_linux_hwbp_cap): New data type.
4748 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4749 (struct arm_linux_hw_breakpoint): New data type.
4750 (MAX_BPTS, MAX_WPTS): Define.
4751 (struct arch_process_info, struct arch_lwp_info): New data types.
4752 (arm_linux_get_hwbp_cap): New function.
4753 (arm_linux_get_hw_breakpoint_count): Likewise.
4754 (arm_linux_get_hw_watchpoint_count): Likewise.
4755 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4756 (arm_hwbp_control_initialize): Likewise.
4757 (arm_hwbp_control_is_enabled): Likewise.
4758 (arm_hwbp_control_is_initialized): Likewise.
4759 (arm_hwbp_control_disable): Likewise.
4760 (arm_linux_hw_breakpoint_equal): Likewise.
4761 (arm_linux_hw_point_initialize): Likewise.
4762 (struct update_registers_data): New data structure.
4763 (update_registers_callback: New function.
4764 (arm_insert_point): Likewise.
4765 (arm_remove_point): Likewise.
4766 (arm_stopped_by_watchpoint): Likewise.
4767 (arm_stopped_data_address): Likewise.
4768 (arm_new_process): Likewise.
4769 (arm_new_thread): Likewise.
4770 (arm_prepare_to_resume): Likewise.
4771 (the_low_target): Register arm_insert_point, arm_remove_point,
4772 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4773 arm_new_thread, and arm_prepare_to_resume.
4774
4775 2011-09-15 Stan Shebs <stan@codesourcery.com>
4776
4777 * server.h (struct emit_ops): Add compare-goto fields.
4778 * tracepoint.c (gdb_agent_op_sizes): New table.
4779 (emit_eq_goto): New function.
4780 (emit_ne_goto): New function.
4781 (emit_lt_goto): New function.
4782 (emit_le_goto): New function.
4783 (emit_gt_goto): New function.
4784 (emit_ge_goto): New function.
4785 (is_goto_target): New function.
4786 (compile_bytecodes): Recognize special cases of compare-goto
4787 combinations and call specialized emitters for them.
4788 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4789 (amd64_emit_ne_goto): New function.
4790 (amd64_emit_lt_goto): New function.
4791 (amd64_emit_le_goto): New function.
4792 (amd64_emit_gt_goto): New function.
4793 (amd64_emit_ge_goto): New function.
4794 (amd64_emit_ops): Add the new functions.
4795 (i386_emit_eq_goto): New function.
4796 (i386_emit_ne_goto): New function.
4797 (i386_emit_lt_goto): New function.
4798 (i386_emit_le_goto): New function.
4799 (i386_emit_gt_goto): New function.
4800 (i386_emit_ge_goto): New function.
4801 (i386_emit_ops): Add the new functions.
4802
4803 2011-09-08 Stan Shebs <stan@codesourcery.com>
4804
4805 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4806 (i386_emit_epilogue): Restore %ebx.
4807
4808 2011-08-31 Jie Zhang <jzhang918@gmail.com>
4809
4810 * server.c (step_thread): Remove definition.
4811 (process_serial_event): Don't handle Hs.
4812 * server.h (step_thread): Remove declaration.
4813 * target.c (set_desired_inferior): Remove use of step_thread.
4814
4815 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
4816
4817 * linux-low.c: Include linux-procfs.h.
4818 (linux_attach_lwp_1): Update comments.
4819 (linux_attach): Scan for existing threads when attaching to a
4820 process that is the tgid.
4821 * Makefile.in: Update dependencies.
4822
4823 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
4824
4825 * configure.srv: Add linux-procfs.o dependencies.
4826
4827 2011-08-14 Yao Qi <yao@codesourcery.com>
4828
4829 * target.h (struct target_ops): Fix indent.
4830 * win32-low.c (win32_target_ops): Fix comment.
4831
4832 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
4833 Yao Qi <yao@codesourcery.com>
4834
4835 * Makefile.in (clean): Remove tic6x-*.c files.
4836 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4837 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4838 (tic6x-c64xp-linux.c): Likewise.
4839 * configure.srv: Add support for tic6x-*-uclinux.
4840 * linux-tic6x-low.c: New.
4841 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4842
4843 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
4844 Yao Qi <yao@codesourcery.com>
4845
4846 * target.h (struct target_ops): Add read_loadmap.
4847 * linux-low.c (struct target_loadseg): New type.
4848 (struct target_loadmap): New type.
4849 (linux_read_loadmap): New function.
4850 (linux_target_ops): Add linux_read_loadmap.
4851 * server.c (handle_query): Support qXfer:fdpic:read packet.
4852 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4853 to NULL.
4854
4855 2011-08-05 Eli Zaretskii <eliz@gnu.org>
4856
4857 * win32-low.c: Include <stdint.h>.
4858
4859 2011-07-22 Pedro Alves <pedro@codesourcery.com>
4860
4861 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4862 to the inferior here.
4863 (i386_remove_aligned_watchpoint): Ditto.
4864 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4865 fit part of the watchpoint in the debug registers.
4866 (i386_update_inferior_debug_regs): New.
4867 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4868 registers, and only update the inferior on success.
4869 (i386_low_remove_watchpoint): Ditto.
4870
4871 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4872
4873 * linux-low.c (compare_ints, unique, list_threads, show_process,
4874 linux_core_of_thread): Delete.
4875 (linux_target_ops): Change linux_core_of_thread to
4876 linux_common_core_of_thread.
4877 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4878 * utils.c (malloc_failure): Change type of argument.
4879 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4880 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4881 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4882 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4883 (IPA_OBJS): Add common-utils-ipa.o.
4884 (ptid_h, linux_osdata_h): New macros.
4885 (server_h): Add common/common-utils.h, common/xml-utils.h,
4886 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4887 common/ptid.h.
4888 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4889 ptid.o, buffer.o): New rules.
4890 (linux-low.o): Add common/linux-osdata.h as a dependency.
4891 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4892 * configure.ac: Add AC_HEADER_DIRENT check.
4893 * config.in: Regenerate.
4894 * configure: Regenerate.
4895 * remote-utils.c (xml_escape_text): Delete.
4896 (buffer_grow, buffer_free, buffer_init, buffer_finish,
4897 buffer_xml_printf): Move to common/buffer.c.
4898 * server.c (main): Remove call to initialize_inferiors.
4899 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
4900 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
4901 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
4902 internal_error, gdb_assert, gdb_assert_fail): Delete.
4903 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
4904 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
4905 common/buffer.h.
4906 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
4907 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
4908 initialize_inferiors): Delete.
4909
4910 2011-07-20 Pedro Alves <pedro@codesourcery.com>
4911
4912 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
4913 symbol error.
4914
4915 2011-05-31 Pedro Alves <pedro@codesourcery.com>
4916
4917 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
4918 assertion.
4919 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
4920
4921 2011-05-26 Yao Qi <yao@codesourcery.com>
4922
4923 * Makefile.in (thread-db.o): Track dependence to
4924 common/gdb_thread_db.h.
4925 * thread-db.c: include gdb_thread_db.h from right place.
4926
4927 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
4928
4929 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
4930 __FILE__ and __LINE__ to internal_error.
4931
4932 2011-05-13 Doug Evans <dje@google.com>
4933
4934 * thread-db.c (try_thread_db_load_from_sdir): New function.
4935 (try_thread_db_load_from_dir): New function.
4936 (thread_db_load_search): Handle $sdir, ignore $pdir.
4937 Remove trying of system directories if search of
4938 libthread-db-search-path fails, that is now done via $sdir.
4939
4940 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
4941
4942 * server.c (handle_query): Add EnableDisableTracepoints to the list
4943 of supported features.
4944 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
4945 tracepoints.
4946 (cmd_qtenable_disable): New.
4947 (cmd_qtstart): Install tracepoints even if disabled.
4948 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
4949 receiving a QTEnable or QTDisable packet.
4950 (gdb_collect): Skip data collection if fast tracepoint is disabled.
4951 (ust_marker_to_static_tracepoint): Do not ignore disabled static
4952 tracepoints.
4953 (gdb_probe): Skip data collection if static tracepoint is disabled.
4954
4955 2011-05-10 Doug Evans <dje@google.com>
4956
4957 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
4958
4959 2011-05-04 Doug Evans <dje@google.com>
4960
4961 * linux-low.c (linux_join): Skip process lookup.
4962 * spu-low.c (spu_join): Ditto.
4963 * server.c (join_inferiors_callback): Delete.
4964 (process_serial_event): For 'D' packet (detach) call join_inferior
4965 directly.
4966
4967 2011-05-04 Joseph Myers <joseph@codesourcery.com>
4968
4969 * README: Don't mention xscale*-*-linux*.
4970 * configure.srv (xscale*-*-linux*): Don't handle target.
4971
4972 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
4973
4974 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
4975 casting pointers.
4976 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
4977 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
4978 (i386_emit_void_call_2): Likewise.
4979
4980 2011-04-26 Yao Qi <yao@codesourcery.com>
4981
4982 * linux-low.c: Move common macros to linux-ptrace.h.
4983 Include linux-ptrace.h.
4984 * Makefile.in (linux_ptrace_h): New.
4985 (linux-low.o): Depends on linux-ptrace.h.
4986
4987 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4988
4989 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
4990 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
4991 (remote_prepare): New function with most of the TCP code from ...
4992 (remote_open): ... here. Detect PORT here unconditionally. Move also
4993 setting transport_is_reliable.
4994 * server.c (run_once): New variable.
4995 (gdbserver_usage): Document it.
4996 (main): Set run_once for `--once'. Call remote_prepare. Exit after
4997 the first run if RUN_ONCE.
4998 * server.h (run_once, remote_prepare): New declarations.
4999
5000 2011-04-19 Tom Tromey <tromey@redhat.com>
5001
5002 * win32-low.c (handle_load_dll): Remove duplicate "the".
5003
5004 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5005
5006 Remove support for old Cygwin 1.5 versions.
5007 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5008 function to avoid warning.
5009 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5010 warning.
5011
5012 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5013
5014 * gdbserver/server.h (Macro _): Define it if not available.
5015
5016 2011-03-14 Michael Snyder <msnyder@vmware.com>
5017
5018 * hostio.c (handle_close): Remove unnecessary null test.
5019
5020 2011-03-10 Joel Brobecker <brobecker@adacore.com>
5021
5022 * Makefile.in (maintainer-clean realclean distclean): Remove
5023 "make ... subdir_do" command.
5024
5025 2011-03-10 Michael Snyder <msnyder@vmware.com>
5026
5027 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5028
5029 * server.c (handle_v_run): Free alloced buffer on early return.
5030
5031 2011-03-09 Yao Qi <yao@codesourcery.com>
5032
5033 Revert:
5034 2011-03-04 Yao Qi <yao@codesourcery.com>
5035
5036 * Makefile.in: Remove GNU make feature --directory.
5037
5038 2011-03-05 Yao Qi <yao@codesourcery.com>
5039
5040 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5041 (subdir_do): New make target. Copied from gdb/Makefile.
5042 (maintainer-clean, realclean, distclean, clean): Call corresponding
5043 make targets in common/Makefile.
5044
5045 2011-02-11 Yao Qi <yao@codesourcery.com>
5046
5047 * configure.ac: Call AC_PROG_RANLIB.
5048 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5049 * configure: Regenerate.
5050
5051 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5052
5053 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5054
5055 2011-03-06 Yao Qi <yao@codesourcery.com>
5056
5057 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5058
5059 2011-03-05 Yao Qi <yao@codesourcery.com>
5060
5061 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5062 (subdir_do): New make target. Copied from gdb/Makefile.
5063 (maintainer-clean, realclean, distclean, clean): Call corresponding
5064 make targets in common/Makefile.
5065
5066 2011-03-04 Yao Qi <yao@codesourcery.com>
5067
5068 * Makefile.in: Remove GNU make feature --directory.
5069
5070 2011-03-04 Michael Snyder <msnyder@vmware.com>
5071
5072 * server.c (queue_stop_reply): Call xmalloc not malloc.
5073
5074 2011-03-02 Michael Snyder <msnyder@vmware.com>
5075
5076 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5077
5078 2011-02-28 Michael Snyder <msnyder@vmware.com>
5079
5080 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5081 (cmd_qtframe): Ditto.
5082 (cmd_qtbuffer): Ditto.
5083 (cmd_bigqtbuffer): Ditto.
5084
5085 * utils.c (decimal2str): Initialize 'width' to nine, then
5086 don't mess with it.
5087
5088 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5089
5090 * hostio.c (require_data): Free *data, not data.
5091
5092 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5093
5094 * hostio.c (require_data): Use free, not xfree.
5095
5096 2011-02-27 Michael Snyder <msnyder@vmware.com>
5097
5098 * server.c (handle_query): Discard unused value.
5099
5100 * hostio.c (require_data): Free malloc memory before returning
5101 error.
5102
5103 2011-02-26 Michael Snyder <msnyder@vmware.com>
5104
5105 * linux-low.c (list_threads): Call closedir for dirent.
5106
5107 2011-02-27 Michael Snyder <msnyder@vmware.com>
5108
5109 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5110 a case statement falls through.
5111
5112 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5113
5114 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5115 in comparison.
5116
5117 2011-02-26 Michael Snyder <msnyder@vmware.com>
5118
5119 * utils.c (decimal2str): Eliminate dead code and dead param.
5120 (pulongest): Drop dead param from call to decimal2str.
5121 (plongest): Ditto.
5122
5123 2011-02-24 Joel Brobecker <brobecker@adacore.com>
5124
5125 Revert the following patch (not approved yet):
5126 2011-02-21 Hui Zhu <teawater@gmail.com>
5127 * tracepoint.c (tp_printf): New function.
5128 (eval_agent_expr): Handle gdb_agent_op_printf.
5129
5130 2011-02-21 Hui Zhu <teawater@gmail.com>
5131
5132 * tracepoint.c (tp_printf): New function.
5133 (eval_agent_expr): Handle gdb_agent_op_printf.
5134
5135 2011-02-18 Tom Tromey <tromey@redhat.com>
5136
5137 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5138 (tracepoint.o): Likewise.
5139 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5140 (gdb_agent_op_names): Likewise.
5141
5142 2011-02-18 Tom Tromey <tromey@redhat.com>
5143
5144 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5145 gdb_agent_op_rot>: New constants.
5146 (gdb_agent_op_names): Add pick and roll.
5147 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5148 cases.
5149
5150 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5151
5152 * aclocal.m4: Regenerated with aclocal-1.11.1.
5153
5154 2011-02-14 Pedro Alves <pedro@codesourcery.com>
5155
5156 * server.c (handle_qxfer_traceframe_info): New.
5157 (qxfer_packets): Register "traceframe-info".
5158 (handle_query): Report support for qXfer:traceframe-info:read+.
5159 * tracepoint.c (match_blocktype): New.
5160 (traceframe_find_block_type): Rename to ...
5161 (traceframe_walk_blocks): ... this. Add callback filter argument,
5162 and use it.
5163 (traceframe_find_block_type): New, reimplemented on top of
5164 traceframe_walk_blocks.
5165 (build_traceframe_info_xml): New.
5166 (traceframe_read_info): New.
5167 * server.h (traceframe_read_info): Declare.
5168
5169 2011-02-11 Yao Qi <yao@codesourcery.com>
5170
5171 * configure.ac: Call AC_PROG_RANLIB.
5172 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5173 * configure: Regenerate.
5174
5175 2011-02-07 Pedro Alves <pedro@codesourcery.com>
5176
5177 * server.c (gdb_read_memory): Change return semantics to allow
5178 partial transfers.
5179 (handle_search_memory_1): Adjust.
5180 (process_serial_event) <'m' packet>: Handle partial transfers.
5181 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5182
5183 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5184
5185 * regcache.c (init_register_cache): Initialize
5186 regcache->register_status.
5187 (free_register_cache): Release regcache->register_status.
5188 (regcache_cpy): Copy register_status.
5189 (registers_to_string): Print 'x's for unavailable registers.
5190 (supply_register): Mark the register's status valid or
5191 unavailable, depending on whether a buffer was passed in or not.
5192 (supply_register_zeroed): New.
5193 (supply_regblock): Mark the registers' status valid or
5194 unavailable, depending on whether a buffer was passed in or not.
5195 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5196 (struct regcache): New `register_status' field.
5197 (supply_register_zeroed): Declare.
5198 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5199 supply_register_zeroed, rather than passing a NULL buffer to
5200 supply_register.
5201 * tracepoint.c (fetch_traceframe_registers): Update comment.
5202
5203 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5204
5205 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5206 buffer explicit.
5207
5208 2011-01-25 Pedro Alves <pedro@codesourcery.com>
5209
5210 * server.h (decode_xfer_write): Change prototype.
5211 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5212 and don't extract the annex here.
5213 * server.c (decode_xfer_read): Remove `annex' parameter,
5214 and don't extract the annex here.
5215 (decode_xfer): New.
5216 (struct qxfer): New.
5217 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5218 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5219 (handle_qxfer_statictrace): New functions, abstracted out from
5220 handle_query, and made to use the struct qxfer interface.
5221 (handle_threads_qxfer_proper): Rename to ...
5222 (handle_qxfer_threads_proper): ... this.
5223 (handle_threads_qxfer): Rename to ...
5224 (handle_qxfer_threads): ... this. Adjust.
5225 (qxfer_packets): New array.
5226 (handle_qxfer): New function.
5227 (handle_query): Use handle_qxfer.
5228
5229 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5230
5231 * gdbreplay.c: Shorten lines of >= 80 columns.
5232 * linux-low.c: Ditto.
5233 * linux-ppc-low.c: Ditto.
5234 * linux-s390-low.c: Ditto.
5235 * linux-sparc-low.c: Ditto.
5236 * linux-x86-low.c: Ditto.
5237 * linux-xtensa-low.c: Ditto.
5238 * mem-break.c: Ditto.
5239 * nto-low.c: Ditto.
5240 * regcache.h: Ditto.
5241 * remote-utils.c: Ditto.
5242 * server.c: Ditto.
5243 * server.h: Ditto.
5244 * thread-db.c: Ditto.
5245 * tracepoint.c: Ditto.
5246 * utils.c: Ditto.
5247 * win32-low.h: Ditto.
5248
5249 2011-01-05 Joel Brobecker <brobecker@adacore.com>
5250
5251 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5252 update.
5253
5254 2011-01-01 Joel Brobecker <brobecker@adacore.com>
5255
5256 * server.c (gdbserver_version): Update copyright year in version
5257 output.
5258 * gdbreplay.c (gdbreplay_version): Ditto.
5259
5260 2010-12-29 Jie Zhang <jie.zhang@analog.com>
5261
5262 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5263 * linux-bfin-low.c: New file.
5264 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5265 PT_DATA_ADDR for BFIN targets.
5266 * Makefile.in (SFILES): Add linux-bfin-low.c.
5267 (clean): Remove reg-bfin.c.
5268 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5269 * README: Mention supported Blackfin targets.
5270
5271 2010-12-23 Mike Frysinger <vapier@gentoo.org>
5272
5273 * .gitignore: New file.
5274
5275 2010-11-16 Mike Frysinger <vapier@gentoo.org>
5276
5277 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5278
5279 2010-10-22 Jie Zhang <jie@codesourcery.com>
5280
5281 * Makefile.in: Add FLAGS_TO_PASS variable.
5282 (install): Remove dependency of install-only and recursively
5283 invoke make for install-only.
5284
5285 2010-10-04 Doug Evans <dje@google.com>
5286
5287 * Makefile.in (uninstall): Use $(DESTDIR).
5288
5289 2010-09-24 Pedro Alves <pedro@codesourcery.com>
5290
5291 PR gdb/11842
5292
5293 * linux-x86-low.c (compat_siginfo_from_siginfo)
5294 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5295 si_code is < 0. Check for si_code == SI_TIMER before checking for
5296 si_code < 0.
5297
5298 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5299
5300 * lynx-i386-low.c: New file.
5301 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5302
5303 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5304
5305 * lynx-low.c (ptrace_request_to_str): Remove handling for
5306 request values that have been removed in LynxOS 5.x.
5307
5308 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5309
5310 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5311 <ptrace.h>
5312
5313 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5314
5315 * configure.ac: Add --enable-inprocess-agent option.
5316 * configure: Rebuilt.
5317
5318 2010-09-06 Yao Qi <yao@codesourcery.com>
5319
5320 * linux-low.c (linux_kill): Remove unused variable.
5321 (linux_stabilize_threads): Likewise.
5322 * server.c (start_inferior): Likewise.
5323 (queue_stop_reply_callback): Likewise.
5324 * tracepoint.c (do_action_at_tracepoint): Likewise.
5325
5326 2010-09-06 Yao Qi <yao@codesourcery.com>
5327
5328 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5329 on return.
5330
5331 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5332
5333 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5334
5335 2010-09-06 Pedro Alves <pedro@codesourcery.com>
5336
5337 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5338 "$(IPA_DEPFILES)".
5339
5340 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5341
5342 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5343 gdbserver/lynx-ppc-low.c: New files.
5344 * Makefile.in (lynx_low_h): New variable.
5345 (lynx-low.o, lynx-ppc-low.o): New rules.
5346 * configure.ac: On LynxOS, link with -lnetinet.
5347 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5348 * configure: regenerate.
5349
5350 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5351
5352 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5353 * configure.ac: Add check for vasprintf and vsnprintf.
5354 * configure, config.in: Regenerate.
5355 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5356
5357 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5358
5359 * gdbreplay.c: Move include of alloca.h up, next to include of
5360 malloc.h.
5361 * server.h: Add include of malloc.h.
5362 * mem-break.c: Remove include of malloc.h.
5363 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5364
5365 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5366
5367 * Makefile.in (memmem.o): Build with -Wno-error.
5368
5369 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5370
5371 * utils.c (xsnprintf): Make non-static.
5372 * server.h: Add xsnprintf declaration.
5373 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5374 replace calls to snprintf by calls to xsnprintf throughout.
5375
5376 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5377
5378 * configure.ac: Add configure check for alloca.
5379 * configure, config.in: Regenerate.
5380 * server.h: Include alloca.h if it exists.
5381 * gdbreplay.c: Include alloca.h if it exists.
5382
5383 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5384
5385 * linux-low.c (__SIGRTMIN): Define if not already defined.
5386 (linux_create_inferior): Check for __ANDROID__ rather than
5387 __SIGRTMIN.
5388 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5389 are already deferred.
5390 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5391 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5392 stopped and already has a pending signal to report.
5393 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5394 a pending signal to report or is moving out of a jump pad.
5395 (linux_init_signals): Check for __ANDROID__ rather than
5396 __SIGRTMIN.
5397
5398 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5399
5400 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5401 debug_threads check. Avoid a linear search when not doing debug
5402 output.
5403
5404 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5405
5406 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5407 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5408 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5409 (process_event): Change local fd's type to gdb_fildes_t.
5410 (create_file_handler): Adjust prototype.
5411 (delete_file_handler): Adjust prototype.
5412 (handle_file_event): Adjust prototype. Use pfildes.
5413 (create_file_event): Adjsut prototype.
5414 * remote-utils.c (remote_desc, listen_desc): Change type to
5415 gdb_fildes_t.
5416 * server.h: New gdb_fildes_t typedef.
5417 [USE_WIN32API]: Include winsock2.h.
5418 (delete_file_handler, add_file_handler): Adjust prototypes.
5419 (pfildes): Declare.
5420 * utils.c (pfildes): New.
5421
5422 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5423
5424 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5425 * configure: Regenerate.
5426
5427 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5428
5429 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5430 (linux_done_accessing_memory): ... this.
5431 (linux_target_ops): Adjust.
5432 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5433 * nto-low.c (nto_target_ops): Adjust comment.
5434 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5435 * spu-low.c (spu_target_ops): Adjust comment.
5436 * target.h (target_ops): Rename unprepare_to_access_memory field
5437 to done_accessing_memory.
5438 (unprepare_to_access_memory): Rename to ...
5439 (done_accessing_memory): ... this.
5440
5441 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5442
5443 * linux-low.c (linux_prepare_to_access_memory): New.
5444 (linux_unprepare_to_access_memory): New.
5445 (linux_target_ops): Install them.
5446 * server.c (read_memory): Rename to ...
5447 (gdb_read_memory): ... this. Use
5448 prepare_to_access_memory/prepare_to_access_memory.
5449 (write_memory): Rename to ...
5450 (gdb_write_memory): ... this. Use
5451 prepare_to_access_memory/prepare_to_access_memory.
5452 (handle_search_memory_1): Adjust.
5453 (process_serial_event): Adjust.
5454 * target.h (struct target_ops): New fields
5455 prepare_to_access_memory and unprepare_to_access_memory.
5456 (prepare_to_access_memory, unprepare_to_access_memory): New.
5457 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5458 prepare_to_access_memory/prepare_to_access_memory.
5459 * nto-low.c (nto_target_ops): Adjust.
5460 * spu-low.c (spu_target_ops): Adjust.
5461 * win32-low.c (win32_target_ops): Adjust.
5462
5463 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5464
5465 * Makefile.in (WARN_CFLAGS): Get it from configure.
5466 (WERROR_CFLAGS): New.
5467 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5468 * configure.ac: Introduce --enable-werror, which adds -Werror to
5469 the compiler command line. Enabled by default. Disable with
5470 --disable-werror. Add -Wdeclaration-after-statement
5471 Wpointer-arith and -Wformat-nonliteral to warning flags.
5472 * configure: Regenerate.
5473
5474 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5475
5476 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5477
5478 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5479
5480 * gdbreplay.c (remote_error): New.
5481 (gdbchar): New.
5482 (expect): Use gdbchar. Check for error reading from GDB.
5483 Clarify sync error output.
5484 (play): Check for errors writing to GDB.
5485 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5486 * remote-utils.c (getpkt): Check for errors writing to the remote
5487 descriptor.
5488
5489 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5490
5491 * linux-low.c (linux_wait_1): Move non-debugging code out of
5492 `debug_threads' control.
5493
5494 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5495
5496 * linux-low.c (linux_wait_1): Don't set last_status here.
5497 * server.c (push_event, queue_stop_reply_callback): Assert we're
5498 not pushing a TARGET_WAITKIND_IGNORE event.
5499 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5500 (myresume, handle_target_event): Set the thread's last_resume_kind
5501 and last_status from the target returned status.
5502
5503 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5504
5505 PR threads/10729
5506
5507 * linux-x86-low.c (update_debug_registers_callback): New.
5508 (i386_dr_low_set_addr): Use it.
5509 (i386_dr_low_get_addr): New.
5510 (i386_dr_low_set_control): Use update_debug_registers_callback.
5511 (i386_dr_low_get_control): New.
5512 (i386_dr_low_get_status): Adjust.
5513 * linux-low.c (linux_stop_lwp): New.
5514 * linux-low.h (linux_stop_lwp): Declare.
5515
5516 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5517 argument instead of a i386_debug_reg_state.
5518 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5519 a i386_debug_reg_state.
5520 (i386_insert_aligned_watchpoint): Adjust.
5521 (i386_remove_aligned_watchpoint): Adjust.
5522 (i386_low_stopped_data_address): Read the debug registers from the
5523 inferior instead of from the mirrors.
5524 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5525 (i386_dr_low_get_addr): Declare.
5526 (i386_dr_low_get_control): Declare.
5527 (i386_dr_low_get_status): Change prototype.
5528
5529 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5530 (i386_dr_low_get_addr): New.
5531 (i386_dr_low_get_control): New.
5532 (i386_dr_low_get_status): Adjust prototype. Return
5533 dr_status_mirror.
5534 (i386_initial_stuff): Clear dr_status_mirror and
5535 dr_control_mirror.
5536 (i386_get_thread_context): Adjust.
5537 (i386_set_thread_context): Adjust.
5538 (i386_thread_added): Adjust.
5539
5540 2010-08-24 Pedro Alves <pedro@codesourcery.com>
5541
5542 * linux-low.h (linux_thread_area): Delete declaration.
5543
5544 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5545
5546 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5547 after its termination.
5548
5549 2010-08-09 Pedro Alves <pedro@codesourcery.com>
5550
5551 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5552 (gdb_wants_all_stopped): Delete.
5553 (linux_wait_1): Don't call them.
5554 * server.c (handle_v_cont): Tag all threads as want-stopped.
5555 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5556 stopped as "client-wants-stopped".
5557
5558 2010-07-31 Pedro Alves <pedro@codesourcery.com>
5559
5560 * Makefile.in (signals_h): New.
5561 (server_h): Depend on it.
5562 (server.o): Don't depend on $(signals_def).
5563 (signals.o): Depend on $(signals_def).
5564
5565 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5566
5567 * Makefile.in (signals_def): New.
5568 (server_h): Append include/gdb/signals.h and signals_def.
5569 (server.o): Append signals_def.
5570
5571 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5572
5573 * server.c (handle_target_event): Use target_signal_to_host for
5574 resume_info.sig initialization.
5575 * target.h (struct thread_resume) <sig>: New comment.
5576
5577 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5578
5579 * server.c (handle_query): strcpy() the returned string from paddress()
5580 instead of sprintf().
5581 * utils.c (paddress): Return phex_nz().
5582
5583 2010-07-07 Joel Brobecker <brobecker@adacore.com>
5584
5585 * server.c (handle_v_cont): Call mourn_inferior if process
5586 just exited.
5587 (myresume): Likewise.
5588
5589 2010-07-01 Pedro Alves <pedro@codesourcery.com>
5590
5591 Static tracepoints, and integration with UST.
5592
5593 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5594 * mem-break.c (uninsert_all_breakpoints)
5595 (reinsert_all_breakpoints): New.
5596 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5597 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5598 (gdb_agent_ust_loaded, helper_thread_id)
5599 (gdb_agent_helper_thread_id): New macros.
5600 (struct ipa_sym_addresses): Add addr_ust_loaded,
5601 addr_helper_thread_id, addr_cmd_buf.
5602 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5603 (in_process_agent_loaded_ust): New.
5604 (write_e_ust_not_loaded): New.
5605 (maybe_write_ipa_ust_not_loaded): New.
5606 (struct collect_static_trace_data_action): New.
5607 (enum tracepoint_type) <static_tracepoint>: New.
5608 (struct tracepoint) <handle>: Mention static tracepoints.
5609 (struct static_tracepoint_ctx): New.
5610 (CMD_BUF_SIZE): New.
5611 (add_tracepoint_action): Handle static tracepoint actions.
5612 (unprobe_marker_at): New.
5613 (clear_installed_tracepoints): Handle static tracepoints.
5614 (cmd_qtdp): Handle static tracepoints.
5615 (probe_marker_at): New.
5616 (cmd_qtstart): Handle static tracepoints.
5617 (response_tracepoint): Handle static tracepoints.
5618 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5619 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5620 (get_context_regcache): Handle static tracepoints.
5621 (do_action_at_tracepoint): Handle static tracepoint actions.
5622 (traceframe_find_block_type): Handle static trace data blocks.
5623 (traceframe_read_sdata): New.
5624 (download_tracepoints): Download static tracepoint actions.
5625 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5626 (GDB_PROBE_NAME): New.
5627 (ust_ops): New.
5628 (GET_UST_SYM): New.
5629 (USTF): New.
5630 (dlsym_ust): New.
5631 (ust_marker_to_static_tracepoint): New.
5632 (gdb_probe): New.
5633 (collect_ust_data_at_tracepoint): New.
5634 (gdb_ust_probe): New.
5635 (UNIX_PATH_MAX, SOCK_DIR): New.
5636 (gdb_ust_connect_sync_socket): New.
5637 (resume_thread, stop_thread): New.
5638 (run_inferior_command): New.
5639 (init_named_socket): New.
5640 (gdb_ust_socket_init): New.
5641 (cstr_to_hexstr): New.
5642 (next_st): New.
5643 (first_marker, next_marker): New.
5644 (response_ust_marker): New.
5645 (cmd_qtfstm, cmd_qtsstm): New.
5646 (unprobe_marker_at, probe_marker_at): New.
5647 (cmd_qtstmat, gdb_ust_thread): New.
5648 (gdb_ust_init): New.
5649 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5650 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5651 (ST_REGENTRY): New.
5652 (x86_64_st_collect_regmap): New.
5653 (X86_64_NUM_ST_COLLECT_GREGS): New.
5654 (AMD64_RIP_REGNUM): New.
5655 (supply_static_tracepoint_registers): New.
5656 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5657 (ST_REGENTRY): New.
5658 (i386_st_collect_regmap): New.
5659 (i386_NUM_ST_COLLECT_GREGS): New.
5660 (supply_static_tracepoint_registers): New.
5661 * server.c (handle_query): Handle qXfer:statictrace:read.
5662 <qSupported>: Report support for StaticTracepoints, and
5663 qXfer:statictrace:read features.
5664 * server.h (traceframe_read_sdata)
5665 (supply_static_tracepoint_registers): Declare.
5666 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5667 (unpack_varlen_hex): Include in IPA build.
5668 * Makefile.in (ustlibs, ustinc): New.
5669 (IPA_OBJS): Add remote-utils-ipa.o.
5670 ($(IPA_LIB)): Link -ldl and -lpthread.
5671 (UST_CFLAGS): New.
5672 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5673 * config.in, configure: Regenerate.
5674
5675 2010-06-20 Ian Lance Taylor <iant@google.com>
5676 Pedro Alves <pedro@codesourcery.com>
5677
5678 * linux-x86-low.c (always_true): Delete.
5679 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5680 trying to fool the compiler with always_true.
5681
5682 2010-06-20 Pedro Alves <pedro@codesourcery.com>
5683
5684 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5685 conditions in gdbserver.
5686
5687 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5688
5689 * spu-low.c (spu_read_memory): Wrap around local store limit.
5690 (spu_write_memory): Likewise.
5691
5692 2010-06-15 Pedro Alves <pedro@codesourcery.com>
5693
5694 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5695 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5696 LONGEST uses.
5697 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5698 uses.
5699 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5700 uses with LONGEST uses.
5701
5702 2010-06-14 Stan Shebs <stan@codesourcery.com>
5703 Pedro Alves <pedro@codesourcery.com>
5704
5705 Bytecode compiler.
5706
5707 * linux-x86-low.c: Include limits.h.
5708 (add_insns): New.
5709 (always_true): New.
5710 (EMIT_ASM): New.
5711 (EMIT_ASM32): New.
5712 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5713 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5714 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5715 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5716 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5717 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5718 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5719 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5720 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5721 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5722 (amd64_emit_void_call_2): New.
5723 (amd64_emit_ops): New.
5724 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5725 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5726 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5727 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5728 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5729 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5730 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5731 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5732 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5733 (i386_emit_stack_adjust, i386_emit_int_call_1)
5734 (i386_emit_void_call_2): New.
5735 (i386_emit_ops): New.
5736 (x86_emit_ops): New.
5737 (the_low_target): Install x86_emit_ops.
5738 * server.h (struct emit_ops): New.
5739 (get_raw_reg_func_addr): Declare.
5740 (current_insn_ptr, emit_error): Declare.
5741 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5742 (set_trace_state_variable_value): New defines.
5743 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5744 addr_get_trace_state_variable_value and
5745 addr_set_trace_state_variable_value.
5746 (symbol_list): New fields for get_raw_reg,
5747 get_trace_state_variable_value and set_trace_state_variable_value.
5748 (condfn): New typedef.
5749 (struct tracepoint): New field `compiled_cond'.
5750 (do_action_at_tracepoint): Clear compiled_cond.
5751 (get_trace_state_variable_value, set_trace_state_variable_value):
5752 Export in the IPA.
5753 (condition_true_at_tracepoint): If there's a compiled condition,
5754 run that.
5755 (current_insn_ptr, emit_error): New globals.
5756 (struct bytecode_address): New.
5757 (get_raw_reg_func_addr): New.
5758 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5759 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5760 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5761 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5762 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5763 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5764 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5765 (compile_tracepoint_condition, compile_bytecodes): New.
5766 * target.h (emit_ops): Forward declare.
5767 (struct target_ops): New field emit_ops.
5768 (target_emit_ops): New.
5769 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5770 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5771 * linux-low.c (linux_emit_ops): New.
5772 (linux_target_ops): Install it.
5773 * linux-low.h (struct linux_target_ops): New field emit_ops.
5774
5775 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5776
5777 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5778 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5779
5780 2010-06-01 Pedro Alves <pedro@codesourcery.com>
5781 Stan Shebs <stan@codesourcery.com>
5782
5783 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5784 (all): Depend on $(extra_libraries).
5785 (install-only): Install the IPA.
5786 (IPA_OBJS, IPA_LIB): New.
5787 (clean): Remove the IPA lib.
5788 (IPAGENT_CFLAGS): New.
5789 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5790 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5791 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5792 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5793 * configure.ac: Check for atomic builtins support in the compiler.
5794 (IPA_DEPFILES, extra_libraries): Define.
5795 * configure.srv (ipa_obj): Add description.
5796 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5797 (i[34567]86-*-linux*): Set ipa_obj.
5798 (x86_64-*-linux*): Set ipa_obj.
5799 * linux-low.c (stabilizing_threads): New.
5800 (supports_fast_tracepoints): New.
5801 (linux_detach): Stabilize threads before detaching.
5802 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5803 the lwp is either not stabilizing, or is moving out of a jump pad.
5804 (linux_fast_tracepoint_collecting): New.
5805 (maybe_move_out_of_jump_pad): New.
5806 (enqueue_one_deferred_signal): New.
5807 (dequeue_one_deferred_signal): New.
5808 (linux_wait_for_event_1): If moving out of a jump pad, defer
5809 pending signals to later.
5810 (linux_stabilize_threads): New.
5811 (linux_wait_1): Check if threads need moving out of jump pads, and
5812 do it if so.
5813 (stuck_in_jump_pad_callback): New.
5814 (move_out_of_jump_pad_callback): New.
5815 (lwp_running): New.
5816 (linux_resume_one_lwp): Handle moving out of jump pads.
5817 (linux_set_resume_request): Dequeue deferred signals.
5818 (need_step_over_p): Also step over fast tracepoint jumps.
5819 (start_step_over): Also uninsert fast tracepoint jumps.
5820 (finish_step_over): Also reinsert fast tracepoint jumps.
5821 (linux_install_fast_tracepoint_jump): New.
5822 (linux_target_ops): Install linux_stabilize_threads and
5823 linux_install_fast_tracepoint_jump_pad.
5824 * linux-low.h (linux_target_ops) <get_thread_area,
5825 install_fast_tracepoint_jump_pad>: New fields.
5826 (struct lwp_info) <collecting_fast_tracepoint,
5827 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5828 (linux_get_thread_area): Declare.
5829 * linux-x86-low.c (jump_insn): New.
5830 (x86_get_thread_area): New.
5831 (append_insns): New.
5832 (push_opcode): New.
5833 (amd64_install_fast_tracepoint_jump_pad): New.
5834 (i386_install_fast_tracepoint_jump_pad): New.
5835 (x86_install_fast_tracepoint_jump_pad): New.
5836 (the_low_target): Install x86_get_thread_area and
5837 x86_install_fast_tracepoint_jump_pad.
5838 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5839 (struct fast_tracepoint_jump): New.
5840 (fast_tracepoint_jump_insn): New.
5841 (fast_tracepoint_jump_shadow): New.
5842 (find_fast_tracepoint_jump_at): New.
5843 (fast_tracepoint_jump_here): New.
5844 (delete_fast_tracepoint_jump): New.
5845 (set_fast_tracepoint_jump): New.
5846 (uninsert_fast_tracepoint_jumps_at): New.
5847 (reinsert_fast_tracepoint_jumps_at): New.
5848 (set_breakpoint_at): Use write_inferior_memory.
5849 (uninsert_raw_breakpoint): Use write_inferior_memory.
5850 (check_mem_read): Mask out fast tracepoint jumps.
5851 (check_mem_write): Mask out fast tracepoint jumps.
5852 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5853 (set_fast_tracepoint_jump): Declare.
5854 (delete_fast_tracepoint_jump)
5855 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5856 (reinsert_fast_tracepoint_jumps_at): Declare.
5857 * regcache.c: Don't compile many functions when building the
5858 in-process agent library.
5859 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5860 the register buffer in the heap.
5861 (free_register_cache): If the register buffer isn't owned by the
5862 regcache, don't free it.
5863 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5864 pre-existing register caches.
5865 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5866 type.
5867 (convert_ascii_to_int): : Constify `from' parameter type.
5868 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5869 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5870 the needed buffer in-place.
5871 (relocate_instruction): New.
5872 * server.c (handle_query) <qSymbols>: If the target supports
5873 tracepoints, give it a chance of looking up symbols. Report
5874 support for fast tracepoints.
5875 (handle_status): Stabilize threads.
5876 (process_serial_event): Adjust.
5877 * server.h (struct fast_tracepoint_jump): Forward declare.
5878 (struct process_info) <fast_tracepoint_jumps>: New field.
5879 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5880 (decode_X_packet, decode_M_packet): Adjust.
5881 (relocate_instruction): Declare.
5882 (in_process_agent_loaded): Declare.
5883 (tracepoint_look_up_symbols): Declare.
5884 (struct fast_tpoint_collect_status): Declare.
5885 (fast_tracepoint_collecting): Declare.
5886 (force_unlock_trace_buffer): Declare.
5887 (handle_tracepoint_bkpts): Declare.
5888 (initialize_low_tracepoint)
5889 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5890 * target.h (struct target_ops) <stabilize_threads,
5891 install_fast_tracepoint_jump_pad>: New fields.
5892 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5893 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5894 [HAVE_STDINT_H]: Include stdint.h.
5895 (trace_debug_1): Rename to ...
5896 (trace_vdebug): ... this.
5897 (trace_debug): Rename to ...
5898 (trace_debug_1): ... this. Add `level' parameter.
5899 (trace_debug): New.
5900 (ATTR_USED, ATTR_NOINLINE): New.
5901 (IP_AGENT_EXPORT): New.
5902 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5903 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
5904 (about_to_request_buffer_space, trace_buffer_is_full)
5905 (stopping_tracepoint, expr_eval_result, error_tracepoint)
5906 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
5907 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
5908 (traceframe_write_count, traceframes_created)
5909 (trace_state_variables)
5910 New renaming defines.
5911 (struct ipa_sym_addresses): New.
5912 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
5913 (symbol_list): New.
5914 (ipa_sym_addrs): New.
5915 (all_tracepoint_symbols_looked_up): New.
5916 (in_process_agent_loaded): New.
5917 (write_e_ipa_not_loaded): New.
5918 (maybe_write_ipa_not_loaded): New.
5919 (tracepoint_look_up_symbols): New.
5920 (debug_threads) [IN_PROCESS_AGENT]: New.
5921 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
5922 (UNKNOWN_SIDE_EFFECTS): New.
5923 (stop_tracing): New.
5924 (flush_trace_buffer): New.
5925 (stop_tracing_bkpt): New.
5926 (flush_trace_buffer_bkpt): New.
5927 (read_inferior_integer): New.
5928 (read_inferior_uinteger): New.
5929 (read_inferior_data_pointer): New.
5930 (write_inferior_data_pointer): New.
5931 (write_inferior_integer): New.
5932 (write_inferior_uinteger): New.
5933 (struct collect_static_trace_data_action): Delete.
5934 (enum tracepoint_type): New.
5935 (struct tracepoint) <type>: New field `type'.
5936 <actions_str, step_actions, step_actions_str>: Only include in
5937 GDBserver.
5938 <orig_size, obj_addr_on_target, adjusted_insn_addr>
5939 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
5940 (tracepoints): Use IP_AGENT_EXPORT.
5941 (last_tracepoint): Don't include in the IPA.
5942 (stopping_tracepoint): Use IP_AGENT_EXPORT.
5943 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
5944 (alloced_trace_state_variables): New.
5945 (trace_state_variables): Use IP_AGENT_EXPORT.
5946 (traceframe_t): Delete unused variable.
5947 (circular_trace_buffer): Don't include in the IPA.
5948 (trace_buffer_start): Delete.
5949 (struct trace_buffer_control): New.
5950 (trace_buffer_free): Delete.
5951 (struct ipa_trace_buffer_control): New.
5952 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
5953 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
5954 New.
5955 (trace_buffer_ctrl): New.
5956 (TRACE_BUFFER_CTRL_CURR): New.
5957 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
5958 Reimplement as macros.
5959 (trace_buffer_wrap): Delete.
5960 (traceframe_write_count, traceframe_read_count)
5961 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
5962 (struct tracepoint_hit_ctx) <type>: New field.
5963 (struct fast_tracepoint_ctx): New.
5964 (memory_barrier): New.
5965 (cmpxchg): New.
5966 (record_tracepoint_error): Update atomically in the IPA.
5967 (clear_inferior_trace_buffer): New.
5968 (about_to_request_buffer_space): New.
5969 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
5970 updating the same buffer.
5971 (add_tracepoint): Default the tracepoint's type to trap
5972 tracepoint, and orig_size to -1.
5973 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
5974 internal variables.
5975 (create_trace_state_variable): New parameter `gdb'. Handle it.
5976 (clear_installed_tracepoints): Clear fast tracepoint jumps.
5977 (cmd_qtdp): Handle fast tracepoints.
5978 (cmd_qtdv): Adjust.
5979 (max_jump_pad_size): New.
5980 (gdb_jump_pad_head): New.
5981 (get_jump_space_head): New.
5982 (claim_jump_space): New.
5983 (sort_tracepoints): New.
5984 (MAX_JUMP_SIZE): New.
5985 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
5986 IPA.
5987 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
5988 support. Upload fast traceframes, and delete internal IPA
5989 breakpoints.
5990 (stop_tracing_handler): New.
5991 (flush_trace_buffer_handler): New.
5992 (cmd_qtstop): Upload fast tracepoints.
5993 (response_tracepoint): Handle fast tracepoints.
5994 (tracepoint_finished_step): Upload fast traceframes. Set the
5995 tracepoint hit context's tracepoint type.
5996 (handle_tracepoint_bkpts): New.
5997 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
5998 type. Add comment about fast tracepoints.
5999 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6000 non-existing action_str field.
6001 (get_context_regcache): Handle fast tracepoints.
6002 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6003 to the regcache.
6004 (fast_tracepoint_from_jump_pad_address): New.
6005 (fast_tracepoint_from_ipa_tpoint_address): New.
6006 (collecting_t): New.
6007 (force_unlock_trace_buffer): New.
6008 (fast_tracepoint_collecting): New.
6009 (collecting): New.
6010 (gdb_collect): New.
6011 (write_inferior_data_ptr): New.
6012 (target_tp_heap): New.
6013 (target_malloc): New.
6014 (download_agent_expr): New.
6015 (UALIGN): New.
6016 (download_tracepoints): New.
6017 (download_trace_state_variables): New.
6018 (upload_fast_traceframes): New.
6019 (IPA_FIRST_TRACEFRAME): New.
6020 (IPA_NEXT_TRACEFRAME_1): New.
6021 (IPA_NEXT_TRACEFRAME): New.
6022 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6023 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6024 (gdb_jump_pad_buffer_end): New.
6025 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6026 (initialize_tracepoint): Adjust.
6027 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6028 buffer. Initialize the low module.
6029 * utils.c (PREFIX, TOOLNAME): New.
6030 (malloc_failure): Use PREFIX.
6031 (error): In the IPA, an error causes an exit.
6032 (fatal, warning): Use PREFIX.
6033 (internal_error): Use TOOLNAME.
6034 (NUMCELLS): Increase to 10.
6035 * configure, config.in: Regenerate.
6036
6037 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6038
6039 * server.c (handle_query) <qSupported>: Do two passes over the
6040 qSupported string to avoid nesting strtok.
6041
6042 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6043
6044 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6045 (CDEPS): New.
6046 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6047 -Wl,--dynamic-list.
6048 * configure: Regenerate.
6049 * proc-service.list: New.
6050
6051 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6052
6053 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6054 New comment.
6055
6056 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6057
6058 * gdbreplay.c (remote_open): Check error return from socket() call by
6059 its equality to -1 not by it being negative.
6060 * remote-utils.c (remote_open): Likewise.
6061
6062 2010-05-23 Pedro Alves <pedro@codesourcery.com>
6063
6064 * config.h: Regenerate.
6065
6066 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6067
6068 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6069 doesn't provide PTRACE_GET_THREAD_AREA.
6070
6071 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6072
6073 * linux-m68k-low.c: Include <asm/ptrace.h>
6074 (ps_get_thread_area): Implement.
6075
6076 2010-05-03 Doug Evans <dje@google.com>
6077
6078 * event-loop.c (struct callback_event): New struct.
6079 (callback_list): New global.
6080 (append_callback_event, delete_callback_event): New functions.
6081 (process_callback): New function.
6082 (start_event_loop): Call it.
6083 * remote-utils.c (NOT_SCHEDULED): Define.
6084 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6085 moved out of readchar.
6086 (readchar): Rewrite. Call reschedule before returning.
6087 (reset_readchar): New function.
6088 (remote_close): Call it.
6089 (process_remaining, reschedule): New functions.
6090 * server.h (callback_handler_func): New typedef.
6091 (append_callback_event, delete_callback_event): Declare.
6092
6093 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6094
6095 * proc-service.c (ps_pglobal_lookup): Use
6096 thread_db_look_up_one_symbol.
6097 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6098 parameter. Use it instead of all_symbols_looked_up.
6099 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6100 field.
6101 (all_symbols_looked_up): Don't declare.
6102 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6103 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6104 field.
6105 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6106 Set all_symbols_looked_up here.
6107 (thread_db_look_up_one_symbol): New.
6108 (thread_db_get_tls_address): Adjust.
6109 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6110 thread_db object on the heap, and tentatively set it in the
6111 process structure.
6112 (thread_db_init): Don't set all_symbols_looked_up here.
6113 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6114
6115 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6116
6117 * linux-low.c (linux_kill, linux_detach): Adjust.
6118 (status_pending_p_callback): Remove redundant statement. Check
6119 for !TARGET_WAITIKIND_IGNORE, instead of
6120 TARGET_WAITKIND_STOPPED.
6121 (handle_tracepoints): Make sure LWP is locked. Adjust.
6122 (linux_wait_for_event_1): Adjust.
6123 (linux_cancel_breakpoints): New.
6124 (unsuspend_one_lwp): New.
6125 (unsuspend_all_lwps): New.
6126 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6127 (send_sigstop_callback): Change return type to int, add new
6128 `except' parameter and handle it.
6129 (suspend_and_send_sigstop_callback): New.
6130 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6131 pass them down. If SUSPEND, also increment the lwp's suspend
6132 count.
6133 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6134 (need_step_over_p): Don't consider suspended LWPs.
6135 (start_step_over): Adjust.
6136 (proceed_one_lwp): Change return type to int, add new `except'
6137 parameter and handle it.
6138 (unsuspend_and_proceed_one_lwp): New.
6139 (proceed_all_lwps): Use find_inferior instead of
6140 for_each_inferior.
6141 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6142 also decrement the suspend count of LWPs. Pass `except' down,
6143 instead of hacking its suspend count.
6144 (linux_pause_all): Add `freeze' parameter. Adjust.
6145 (linux_unpause_all): New.
6146 (linux_target_ops): Install linux_unpause_all.
6147 * server.c (handle_status): Adjust.
6148 * target.h (struct target_ops): New fields `unpause_all' and
6149 `cancel_breakpoints'. Add new parameter to `pause_all'.
6150 (pause_all): Add new `freeze' parameter.
6151 (unpause_all): New.
6152 (cancel_breakpoints): New.
6153 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6154 cancel breakpoints.
6155 (cmd_qtstart): Pause threads.
6156 (stop_tracing): Pause threads, and cancel breakpoints.
6157 * win32-low.c (win32_target_ops): Adjust.
6158
6159 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6160
6161 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6162 the inferior right away from here...
6163 (linux_wait_1): ... to here, and adjust to check the thread's
6164 last_resume_kind instead of the lwp's step or stop_expected flags.
6165
6166 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6167
6168 * README: Use consistent `GDB' and `GDBserver' spellings.
6169
6170 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6171
6172 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6173 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6174 (linux_detach_one_lwp): Assume the lwp is stopped.
6175 (any_thread_of): Delete.
6176 (linux_detach): Stop all lwps here. Don't blindly delete all
6177 breakpoints.
6178 (delete_lwp_callback): New.
6179 (linux_mourn): Delete all lwps of the process that is gone.
6180 (linux_wait_1): Don't delete the last lwp of the process here.
6181 * mem-break.h (mark_breakpoints_out): Declare.
6182 * mem-break.c (mark_breakpoints_out): New.
6183 (free_all_breakpoints): Use it.
6184 * server.c (handle_target_event): If the process is gone, mark
6185 breakpoints out.
6186 * thread-db.c (struct thread_db) <create_bp>: New field.
6187 (thread_db_enable_reporting): Fix prototype. Store a thread event
6188 breakpoint reference in the thread_db struct.
6189 (thread_db_load_search): Clear the thread_db object.
6190 (try_thread_db_load_1): Ditto.
6191 (switch_to_process): New.
6192 (disable_thread_event_reporting): Use it.
6193 (remove_thread_event_breakpoints): New.
6194 (thread_db_detach, thread_db_mourn): Use it.
6195
6196 2010-05-01 Pedro Alves <pedro@codesourcery.com>
6197
6198 * linux-low.c (linux_enable_event_reporting): New.
6199 (linux_wait_for_event_1, handle_extended_wait): Use it.
6200
6201 2010-04-30 Pedro Alves <pedro@codesourcery.com>
6202
6203 * linux-low.c (linux_kill_one_lwp, linux_kill)
6204 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6205 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6206 SIGSTOP even if the LWP is stopped.
6207 (send_sigstop_callback): New.
6208 (stop_all_lwps): Use send_sigstop_callback instead.
6209 (linux_resume_one_thread): Adjust.
6210 (proceed_one_lwp): Still proceed an LWP that the client has
6211 requested to stop, if we haven't reported it as stopped yet. Make
6212 sure that LWPs the client want stopped, have a pending SIGSTOP.
6213
6214 2010-04-26 Doug Evans <dje@google.com>
6215
6216 * server.c (handle_general_set): Make static.
6217
6218 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6219 Print received char after testing for error/eof instead of before.
6220 (input_interrupt): Tweak comment.
6221
6222 2010-04-23 Doug Evans <dje@google.com>
6223
6224 * server.c (start_inferior): Print inferior argv if --debug.
6225
6226 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6227
6228 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6229 * nto-x86-low.c: Include server.h
6230
6231 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6232
6233 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6234 be consistent with other sources of this directory.
6235 (init_registers_amd64): Correct name of source file of this function
6236 in the comment.
6237
6238 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6239
6240 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6241 64-bit executables.
6242
6243 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6244
6245 * win32-i386-low.c: Add 64-bit support.
6246 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6247 (init_registers_amd64): Declare.
6248 (mappings): Add 64-bit version of array.
6249 (init_windows_x86): New function.
6250 (the_low_target): Change init_arch field to init_windows_x86.
6251
6252 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6253
6254 * win32-low.c: Adapt to support also 64-bit architecture.
6255 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6256 (get_image_name): Use SIZE_T type for local variable `done'.
6257 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6258 (toolhelp_get_dll_name): Idem.
6259 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6260 Use uintptr_t typecast to avoid warning.
6261 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6262 (handle_exception): Use phex_nz to avoid warning.
6263 (win32_wait): Remove unused local variable `process'.
6264
6265 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6266
6267 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6268 `amd64-avx.o'.
6269
6270 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6271
6272 * configure.ac: Use `ws2_32' library for srv_mingw.
6273 * configure: Regenerate.
6274 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6275 * remote-utils.c: Likewise.
6276
6277 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6278
6279 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6280 if __x86_64__ is defined.
6281
6282 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6283
6284 * configure: Regenerate.
6285
6286 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6287
6288 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6289 * target.h (target_ops): New get_tib_address field.
6290 * win32-low.h (win32_thread_info): Add thread_local_base field.
6291 * win32-low.c (child_add_thread): Add tlb argument.
6292 Set thread_local_base field to TLB.
6293 (get_child_debug_event): Adapt to child_add_thread change.
6294 (win32_get_tib_address): New function.
6295 (win32_target_ops): Set get_tib_address field to
6296 win32_get_tib_address.
6297 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6298
6299 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6300
6301 * linux-low.c (linux_mourn): Also remove the process.
6302 * server.c (handle_target_event): Don't remove the process here.
6303 * nto-low.c (nto_mourn): New.
6304 (nto_target_ops): Install it.
6305 * spu-low.c (spu_mourn): New.
6306 (spu_target_ops): Install it.
6307 * win32-low.c (win32_mourn): New.
6308 (win32_target_ops): Install it.
6309
6310 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6311
6312 * server.h (buffer_xml_printf): Remove redundant `;'.
6313
6314 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6315
6316 * regcache.c (set_register_cache): Invalidate regcaches before
6317 changing the register cache layout.
6318 (regcache_invalidate_one): Allow a NULL regcache.
6319 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6320 regcaches before changing the register cache layout or the target
6321 regsets.
6322
6323 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6324
6325 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6326 variable warning on Linux/x86-64.
6327
6328 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6329
6330 GDBserver disconnected tracing support.
6331
6332 * linux-low.c (linux_remove_process): Delete.
6333 (add_lwp): Don't set last_resume_kind here.
6334 (linux_kill): Use `mourn'.
6335 (linux_detach): Use `thread_db_detach', and `mourn'.
6336 (linux_mourn): New.
6337 (linux_attach_lwp_1): Adjust comment.
6338 (linux_attach): last_resume_kind moved the thread_info; adjust.
6339 (status_pending_p_callback): Adjust.
6340 (linux_wait_for_event_1): Adjust.
6341 (count_events_callback, select_singlestep_lwp_callback)
6342 (select_event_lwp_callback, cancel_breakpoints_callback)
6343 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6344 (proceed_one_lwp): Adjust.
6345 (linux_async): Add debug output.
6346 (linux_thread_stopped): New.
6347 (linux_pause_all): New.
6348 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6349 linux_pause_all.
6350 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6351 (thread_db_free): Delete declaration.
6352 (thread_db_detach, thread_db_mourn): Declare.
6353 * thread-db.c (thread_db_init): Use thread_db_mourn.
6354 (thread_db_free): Delete, split in two.
6355 (disable_thread_event_reporting): New.
6356 (thread_db_detach): New.
6357 (thread_db_mourn): New.
6358
6359 * server.h (struct thread_info) <last_resume_kind>: New field.
6360 <attached>: Add comment.
6361 <gdb_detached>: New field.
6362 (handler_func): Change return type to int.
6363 (handle_serial_event, handle_target_event): Ditto.
6364 (gdb_connected): Declare.
6365 (tracing): Delete.
6366 (disconnected_tracing): Declare.
6367 (stop_tracing): Declare.
6368
6369 * server.c (handle_query) <qSupported>: Report support for
6370 disconnected tracing.
6371 (queue_stop_reply_callback): Account for running threads.
6372 (gdb_wants_thread_stopped): New.
6373 (gdb_wants_all_threads_stopped): New.
6374 (gdb_reattached_process): New.
6375 (handle_status): Clear the `gdb_detached' flag of all processes.
6376 In all-stop, stop all threads.
6377 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6378 (process_serial_event): If the remote connection breaks, or if an
6379 exit was forced with "monitor exit", force an event loop exit.
6380 Handle disconnected tracing on detach.
6381 (handle_serial_event): Adjust.
6382 (handle_target_event): If GDB isn't connected, forward events back
6383 to the inferior, unless the last process exited, in which case,
6384 exit gdbserver. Adjust interface.
6385
6386 * remote-utils.c (remote_open): Don't block in accept. Instead
6387 register an event loop source on the listen socket file
6388 descriptor. Refactor bits into ...
6389 (listen_desc): ... this new global.
6390 (gdb_connected): ... this new function.
6391 (enable_async_notification): ... this new function.
6392 (handle_accept_event): ... this new function.
6393 (remote_close): Clear remote_desc.
6394
6395 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6396
6397 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6398 New fields.
6399 (mourn_inferior): Define.
6400 (target_process_qsupported): Avoid the dangling else problem.
6401 (thread_stopped): Define.
6402 (pause_all): Define.
6403 (target_waitstatus_to_string): Declare.
6404 * target.c (target_waitstatus_to_string): New.
6405
6406 * tracepoint.c (tracing): Make extern.
6407 (disconnected_tracing): New.
6408 (stop_tracing): Make extern. Handle tracing stops due to GDB
6409 disconnecting.
6410 (cmd_qtdisconnected): New.
6411 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6412 (handle_tracepoint_general_set): Handle QTDisconnected.
6413
6414 * event-loop.c (event_handler_func): Change return type to int.
6415 (process_event): Bail out if the event handler wants the event
6416 loop to stop.
6417 (handle_file_event): Ditto.
6418 (start_event_loop): Bail out if the event handler wants the event
6419 loop to stop.
6420
6421 * nto-low.c (nto_target_ops): Adjust.
6422 * spu-low.c (spu_wait): Don't remove the process here.
6423 (spu_target_ops): Adjust.
6424 * win32-low.c (win32_wait): Don't remove the process here.
6425 (win32_target_ops): Adjust.
6426
6427 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6428
6429 * regcache.c (realloc_register_cache): Invalidate inferior's
6430 regcache before recreating it.
6431
6432 2010-04-09 Pedro Alves <pedro@codesourcery.com>
6433
6434 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6435
6436 2010-04-09 Stan Shebs <stan@codesourcery.com>
6437 Pedro Alves <pedro@codesourcery.com>
6438
6439 * server.h (LONGEST): New.
6440 (struct thread_info) <while_stepping>: New field.
6441 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6442 Declare.
6443 (initialize_tracepoint, handle_tracepoint_general_set)
6444 (handle_tracepoint_query, tracepoint_finished_step)
6445 (tracepoint_was_hit, release_while_stepping_state_list):
6446 (current_traceframe): Declare.
6447 * server.c (handle_general_set): Handle tracepoint packets.
6448 (read_memory): New.
6449 (write_memory): New.
6450 (handle_search_memory_1): Use read_memory.
6451 (handle_query): Report support for conditional tracepoints, trace
6452 state variables, and tracepoint sources. Handle tracepoint
6453 queries.
6454 (main): Initialize the tracepoints module.
6455 (process_serial_event): Handle traceframe reads/writes.
6456
6457 * linux-low.c (handle_tracepoints): New.
6458 (linux_wait_1): Call it.
6459 (linux_resume_one_lwp): Handle while-stepping.
6460 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6461 (linux_target_ops): Install them.
6462 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6463 New field.
6464 * linux-x86-low.c (x86_supports_tracepoints): New.
6465 (the_low_target). Install it.
6466
6467 * mem-break.h (delete_breakpoint): Declare.
6468 * mem-break.c (delete_breakpoint): Make external.
6469
6470 * target.h (struct target_ops): Add `supports_tracepoints',
6471 `read_pc', and `write_pc' fields.
6472 (target_supports_tracepoints): Define.
6473 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6474 (phex_nz): New.
6475
6476 * regcache.h (struct regcache) <registers_owned>: New field.
6477 (init_register_cache, regcache_cpy): Declare.
6478 (regcache_read_pc, regcache_write_pc): Declare.
6479 (register_cache_size): Declare.
6480 (supply_regblock): Declare.
6481 * regcache.c (init_register_cache): New.
6482 (new_register_cache): Use it.
6483 (regcache_cpy): New.
6484 (register_cache_size): New.
6485 (supply_regblock): New.
6486 (regcache_read_pc, regcache_write_pc): New.
6487
6488 * tracepoint.c: New.
6489
6490 * Makefile.in (OBS): Add tracepoint.o.
6491 (tracepoint.o): New rule.
6492
6493 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6494
6495 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6496 (i386-mmx.o): New.
6497 (i386-mmx.c): Likewise.
6498 (i386-mmx-linux.o): Likewise.
6499 (i386-mmx-linux.c): Likewise.
6500
6501 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6502 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6503 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6504 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6505
6506 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6507 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6508 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6509
6510 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6511
6512 * Makefile.in (clean): Updated.
6513 (i386-avx.o): New.
6514 (i386-avx.c): Likewise.
6515 (i386-avx-linux.o): Likewise.
6516 (i386-avx-linux.c): Likewise.
6517 (amd64-avx.o): Likewise.
6518 (amd64-avx.c): Likewise.
6519 (amd64-avx-linux.o): Likewise.
6520 (amd64-avx-linux.c): Likewise.
6521
6522 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6523 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6524 (srv_amd64_regobj): Add amd64-avx.o.
6525 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6526 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6527 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6528 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6529 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6530 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6531 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6532
6533 * i387-fp.c: Include "i386-xstate.h".
6534 (i387_xsave): New.
6535 (i387_cache_to_xsave): Likewise.
6536 (i387_xsave_to_cache): Likewise.
6537 (x86_xcr0): Likewise.
6538
6539 * i387-fp.h (i387_cache_to_xsave): Likewise.
6540 (i387_xsave_to_cache): Likewise.
6541 (x86_xcr0): Likewise.
6542
6543 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6544 * linux-crisv32-low.c (target_regsets): Likewise.
6545 * linux-m68k-low.c (target_regsets): Likewise.
6546 * linux-mips-low.c (target_regsets): Likewise.
6547 * linux-ppc-low.c (target_regsets): Likewise.
6548 * linux-s390-low.c (target_regsets): Likewise.
6549 * linux-sh-low.c (target_regsets): Likewise.
6550 * linux-sparc-low.c (target_regsets): Likewise.
6551 * linux-xtensa-low.c (target_regsets): Likewise.
6552
6553 * linux-low.c: Include <sys/uio.h>.
6554 (regsets_fetch_inferior_registers): Support nt_type.
6555 (regsets_store_inferior_registers): Likewise.
6556 (linux_process_qsupported): New.
6557 (linux_target_ops): Add linux_process_qsupported.
6558
6559 * linux-low.h (regset_info): Add nt_type.
6560 (linux_target_ops): Add process_qsupported.
6561
6562 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6563 and <sys/uio.h>.
6564 (init_registers_i386_avx_linux): New.
6565 (init_registers_amd64_avx_linux): Likewise.
6566 (xmltarget_i386_linux_no_xml): Likewise.
6567 (xmltarget_amd64_linux_no_xml): Likewise.
6568 (PTRACE_GETREGSET): Likewise.
6569 (PTRACE_SETREGSET): Likewise.
6570 (x86_fill_xstateregset): Likewise.
6571 (x86_store_xstateregset): Likewise.
6572 (use_xml): Likewise.
6573 (x86_linux_update_xmltarget): Likewise.
6574 (x86_linux_process_qsupported): Likewise.
6575 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6576 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6577 init_registers_i386_linux here. Call
6578 x86_linux_update_xmltarget.
6579 (the_low_target): Add x86_linux_process_qsupported.
6580
6581 * server.c (handle_query): Call target_process_qsupported.
6582
6583 * target.h (target_ops): Add process_qsupported.
6584 (target_process_qsupported): New.
6585
6586 2010-04-03 Pedro Alves <pedro@codesourcery.com>
6587
6588 * inferiors.c (add_thread): Set last_status kind to
6589 TARGET_WAITKIND_IGNORE.
6590 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6591 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6592 (linux_wait_1): Move `thread' local definition to block that uses
6593 it. Don't NULL initialize `event_child'.
6594 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6595 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6596 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6597
6598 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6599
6600 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6601 an extended waitstatus, or by a watchpoint.
6602 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6603 thread was stepping or has been stopped by a watchpoint.
6604
6605 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6606
6607 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6608 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6609 of another, then delete the previous, and validate all
6610 breakpoints.
6611 (validate_inserted_breakpoint): New.
6612 (delete_disabled_breakpoints): New.
6613 (validate_breakpoints): New.
6614 (check_mem_read): Validate breakpoints before trusting their
6615 shadow. Delete disabled breakpoints.
6616 (check_mem_write): Validate breakpoints before trusting they
6617 should be inserted. Delete disabled breakpoints.
6618 * mem-break.h (validate_breakpoints):
6619 * server.c (handle_query): Validate breakpoints when we see a
6620 qSymbol query.
6621
6622 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6623
6624 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6625 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6626 if we could tell there's a GDB breakpoint at stop_pc.
6627 (need_step_over_p): Don't do a step over if we find a GDB
6628 breakpoint at the resume PC.
6629
6630 * mem-break.c (struct raw_breakpoint): New.
6631 (enum bkpt_type): New type `gdb_breakpoint'.
6632 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6633 fields. New field `raw'.
6634 (find_raw_breakpoint_at): New.
6635 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6636 breakpoint instead.
6637 (set_breakpoint_at): Adjust.
6638 (delete_raw_breakpoint): New.
6639 (release_breakpoint): New.
6640 (delete_breakpoint): Rename to...
6641 (delete_breakpoint_1): ... this. Add proc parameter. Use
6642 release_breakpoint. Return ENOENT.
6643 (delete_breakpoint): Reimplement.
6644 (find_breakpoint_at): Delete.
6645 (find_gdb_breakpoint_at): New.
6646 (delete_breakpoint_at): Delete.
6647 (set_gdb_breakpoint_at): New.
6648 (delete_gdb_breakpoint_at): New.
6649 (gdb_breakpoint_here): New.
6650 (set_reinsert_breakpoint): Use release_breakpoint.
6651 (uninsert_breakpoint): Rename to ...
6652 (uninsert_raw_breakpoint): ... this.
6653 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6654 (reinsert_raw_breakpoint): Change parameter type to
6655 raw_breakpoint.
6656 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6657 instead.
6658 (check_breakpoints): Adjust. Use release_breakpoint.
6659 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6660 (breakpoint_inserted_here): Ditto.
6661 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6662 Don't trust the breakpoint's shadow if it is not inserted.
6663 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6664 (delete_all_breakpoints): Adjust.
6665 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6666 use delete_breakpoint_1.
6667
6668 * mem-break.h (breakpoints_supported): Delete declaration.
6669 (set_gdb_breakpoint_at): Declare.
6670 (gdb_breakpoint_here): Declare.
6671 (delete_breakpoint_at): Delete.
6672 (delete_gdb_breakpoint_at): Declare.
6673
6674 * server.h (struct raw_breakpoint): Forward declare.
6675 (struct process_info): New field `raw_breakpoints'.
6676
6677 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6678 breakpoints.
6679
6680 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6681
6682 * linux-low.c (status_pending_p_callback): Fix comment.
6683 (linux_wait_for_event_1): Move most of the internal breakpoint
6684 handling from here...
6685 (linux_wait_1): ... to here.
6686 (count_events_callback): New.
6687 (select_singlestep_lwp_callback): New.
6688 (select_event_lwp_callback): New.
6689 (cancel_breakpoints_callback): New.
6690 (select_event_lwp): New.
6691 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6692 priority to all LWPs that have had events that should be reported
6693 to the client. Cancel breakpoints when about to reporting the
6694 event to the client, not while stopping lwps. No longer cancel
6695 finished single-steps here.
6696 (cancel_finished_single_step): Delete.
6697 (cancel_finished_single_steps): Delete.
6698
6699 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6700
6701 * mem-break.c (enum bkpt_type): New.
6702 (struct breakpoint): New field `type'.
6703 (set_breakpoint_at): Change return type to struct breakpoint
6704 pointer. Set type to `other_breakpoint' by default.
6705 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6706 in the breakpoint list.
6707 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6708 (reinsert_breakpoint): Rename to ...
6709 (reinsert_raw_breakpoint): ... this.
6710 (reinsert_breakpoints_at): Adjust.
6711 * mem-break.h (struct breakpoint): Declare.
6712 (set_breakpoint_at): Change return type to struct breakpoint
6713 pointer.
6714
6715 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6716
6717 * server.c (handle_query): Assign, not compare.
6718
6719 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6720
6721 Teach linux gdbserver to step-over-breakpoints.
6722
6723 * linux-low.c (can_hardware_single_step): New.
6724 (supports_breakpoints): New.
6725 (handle_extended_wait): If stopping threads, read the stop pc of
6726 the new cloned LWP.
6727 (get_pc): New.
6728 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6729 low target doesn't support retrieving the PC.
6730 (add_lwp): Set last_resume_kind to resume_continue.
6731 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6732 (linux_attach): Don't clear stop_expected. Set the lwp's
6733 last_resume_kind to resume_stop.
6734 (linux_detach_one_lwp): Don't check for removed breakpoints.
6735 (check_removed_breakpoint): Delete.
6736 (status_pending_p): Rename to ...
6737 (status_pending_p_callback): ... this. Don't check for removed
6738 breakpoints. Don't consider threads that are stopped from GDB's
6739 perspective.
6740 (linux_wait_for_lwp): Always read the stop_pc here.
6741 (cancel_breakpoint): New.
6742 (step_over_bkpt): New global.
6743 (linux_wait_for_event_1): Implement stepping over breakpoints.
6744 (gdb_wants_lwp_stopped): New.
6745 (gdb_wants_all_stopped): New.
6746 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6747 single-step traps here. Store the thread's last reported target
6748 wait status.
6749 (send_sigstop): Don't clear stop_expected. Always set it,
6750 instead.
6751 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6752 (cancel_finished_single_step): New.
6753 (cancel_finished_single_steps): New.
6754 (wait_for_sigstop): Don't cancel finished single-step traps here.
6755 (linux_resume_one_lwp): Don't check for removed breakpoints.
6756 Don't set `step' on non-hardware step archs.
6757 (linux_set_resume_request): Ignore resume_stop requests if already
6758 stopping or stopped. Set the lwp's last_resume_kind.
6759 (resume_status_pending_p): Don't check for removed breakpoints.
6760 (need_step_over_p): New.
6761 (start_step_over): New.
6762 (finish_step_over): New.
6763 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6764 requests. Clear the thread's last reported target waitstatus.
6765 Don't use the `suspended' flag. Don't consider pending breakpoints.
6766 (linux_resume): Start a step-over if necessary.
6767 (proceed_one_lwp): New.
6768 (proceed_all_lwps): New.
6769 (unstop_all_lwps): New.
6770 * linux-low.h (struct lwp_info): Rewrite comment for the
6771 `suspended' flag. Add the `stop_pc' field. Delete the
6772 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6773 Add `'last_resume_kind' and `need_step_over' fields.
6774 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6775 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6776 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6777 (set_raw_breakpoint_at): New.
6778 (set_breakpoint_at): Rewrite to use it.
6779 (reinsert_breakpoint_handler): Delete.
6780 (set_reinsert_breakpoint): New.
6781 (reinsert_breakpoint_by_bp): Delete.
6782 (delete_reinsert_breakpoints): New.
6783 (uninsert_breakpoint): Rewrite.
6784 (uninsert_breakpoints_at): New.
6785 (reinsert_breakpoint): Rewrite.
6786 (reinsert_breakpoints_at): New.
6787 (check_breakpoints): Rewrite.
6788 (breakpoint_here): New.
6789 (breakpoint_inserted_here): New.
6790 (check_mem_read): Adjust.
6791 * mem-break.h (breakpoints_supported, breakpoint_here)
6792 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6793 (reinsert_breakpoint_by_bp): Delete declaration.
6794 (delete_reinsert_breakpoints): Declare.
6795 (reinsert_breakpoint): Delete declaration.
6796 (reinsert_breakpoints_at): Declare.
6797 (uninsert_breakpoint): Delete declaration.
6798 (uninsert_breakpoints_at): Declare.
6799 (check_breakpoints): Adjust prototype.
6800 * server.h: Adjust include order.
6801 (struct thread_info): Declare here. Add a `last_status' field.
6802
6803 2010-03-23 Michael Snyder <msnyder@vmware.com>
6804
6805 * server.c (crc32): New function.
6806 (handle_query): Add handling for 'qCRC:' request.
6807
6808 2010-03-23 Pedro Alves <pedro@codesourcery.com>
6809
6810 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6811 lwp had been stopped by a watchpoint.
6812
6813 2010-03-16 Pedro Alves <pedro@codesourcery.com>
6814
6815 * server.h (internal_error): Declare.
6816 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6817 * utils.c (internal_error): New function.
6818
6819 2010-03-15 Andreas Schwab <schwab@redhat.com>
6820
6821 * configure.srv: Fix typo setting srv_regobj.
6822
6823 2010-03-15 Pedro Alves <pedro@codesourcery.com>
6824
6825 * linux-low.c (fetch_register): Avoid passing a non string literal
6826 format to `error'.
6827 (usr_store_inferior_registers): Ditto.
6828
6829 2010-03-14 Pedro Alves <pedro@codesourcery.com>
6830
6831 * linux-low.c (linux_write_memory): Bail out early if peeking
6832 memory failed.
6833
6834 2010-03-14 Pedro Alves <pedro@codesourcery.com>
6835
6836 * linux-low.h (struct lwp_info): New fields
6837 `stopped_by_watchpoint' and `stopped_data_address'.
6838 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6839 here, and cache them in the lwp object.
6840 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6841 directly.
6842 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6843 field.
6844 (linux_stopped_by_watchpoint): Rewrite.
6845 (linux_stopped_data_address): Rewrite.
6846
6847 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
6848
6849 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6850 switching the current inferior, not before.
6851
6852 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6853
6854 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6855 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6856 i386-linux.c and amd64-linux.c.
6857 (reg-i386.o): Removed.
6858 (reg-i386.c): Likewise.
6859 (reg-i386-linux.o): Likewise.
6860 (reg-i386-linux.c): Likewise.
6861 (reg-x86-64.o): Likewise.
6862 (reg-x86-64.c): Likewise.
6863 (reg-x86-64-linux.o): Likewise.
6864 (reg-x86-64-linux.c): Likewise.
6865 (i386.o): New.
6866 (i386.c): Likewise.
6867 (i386-linux.o): Likewise.
6868 (i386-linux.c): Likewise.
6869 (amd64.o): Likewise.
6870 (amd64.c): Likewise.
6871 (amd64-linux.o): Likewise.
6872 (amd64-linux.c): Likewise.
6873
6874 * configure.srv (srv_i386_regobj): New.
6875 (srv_i386_linux_regobj): Likewise.
6876 (srv_amd64_regobj): Likewise.
6877 (srv_amd64_linux_regobj): Likewise.
6878 (srv_i386_32bit_xmlfiles): Likewise.
6879 (srv_i386_64bit_xmlfiles): Likewise.
6880 (srv_i386_xmlfiles): Likewise.
6881 (srv_amd64_xmlfiles): Likewise.
6882 (srv_i386_linux_xmlfiles): Likewise.
6883 (srv_amd64_linux_xmlfiles): Likewise.
6884 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
6885 srv_xmlfiles to $srv_i386_xmlfiles.
6886 (i[34567]86-*-mingw32ce*): Likewise.
6887 (i[34567]86-*-mingw*): Likewise.
6888 (i[34567]86-*-nto*): Likewise.
6889 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6890 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
6891 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6892 (x86_64-*-linux*): Likewise.
6893
6894 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6895 (init_registers_amd64_linux): New.
6896 (x86_arch_setup): Replace init_registers_x86_64_linux with
6897 init_registers_amd64_linux.
6898
6899 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
6900
6901 * configure.ac: Check for libdl. If it is not available link against
6902 static libthread_db.
6903 * configure: Regenerate.
6904
6905 2010-02-22 Pedro Alves <pedro@codesourcery.com>
6906
6907 PR9605
6908
6909 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
6910 handing a read watchpoint.
6911 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
6912
6913 2010-02-12 Doug Evans <dje@google.com>
6914
6915 * linux-low.c (linux_supports_tracefork_flag): Document.
6916 (linux_look_up_symbols): Add comment.
6917
6918 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
6919
6920 * regcache.c (supply_register): Clear regcache if buf is NULL.
6921
6922 2010-02-02 Nicolas Roche <roche@sourceware.org>
6923 Joel Brobecker <brobecker@adacore.com>
6924
6925 * inferiors.c (find_inferior): Add function documentation.
6926 (unloaded_dll): Handle the case where the unloaded dll has not
6927 been previously registered in the dll list.
6928
6929 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6930
6931 * linux-arm-low.c (thumb_breakpoint_len): Delete.
6932 (thumb2_breakpoint): New.
6933 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
6934
6935 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6936
6937 * linux-low.c (get_stop_pc): Check for SIGTRAP.
6938 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
6939 breakpoints.
6940
6941 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6942
6943 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
6944
6945 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6946
6947 * linux-s390-low.c (s390_collect_ptrace_register)
6948 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
6949
6950 2010-01-21 Doug Evans <dje@google.com>
6951
6952 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
6953 (PTRACE_ARG4_TYPE): New macro.
6954 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
6955 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
6956 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
6957 (usr_store_inferior_registers): Ditto.
6958 (linux_read_memory, linux_write_memory): Ditto.
6959 (linux_test_for_tracefork): Ditto.
6960
6961 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
6962 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
6963
6964 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6965
6966 * proc-service.c (ps_lgetregs): Don't refetch registers from the
6967 target.
6968
6969 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6970
6971 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
6972 prototype to take a regcache. Adjust.
6973
6974 2010-01-20 Pedro Alves <pedro@codesourcery.com>
6975
6976 * regcache.h (struct thread_info): Forward declare.
6977 (struct regcache): New.
6978 (new_register_cache): Adjust prototype.
6979 (get_thread_regcache): Declare.
6980 (free_register_cache): Adjust prototype.
6981 (registers_to_string, registers_from_string): Ditto.
6982 (supply_register, supply_register_by_name, collect_register)
6983 (collect_register_as_string, collect_register_by_name): Ditto.
6984 * regcache.c (struct inferior_regcache_data): Delete.
6985 (get_regcache): Rename to ...
6986 (get_thread_regcache): ... this. Adjust. Switch inferior before
6987 fetching registers.
6988 (regcache_invalidate_one): Adjust.
6989 (regcache_invalidate): Fix prototype.
6990 (new_register_cache): Return the new register cache.
6991 (free_register_cache): Change prototype.
6992 (realloc_register_cache): Adjust.
6993 (registers_to_string): Change prototype to take a regcache. Adjust.
6994 (registers_from_string): Ditto.
6995 (register_data): Ditto.
6996 (supply_register): Ditto.
6997 (supply_register_by_name): Ditto.
6998 (collect_register): Ditto.
6999 (collect_register_as_string): Ditto.
7000 (collect_register_by_name): Ditto.
7001 * server.c (process_serial_event): Adjust.
7002 * linux-low.h (regset_fill_func, regset_store_func): Change
7003 prototype.
7004 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7005 Change prototype.
7006 * linux-low.c (get_stop_pc): Adjust.
7007 (check_removed_breakpoint): Adjust.
7008 (linux_wait_for_event): Adjust.
7009 (linux_resume_one_lwp): Adjust.
7010 (fetch_register): Add regcache parameter. Adjust.
7011 (usr_store_inferior_registers): Ditto.
7012 (regsets_fetch_inferior_registers): Ditto.
7013 (regsets_store_inferior_registers): Ditto.
7014 (linux_fetch_registers, linux_store_registers): Ditto.
7015 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7016 regcache. Adjust.
7017 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7018 Ditto.
7019 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7020 prototype to take a regcache.
7021 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7022 * remote-utils.c (convert_ascii_to_int, outreg)
7023 (prepare_resume_reply): Change prototype to take a regcache.
7024 Adjust.
7025 * target.h (struct target_ops) <fetch_registers, store_registers>:
7026 Change prototype to take a regcache.
7027 (fetch_inferior_registers, store_inferior_registers): Change
7028 prototype to take a regcache. Adjust.
7029 * proc-service.c (ps_lgetregs): Adjust.
7030 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7031 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7032 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7033 take a regcache. Adjust.
7034 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7035 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7036 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7037 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7038 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7039 (cris_cannot_fetch_register):
7040 (cris_breakpoint_at): Change prototype to take a regcache.
7041 Adjust.
7042 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7043 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7044 to take a regcache. Adjust.
7045 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7046 Adjust.
7047 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7048 take a regcache. Adjust.
7049 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7050 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7051 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7052 * linux-mips-low.c (mips_get_pc):
7053 (mips_set_pc): Change prototype to take a regcache. Adjust.
7054 (mips_reinsert_addr): Adjust.
7055 (mips_collect_register): Change prototype to take a regcache.
7056 Adjust.
7057 (mips_supply_register):
7058 (mips_collect_register_32bit, mips_supply_register_32bit)
7059 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7060 (mips_store_fpregset): Ditto.
7061 * linux-ppc-low.c (ppc_supply_ptrace_register)
7062 (ppc_supply_ptrace_register): Ditto.
7063 (parse_spufs_run): Adjust.
7064 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7065 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7066 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7067 take a regcache. Adjust.
7068 * linux-s390-low.c (s390_collect_ptrace_register)
7069 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7070 (s390_set_pc): Change prototype to take a regcache. Adjust.
7071 (s390_arch_setup): Adjust.
7072 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7073 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7074 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7075 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7076 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7077 regcache. Adjust.
7078 (sparc_breakpoint_at): Adjust.
7079 * linux-xtensa-low.c (xtensa_fill_gregset):
7080 (xtensa_store_gregset):
7081 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7082 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7083 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7084 prototype to take a regcache. Adjust.
7085 * win32-arm-low.c (arm_fetch_inferior_register)
7086 (arm_store_inferior_register): Change prototype to take a
7087 regcache. Adjust.
7088 * win32-i386-low.c (i386_fetch_inferior_register)
7089 (i386_store_inferior_register): Change prototype to take a
7090 regcache. Adjust.
7091 * win32-low.c (child_fetch_inferior_registers)
7092 (child_store_inferior_registers): Change prototype to take a
7093 regcache. Adjust.
7094 (win32_wait): Adjust.
7095 (win32_fetch_inferior_registers): Change prototype to take a
7096 regcache. Adjust.
7097 (win32_store_inferior_registers): Adjust.
7098 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7099 store_inferior_register>: Change prototype to take a regcache.
7100
7101 2010-01-20 Doug Evans <dje@google.com>
7102
7103 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7104 #ifdef.
7105 (linux_wait_for_event1, linux_init_signals): Ditto.
7106 (W_STOPCODE): Provide definition if missing.
7107
7108 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7109
7110 * linux-low.c (linux_core_of_thread): New.
7111 (compare_ints, show_process, list_threads): New.
7112 (linux_qxfer_osdata): Report threads and cores.
7113 (linux_target_op): Register linux_core_of_thread.
7114 * remote-utils.c (prepare_resume_reply): Report the core.
7115 (buffer_xml_printf): Support %d specifier.
7116 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7117 New.
7118 (handle_query): Handle qXfer:threads. Announce availability
7119 thereof.
7120 * target.h (struct target_ops): New field core_of_thread.
7121
7122 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7123
7124 * Makefile.in (clean): Remove new generated files.
7125 (reg-s390.o, reg-s390.c): Remove rules.
7126 (reg-s390x.o, reg-s390x.c): Likewise.
7127 (s390-linux32.o, s390-linux32.c): Add rules.
7128 (s390-linux64.o, s390-linux64.c): Likewise.
7129 (s390x-linux64.o, s390x-linux64.c): Likewise.
7130 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7131 * linux-s390-low.c: Include <elf.h>.
7132 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7133 (init_registers_s390): Remove prototype.
7134 (init_registers_s390x): Likewise.
7135 (init_registers_s390_linux32): Add prototype.
7136 (init_registers_s390_linux64): Likewise.
7137 (init_registers_s390x_linux64): Likewise.
7138 (s390_num_regs_3264): New define.
7139 (s390_regmap_3264): New global variable.
7140 (s390_cannot_fetch_register): Remove obsolete check.
7141 (s390_cannot_store_register): Likewise.
7142 (s390_collect_ptrace_register): Handle upper/lower register halves.
7143 (s390_supply_ptrace_register): Likewise.
7144 (s390_fill_gregset): Update to register number changes.
7145 (s390_get_hwcap): New routine.
7146 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7147 Install appropriate regmap and register set.
7148
7149 2010-01-01 Joel Brobecker <brobecker@adacore.com>
7150
7151 * server.c (gdbserver_version): Update copyright year to 2010.
7152 * gdbreplay.c (gdbreplay_version): Likewise.
7153
7154 2009-12-28 Doug Evans <dje@google.com>
7155
7156 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7157 elf/external.h. Include <elf.h> instead but only if necessary.
7158
7159 2009-12-28 Pedro Alves <pedro@codesourcery.com>
7160
7161 * linux-low.c (linux_remove_process): Remove `detaching'
7162 parameter. Don't release/detach from thread_db here.
7163 (linux_kill): Release/detach from thread_db here, ...
7164 (linux_detach): ... and here, before actually detaching.
7165 (linux_wait_1): ... and here, when a process exits.
7166 * thread-db.c (any_thread_of): New.
7167 (thread_db_free): Switch the current inferior to a thread of the
7168 passed in process.
7169
7170 2009-12-21 Doug Evans <dje@google.com>
7171
7172 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7173
7174 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7175 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7176 warning ifndef __NR_tkill. Move setting of errno there too.
7177 Delete unnecessary resetting of errno after syscall.
7178 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7179
7180 * configure.ac: Check for dladdr.
7181 * config.in: Regenerate.
7182 * configure: Regenerate.
7183 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7184 (try_thread_db_load): Update.
7185
7186 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7187
7188 2009-12-18 Doug Evans <dje@google.com>
7189
7190 * event-loop.c: Include unistd.h if it exists.
7191
7192 * linux-low.c (my_waitpid): Move definition away from being in
7193 between linux_tracefork_child/linux_test_for_tracefork.
7194
7195 * gdb_proc_service.h (psaddr_t): Fix type.
7196 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7197 signature to match glibc.
7198
7199 2009-12-16 Doug Evans <dje@google.com>
7200
7201 * linux-low.c (linux_read_memory): Fix argument to read.
7202
7203 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7204
7205 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7206 events, don't leave current_inferior pointing at null.
7207
7208 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7209
7210 * win32-low.c (LOG): Delete.
7211 (OUTMSG): Output to stderr.
7212 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7213 on compile time LOG macro.
7214 (win32_wait): Fix debug output.
7215
7216 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7217
7218 * win32-low.c (win32_add_one_solib): If the dll name is
7219 "ntdll.dll", prepend the system directory to the dll path.
7220
7221 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7222
7223 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7224
7225 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
7226 Vladimir Prus <vladimir@codesourcery.com>
7227
7228 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7229 * configure.ac: Check for __mcoldfire__ and set
7230 gdb_cv_m68k_is_coldfire.
7231 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7232 reg-cf.o and reg-m68k.o.
7233 * configure: Regenerated.
7234
7235 2009-11-16 Pedro Alves <pedro@codesourcery.com>
7236
7237 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7238 Pass it to thread_db_free.
7239 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7240 proper `detaching' argument to linux_remove_process.
7241 * linux-low.h (thread_db_free): Add `detaching' parameter.
7242 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7243 to thread_db_free.
7244 (thread_db_free): Add `detaching' parameter. Only
7245 call td_ta_clear_event if detaching from process.
7246
7247 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7248
7249 * thread-db.c (thread_db_free): Fix typo.
7250
7251 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7252
7253 PR gdb/10838
7254 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7255
7256 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7257
7258 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7259 with an i686 compiler.
7260 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7261 needed.
7262 * configure: Rebuilt.
7263
7264 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7265
7266 PR gdb/10783
7267
7268 * server.c (handle_search_memory_1): Correct read_addr initialization
7269 in loop for searching subsequent chunks.
7270
7271 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7272
7273 * configure.ac: New --with-libthread-db option.
7274 * thread-db.c: Allow direct dependence on libthread_db.
7275 (thread_db_free): Adjust.
7276 * config.in: Regenerate.
7277 * configure: Likewise.
7278
7279 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7280
7281 PR gdb/10757
7282 * thread-db.c (attach_thread): New function.
7283 (maybe_attach_thread): Return success/failure.
7284 (find_new_threads_callback): Adjust.
7285 (thread_db_find_new_threads): Loop until no new threads.
7286
7287 2009-10-13 Pedro Alves <pedro@codesourcery.com>
7288
7289 * proc-service.c (ps_lgetregs): Formatting.
7290
7291 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7292
7293 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7294 * configure.ac: Adjust.
7295 * linux-low.h (struct process_info_private): Move members to struct
7296 thread_db.
7297 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7298 * linux-low.c (linux_remove_process): Adjust.
7299 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7300 * server.c (handle_query): Move code ...
7301 (handle_monitor_command): ... here. New function.
7302 * target.h (struct target_ops): New member.
7303 * thread-db.c (struct thread_db): New.
7304 (libthread_db_search_path): New variable.
7305 (thread_db_create_event, thread_db_enable_reporting)
7306 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7307 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7308 (try_thread_db_load_1, dladdr_to_soname): New functions.
7309 (try_thread_db_load, thread_db_load_search): New functions.
7310 (thread_db_init): Search for libthread_db.
7311 (thread_db_free): New function.
7312 (thread_db_handle_monitor_command): Likewise.
7313 * config.in: Regenerate.
7314 * configure: Regenerate.
7315
7316 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7317
7318 * spu-low.c (spu_kill): Wait for inferior to terminate.
7319 Call clear_inferiors.
7320 (spu_detach): Call clear_inferiors.
7321
7322 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7323
7324 * aclocal.m4: Regenerate.
7325 * config.in: Likewise.
7326 * configure: Likewise.
7327
7328 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7329
7330 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7331 (parse_spufs_run): New function.
7332 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7333 (ppc_breakpoint_at): Handle SPU breakpoints.
7334
7335 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7336
7337 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7338 (SPUFS_MAGIC): Define.
7339 (spu_enumerate_spu_ids): New function.
7340 (linux_qxfer_spu): New function.
7341 (linux_target_ops): Install linux_qxfer_spu.
7342
7343 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7344
7345 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7346 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7347 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7348 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7349 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7350 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7351 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7352 (init_registers_powerpc_cell32l): Add prototype.
7353 (init_registers_powerpc_cell64l): Likewise.
7354 (ppc_arch_setup): Detect Cell/B.E. architecture.
7355
7356 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7357
7358 * Makefile.in (datarootdir): New variable.
7359
7360 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7361
7362 * linux-low.c (linux_write_memory): Update debugging output.
7363 * Makefile.in (clean): Add new descriptions.
7364 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7365 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7366 * configure.srv: Add new files for arm*-*-linux*.
7367 * linux-arm-low.c: Add new declarations.
7368 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7369 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7370 (HWCAP_VFPv3D16): New.
7371 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7372 instead of __IWMMXT__.
7373 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7374 (arm_arch_setup): New.
7375 (target_regsets): Remove #ifdef. Add VFP regset.
7376 (the_low_target): Use arm_arch_setup.
7377
7378 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7379
7380 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7381 the main thread again.
7382
7383 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7384
7385 Adding Neutrino gdbserver.
7386 * configure: Regenerated.
7387 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7388 * configure.srv (i[34567]86-*-nto*): New target.
7389 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7390 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7391 (nto_comctrl) [__QNX__]: New function.
7392 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7393
7394 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7395
7396 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7397 srv_tgtobj.
7398
7399 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7400 Pedro Alves <pedro@codesourcery.com>
7401
7402 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7403 don't support CONTEXT_EXTENDED_REGISTERS.
7404 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7405 (the_low_target): Install them.
7406 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7407 failing with ERROR_PIPE_NOT_CONNECTED.
7408
7409 2009-06-30 Doug Evans <dje@google.com>
7410 Pierre Muller <muller@ics.u-strasbg.fr>
7411
7412 Add h/w watchpoint support to x86-linux, win32-i386.
7413 * Makefile.in (SFILES): Add i386-low.c
7414 (i386_low_h): Define.
7415 (i386-low.o): Add dependencies.
7416 (linux-x86-low.o): Add i386-low.h dependency.
7417 (win32-i386-low.o): Ditto.
7418 * i386-low.c: New file.
7419 * i386-low.h: New file.
7420 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7421 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7422 * linux-low.c (linux_add_process): Initialize arch_private.
7423 (linux_remove_process): Free arch_private.
7424 (add_lwp): Initialize arch_private.
7425 (delete_lwp): Free arch_private.
7426 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7427 provided.
7428 * linux-low.h (process_info_private): New member arch_private.
7429 (lwp_info): New member arch_private.
7430 (linux_target_ops): New members new_process, new_thread,
7431 prepare_to_resume.
7432 (ptid_of): New macro.
7433 * linux-x86-low.c: Include stddef.h, i386-low.h.
7434 (arch_process_info): New struct.
7435 (arch_lwp_info): New struct.
7436 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7437 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7438 (i386_dr_low_get_status): New function.
7439 (x86_insert_point, x86_remove_point): New functions.
7440 (x86_stopped_by_watchpoint): New function.
7441 (x86_stopped_data_address): New function.
7442 (x86_linux_new_process, x86_linux_new_thread): New functions.
7443 (x86_linux_prepare_to_resume): New function.
7444 (the_low_target): Add entries for insert_point, remove_point,
7445 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7446 prepare_to_resume.
7447 * server.c (debug_hw_points): New global.
7448 (monitor_show_help): Document set debug-hw-points.
7449 (handle_query): Process "set debug-hw-points".
7450 * server.h (debug_hw_points): Declare.
7451 (paddress): Declare.
7452 * utils.c (NUMCELLS, CELLSIZE): New macros.
7453 (get_sell, xsnprintf, paddress): New functions.
7454 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7455 remove_point, stopped_by_watchpoint, stopped_data_address.
7456 * win32-i386-low.c: Include i386-low.h.
7457 (debug_reg_state): Replaces dr.
7458 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7459 (i386_dr_low_get_status): New function.
7460 (i386_insert_point, i386_remove_point): New functions.
7461 (i386_stopped_by_watchpoint): New function.
7462 (i386_stopped_data_address): New function.
7463 (i386_initial_stuff): Update.
7464 (get_thread_context,set_thread_context,i386_thread_added): Update.
7465 (the_low_target): Add entries for insert_point,
7466 remove_point, stopped_by_watchpoint, stopped_data_address.
7467 * win32-low.c (win32_insert_watchpoint): New function.
7468 (win32_remove_watchpoint): New function.
7469 (win32_stopped_by_watchpoint): New function.
7470 (win32_stopped_data_address): New function.
7471 (win32_target_ops): Add entries for insert_watchpoint,
7472 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7473 * win32-low.h (win32_target_ops): New members insert_point,
7474 remove_point, stopped_by_watchpoint, stopped_data_address.
7475
7476 2009-06-25 Pedro Alves <pedro@codesourcery.com>
7477
7478 * server.c (process_serial_event): Re-return unsupported, not
7479 error, if the type isn't recognized. Re-allow supporting only
7480 insert or remove packets. Also call require_running for
7481 breakpoints. Add missing break statement to default case. Tidy.
7482 * target.h (struct target_ops): Rename insert_watchpoint to
7483 insert_point, and remove_watchpoint to remove_point.
7484
7485 * linux-low.h (struct linux_target_ops): Likewise.
7486 * linux-low.c (linux_insert_watchpoint): Rename to ...
7487 (linux_insert_point): ... this. Adjust.
7488 (linux_remove_watchpoint): Rename to ...
7489 (linux_remove_point): ... this. Adjust.
7490 (linux_target_ops): Adjust.
7491 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7492 (cris_insert_point): ... this.
7493 (cris_remove_watchpoint): Rename to ...
7494 (cris_remove_point): ... this.
7495 (the_low_target): Adjust.
7496
7497 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7498
7499 * server.c (handle_v_kill): Pass signal_pid to
7500 kill_inferior if multi_process is zero.
7501
7502 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7503
7504 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7505 * target.h (target_ops): Comment for *_watchpoint to make it clear
7506 the functions can get types '0' and '1'.
7507
7508 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7509
7510 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7511 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7512 * regcache.c (get_regcache): Likewise.
7513 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7514 * win32-low.c (child_fetch_inferior_registers): Remove check for
7515 regno 0.
7516
7517 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7518 Pedro Alves <pedro@codesourcery.com>
7519
7520 * target.h (struct target_ops) <supports_multi_process>: New
7521 callback.
7522 (target_supports_multi_process): New.
7523 * server.c (handle_query): Even if GDB reports support, only
7524 enable multi-process if the target also supports it. Report
7525 multi-process support only if the target backend supports it.
7526 * linux-low.c (linux_supports_multi_process): New function.
7527 (linux_target_ops): Install it as target_supports_multi_process
7528 callback.
7529
7530 2009-05-24 Doug Evans <dje@google.com>
7531
7532 Global renaming of find_thread_pid to find_thread_ptid.
7533 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7534 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7535 All callers updated.
7536
7537 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7538 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7539 directly.
7540
7541 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7542 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7543 (linux_resume_one_lwp): Ditto.
7544
7545 2009-05-23 Doug Evans <dje@google.com>
7546
7547 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7548 from struct inferior_list_entry * to struct lwp_info *.
7549 All callers updated.
7550
7551 2009-05-13 Doug Evans <dje@google.com>
7552
7553 * linux-x86-low.c: Don't include assert.h.
7554 (x86_siginfo_fixup): Use fatal, not assert.
7555 (x86_arch_setup): Fix comment.
7556
7557 2009-05-12 Doug Evans <dje@google.com>
7558
7559 Biarch support for i386/amd64 gdbserver.
7560 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7561 Add linux-x86-low.c.
7562 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7563 (linux-x86-low.o): Add.
7564 * linux-x86-64-low.c: Delete.
7565 * linux-i386-low.c: Delete.
7566 * linux-x86-low.c: New file.
7567 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7568 linux-x86-low.o.
7569 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7570 linux-x86-low.o.
7571 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7572 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7573 (linux_child_pid_to_exec_file): New function.
7574 (elf_64_header_p, elf_64_file_p): New functions.
7575 (siginfo_fixup): New function.
7576 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7577 give target a chance to convert layout.
7578 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7579 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7580
7581 2009-05-07 Doug Evans <dje@google.com>
7582
7583 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7584 (regsets_store_inferior_registers): Ditto.
7585
7586 2009-05-06 Pedro Alves <pedro@codesourcery.com>
7587
7588 PR server/10048
7589
7590 * linux-low.c (must_set_ptrace_flags): Delete.
7591 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7592 of the global.
7593 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7594 `lwp->must_set_ptrace_flags' instead.
7595 (linux_wait_for_event_1): Set ptrace options here.
7596 (linux_wait_1): ... not here.
7597
7598 2009-04-30 Doug Evans <dje@google.com>
7599
7600 * inferiors.c (started_inferior_callback): New function.
7601 (attached_inferior_callback): New function.
7602 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7603 * server.c (print_started_pid, print_attached_pid): New functions.
7604 (detach_or_kill_for_exit): New function.
7605 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7606 * server.h (have_started_inferiors_p): Declare.
7607 (have_attached_inferiors_p): Declare.
7608
7609 * inferiors.c (remove_process): Fix memory leak, free process.
7610 * linux-low.c (linux_remove_process): New function.
7611 (linux_kill): Call it instead of remove_process.
7612 (linux_detach, linux_wait_1): Ditto.
7613
7614 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7615
7616 * configure.srv: Add x86 Windows CE target.
7617
7618 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7619
7620 * inferiors.c (get_thread_process): Make global.
7621 * server.h (get_thread_process): Add prototype.
7622 * thread-db.c (find_one_thread): Use get_thread_process
7623 instead of current_process.
7624 (thread_db_get_tls_address): Do not crash if called when
7625 thread layer is not yet initialized.
7626
7627 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7628
7629 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7630 * spu-low.c (current_tid): Rename to ...
7631 (current_ptid): ... this.
7632 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7633 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7634 ptid_get_lwp (current_ptid) instead of current_tid.
7635 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7636 instead of current_tid. Use find_process_pid to verify pid
7637 argument is valid. Pass proper argument to remove_process.
7638 (spu_thread_alive): Compare current_ptid instead of current_tid.
7639 (spu_resume): Likewise.
7640
7641 2009-04-02 Pedro Alves <pedro@codesourcery.com>
7642
7643 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7644 variable.
7645
7646 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7647
7648 Implement the multiprocess extensions, and add linux multiprocess
7649 support.
7650
7651 * server.h (ULONGEST): Declare.
7652 (struct ptid, ptid_t): New.
7653 (minus_one_ptid, null_ptid): Declare.
7654 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7655 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7656 (struct inferior_list_entry): Change `id' type from unsigned from
7657 to ptid_t.
7658 (struct sym_cache, struct breakpoint, struct
7659 process_info_private): Forward declare.
7660 (struct process_info): Declare.
7661 (current_process): Declare.
7662 (all_processes): Declare.
7663 (initialize_inferiors): Declare.
7664 (add_thread): Adjust to use ptid_t.
7665 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7666 (add_process, remove_process, find_thread_pid): Declare.
7667 (find_inferior_id): Adjust to use ptid_t.
7668 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7669 (multi_process): Declare.
7670 (push_event): Adjust to use ptid_t.
7671 (read_ptid, write_ptid): Declare.
7672 (prepare_resume_reply): Adjust to use ptid_t.
7673 (clear_symbol_cache): Declare.
7674 * inferiors.c (all_processes): New.
7675 (null_ptid, minus_one_ptid): New.
7676 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7677 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7678 (add_thread): Change unsigned long to ptid. Remove gdb_id
7679 parameter. Adjust.
7680 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7681 (gdb_id_to_thread): Rename to ...
7682 (find_thread_pid): ... this. Change unsigned long to ptid.
7683 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7684 (loaded_dll, pull_pid_from_list): Adjust.
7685 (add_process, remove_process, find_process_pid)
7686 (get_thread_process, current_process, initialize_inferiors): New.
7687 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7688 (struct target_waitstatus) <related_pid>: Ditto.
7689 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7690 return type to int.
7691 (struct target_ops) <join>: Add `pid' argument.
7692 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7693 (struct target_ops) <wait>: Add `ptid' field. Change return type
7694 to ptid.
7695 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7696 (mywait): Add `ptid' argument. Change return type to ptid_t.
7697 (target_pid_to_str): Declare.
7698 * target.c (set_desired_inferior): Adjust to use ptids.
7699 (mywait): Add new `ptid' argument. Adjust.
7700 (target_pid_to_str): New.
7701 * mem-break.h (free_all_breakpoints): Declare.
7702 * mem-break.c (breakpoints): Delelete.
7703 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7704 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7705 to use per-process breakpoint list.
7706 (free_all_breakpoints): New.
7707 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7708 (symbol_cache, all_symbols_looked_up): Delete.
7709 (hexchars): New.
7710 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7711 read_ptid): New.
7712 (prepare_resume_reply): Change ptid argument's type from unsigned
7713 long to ptid_t. Adjust. Implement W;process and X;process.
7714 (free_sym_cache, clear_symbol_cache): New.
7715 (look_up_one_symbol): Adjust to per-process symbol cache. *
7716 * server.c (cont_thread, general_thread, step_thread): Change type
7717 to ptid_t.
7718 (attached): Delete.
7719 (multi_process): New.
7720 (last_ptid): Change type to ptid_t.
7721 (struct vstop_notif) <ptid>: Change type to ptid_t.
7722 (queue_stop_reply, push_event): Change `ptid' argument's type to
7723 ptid_t.
7724 (discard_queued_stop_replies): Add `pid' argument.
7725 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7726 changes. Don't reference the `attached' global.
7727 (attach_inferior): Adjust to mywait interface changes.
7728 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7729 features. Handle and report "multiprocess+". Handle
7730 "qAttached:PID".
7731 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7732 changes.
7733 (handle_v_kill): New.
7734 (handle_v_stopped): Adjust to use target_pid_to_str.
7735 (handle_v_requests): Allow multiple attaches and runs when
7736 multiprocess extensions are in effect. Handle "vKill".
7737 (myresume): Adjust to use ptids.
7738 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7739 (handle_status): Adjust to discard_queued_stop_replies interface
7740 change.
7741 (first_thread_of, kill_inferior_callback)
7742 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7743 (main): Call initialize_inferiors. Adjust to use ptids, killing
7744 and detaching from all inferiors. Handle multiprocess packet
7745 variants.
7746 * linux-low.h: Include gdb_proc_service.h.
7747 (struct process_info_private): New.
7748 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7749 <lwpid_of>: Use ptid_get_lwp.
7750 (get_lwp_thread): Adjust.
7751 (struct lwp_info): Add `dead' member.
7752 (find_lwp_pid): Declare.
7753 * linux-low.c (thread_db_active): Delete.
7754 (new_inferior): Adjust comment.
7755 (inferior_pid): Delete.
7756 (linux_add_process): New.
7757 (handle_extended_wait): Adjust.
7758 (add_lwp): Change unsigned long to ptid.
7759 (linux_create_inferior): Add process to processes table. Adjust
7760 to use ptids. Don't set new_inferior here.
7761 (linux_attach_lwp): Rename to ...
7762 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7763 it. Adjust to use ptids.
7764 (linux_attach_lwp): New.
7765 (linux_attach): Add process to processes table. Don't set
7766 new_inferior here.
7767 (struct counter): New.
7768 (second_thread_of_pid_p, last_thread_of_process_p): New.
7769 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7770 multiple processes.
7771 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7772 processes. Remove process from process table.
7773 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7774 to multiple processes.
7775 (any_thread_of): New.
7776 (linux_detach): Add `pid' argument, and handle it. Remove process
7777 from processes table.
7778 (linux_join): Add `pid' argument. Handle it.
7779 (linux_thread_alive): Change unsighed long argument to ptid_t.
7780 Consider dead lwps as not being alive.
7781 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7782 threads we're not interested in.
7783 (same_lwp, find_lwp_pid): New.
7784 (linux_wait_for_lwp): Change `pid' argument's type from int to
7785 ptid_t. Adjust.
7786 (linux_wait_for_event): Rename to ...
7787 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7788 from int to ptid_t. Adjust.
7789 (linux_wait_for_event): New.
7790 (linux_wait_1): Add `ptid' argument. Change return type to
7791 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7792 that exit from the process table.
7793 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7794 Adjust.
7795 (mark_lwp_dead): New.
7796 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7797 stopping all threads, mark its main lwp as dead.
7798 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7799 ptids.
7800 (fetch_register, usr_store_inferior_registers)
7801 (regsets_fetch_inferior_registers)
7802 (regsets_store_inferior_registers, linux_read_memory)
7803 (linux_write_memory): Inline `inferior_pid'.
7804 (linux_look_up_symbols): Adjust to use per-process
7805 `thread_db_active'.
7806 (linux_request_interrupt): Adjust to use ptids.
7807 (linux_read_auxv): Inline `inferior_pid'.
7808 (initialize_low): Don't reference thread_db_active.
7809 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7810 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7811 (ps_getpid): Return the pid of the current inferior.
7812 * thread-db.c (proc_handle, thread_agent): Delete.
7813 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7814 per-process data.
7815 (find_one_thread): Change argument type to ptid_t. Adjust to
7816 per-process data.
7817 (maybe_attach_thread): Adjust to per-process data and ptids.
7818 (thread_db_find_new_threads): Ditto.
7819 (thread_db_init): Ditto.
7820 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7821 processes table. Adjust to use ptids.
7822 (spu_kill, spu_detach): Adjust interface. Remove process from
7823 processes table.
7824 (spu_join, spu_thread_alive): Adjust interface.
7825 (spu_wait): Adjust interface. Remove process from processes
7826 table. Adjust to use ptids.
7827 * win32-low.c (current_inferior_tid): Delete.
7828 (current_inferior_ptid): New.
7829 (debug_event_ptid): New.
7830 (thread_rec): Take a ptid. Adjust.
7831 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7832 (child_delete_thread): Ditto.
7833 (do_initial_child_stuff): Add `attached' argument. Add process to
7834 processes table.
7835 (child_fetch_inferior_registers, child_store_inferior_registers):
7836 Adjust.
7837 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7838 (win32_attach): Pass 1 to do_initial_child_stuff.
7839 (win32_kill): Adjust interface. Remove process from processes
7840 table.
7841 (win32_detach): Ditto.
7842 (win32_join): Adjust interface.
7843 (win32_thread_alive): Take a ptid.
7844 (win32_resume): Adjust to use ptids.
7845 (get_child_debug_event): Ditto.
7846 (win32_wait): Adjust interface. Remove exiting process from
7847 processes table.
7848
7849 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7850
7851 Non-stop mode support.
7852
7853 * server.h (non_stop): Declare.
7854 (gdb_client_data, handler_func): Declare.
7855 (delete_file_handler, add_file_handler, start_event_loop):
7856 Declare.
7857 (handle_serial_event, handle_target_event, push_event)
7858 (putpkt_notif): Declare.
7859 * target.h (enum resume_kind): New.
7860 (struct thread_resume): Replace `step' field by `kind' field.
7861 (TARGET_WNOHANG): Define.
7862 (struct target_ops) <wait>: Add `options' argument.
7863 <supports_non_stop, async, start_non_stop>: New fields.
7864 (target_supports_non_stop, target_async): New.
7865 (start_non_stop): Declare.
7866 (mywait): Add `options' argument.
7867 * target.c (mywait): Add `options' argument. Print child exit
7868 notifications here.
7869 (start_non_stop): New.
7870 * server.c (non_stop, own_buf, mem_buf): New globals.
7871 (struct vstop_notif): New.
7872 (notif_queue): New global.
7873 (queue_stop_reply, push_event, discard_queued_stop_replies)
7874 (send_next_stop_reply): New.
7875 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7876 interface changes.
7877 (attach_inferior): In non-stop mode, don't wait for the target
7878 here.
7879 (handle_general_set): Handle QNonStop.
7880 (handle_query): When handling qC, return the current general
7881 thread, instead of the first thread of the list.
7882 (handle_query): If the backend supports non-stop mode, include
7883 QNonStop+ in the qSupported query response.
7884 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
7885 and non-stop mode.
7886 (handle_v_attach, handle_v_run): Handle non-stop mode.
7887 (handle_v_stopped): New.
7888 (handle_v_requests): Report support for vCont;t. Handle vStopped.
7889 (myresume): Adjust to use resume_kind. Handle non-stop.
7890 (queue_stop_reply_callback): New.
7891 (handle_status): Handle non-stop mode.
7892 (main): Clear non_stop flag on reconnection. Use the event-loop.
7893 Refactor serial protocol handling from here ...
7894 (process_serial_event): ... to this new function. When GDB
7895 selects any thread, select one here. In non-stop mode, wait until
7896 GDB acks all pending events before exiting.
7897 (handle_serial_event, handle_target_event): New.
7898 * remote-utils.c (remote_open): Install remote_desc in the event
7899 loop.
7900 (remote_close): Remove remote_desc from the event loop.
7901 (putpkt_binary): Rename to...
7902 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
7903 (putpkt_binary): New as wrapper around putpkt_binary_1.
7904 (putpkt_notif): New.
7905 (prepare_resume_reply): In non-stop mode, don't change the
7906 general_thread.
7907 * event-loop.c: New.
7908 * Makefile.in (OBJ): Add event-loop.o.
7909 (event-loop.o): New rule.
7910
7911 * linux-low.h (pid_of): Moved here.
7912 (lwpid_of): New.
7913 (get_lwp_thread): Use lwpid_of.
7914 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
7915 * linux-low.c (pid_of): Delete.
7916 (inferior_pid): Use lwpid_of.
7917 (linux_event_pipe): New.
7918 (target_is_async_p): New.
7919 (delete_lwp): New.
7920 (handle_extended_wait): Use lwpid_of.
7921 (add_lwp): Don't set lwpid field.
7922 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
7923 (linux_kill_one_lwp): If killing a running lwp, stop it first.
7924 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
7925 (linux_detach_one_lwp): If detaching from a running lwp, stop it
7926 first. Adjust to linux_wait_for_event interface changes. Use
7927 lwpid_of.
7928 (linux_detach): Don't delete the main lwp here.
7929 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
7930 (status_pending_p): Don't consider explicitly suspended lwps.
7931 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
7932 pointer. Add OPTIONS argument. Change return type to int. Use
7933 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
7934 (linux_wait_for_event): Take an integer pid instead of a lwp_info
7935 pointer. Add status pointer argument. Return a pid instead of a
7936 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
7937 changes. In non-stop mode, don't switch to a random thread.
7938 (linux_wait): Rename to...
7939 (linux_wait_1): ... this. Add target_options argument, and handle
7940 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
7941 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
7942 clean exit and signal exit code. Don't stop all threads in
7943 non-stop mode. In all-stop mode, only stop all threads when
7944 reporting a stop to GDB. Handle explicit thread stop requests.
7945 (async_file_flush, async_file_mark): New.
7946 (linux_wait): New.
7947 (send_sigstop): Use lwpid_of.
7948 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
7949 interface changes. In non-stop mode, don't switch to a random
7950 thread.
7951 (linux_resume_one_lwp): Use lwpid_of.
7952 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
7953 (linux_resume_one_thread): ... this. Handle resume_stop. In
7954 non-stop mode, don't look for pending flag in all threads.
7955 (resume_status_pending_p): Don't consider explicitly suspended
7956 threads.
7957 (my_waitpid): Reimplement. Emulate __WALL.
7958 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7959 Use lwpid_of.
7960 (sigchld_handler, linux_supports_non_stop, linux_async)
7961 (linux_start_non_stop): New.
7962 (linux_target_ops): Register linux_supports_non_stop, linux_async
7963 and linux_start_non_stop.
7964 (initialize_low): Install SIGCHLD handler.
7965 * thread-db.c (thread_db_create_event, find_one_thread)
7966 (thread_db_get_tls_address): Use lwpid_of.
7967 * win32-low.c (win32_detach): Adjust to use resume_kind.
7968 (win32_wait): Add `options' argument.
7969 * spu-low.c (spu_resume): Adjust to use resume_kind.
7970 (spu_wait): Add `options' argument.
7971
7972 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7973
7974 Decouple target code from remote protocol.
7975
7976 * target.h (enum target_waitkind): New.
7977 (struct target_waitstatus): New.
7978 (struct target_ops) <wait>: Return an unsigned long. Take a
7979 target_waitstatus pointer instead of a char pointer.
7980 (mywait): Likewise.
7981 * target.c (mywait): Change prototype to return an unsigned long.
7982 Take a target_waitstatus pointer instead of a char pointer. Adjust.
7983 * server.h (thread_from_wait, old_thread_from_wait): Delete
7984 declarations.
7985 (prepare_resume_reply): Change prototype to take a
7986 target_waitstatus.
7987 * server.c (thread_from_wait, old_thread_from_wait): Delete.
7988 (last_status, last_ptid): New.
7989 (start_inferior): Remove "statusptr" argument. Adjust. Return a
7990 pid instead of a signal.
7991 (attach_inferior): Remove "status" and "signal" parameters.
7992 Adjust.
7993 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
7994 not as an address.
7995 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
7996 (handle_v_requests, myresume): Remove "status" and "signal"
7997 parameters. Adjust.
7998 (handle_status): New.
7999 (main): Delete local `status'. Adjust.
8000 * remote-utils.c: Include target.h.
8001 (prepare_resume_reply): Change prototype to take a
8002 target_waitstatus. Adjust.
8003
8004 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8005 interface.
8006 * spu-low.c (spu_wait): Adjust.
8007 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8008 Delete.
8009 (win32_wait): Adjust.
8010
8011 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8012
8013 * target.h (struct thread_resume): Delete leave_stopped member.
8014 (struct target_ops): Add a `n' argument to the `resume' callback.
8015 * server.c (start_inferior): Adjust.
8016 (handle_v_cont, myresume): Adjust.
8017 * linux-low.c (check_removed_breakpoint): Adjust to resume
8018 interface change, and to removed leave_stopped field.
8019 (resume_ptr): Delete.
8020 (struct thread_resume_array): New.
8021 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8022 resume interface change.
8023 (linux_continue_one_thread, linux_queue_one_thread)
8024 (resume_status_pending_p): Check if the resume field is NULL
8025 instead of checking the leave_stopped member.
8026 (linux_resume): Adjust to the target resume interface change.
8027 * spu-low.c (spu_resume): Adjust to the target resume interface
8028 change.
8029 * win32-low.c (win32_detach, win32_resume): Ditto.
8030
8031 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8032
8033 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8034 flag.
8035 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8036 pending.
8037 (linux_continue_one_thread): Only preserve the stepping flag if
8038 there's a pending breakpoint.
8039
8040 2009-03-31 Pedro Alves <pedro@codesourcery.com>
8041
8042 * server.c (main): After the inferior having exited, call
8043 remote_close before exiting gdbserver.
8044
8045 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8046
8047 Fix size of FPSCR in Power 7 processors.
8048 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8049 (PPC_FEATURE_HAS_DFP): New #define.
8050 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8051 size of the FPSCR.
8052
8053 2009-03-23 Pedro Alves <pedro@codesourcery.com>
8054
8055 * server.c (handle_query) Whitespace and formatting.
8056
8057 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8058
8059 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8060 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8061 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8062 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8063 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8064 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8065 Makefile.in, configure.ac: Fix whitespace throughout.
8066 * configure: Regenerate.
8067
8068 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8069
8070 * inferiors.c (find_inferior): Make it safe for the callback
8071 function to delete the currently iterated inferior.
8072
8073 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8074
8075 * Makefile.in (linuw_low_h): Move higher.
8076 (thread-db.o): Depend on $(linux_low_h).
8077
8078 2009-03-17 Pedro Alves <pedro@codesourcery.com>
8079
8080 Rename "process" to "lwp" throughout.
8081
8082 * linux-low.c (all_processes): Rename to...
8083 (all_lwps): ... this.
8084 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8085 (add_process): Rename to ...
8086 (add_lwp): ... this. Adjust.
8087 (linux_create_inferior): Adjust.
8088 (linux_attach_lwp): Adjust.
8089 (linux_attach): Adjust.
8090 (linux_kill_one_process): Rename to ...
8091 (linux_kill_one_lwp): ... this. Adjust.
8092 (linux_kill): Adjust.
8093 (linux_detach_one_process): Rename to ...
8094 (linux_detach_one_lwp): ... this. Adjust.
8095 (linux_detach): Adjust.
8096 (check_removed_breakpoint): Adjust.
8097 (status_pending_p): Adjust.
8098 (linux_wait_for_process): Rename to ...
8099 (linux_wait_for_lwp): ... this. Adjust.
8100 (linux_wait_for_event): Adjust.
8101 (send_sigstop): Adjust.
8102 (wait_for_sigstop): Adjust.
8103 (stop_all_processes): Rename to ...
8104 (stop_all_lwps): ... this.
8105 (linux_resume_one_process): Rename to ...
8106 (linux_resume_one_lwp): ... this. Adjust.
8107 (linux_set_resume_request, linux_continue_one_thread)
8108 (linux_queue_one_thread, resume_status_pending_p)
8109 (usr_store_inferior_registers, regsets_store_inferior_registers)
8110 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8111 Adjust.
8112 * linux-low.h (get_process): Rename to ...
8113 (get_lwp): ... this. Adjust.
8114 (get_thread_process): Rename to ...
8115 (get_thread_lwp): ... this. Adjust.
8116 (get_process_thread): Rename to ...
8117 (get_lwp_thread): ... this. Adjust.
8118 (struct process_info): Rename to ...
8119 (struct lwp_info): ... this.
8120 (all_processes): Rename to ...
8121 (all_lwps): ... this.
8122 * proc-service.c (ps_lgetregs): Adjust.
8123 * thread-db.c (thread_db_create_event, find_one_thread)
8124 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8125
8126 2009-03-14 Pedro Alves <pedro@codesourcery.com>
8127
8128 * server.c (handle_query): Handle "qAttached".
8129
8130 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8131
8132 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8133 GPLv3, update license URL.
8134
8135 2009-03-01 Doug Evans <dje@google.com>
8136
8137 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
8138 (server_h): Add gdb_signals.h.
8139 (signals.o): Update.
8140 * server.h (target_signal_from_host,target_signal_to_host_p)
8141 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8142
8143 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8144
8145 * remote-utils.c (getpkt): Also generate remote-debug
8146 information if noack_mode is set.
8147
8148 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8149
8150 * server.c (handle_query): Report qXfer:siginfo:read and
8151 qXfer:siginfo:write as supported and handle them.
8152 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8153 * linux-low.c (linux_xfer_siginfo): New.
8154 (linux_target_ops): Set it.
8155
8156 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8157
8158 * server.c (gdbserver_usage): Mention --remote-debug.
8159 (main): Accept '--remote-debug' switch.
8160
8161 2009-01-18 Doug Evans <dje@google.com>
8162
8163 * regcache.c (new_register_cache): No need to check result of xcalloc.
8164 * server.c (handle_search_memory): Back out calls to xmalloc,
8165 result is checked and error is returned to user upon failure.
8166 (handle_query): Ditto. Add more checks for result of malloc.
8167 (handle_v_cont): Check result of malloc, report error back to
8168 user upon failure.
8169 (handle_v_run): Ditto. Call freeargv.
8170 * server.h (freeargv): Declare.
8171 * utils.c (freeargv): New fn.
8172
8173 2009-01-15 Doug Evans <dje@google.com>
8174
8175 * gdbreplay.c (perror_with_name): Make arg const char *.
8176 * server.h (target_signal_to_name): Make return type const char *.
8177 * thread-db.c (thread_db_err_str): Make return type const char *.
8178 * utils.c (perror_with_name): Make arg const char *.
8179
8180 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8181
8182 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8183 when handling a EXIT_PROCESS_DEBUG_EVENT.
8184
8185 2009-01-06 Joel Brobecker <brobecker@adacore.com>
8186
8187 * gdbreplay.c (gdbreplay_version): Update copyright year.
8188 * server.c (gdbserver_version): Likewise.
8189
8190 2009-01-05 Doug Evans <dje@google.com>
8191
8192 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
8193 (handle_extended_wait): Improve comment.
8194
8195 2008-12-13 Doug Evans <dje@google.com>
8196
8197 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8198 * server.h (ATTR_MALLOC): New macro.
8199 (xmalloc,xcalloc,xstrdup): Declare.
8200 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8201 * inferiors.c: Ditto.
8202 * linux-low.c: Ditto.
8203 * mem-break.c: Ditto.
8204 * regcache.c: Ditto.
8205 * remote-utils.c: Ditto.
8206 * server.c: Ditto.
8207 * target.c: Ditto.
8208 * win32-low.c: Ditto.
8209
8210 2008-12-12 Doug Evans <dje@google.com>
8211
8212 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8213 in debugging printf.
8214
8215 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8216
8217 2008-12-09 Doug Evans <dje@google.com>
8218
8219 * linux-low.h (struct process_info): Delete member tid, unused.
8220 * thread-db.c (find_one_thread): Update.
8221 (maybe_attach_thread): Update.
8222
8223 2008-12-02 Pedro Alves <pedro@codesourcery.com>
8224
8225 * target.h (struct target_ops): Add qxfer_osdata member.
8226 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8227 and dirent.h.
8228 (linux_qxfer_osdata): New functions.
8229 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8230 callback.
8231 * server.c (handle_query): Handle "qXfer:osdata:read:".
8232 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8233 (buffer_xml_printf): New functions.
8234 * server.h (struct buffer): New.
8235 (buffer_grow_str, buffer_grow_str0): New macros.
8236 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8237 (buffer_xml_printf): Declare.
8238
8239 2008-11-24 Doug Evans <dje@google.com>
8240
8241 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8242
8243 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8244
8245 * server.c (handle_v_run): Always use the supplied argument list.
8246
8247 2008-11-19 Bob Wilson <bob.wilson@acm.org>
8248
8249 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8250 (xtensa_regmap_table): Add entry for scompare1.
8251
8252 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8253
8254 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8255 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8256 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8257 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8258 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8259 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8260 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8261 XML target descriptions.
8262 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8263 when inferior is running on an ISA 2.05 or later processor. Add
8264 special case to return offset for full 64-bit slot of FPSCR when
8265 in 32-bits.
8266
8267 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8268
8269 * Makefile.in (SFILES, clean): Added sparc64 files.
8270 (reg-sparc64.o, reg-sparc64.c): New.
8271 * configure.srv (sparc*-*-linux*): New configuration.
8272 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8273 syscall arguments for SPARC.
8274 (regsets_store_inferior_registers): Likewise.
8275 * linux-sparc-low.c: New file.
8276
8277 2008-10-21 Doug Evans <dje@google.com>
8278
8279 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8280 (READLINE_DIR,READLINE_DEP): Delete.
8281 (INTERNAL_CFLAGS): Update.
8282 (LINTFLAGS): Update.
8283
8284 2008-10-10 Pedro Alves <pedro@codesourcery.com>
8285
8286 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8287 whole argv from the last run, not just argv[0].
8288
8289 2008-09-08 Pedro Alves <pedro@codesourcery.com>
8290
8291 * regcache.c (new_register_cache): Return NULL if the register
8292 cache size isn't known yet.
8293 (free_register_cache): Avoid dereferencing a NULL regcache.
8294
8295 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8296
8297 * configure.srv: Merge MIPS and MIPS64.
8298
8299 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8300
8301 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8302
8303 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
8304
8305 * Makefile.in: Add required vsx dependencies.
8306
8307 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8308 Declare init_registers_powerpc_vsx32l.
8309 Declare init_registers_powerpc_vsx64l.
8310 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8311 (ppc_arch_setup): Check for VSX in hwcap.
8312 (ppc_fill_vsxregset): New function.
8313 (ppc_store_vsxregset): New function.
8314 Add new VSX entry in regset_info target_regsets.
8315
8316 * configure.srv: Add new VSX dependencies.
8317
8318 2008-08-12 Pedro Alves <pedro@codesourcery.com>
8319
8320 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8321 (remote_open): Set or clear transport_is_reliable.
8322 (putpkt_binary): Don't expect acks in noack mode.
8323 (getpkt): Don't send ack/nac in noack mode.
8324 * server.c (handle_general_set): Handle QStartNoAckMode.
8325 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8326 qSupported.
8327 (main): Reset noack_mode on every connection.
8328 * server.h (noack_mode): Declare.
8329
8330 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8331
8332 * Makefile.in (GDBREPLAY_OBS): New variable.
8333 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8334
8335 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8336 Daniel Jacobowitz <dan@codesourcery.com>
8337
8338 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8339 (usr_store_inferior_registers): Likewise.
8340 (regsets_store_inferior_registers): Likewise.
8341
8342 2008-07-31 Rolf Jansen <rj@surtec.com>
8343 Pedro Alves <pedro@codesourcery.com>
8344
8345 * configure.ac: Check for memmem declaration.
8346 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8347 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8348 (disable_packet_qfThreadInfo): Unconditionally compile.
8349 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8350 * configure, config.in: Regenerate.
8351
8352 2008-07-28 Doug Kwan <dougkwan@google.com>
8353
8354 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8355 (linux_write_memory): Remove declaration of errno.
8356
8357 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8358
8359 * linux-low.c (handle_extended_wait): Do not use "status"
8360 variable uninitialized.
8361
8362 2008-07-07 Pedro Alves <pedro@codesourcery.com>
8363
8364 * server.c (handle_v_attach): Inhibit reporting dll changes.
8365
8366 2008-06-27 Pedro Alves <pedro@codesourcery.com>
8367
8368 * remote-utils.c (prepare_resume_reply): If requested, don't
8369 output "thread:TID" in the T stop reply.
8370
8371 * server.c (disable_packet_vCont, disable_packet_Tthread)
8372 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8373 (handle_query): If requested, disable support for qC, qfThreadInfo
8374 and qsThreadInfo.
8375 (handle_v_requests): If requested, disable support for vCont.
8376 (gdbserver_show_disableable): New.
8377 (main): Handle --disable-packet and --disable-packet=LIST.
8378
8379 * server.h (disable_packet_vCont, disable_packet_Tthread)
8380 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8381
8382 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8383
8384 * server.c (gdbserver_usage): Mention --version.
8385
8386 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8387
8388 * Makefile.in (gdbreplay.o): New rule.
8389
8390 2008-06-06 Joseph Myers <joseph@codesourcery.com>
8391
8392 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8393 message, not gdbserver.
8394
8395 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
8396 Nathan Sidwell <nathan@codesourcery.com>
8397 Joseph Myers <joseph@codesourcery.com>
8398
8399 * acinclude.m4: Include ../../config/acx.m4.
8400 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8401 * configure, config.in: Regenerate.
8402 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8403 * server.c (gdbserver_version): Print PKGVERSION.
8404 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8405 (main): Adjust gdbserver_usage calls.
8406 * gdbreplay.c (version, host_name): Add declarations.
8407 (gdbreplay_version, gdbreplay_usage): New.
8408 (main): Accept --version and --help options.
8409
8410 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8411
8412 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8413 (arm_breakpoint_at): Handle Thumb.
8414 (the_low_target): Add comment.
8415
8416 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8417
8418 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8419
8420 2008-05-09 Doug Evans <dje@google.com>
8421
8422 * server.h (decode_search_memory_packet): Declare.
8423 * remote-utils.c (decode_search_memory_packet): New fn.
8424 * server.c (handle_search_memory_1): New fn.
8425 (handle_search_memory): New fn.
8426 (handle_query): Process qSearch:memory packets.
8427
8428 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8429
8430 * regcache.c (registers_length): Remove.
8431 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8432 full register packet.
8433 * regcache.h (registers_length): Remove prototype.
8434 * server.h (PBUFSIZ): Define to 16384.
8435
8436 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8437
8438 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8439 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8440 powerpc-64l.o, and powerpc-altivec64l.o.
8441 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8442 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8443 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8444 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8445 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8446 to srv_xmlfiles.
8447
8448 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8449 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8450 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8451 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8452 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8453 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8454 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8455 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8456 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8457 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8458 (clean): Update.
8459
8460 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8461 (init_registers_powerpc_32l): ... this new prototype.
8462 (init_registers_powerpc_32): Remove, replace by ...
8463 (init_registers_powerpc_altivec32l): ... this new prototype.
8464 (init_registers_powerpc_e500): Remove, replace by ...
8465 (init_registers_powerpc_e500l): ... this new prototype.
8466 (init_registers_ppc64): Remove, replace by ...
8467 (init_registers_powerpc_64l): ... this new prototype.
8468 (init_registers_powerpc_64): Remove, replace by ...
8469 (init_registers_powerpc_altivec64l): ... this new prototype.
8470 (ppc_num_regs): Set to 73.
8471 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8472 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8473 (ppc_cannot_store_register): Handle orig_r3 and trap.
8474 (ppc_arch_setup): Update init_registers_... calls.
8475 (ppc_fill_gregset): Handle orig_r3 and trap.
8476
8477 * inferiors.c (clear_inferiors): Reset current_inferior.
8478
8479 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
8480
8481 * acinclude.m4: Add override.m4.
8482 * configure: Regenerate.
8483
8484 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8485
8486 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8487 initial call to init_register_ppc64.
8488
8489 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8490
8491 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8492 single powerpc*-*-linux* case.
8493 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8494
8495 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8496
8497 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
8498 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
8499 from reg_xmlfiles.
8500 * linux-ppc-low.c: Include <elf.h>.
8501 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8502 (ppc_hwcap): New global variable.
8503 (ppc_regmap): Remove __SPE__ #ifdef sections.
8504 (ppc_regmap_e500): New global variable.
8505 (ppc_cannot_store_register): Update __SPE__ special case.
8506 (ppc_get_hwcap): New function.
8507 (ppc_arch_setup): Use it to determine whether inferior supports
8508 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8509 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8510 Do not access registers if target does not support AltiVec.
8511 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8512 Do not access registers if target does not support SPE.
8513 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8514
8515 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8516
8517 * linux-low.c (disabled_regsets, num_regsets): New.
8518 (use_regsets_p): Delete.
8519 (linux_wait_for_process): Clear disabled_regsets.
8520 (regsets_fetch_inferior_registers): Check and set it.
8521 (regsets_store_inferior_registers): Likewise.
8522 (linux_fetch_registers, linux_store_registers): Do not use
8523 use_regsets_p.
8524 (initialize_low): Allocate disabled_regsets.
8525
8526 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8527
8528 * Makefile.in (LIBOBJS): New.
8529 (OBS): Use LIBOBJS.
8530 (memmem.o): New rule.
8531 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8532 * configure: Regenerated.
8533
8534 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8535
8536 * server.c (handle_query): Never return "unsupported" for
8537 qXfer:features:read queries.
8538
8539 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8540
8541 * server.c (get_features_xml): Fix inverted condition.
8542 (handle_query): Always support qXfer:feature:read.
8543
8544 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8545
8546 * server.c (wrapper_argv): New.
8547 (start_inferior): Handle wrapper_argv. If set, expect an extra
8548 trap.
8549 (gdbserver_usage): Document --wrapper.
8550 (main): Parse --wrapper.
8551
8552 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8553
8554 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8555 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8556 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8557 (ppc_set_pc): Likewise.
8558 (ppc_arch_setup): New function.
8559 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8560 of collect_register.
8561 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
8562
8563 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8564
8565 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8566 instead of linux-ppc64-low.o.
8567 * linux-ppc64-low.c: Remove file.
8568 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8569 (linux-ppc64-low.o): Remove rule.
8570
8571 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8572 (init_registers_powerpc_64): Likewise.
8573 (ppc_regmap): Conditionally define depending on __powerpc64__.
8574 (ppc_cannot_store_register): Do not special-case "fpscr" when
8575 compiled on __powerpc64__.
8576 (ppc_collect_ptrace_register): New function.
8577 (ppc_supply_ptrace_register): New function.
8578 (ppc_breakpoint): Change type to "unsigned int".
8579 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8580 (the_low_target): Conditionally provide initializers for the
8581 arch_setup member depending on __powerpc64__. Install
8582 collect_ptrace_register and supply_ptrace_register members.
8583
8584 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8585
8586 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8587 * server.c (gdbserver_xmltarget): Define.
8588 (get_features_xml): Use it to replace "target.xml" and arch_string.
8589
8590 * configure.srv: Remove srv_xmltarget. Add XML files that were
8591 mentioned there to srv_xmlfiles instead. Remove conditional tests
8592 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8593 srv_xmlfiles and srv_regobj to include all possible choices.
8594 * configure.ac (srv_xmltarget): Remove.
8595 (srv_xmlfiles): Do not add "target.xml".
8596 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8597 checks for supplementary target information.
8598 * configure: Regenerate.
8599 * Makefile.in (XML_TARGET): Remove.
8600 (target.xml): Remove rule.
8601 (clean): Do not clean up target.xml.
8602 (.PRECIOUS): Do not mention target.xml.
8603
8604 * target.h (struct target_ops): Remove arch_string member.
8605 * linux-low.c (linux_arch_string): Remove.
8606 (linux_target_ops): Remove arch_string initializer.
8607 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8608 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8609 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8610 * spu-low.c (spu_arch_string): Remove.
8611 (spu_target_ops): Remove arch_string initializer.
8612 * win32-low.c (win32_arch_string): Remove.
8613 (win32_target_ops): Remove arch_string initializer.
8614 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8615 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8616 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8617
8618 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8619
8620 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8621 by collect_ptrace_register and supply_ptrace_register hooks.
8622 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8623 instead of checking for the_low_target.left_pad_xfer.
8624 (usr_store_inferior_registers): Use collect_ptrace_register callback
8625 instead of checking for the_low_target.left_pad_xfer.
8626
8627 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8628 (s390_supply_ptrace_register): Likewise.
8629 (s390_fill_gregset): Call s390_collect_ptrace_register.
8630 (the_low_target): Update.
8631
8632 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8633 (ppc_supply_ptrace_register): Likewise.
8634 (the_low_target): Update.
8635
8636 * linux-i386-low.c (the_low_target): Update.
8637 * linux-x86-64-low.c (the_low_target): Update.
8638
8639 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8640
8641 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8642 reg-s390.o and reg-s390x.o.
8643
8644 * linux-low.c (new_inferior): New global variable.
8645 (linux_create_inferior, linux_attach): Set it.
8646 (linux_wait_for_process): Call the_low_target.arch_setup after the
8647 target has stopped for the first time.
8648 (initialize_low): Do not call the_low_target.arch_setup.
8649
8650 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8651 (s390_set_pc): Likewise.
8652 (s390_arch_setup): New function.
8653 (the_low_target): Use s390_arch_setup as arch_setup routine.
8654
8655 * regcache.c (realloc_register_cache): New function.
8656 (set_register_cache): Call it for each existing regcache.
8657
8658 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8659
8660 * server.h (init_registers): Remove prototype.
8661
8662 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8663 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8664 instead of init_registers ().
8665 * linux-arm-low.c (init_registers_arm): Add prototype.
8666 (init_registers_arm_with_iwmmxt): Likewise.
8667 (the_low_target): Add initializer for arch_setup field.
8668 * linux-cris-low.c (init_registers_cris): Add prototype.
8669 (the_low_target): Add initializer for arch_setup field.
8670 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8671 (the_low_target): Add initializer for arch_setup field.
8672 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8673 (the_low_target): Add initializer for arch_setup field.
8674 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8675 (the_low_target): Add initializer for arch_setup field.
8676 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8677 (the_low_target): Add initializer for arch_setup field.
8678 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8679 (the_low_target): Add initializer for arch_setup field.
8680 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8681 (init_registers_mips64_linux): Likewise.
8682 (the_low_target): Add initializer for arch_setup field.
8683 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8684 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8685 (the_low_target): Add initializer for arch_setup field.
8686 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8687 (init_registers_powerpc_64): Likewise.
8688 (the_low_target): Add initializer for arch_setup field.
8689 * linux-s390-low.c (init_registers_s390): Add prototype.
8690 (init_registers_s390x): Likewise.
8691 (the_low_target): Add initializer for arch_setup field.
8692 * linux-sh-low.c (init_registers_sh): Add prototype.
8693 (the_low_target): Add initializer for arch_setup field.
8694 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8695 (the_low_target): Add initializer for arch_setup field.
8696 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8697 (the_low_target): Add initializer for arch_setup field.
8698
8699 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8700 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8701 instead of init_registers ().
8702 * win32-arm-low.c (init_registers_arm): Add prototype.
8703 (the_low_target): Add initializer for arch_setup field.
8704 * win32-i386-low.c (init_registers_i386): Add prototype.
8705 (the_low_target): Add initializer for arch_setup field.
8706
8707 * spu-low.c (init_registers_spu): Add prototype.
8708 (initialize_low): Call initialie_registers_spu () instead of
8709 initialize_registers ().
8710
8711 2008-02-19 Pedro Alves <pedro@codesourcery.com>
8712
8713 * server.c (handle_v_requests): When handling the vRun and vAttach
8714 packets, if already debugging a process, don't kill it. Return an
8715 error instead.
8716
8717 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8718
8719 * server.c (handle_query): Correct length check.
8720
8721 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8722
8723 * win32-low.c (do_initial_child_stuff): Add process handle
8724 parameter. Set current_process_handle and current_process_id from the
8725 parameters. Clear globals.
8726 (win32_create_inferior): Don't set current_process_handle and
8727 current_process_id here. Instead pass them on the call to
8728 do_initial_child_stuff.
8729 (win32_attach): Likewise.
8730 (win32_clear_inferiors): New.
8731 (win32_kill): Don't close the current process handle or the
8732 current thread handle here. Instead call win32_clear_inferiors.
8733 (win32_detach): Don't open a new handle to the process. Call
8734 win32_clear_inferiors.
8735 (win32_join): Don't rely on current_process_handle; open a new
8736 handle using the process id.
8737 (win32_wait): Call win32_clear_inferiors when the inferior process
8738 has exited.
8739
8740 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8741
8742 * server.c (monitor_show_help): Add "exit".
8743
8744 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8745
8746 * Makefile.in (SFILES): Add linux-xtensa-low.c.
8747 (clean): Add reg-xtensa.c.
8748 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
8749 * configure.srv (xtensa*-*-linux*) New target.
8750 * linux-xtensa-low.c: New.
8751 * xtensa-xtregs.c: New.
8752
8753 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8754
8755 * hostio.c: Don't include errno.h.
8756 (errno_to_fileio_errno): Move to hostio-errno.
8757 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8758 error number outputting to the target->hostio_last_error callback.
8759 (hostio_packet_error): Use FILEIO_EINVAL directly.
8760 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8761 calls to hostio_error.
8762 * hostio-errno.c: New.
8763 * server.h (hostio_last_error_from_errno): Declare.
8764 * target.h (target_ops): Add hostio_last_error member.
8765 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8766 as hostio_last_error handler.
8767 * spu-low.c (spu_target_ops): Likewise.
8768 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8769 (wince_hostio_last_error): New functions.
8770 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8771 as hostio_last_error handler.
8772 (win32_target_ops) [!_WIN32_WCE]: Register
8773 hostio_last_error_from_errno as hostio_last_error handler.
8774 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8775 (hostio-errno.o): New rule.
8776 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8777 * configure.srv (srv_hostio_err_objs): New variable. Default to
8778 hostio-errno.o.
8779 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8780 * configure: Regenerate.
8781
8782 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8783
8784 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8785 (linux_kill, linux_detach): Clean up the process list.
8786 * remote-utils.c (remote_open): Improve port number parsing.
8787 (putpkt_binary, input_interrupt): Only send interrupts if the target
8788 is running.
8789 * server.c (extended_protocol): Make static.
8790 (attached): Define earlier.
8791 (exit_requested, response_needed, program_argv): New variables.
8792 (target_running): New.
8793 (start_inferior): Clear attached here.
8794 (attach_inferior): Set attached here.
8795 (require_running): Define.
8796 (handle_query): Use require_running and target_running. Implement
8797 "monitor exit".
8798 (handle_v_attach, handle_v_run): New.
8799 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8800 (gdbserver_usage): Update.
8801 (main): Redo argument parsing. Handle --debug and --multi. Handle
8802 --attach along with other options or after the port. Save
8803 program_argv. Support no initial program. Resynchronize
8804 communication with GDB after an error. Handle "monitor exit".
8805 Use require_running and target_running. Always allow the extended
8806 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8807 restart in extended mode.
8808 * README: Refer to the GDB manual. Update --attach usage.
8809
8810 2007-12-20 Andreas Schwab <schwab@suse.de>
8811
8812 * linux-low.c (STACK_SIZE): Define.
8813 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8814 (linux_test_for_tracefork): Likewise.
8815
8816 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8817
8818 * linux-low.c (linux_wait_for_event): Update messages. Do not
8819 reinsert auto-delete breakpoints.
8820 * mem-break.c (struct breakpoint): Change return type of handler to
8821 int.
8822 (set_breakpoint_at): Update handler type.
8823 (reinsert_breakpoint_handler): Return 1 instead of calling
8824 delete_breakpoint.
8825 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8826 setting a new one.
8827 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8828 * mem-break.h (set_breakpoint_at): Update handler type.
8829 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8830 * win32-low.c (auto_delete_breakpoint): New.
8831 (get_child_debug_event): Use it.
8832
8833 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8834
8835 * configure.ac: Check for pread and pwrite.
8836 * hostio.c (handle_pread): Fall back to lseek and read.
8837 (handle_pwrite): Fall back to lseek and write.
8838 * config.in, configure: Regenerated.
8839
8840 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8841
8842 * server.c (myresume): Add own_buf argument.
8843 (main): Update calls.
8844
8845 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8846
8847 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8848 * remote-utils.c (remote_open): Do not call disable_async_io.
8849 (block_async_io): Delete.
8850 (unblock_async_io): Make static.
8851 (initialize_async_io): New.
8852 * server.c (handle_v_cont): Handle async I/O here.
8853 (myresume): Likewise. Move other common resume tasks here...
8854 (main): ... from here. Call initialize_async_io. Disable async
8855 I/O before the main loop.
8856 * server.h (initialize_async_io): Declare.
8857 (block_async_io, unblock_async_io): Delete prototypes.
8858 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8859
8860 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8861
8862 * remote-utils.c (readchar): Allow binary data in received messages.
8863
8864 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8865
8866 * win32-low.c (attaching): New global.
8867 (win32_create_inferior): Clear the `attaching' global.
8868 (win32_attach): Set the `attaching' global.
8869 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8870 attaching. Only set a breakpoint at the entry point if not
8871 attaching.
8872
8873 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8874
8875 * server.c (main): Don't report dll events on the initial
8876 connection on attaches.
8877
8878 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8879
8880 * server.c (main): Relax numerical bases supported for the pid of
8881 the --attach command line argument.
8882
8883 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8884
8885 * win32-low.c (win32_attach): Call OpenProcess before
8886 DebugActiveProcess, not after. Add last error output to error
8887 call.
8888
8889 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8890
8891 * win32-low.c (win32_get_thread_context)
8892 (win32_set_thread_context): New functions.
8893 (thread_rec): Use win32_get_thread_context.
8894 (continue_one_thread, win32_resume): Use win32_set_thread_context.
8895 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8896 field.
8897
8898 2007-12-03 Leo Zayas
8899 Pedro Alves <pedro_alves@portugalmail.pt>
8900
8901 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
8902 global variables.
8903 (child_add_thread): Minor cleanup.
8904 (child_continue): Resume artificially suspended threads before
8905 calling ContinueDebugEvent.
8906 (suspend_one_thread): New.
8907 (fake_breakpoint_event): New.
8908 (get_child_debug_event): Change return type to int. Check here if
8909 gdb sent an interrupt request. If a soft interrupt was requested,
8910 fake a breakpoint event. Return 0 if there is no event to handle,
8911 and 1 otherwise.
8912 (win32_wait): Don't check here if gdb sent an interrupt request.
8913 Ensure there is a valid event to handle.
8914 (win32_request_interrupt): Add soft interruption method as last
8915 resort.
8916
8917 2007-12-03 Leo Zayas
8918 Pedro Alves <pedro_alves@portugalmail.pt>
8919
8920 * win32-low.h (win32_thread_info): Add descriptions to the
8921 structure members. Replace `suspend_count' counter by a
8922 `suspended' flag.
8923 * win32-low.c (thread_rec): Update condition of when to get the
8924 context from the inferior. Rely on ContextFlags being set if it
8925 has already been retrieved. Only suspend the inferior thread if
8926 we haven't already. Warn if that fails.
8927 (continue_one_thread): s/suspend_count/suspended/. Only call
8928 ResumeThread once. Warn if that fails.
8929
8930 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8931
8932 * win32-low.c (win32_wait): Don't read from the inferior when it
8933 has already exited.
8934
8935 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8936
8937 * Makefile.in (win32_low_h): New variable.
8938 (win32-low.o): Add dependency on $(win32_low_h).
8939 (win32-arm-low.o, win32-i386-low.o): New rules.
8940
8941 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8942
8943 * hostio.c: Correct copyright year.
8944
8945 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8946
8947 * Makefile.in (OBS): Add hostio.o.
8948 (hostio.o): New rule.
8949 * server.h (handle_vFile): Declare.
8950 * hostio.c: New file.
8951 * server.c (handle_v_requests): Take packet_len and new_packet_len
8952 for binary packets. Call handle_vFile.
8953 (main): Update call to handle_v_requests.
8954
8955 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
8956
8957 * linux-low.c: Include <sched.h>.
8958
8959 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
8960
8961 * linux-low.c (linux_tracefork_grandchild): New.
8962 (linux_tracefork_child): Use clone.
8963 (linux_test_for_tracefork): Use clone; allocate and free a stack.
8964
8965 2007-10-31 Joel Brobecker <brobecker@adacore.com>
8966
8967 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
8968
8969 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
8970
8971 * linux-low.c (handle_extended_wait): Handle unexpected signals.
8972
8973 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
8974
8975 * inferiors.c (change_inferior_id): Delete.
8976 (add_pid_to_list, pull_pid_from_list): New.
8977 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
8978 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
8979 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
8980 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
8981 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
8982 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
8983 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
8984 (using_threads): Always set to 1.
8985 (handle_extended_wait): New.
8986 (add_process): Do not set TID.
8987 (linux_create_inferior): Set must_set_ptrace_flags.
8988 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
8989 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
8990 (linux_thread_alive): Rename TID argument to LWPID.
8991 (linux_wait_for_process): Handle unknown processes. Do not use TID.
8992 (linux_wait_for_event): Do not use TID or check using_threads. Update
8993 call to dead_thread_notify. Call handle_extended_wait.
8994 (linux_create_inferior): Use PTRACE_SETOPTIONS.
8995 (send_sigstop): Delete sigstop_sent.
8996 (wait_for_sigstop): Avoid TID.
8997 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
8998 (linux_test_for_tracefork): New.
8999 (linux_lookup_signals): Use thread_db_active and
9000 linux_supports_tracefork_flag.
9001 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9002 * linux-low.h (get_process_thread): Avoid TID.
9003 (struct process_ifo): Move thread_known and tid to the end. Remove
9004 sigstop_sent.
9005 (linux_attach_lwp, thread_db_init): Update prototypes.
9006 * server.h (change_inferior_id): Delete prototype.
9007 (add_pid_to_list, pull_pid_from_list): New prototypes.
9008 * thread-db.c (thread_db_use_events): New.
9009 (find_first_thread): Rename to...
9010 (find_one_thread): ...this. Update callers and messages. Do not
9011 call fatal. Check thread_db_use_events. Do not call
9012 change_inferior_id or new_thread_notify.
9013 (maybe_attach_thread): Update. Do not call new_thread_notify.
9014 (thread_db_init): Set thread_db_use_events. Check use_events.
9015 * utils.c (fatal, warning): Correct message prefix.
9016
9017 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9018
9019 * Makefile.in (clean): Remove new files.
9020 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9021 (powerpc-64.o, powerpc-64.c): New rules.
9022 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9023 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9024 with SPE.
9025 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9026 SPE targets.
9027 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9028 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9029 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9030 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9031 (target_regsets): Add AltiVec and SPE register sets.
9032 * configure.ac: Check for AltiVec and SPE.
9033 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9034 (ppc_fill_vrregset, ppc_store_vrregset): New.
9035 (target_regsets): Add AltiVec register set.
9036 * configure: Regenerated.
9037
9038 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9039
9040 * linux-low.c (O_LARGEFILE): Define.
9041 (linux_read_memory): Use /proc/PID/mem.
9042 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9043 * configure, config.in: Regenerated.
9044
9045 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9046
9047 * linux-low.c (linux_wait_for_event): Do not pass signals while
9048 single-stepping.
9049
9050 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9051
9052 * win32-low.c (create_process): New.
9053 (win32_create_inferior): Use create_process instead of
9054 CreateProcess. If create_process failed retry appending an ".exe"
9055 suffix. Store the GetLastError result immediatelly after
9056 create_process calls and use it on the call to error.
9057
9058 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9059
9060 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9061
9062 2007-08-23 Joel Brobecker <brobecker@adacore.com>
9063
9064 * configure.ac: Switch license to GPLv3.
9065
9066 2007-08-01 Michael Snyder <msnyder@access-company.com>
9067
9068 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9069
9070 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9071
9072 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9073 typedef.
9074 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9075 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9076 CloseToolhelp32Snapshot.
9077 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9078 CloseToolhelp32Snapshot.
9079
9080 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
9081
9082 * server.c (main): Check for inferior exit before main loop.
9083
9084 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9085
9086 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9087 instead of on tmp_desc.
9088
9089 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9090 Daniel Jacobowitz <dan@codesourcery.com>
9091
9092 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9093 (add_thread): Minor cleanups.
9094 (clear_inferiors): Move lower in the file. Clear the DLL
9095 list.
9096 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9097 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9098 (xml_escape_text): New.
9099 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9100 for qSupported.
9101 (handle_v_cont): Report errors.
9102 (gdbserver_version): Update.
9103 (main): Correct size of own_buf. Do not report initial DLL events.
9104 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9105 (unloaded_dll, xml_escape_text): New.
9106 * win32-low.c (enum target_waitkind): Update comments.
9107 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9108 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9109 (win32_EnumProcessModules, win32_GetModuleInformation)
9110 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9111 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9112 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9113 (win32_Module32First, win32_Module32Next, load_toolhelp)
9114 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9115 (get_child_debug_event): Handle DLL events.
9116 (win32_wait): Likewise.
9117
9118 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9119
9120 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9121 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9122
9123 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9124
9125 * win32-low.c (handle_output_debug_string): Ignore event if not
9126 waiting.
9127
9128 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9129
9130 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9131
9132 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9133
9134 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9135
9136 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9137
9138 * inferiors.c (change_inferior_id): Add comment.
9139 * linux-low.c (check_removed_breakpoint): Add an early
9140 prototype. Improve debug output.
9141 (linux_attach): Doc update.
9142 (linux_detach_one_process, linux_detach): Clean up before releasing
9143 each process.
9144 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9145 * linux-low.h (struct process_info): Doc improvement.
9146 * mem-break.c (delete_all_breakpoints): New.
9147 * mem-break.h (delete_all_breakpoints): New prototype.
9148 * thread-db.c (find_first_thread): New.
9149 (thread_db_create_event): Call it instead of
9150 thread_db_find_new_threads. Clean up unused variables.
9151 (maybe_attach_thread): Remove first thread handling.
9152 (thread_db_find_new_threads): Use find_first_thread.
9153 (thread_db_get_tls_address): Likewise.
9154
9155 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9156
9157 * thread-db.c (thread_db_find_new_threads): Add prototype.
9158 (thread_db_create_event): Check for the main thread before adding
9159 a new thread.
9160 (maybe_attach_thread): Only enable event reporting if TID == 0.
9161 (thread_db_get_tls_address): Check for new threads.
9162
9163 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9164
9165 * linux-low.c (linux_create_inferior): Try execv before execvp.
9166 * spu-low.c (spu_create_inferior): Likewise.
9167
9168 2007-06-13 Mike Frysinger <vapier@gentoo.org>
9169
9170 * linux-low.c (linux_create_inferior): Change execv to execvp.
9171 * spu-low.c (spu_create_inferior): Likewies.
9172
9173 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9174
9175 * Makefile.in (clean): Clean new files instead of deleted ones.
9176 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9177 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9178 rules.
9179 * configure.srv: Specify XML files and new regformats for MIPS and
9180 MIPS64 GNU/Linux.
9181 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9182 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9183 an entry for the restart register.
9184 (mips_cannot_fetch_register, mips_cannot_store_register)
9185 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9186 register names to match the XML descriptions.
9187 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9188 restart register instead of $0.
9189
9190 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9191 Markus Deuling <deuling@de.ibm.com>
9192
9193 * remote-utils.c (decode_xfer_write): New function.
9194 * server.h (decode_xfer_write): Add prototype.
9195 * server.c (handle_query): Add PACKET_LEN argument. Support
9196 qXfer:spu:read and qXfer:spu:write packets.
9197 (main): Pass packet_len to handle_query.
9198 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9199 * target.h (target_ops): Add qxfer_spu.
9200
9201 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9202
9203 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9204 accessing non-seekable spufs files.
9205
9206 2007-05-16 Markus Deuling <deuling@de.ibm.com>
9207
9208 * server.c (handle_query): Add reply for qC packet.
9209
9210 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9211 Leo Zayas <lerele@champenstudios@com>
9212
9213 * server.h (check_remote_input_interrupt_request): New function.
9214 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9215 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9216 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9217 (check_remote_input_interrupt_request): New function.
9218 * server.h (check_remote_input_interrupt_request): Declare.
9219 * win32-low.c (winapi_DebugBreakProcess,
9220 winapi_GenerateConsoleCtrlEvent): New typedefs.
9221 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9222 to 250 ms.
9223 (win32_wait): Check for remote interrupt request
9224 with check_remote_input_interrupt_request.
9225 (win32_request_interrupt): New function.
9226 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9227
9228 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9229
9230 * win32-low.c (debug_registers_changed,
9231 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9232 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9233 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9234 (thread_rec): Get context using the low target.
9235 (child_add_thread): Call thread_added on the low target,
9236 which does the same thing.
9237 (regptr): Delete.
9238 (do_initial_child_stuff): Remove debug registers references.
9239 Set context using the low target. Resume threads after
9240 setting the contexts.
9241 (child_continue): Remove dead variable. Remove debug
9242 registers references.
9243 (child_fetch_inferior_registers): Go through the low target.
9244 (do_child_store_inferior_registers): Remove.
9245 (child_store_inferior_registers): Go through the low target.
9246 (win32_resume): Remove debug registers references.
9247 Set context using the low target.
9248 (handle_exception): Change return type to void. Don't record
9249 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9250 first chance exception.
9251 (get_child_debug_event): Change return type to void. Remove
9252 goto loop. Always return after waiting for debug event.
9253 (win32_wait): Convert to switch statement. Handle spurious
9254 events.
9255
9256 * win32-i386-low.c (debug_registers_changed,
9257 debug_registers_used): New.
9258 (initial_stuff): Rename to ...
9259 (i386_initial_stuff): ... this. Clear debug registers
9260 state variables.
9261 (store_debug_registers): Delete.
9262 (i386_get_thread_context): New.
9263 (load_debug_registers): Delete.
9264 (i386_set_thread_context): New.
9265 (i386_thread_added): New.
9266 (single_step): Rename to ...
9267 (i386_single_step): ... this.
9268 (do_fetch_inferior_registers): Rename to ...
9269 (i386_fetch_inferior_register): ... this.
9270 (i386_store_inferior_register): New.
9271 (the_low_target): Adapt to new interface.
9272
9273 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9274 (arm_get_thread_context): New.
9275 (arm_set_thread_context): New.
9276 (regptr): New.
9277 (do_fetch_inferior_registers): Rename to ...
9278 (arm_fetch_inferior_register): ... this.
9279 (arm_store_inferior_register): New.
9280 (arm_wince_breakpoint): Reimplement as unsigned long.
9281 (arm_wince_breakpoint_len): Define.
9282 (the_low_target): Adapt to new interface.
9283
9284 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9285 load_debug_registers. Add get_thread_context, set_thread_context,
9286 thread_added and store_inferior_register. Rename
9287 fetch_inferior_registers to fetch_inferior_register.
9288 (regptr): Remove declaration.
9289
9290 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9291
9292 * linux-low.c (linux_detach): Change return type to int. Return 0.
9293 * spu-low.c (spu_detach): Likewise.
9294
9295 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9296
9297 * target.h (target_ops): Change return type of detach to int.
9298 Add join.
9299 (join_inferior): New.
9300 * server.c (main): Don't skip detach support on mingw32.
9301 If the inferior doesn't support detaching return error.
9302 Call join_inferior instead of using waitpid.
9303 * linux-low.c (linux_join): New.
9304 (linux_target_op): Add linux_join.
9305 * spu-low.c (spu_join): New.
9306 (spu_target_ops): Add spu_join.
9307 * win32-low.c (win32_detach): Adapt to new interface.
9308 Reopen current_process_handle before detaching. Issue a child
9309 resume before detaching.
9310 (win32_join): New.
9311 (win32_target_op): Add win32_join.
9312
9313 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9314
9315 * win32-low.c (win32-attach): Fix return value.
9316 * target.h (target_ops): Describe ATTACH return values.
9317
9318 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9319
9320 * win32-low.c (GETPROCADDRESS): Define.
9321 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9322 (winapi_DebugSetProcessKillOnExit): Likewise.
9323 (win32_create_inferior): Force usage of ansi CreateProcessA.
9324 (win32_attach): Use GETPROCADDRESS.
9325 (win32_detach): Likewise.
9326
9327 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9328
9329 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9330
9331 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9332
9333 * win32-low.c: Commit leftover changes from 2007-03-29.
9334
9335 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9336
9337 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9338 fields short instead of int. Add explicit padding.
9339 (i387_cache_to_fsave): Remove unnecessary casts.
9340 (i387_fsave_to_cache): Doc fix.
9341 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9342
9343 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9344
9345 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9346 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9347
9348 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9349
9350 * configure.srv (arm*-*-mingw32ce*): Move near the other
9351 arm targets.
9352
9353 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9354
9355 * configure.ac: Add errno checking.
9356 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9357 sys/file.h and malloc.h.
9358 (AC_CHECK_DECLS): Add perror.
9359 (srv_mingwce): Handle.
9360 * configure.srv (i[34567]86-*-cygwin*): Add
9361 win32-i386-low.o to srv_tgtobj.
9362 (i[34567]86-*-mingw*): Likewise.
9363 (arm*-*-mingw32ce*): Add case.
9364 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9365 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9366 [__MINGW32CE__] (strerror): New function.
9367 [__MINGW32CE__] (errno): Define to GetLastError.
9368 [__MINGW32CE__] (COUNTOF): New macro.
9369 (remote_open): Remove extra close call.
9370 * mem-break.c (delete_breakpoint_at): New function.
9371 * mem-break.h (delete_breakpoint_at): Declare.
9372 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9373 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9374 [USE_WIN32API] (read, write): Add char* casts.
9375 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9376 * server.h: Include wincecompat.h on Windows CE.
9377 [HAVE_ERRNO_H]: Check.
9378 (perror): Declare if not declared.
9379 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9380 (perror_with_name): Remove errno declaration.
9381 * wincecompat.h: New.
9382 * wincecompat.c: New.
9383 * win32-low.h: New.
9384 * win32-arm-low.c: New.
9385 * win32-i386-low.c: New.
9386 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9387 (OUTMSG2): Make it safe.
9388 (_T): New macro.
9389 (COUNTOF): New macro.
9390 (NUM_REGS): Get it from the low target.
9391 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9392 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9393 (thread_rec): Let low target handle debug registers.
9394 (child_add_thread): Likewise.
9395 (child_init_thread_list): Likewise.
9396 (continue_one_thread): Likewise.
9397 (regptr): New.
9398 (do_child_fetch_inferior_registers): Move to ...
9399 * win32-i386-low.c: ... here, and rename to ...
9400 (do_fetch_inferior_registers): ... this.
9401 * win32-low.c (child_fetch_inferior_registers):
9402 Go through the low target.
9403 (do_child_store_inferior_registers): Use regptr.
9404 (strwinerror): New function.
9405 (win32_create_inferior): Handle Windows CE.
9406 Use strwinerror instead of strerror on Windows error
9407 codes. Add program to the error output.
9408 Don't close the main thread handle on Windows CE.
9409 (win32_attach): Use coredll.dll on Windows CE.
9410 (win32_kill): Close current process and current
9411 thread handles.
9412 (win32_detach): Use coredll.dll on Windows CE.
9413 (win32_resume): Let low target handle debug registers, and
9414 step request.
9415 (handle_exception): Add/Remove initial breakpoint. Avoid
9416 non-existant WSTOPSIG on Windows CE.
9417 (win32_read_inferior_memory): Cast to remove warning.
9418 (win32_arch_string): Go through the low target.
9419 (initialize_low): Call set_breakpoint_data with the low
9420 target's breakpoint.
9421 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9422 FOP_REGNUM, mappings): Move to ...
9423 * win32-i386-low.c: ... here.
9424 * win32-low.c (win32_thread_info): Move to ...
9425 * win32-low.h: ... here.
9426 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9427 win32-arm-low.c and wincecompat.c.
9428 (all:): Add $EXEEXT.
9429 (install-only:): Likewise.
9430 (gdbserver:): Likewise.
9431 (gdbreplay:): Likewise.
9432 * config.in: Regenerate.
9433 * configure: Regenerate.
9434
9435 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9436
9437 * win32-low.c: Rename typedef thread_info to
9438 win32_thread_info throughout.
9439
9440 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9441
9442 * win32-i386-low.c: Rename to ...
9443 * win32-low.c: ... this.
9444 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9445 * Makefile.in: Likewise.
9446
9447 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9448
9449 * remote-utils.c (monitor_output): Constify msg parameter.
9450 * server.h (monitor_output): Likewise.
9451 * win32-i386-low.c (handle_output_debug_string): New.
9452 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9453 handle_output_debug_string.
9454 (get_child_debug_event): Likewise.
9455
9456 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9457
9458 * server.c (main): Correct strtoul check.
9459
9460 2007-03-27 Jon Ringle <jon@ringle.org>
9461
9462 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9463
9464 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9465
9466 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9467
9468 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9469
9470 * terminal.h: Check HAVE_SGTTY_H.
9471
9472 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
9473
9474 * remote-utils.c (remote_open): Print out the assigned port number.
9475
9476 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9477
9478 * remote-utils.c (monitor_output): New function.
9479 * server.c (debug_threads): Define here.
9480 (monitor_show_help): New function.
9481 (handle_query): Handle qRcmd.
9482 (main): Do not handle 'd' packet.
9483 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9484 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9485 of debug_threads.
9486
9487 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9488
9489 * Makefile.in (EXEEXT): New.
9490 (clean): Use $(EXEEXT).
9491
9492 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9493
9494 * target.h (target_ops): Rename send_signal to request_interrupt,
9495 and remove enum target_signal parameter.
9496 * linux-low.c (linux_request_interrupt): Rename from
9497 linux_send_signal, and always send SIGINT.
9498 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9499 and always send SIGINT.
9500 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9501 of send_signal.
9502 (input_interrupt): Likewise.
9503
9504 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9505
9506 * server.c (get_features_xml): Check if target implemented
9507 arch_string.
9508 * win32-i386-low.c (win32_arch_string): New.
9509 (win32_target_ops): Add win32_arch_string as arch_string member.
9510
9511 2007-02-22 Markus Deuling <deuling@de.ibm.com>
9512
9513 * spu-low.c (spu_arch_string): New.
9514 (spu_target_ops): Add spu_arch_string.
9515
9516 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9517
9518 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9519 * configure.ac: Do not check for terminal.h.
9520 * configure, config.in: Regenerated.
9521
9522 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9523
9524 * Makefile.in (OBS): Add $(XML_BUILTIN).
9525 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9526 (clean): Update.
9527 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9528 (arm-with-iwmmxt.c): New.
9529 * config.in, configure: Regenerate.
9530 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9531 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9532 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9533 (arm*-*-linux*): Add iWMMXt and regset support.
9534 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9535 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9536 (arm_store_wmmxregset, target_regsets): New.
9537 * server.c (get_features_xml): Take annex argument. Check builtin
9538 XML documents.
9539 (handle_query): Handle multiple annexes.
9540
9541 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9542
9543 * remote-utils.c [USE_WIN32API] (read, write): Define.
9544 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9545 write.
9546
9547 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9548
9549 * linux-i386-low.c (the_low_target): Set arch_string.
9550 * linux-x86-64-low.c (the_low_target): Likewise.
9551 * linux-low.c (linux_arch_string): New.
9552 (linux_target_ops): Add it.
9553 * linux-low.h (struct linux_target_ops): Add arch_string.
9554 * server.c (write_qxfer_response): Use const void * for DATA.
9555 (get_features_xml): New.
9556 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9557 * target.h (struct target_ops): Add arch_string method.
9558
9559 2007-01-03 Denis Pilat <denis.pilat@st.com>
9560 Daniel Jacobowitz <dan@codesourcery.com>
9561
9562 * linux-low.c (linux_kill): Handle being called with no threads.
9563 * win32-i386-low.c (win32_kill): Likewise.
9564 (get_child_debug_event): Clear current_process_handle.
9565
9566 2006-12-30 Denis PILAT <denis.pilat@st.com>
9567 Daniel Jacobowitz <dan@codesourcery.com>
9568
9569 * remote-utils.c (remote_open): Check the type of specified
9570 serial port devices before opening them.
9571 * server.c (main): Kill the inferior if an error occurs during
9572 the first remote_open.
9573
9574 2006-12-05 Markus Deuling <deuling@de.ibm.com>
9575
9576 * README: Update supported targets.
9577
9578 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9579
9580 * Makefile.in (clean): Remove reg-mips64.c.
9581 (reg-mips64.c, reg-mips64.o): New rules.
9582 * configure.srv: Handle mips64. Include regset support for mips.
9583 * linux-mips-low.c (union mips_register): New.
9584 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9585 (mips_breakpoint, mips_breakpoint_at): Use int.
9586 (mips_collect_register, mips_supply_register)
9587 (mips_collect_register_32bit, mips_supply_register_32bit)
9588 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9589 (mips_store_fpregset, target_regsets): New.
9590 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9591
9592 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9593
9594 * configure.srv: Add target "spu*-*-*".
9595 * Makefile.in (clean): Remove reg-spu.c.
9596 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9597 * spu-low.c: New file.
9598
9599 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9600
9601 * configure.ac: Correct td_thr_tls_get_addr test.
9602 * configure: Regenerated.
9603
9604 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9605
9606 * linux-low.c (linux_wait_for_event): Reformat. Use the
9607 pass_signals array.
9608 * remote-utils.c (decode_address_to_semicolon): New.
9609 * server.c (pass_signals, handle_general_set): New.
9610 (handle_query): Mention QPassSignals for qSupported.
9611 (main): Call handle_general_set.
9612 * server.h (pass_signals, decode_address_to_semicolon): New.
9613
9614 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9615
9616 * server.c (handle_query): Correct error handling for read_auxv.
9617
9618 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9619
9620 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9621 and srv_linux_thread_db to yes.
9622 * linux-s390-low.c (s390_fill_gregset): New function.
9623 (target_regsets): Define data structure.
9624
9625 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9626
9627 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9628 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9629 * config.in, configure: Regenerated.
9630 * inferiors.c (gdb_id_to_thread): New function.
9631 (gdb_id_to_thread_id): Use it.
9632 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9633 * linux-low.h (struct process_info): Add th member.
9634 (thread_db_get_tls_address): New prototype.
9635 * remote-utils.c (decode_address): Make non-static.
9636 * server.c (handle_query): Handle qGetTLSAddr.
9637 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9638 * target.h (struct target_ops): Add get_tls_address.
9639 * thread-db.c (maybe_attach_thread): Save the thread handle.
9640 (thread_db_get_tls_address): New.
9641
9642 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9643
9644 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9645 (linux_resume_one_process): Take a siginfo_t *. Update all
9646 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9647 (struct pending_signals): Add a siginfo_t.
9648 (linux_wait_for_process): Always set last_status.
9649 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9650 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9651 * linux-low.h (struct process_info): Add last_status.
9652
9653 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9654
9655 * remote-utils.c (try_rle): New function.
9656 (putpkt_binary): Use it.
9657
9658 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9659
9660 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9661 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9662 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9663 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9664 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9665 point registers.
9666
9667 2006-08-08 Richard Sandiford <richard@codesourcery.com>
9668
9669 * server.c (terminal_fd): New variable.
9670 (old_foreground_pgrp): Likewise.
9671 (restore_old_foreground_pgrp): New function.
9672 (start_inferior): Record the terminal file descriptor in terminal_fd
9673 and its original foreground group in old_foreground_pgrp. Register
9674 restore_old_foreground_pgrp with atexit().
9675
9676 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9677
9678 * server.c (handle_query): Correct qPart to qXfer.
9679
9680 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9681
9682 * configure.ac: Check for more headers which are missing on
9683 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9684 * configure.srv: Add Cygwin and mingw32.
9685 * remote-utils.c: Don't include headers unconditionally which
9686 are missing on mingw32. Include <winsock.h> for mingw32.
9687 (remote_open): Adjust for mingw32 support. Flush
9688 standard error after writing to it.
9689 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9690 (unblock_async_io, enable_async_io, disable_async_io)
9691 (readchar, getpkt): Update for Winsock support.
9692 (prepare_resume_reply): Expect a protocol signal number.
9693 * server.c: Disable <sys/wait.h> on mingw32.
9694 (start_inferior): Adjust for mingw32 support. Flush
9695 standard error after writing to it.
9696 (attach_inferior): Likewise. Use protocol signal
9697 numbers.
9698 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9699 and names.
9700 * win32-i386-low.c: New file.
9701 * Makefile.in (XM_CLIBS): Set.
9702 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9703 (win32-i386-low.o): New dependency rule.
9704 * linux-low.c (linux_wait): Use target signal numbers.
9705 * target.h (struct target_ops): Doc fix.
9706 * server.h (target_signal_to_name): New prototype.
9707 * gdbreplay.c: Don't include headers unconditionally which
9708 are missing on mingw32. Include <winsock.h> for mingw32.
9709 (remote_close, remote_open): Adjust for Winsock support.
9710 * configure, config.in: Regenerated.
9711
9712 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9713
9714 * server.c (decode_xfer_read, write_qxfer_response): New.
9715 (handle_query): Take a packet length argument. Handle
9716 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9717 the qSupported response.
9718 (main): Update call to handle_query.
9719
9720 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9721
9722 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9723 (putpkt_binary): Renamed from putpkt and adjusted for binary
9724 data.
9725 (putpkt): New wrapper for putpkt_binary.
9726 (readchar): Don't mask off the high bit.
9727 (decode_X_packet): New function.
9728 * server.c (main): Call putpkt_binary if a handler sets the packet
9729 length. Save the length of the incoming packet. Handle 'X'.
9730 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9731
9732 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9733
9734 * server.c (handle_query): Handle qSupported.
9735
9736 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9737
9738 * remote-utils.c (all_symbols_looked_up): New variable.
9739 (look_up_one_symbol): Check it.
9740 * server.h (look_up_one_symbol): New declaration.
9741 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9742
9743 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9744
9745 * Makefile.in (linux-arm-low.o): Update dependencies.
9746 * linux-arm-low.c: Include "gdb_proc_service.h".
9747 (PTRACE_GET_THREAD_AREA): Define.
9748 (ps_get_thread_area): New function.
9749
9750 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9751
9752 * configure.srv (m68k*-*-uclinux*): New target.
9753 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9754 (linux_resume_one_process): Remove extraneous cast.
9755 (linux_read_offsets): New.
9756 (linux_target_op): Add linux_read_offsets on mmuless systems.
9757 * server.c (handle_query): Add qOffsets logic.
9758 * target.h (struct target_ops): Add read_offsets.
9759
9760 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9761
9762 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9763 (PTRACE_GET_THREAD_AREA): Define.
9764 (ps_get_thread_area): New function.
9765 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9766 (linux-x86-64-low.o): Update.
9767
9768 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9769
9770 * configure.ac: Remove checks for prfpregset_t.
9771 * gdb_proc_service.h: New file.
9772 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9773 new "gdb_proc_service.h".
9774 * proc-service.c: Likewise.
9775 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9776 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9777 * Makefile.in (gdb_proc_service_h): Updated.
9778 * configure, config.in: Regenerated.
9779
9780 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9781
9782 * remote-utils.c (prepare_resume_reply): Move declaration
9783 of gdb_id_from_wait to the top of the block.
9784
9785 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9786
9787 * linux-low.c (regsets_store_inferior_registers): Read the regset
9788 from the target before filling it.
9789
9790 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9791
9792 * server.c (attach_inferior): Return SIGTRAP for a successful
9793 attach.
9794
9795 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9796
9797 * Makefile.in (OBS): Add version.o.
9798 (STAGESTUFF): Delete.
9799 (version.o): Add dependencies.
9800 (version.c): Replace rule.
9801 (clean): Remove version.c.
9802 * server.c (gdbserver_version): New.
9803 (gdbserver_usage): Use printf.
9804 (main): Handle --version and --help.
9805 * server.h (version, host_name): Add declarations.
9806
9807 2005-12-23 Eli Zaretskii <eliz@gnu.org>
9808
9809 * linux-arm-low.c:
9810 * linux-arm-low.c:
9811 * inferiors.c:
9812 * i387-fp.h:
9813 * i387-fp.c:
9814 * gdbreplay.c:
9815 * regcache.c:
9816 * proc-service.c:
9817 * mem-break.h:
9818 * mem-break.c:
9819 * linux-x86-64-low.c:
9820 * linux-sh-low.c:
9821 * linux-s390-low.c:
9822 * linux-ppc64-low.c:
9823 * linux-ppc-low.c:
9824 * linux-mips-low.c:
9825 * linux-m68k-low.c:
9826 * linux-m32r-low.c:
9827 * linux-low.h:
9828 * linux-low.c:
9829 * linux-ia64-low.c:
9830 * linux-i386-low.c:
9831 * linux-crisv32-low.c:
9832 * thread-db.c:
9833 * terminal.h:
9834 * target.h:
9835 * target.c:
9836 * server.h:
9837 * server.c:
9838 * remote-utils.c:
9839 * regcache.h:
9840 * utils.c:
9841 * Makefile.in:
9842 * configure.ac:
9843 * gdbserver.1: Add (C) after Copyright. Update the FSF
9844 address.
9845
9846 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9847
9848 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9849 (arm_breakpoint_at): Recognize both breakpoints.
9850 (the_low_target): Use the correct breakpoint instruction.
9851
9852 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9853
9854 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9855 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9856 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9857 (the_low_target): Update.
9858
9859 2005-10-25 Andreas Schwab <schwab@suse.de>
9860
9861 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9862
9863 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9864 (ia64_num_regs): Reduce to 462.
9865
9866 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9867
9868 * acinclude.m4: Correct quoting.
9869 * aclocal.m4: Regenerated.
9870
9871 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9872 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9873 (thread_db_init): Call thread_db_err_str.
9874 * configure.ac: Check for TD_VERSION.
9875 * config.in, configure: Regenerated.
9876
9877 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9878
9879 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9880
9881 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9882
9883 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9884 is not available. Define HAVE_PTRACE_GETREGS if it is.
9885 * config.in, configure: Regenerated.
9886 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9887 * linux-i386-low.c, linux-m68k-low.c: Update to use
9888 HAVE_PTRACE_GETREGS.
9889 * linux-low.c (regsets_fetch_inferior_registers)
9890 (regsets_store_inferior_registers): Only return 0 if we processed
9891 GENERAL_REGS.
9892 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9893 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9894
9895 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9896
9897 * inferiors.c (struct thread_info): Add gdb_id.
9898 (add_thread): Add gdb_id argument.
9899 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
9900 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
9901 calls to add_thread.
9902 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
9903 * server.c (handle_query): Use thread_to_gdb_id.
9904 (handle_v_cont, main): Use gdb_id_to_thread_id.
9905 * server.h (add_thread): Update prototype.
9906 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
9907 prototypes.
9908
9909 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9910
9911 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
9912 left-padded registers.
9913 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
9914 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
9915
9916 2005-07-01 Steve Ellcey <sje@cup.hp.com>
9917
9918 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
9919 * configure: Regenerate.
9920 * config.in: Regenerate.
9921 * server.h (NEED_DECLARATION_STRERROR):
9922 Replace with !HAVE_DECL_STRERROR.
9923
9924 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
9925
9926 * linux-low.c (linux_wait, linux_send_signal): Don't test
9927 an unsigned long variable for > 0 if it could be MAX_ULONG.
9928 * server.c (myresume): Likewise.
9929 * target.c (set_desired_inferior): Likewise.
9930
9931 2005-06-13 Mark Kettenis <kettenis@gnu.org>
9932
9933 * configure.ac: Simplify and improve check for socklen_t.
9934 * configure, config.in: Regenerate.
9935
9936 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
9937
9938 * acconfig.h: Remove.
9939 * configure.ac: Add a test for socklen_t. Use three-argument
9940 AC_DEFINE throughout.
9941 * config.in: Regenerated using autoheader 2.59.
9942 * configure: Regenerated.
9943
9944 * gdbreplay.c (socklen_t): Provide a default.
9945 (remote_open): Use socklen_t.
9946 * remote-utils.c (socklen_t): Provide a default.
9947 (remote_open): Use socklen_t.
9948 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
9949 unsigned char.
9950
9951 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
9952 char for buffers.
9953 * linux-low.c (linux_read_memory, linux_write_memory)
9954 (linux_read_auxv): Likewise.
9955 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
9956 (check_mem_write): Likewise.
9957 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
9958 Likewise.
9959 * regcache.c (struct inferior_rgcache_data, registers_to_string)
9960 (registers_from_string, register_data): Likewise.
9961 * server.c (handle_query, main): Likewise.
9962 * server.h (convert_ascii_to_int, convert_int_to_ascii)
9963 (decode_M_packet): Likewise.
9964 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
9965 * target.h (struct target_ops): Update read_memory, write_memory,
9966 and read_auxv.
9967 (read_inferior_memory, write_inferior_memory): Update.
9968 * linux-low.h (struct linux_target_ops): Change type of breakpoint
9969 to unsigned char *.
9970 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
9971 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
9972 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
9973 linux-s390-low.c, linux-sh-low.c: Update for changes in
9974 read_inferior_memory and the_low_target->breakpoint.
9975
9976 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
9977
9978 * Makefile.in (SFILES): Add linux-ppc64-low.c.
9979 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
9980 * configure.srv: Add powerpc64-*-linux*.
9981 * linux-ppc64-low.c: New file.
9982
9983 2005-05-23 Orjan Friberg <orjanf@axis.com>
9984
9985 * linux-cris-low.c: New file with support for CRIS.
9986 * linux-crisv32-low.c: Ditto for CRISv32.
9987 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
9988 (clean): Add reg-cris.c and reg-crisv32.c.
9989 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
9990 reg-crisv32.o, and reg-crisv32.c to make rules.
9991 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
9992 recognized targets.
9993
9994 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
9995
9996 * linux-low.c (fetch_register): Ensure buffer size is a multiple
9997 of sizeof (PTRACE_XFER_TYPE).
9998 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
9999
10000 2005-05-12 Orjan Friberg <orjanf@axis.com>
10001
10002 * target.h (struct target_ops): Add insert_watchpoint,
10003 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10004 pointers for hardware watchpoint support.
10005 * linux-low.h (struct linux_target_ops): Ditto.
10006 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10007 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10008 to linux_target_ops.
10009 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10010 reply packet.
10011 * server.c (main): Recognize 'Z' and 'z' packets.
10012
10013 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10014
10015 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10016 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10017 (the_low_target): Add new members.
10018
10019 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10020
10021 * proc-service.c (ps_lgetregs): Search all_processes instead of
10022 all_threads.
10023
10024 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10025
10026 * server.c (start_inferior): Change return type to int.
10027 (attach_inferior): Change sigptr to int *.
10028 (handle_v_cont, handle_v_requests): Change signal to int *.
10029 (main): Change signal to int.
10030
10031 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
10032
10033 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10034 * configure.srv: Add m32r*-*-linux*.
10035 * linux-m32r-low.c: New file.
10036
10037 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10038
10039 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10040
10041 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10042
10043 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10044 Take unsigned long arguments for PIDs.
10045 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10046 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10047 (wait_for_sigstop, linux_resume_one_process)
10048 (regsets_fetch_inferior_registers, linux_send_signal)
10049 (linux_read_auxv): Likewise. Update the types of variables holding
10050 PIDs. Update format string specifiers.
10051 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10052 * remote-utils.c (prepare_resume_reply): Likewise.
10053 * server.c (cont_thread, general_thread, step_thread)
10054 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10055 unsigned long.
10056 (handle_query): Update format specifiers.
10057 (handle_v_cont, main): Use strtoul for thread IDs.
10058 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10059 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10060 (general_thread, step_thread, thread_from_wait)
10061 (old_thread_from_wait): Update.
10062 * target.h (struct thread_resume): Use unsigned long for THREAD.
10063 (struct target_ops): Use unsigned long for arguments to attach and
10064 thread_alive.
10065
10066 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10067
10068 * acinclude.m4: Include bfd/bfd.m4 directly.
10069 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10070 <agriffis@toolchain.org>.
10071 * aclocal.m4, configure: Regenerated.
10072
10073 2005-01-07 Andrew Cagney <cagney@gnu.org>
10074
10075 * configure.ac: Rename configure.in, require autoconf 2.59.
10076 * configure: Re-generate.
10077
10078 2004-12-08 Daniel Jacobowitz <dan@debian.org>
10079
10080 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10081 LIBS when finished.
10082 * aclocal.m4: Regenerated.
10083 * configure: Regenerated.
10084
10085 2004-11-21 Andreas Schwab <schwab@suse.de>
10086
10087 * linux-m68k-low.c (m68k_num_gregs): Define.
10088 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10089 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10090 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10091 (m68k_breakpoint_at): New. Add to the_low_target.
10092
10093 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10094 srv_linux_thread_db to yes.
10095
10096 2004-10-20 Joel Brobecker <brobecker@gnat.com>
10097
10098 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10099 (ARCH_SET_FS): Likewise.
10100 (ARCH_GET_FS): Likewise.
10101 (ARCH_GET_GS): Likewise.
10102
10103 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10104
10105 * linux-i386-low.c (ps_get_thread_area): New.
10106 * linux-x86-64-low.c (ps_get_thread_area): New.
10107 * linux-low.c: Include <sys/syscall.h>.
10108 (linux_kill_one_process): Don't kill the first thread here.
10109 (linux_kill): Kill the first thread here.
10110 (kill_lwp): New function.
10111 (send_sigstop, linux_send_signal): Use it.
10112 * proc-service.c: Clean up #ifdefs.
10113 (fpregset_info): Delete.
10114 (ps_lgetregs): Update and enable implementation.
10115 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10116 implementations.
10117 * remote-utils.c (struct sym_cache, symbol_cache): New.
10118 (input_interrupt): Print a clearer message.
10119 (async_io_enabled): New variable.
10120 (enable_async_io, disable_async_io): Use it. Update comments.
10121 (look_up_one_symbol): Use the symbol cache.
10122 * thread-db.c (thread_db_look_up_symbols): New function.
10123 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10124
10125 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10126
10127 * configure.in: Test for -rdynamic.
10128 * configure: Regenerated.
10129 * Makefile (INTERNAL_LDFLAGS): New.
10130 (gdbserver, gdbreplay): Use it.
10131
10132 2004-09-02 Andrew Cagney <cagney@gnu.org>
10133
10134 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10135
10136 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
10137
10138 * linux-low.c (linux_wait): Clear all_processes list also.
10139
10140 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10141
10142 * linux-low.c: Include <errno.h>. Remove extern declaration of
10143 errno.
10144
10145 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10146
10147 * gdbreplay.c, server.h, utils.c: Update copyright years.
10148
10149 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10150
10151 * server.c (main): Print child status or termination signal from
10152 variable 'signal', not 'sig'.
10153
10154 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10155
10156 * linux-low.c (linux_read_memory): Change return type to
10157 int. Check for and return error from ptrace().
10158 * target.c (read_inferior_memory): Change return type to int. Pass
10159 back return status from the_target->read_memory().
10160 * target.h (struct target_ops): Adapt *read_memory() prototype.
10161 Update comment.
10162 (read_inferior_memory): Adapt prototype.
10163 * server.c (main): Return an error packet if
10164 read_inferior_memory() returns an error.
10165
10166 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
10167
10168 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10169 Unify with other clean targets.
10170
10171 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10172
10173 * server.c (handle_v_cont): Call set_desired_inferior.
10174
10175 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10176
10177 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10178
10179 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10180
10181 * linux-low.c (linux_wait): Unblock async I/O.
10182 (linux_resume): Block and enable async I/O.
10183 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10184 * server.h (block_async_io, unblock_async_io): Add prototypes.
10185
10186 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10187
10188 * remote-utils.c (remote_open): Print a status notice after
10189 opening a TCP port.
10190 * server.c (attach_inferior): Print a status notice after
10191 attaching.
10192
10193 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10194
10195 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10196
10197 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
10198
10199 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10200 error packet.
10201 * server.c, target.h: Update copyright years.
10202
10203 2004-02-25 Roland McGrath <roland@redhat.com>
10204
10205 * target.h (struct target_ops): New member `read_auxv'.
10206 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10207 * linux-low.c (linux_read_auxv): New function.
10208 (linux_target_ops): Initialize `read_auxv' member to that.
10209
10210 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10211
10212 Committed by Jim Blandy <jimb@redhat.com>.
10213
10214 * linux-s390-low.c (s390_num_regs): Update.
10215 (s390_regmap): Remove control registers. Use __s390x__ predefine
10216 instead of GPR_SIZE to distiguish s390 and s390x targets.
10217
10218 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
10219
10220 * linux-low.c: Update copyright year.
10221 (check_removed_breakpoint): Clear pending_is_breakpoint.
10222 (linux_set_resume_request, linux_queue_one_thread)
10223 (resume_status_pending_p): New functions.
10224 (linux_continue_one_thread): Use process->resume.
10225 (linux_resume): Only resume threads if there are no pending events.
10226 * linux-low.h (struct process_info): Add resume request
10227 pointer.
10228
10229 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
10230
10231 * regcache.c (new_register_cache): Clear the allocated register
10232 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10233
10234 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
10235
10236 * linux-low.c (linux_resume): Take a struct thread_resume *
10237 argument.
10238 (linux_wait): Update call.
10239 (resume_ptr): New static variable.
10240 (linux_continue_one_thread): Renamed from
10241 linux_continue_one_process. Use resume_ptr.
10242 (linux_resume): Use linux_continue_one_thread.
10243 * server.c (handle_v_cont, handle_v_requests): New functions.
10244 (myresume): New function.
10245 (main): Handle 'v' case.
10246 * target.h (struct thread_resume): New type.
10247 (struct target_ops): Change argument of "resume" to struct
10248 thread_resume *.
10249 (myresume): Delete macro.
10250
10251 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10252
10253 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10254 (uninstall): Support DESTDIR.
10255
10256 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10257
10258 * configure.srv: Add xscale*linux copy of arm*linux entry.
10259
10260 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
10261
10262 * linux-arm-low.c (arm_reinsert_addr): New function.
10263 (the_low_target): Add arm_reinsert_addr.
10264
10265 2003-07-08 Mark Kettenis <kettenis@gnu.org>
10266
10267 * mem-break.c: Remove whitespace at end of file.
10268
10269 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10270
10271 * configure.in: Check whether we need to prototype strerror.
10272 * server.h: Optionally prototype strerror.
10273 * gdbreplay.c (perror_with_name): Use strerror.
10274 * linux-low.c (linux_attach_lwp): Use strerror.
10275 * utils.c (perror_with_name): Use strerror.
10276 * config.in, configure: Regenerated.
10277
10278 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10279
10280 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10281 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10282
10283 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
10284
10285 * Makefile.in (SFILES): Update.
10286 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10287 low-sun3.c: Remove files.
10288
10289 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
10290
10291 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10292 (linux_detach_one_process, linux_detach): New functions.
10293 (linux_target_ops): Add linux_detach.
10294 * server.c (main): Handle 'D' packet.
10295 * target.h (struct target_ops): Add "detach" member.
10296 (detach_inferior): Define.
10297
10298 2003-06-13 Mark Kettenis <kettenis@gnu.org>
10299
10300 From Kelley Cook <kelleycook@wideopenwest.com>:
10301 * configure.srv: Accept i[34567]86 variants.
10302
10303 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
10304
10305 * linux-low.c (linux_wait_for_event): Correct comment typos.
10306 (linux_resume_one_process): Call check_removed_breakpoint.
10307 (linux_send_signal): New function.
10308 (linux_target_ops): Add linux_send_signal.
10309 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10310 of kill.
10311 * target.h (struct target_ops): Add send_signal.
10312
10313 2003-05-29 Jim Blandy <jimb@redhat.com>
10314
10315 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10316 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10317 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10318 away part of the register's value.
10319
10320 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
10321
10322 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10323 (linux_wait_for_event, linux_init_signals): Likewise.
10324
10325 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
10326
10327 * configure.in: Check for stdlib.h.
10328 * configure: Regenerated.
10329 * config.in: Regenerated.
10330
10331 2003-01-04 Andreas Schwab <schwab@suse.de>
10332
10333 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10334
10335 2003-01-02 Andrew Cagney <ac131313@redhat.com>
10336
10337 * Makefile.in: Remove obsolete code.
10338
10339 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
10340
10341 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10342 defined(PT_FPR0_HI).
10343
10344 2002-11-17 Stuart Hughes <seh@zee2.com>
10345
10346 * linux-arm-low.c (arm_num_regs): Increase.
10347 (arm_regmap): Include status register.
10348
10349 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
10350
10351 * linux-low.c (register_addr): Remove incorrect -1 check.
10352
10353 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
10354
10355 * linux-low.c (linux_create_inferior): Call setpgid. Return
10356 the new PID.
10357 (unstopped_p, linux_signal_pid): Remove.
10358 (linux_target_ops): Remove linux_signal_pid.
10359 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10360 global instead of target method.
10361 * target.h (struct target_ops): Remove signal_pid. Update comment
10362 for create_inferior.
10363 * server.c (signal_pid): New variable.
10364 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
10365 gdbserver. Set the child to be the foreground process group.
10366 (attach_inferior): Set signal_pid.
10367
10368 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
10369
10370 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10371
10372 2002-08-20 Jim Blandy <jimb@redhat.com>
10373
10374 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10375 default for this.
10376
10377 2002-08-01 Andrew Cagney <cagney@redhat.com>
10378
10379 * Makefile.in: Make chill references obsolete.
10380
10381 2002-07-24 Kevin Buettner <kevinb@redhat.com>
10382
10383 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10384 * configure: Regenerate.
10385 * config.in: Regenerate.
10386
10387 2002-07-09 David O'Brien <obrien@FreeBSD.org>
10388
10389 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10390 (perror_with_name, remote_close, remote_open, expect, play): Static.
10391
10392 2002-07-04 Michal Ludvig <mludvig@suse.cz>
10393
10394 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
10395 byte offsets instead of an array of indexes.
10396 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10397
10398 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
10399
10400 * regcache.c: Add comment.
10401
10402 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
10403
10404 * thread-db.c: New file.
10405 * proc-service.c: New file.
10406 * acinclude.m4: New file.
10407 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10408 proc-service.o, and thread-db.o.
10409 (linux-low.o): Add USE_THREAD_DB.
10410 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10411 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10412 * aclocal.m4: Regenerated.
10413 * config.in: Regenerated.
10414 * configure: Regenerated.
10415 * configure.in: Check for proc_service.h, sys/procfs.h,
10416 thread_db.h, and linux/elf.h headrs.
10417 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10418 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10419 Check for -lthread_db and thread support.
10420 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10421 PowerPC, and SuperH.
10422 * i387-fp.c: Constify arguments.
10423 * i387-fp.h: Likewise.
10424 * inferiors.c: (struct thread_info): Renamed from
10425 `struct inferior_info'. Remove PID member. Use generic inferior
10426 list header. All uses updated.
10427 (inferiors, signal_pid): Removed.
10428 (all_threads): New variable.
10429 (get_thread): Define.
10430 (add_inferior_to_list): New function.
10431 (for_each_inferior): New function.
10432 (change_inferior_id): New function.
10433 (add_inferior): Removed.
10434 (remove_inferior): New function.
10435 (add_thread): New function.
10436 (free_one_thread): New function.
10437 (remove_thread): New function.
10438 (clear_inferiors): Use for_each_inferior and free_one_thread.
10439 (find_inferior): New function.
10440 (find_inferior_id): New function.
10441 (inferior_target_data): Update argument type.
10442 (set_inferior_target_data): Likewise.
10443 (inferior_regcache_data): Likewise.
10444 (set_inferior_regcache_data): Likewise.
10445 * linux-low.c (linux_bp_reinsert): Remove.
10446 (all_processes, stopping_threads, using_thrads)
10447 (struct pending_signals, debug_threads, pid_of): New.
10448 (inferior_pid): Replace with macro.
10449 (struct inferior_linux_data): Remove.
10450 (get_stop_pc, add_process): New functions.
10451 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10452 Use add_process and add_thread.
10453 (linux_attach_lwp): New function, based on old linux_attach. Use
10454 add_process and add_thread. Set stop_expected for new threads.
10455 (linux_attach): New function.
10456 (linux_kill_one_process): New function.
10457 (linux_kill): Kill all LWPs.
10458 (linux_thread_alive): Use find_inferior_id.
10459 (check_removed_breakpoints, status_pending_p): New functions.
10460 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10461 Update. Use WNOHANG. Wait for cloned processes also. Update process
10462 struct for the found process.
10463 (linux_wait_for_event): New function.
10464 (linux_wait): Use it. Support LWPs.
10465 (send_sigstop, wait_for_sigstop, stop_all_processes)
10466 (linux_resume_one_process, linux_continue_one_process): New functions.
10467 (linux_resume): Support LWPs.
10468 (REGISTER_RAW_SIZE): Remove.
10469 (fetch_register): Use register_size instead. Call supply_register.
10470 (usr_store_inferior_registers): Likewise. Call collect_register.
10471 Fix recursive case.
10472 (regsets_fetch_inferior_registers): Improve error message.
10473 (regsets_store_inferior_registers): Add debugging.
10474 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10475 (unstopped_p, linux_signal_pid): New functions.
10476 (linux_target_ops): Add linux_signal_pid.
10477 (linux_init_signals): New function.
10478 (initialize_low): Call it. Initialize using_threads.
10479 * regcache.c (inferior_regcache_data): Add valid
10480 flag.
10481 (get_regcache): Fetch registers lazily. Add fetch argument
10482 and update all callers.
10483 (regcache_invalidate_one, regcache_invalidate): New
10484 functions.
10485 (new_register_cache): Renamed from create_register_cache.
10486 Return the new regcache.
10487 (free_register_cache): Change argument to a void *.
10488 (registers_to_string, registers_from_string): Call get_regcache
10489 with fetch flag set.
10490 (register_data): Make static. Pass fetch flag to get_regcache.
10491 (supply_register): Call get_regcache with fetch flag clear.
10492 (collect_register): Call get_regcache with fetch flag set.
10493 (collect_register_as_string): New function.
10494 * regcache.h: Update.
10495 * remote-utils.c (putpkt): Flush after debug output and use
10496 stderr.
10497 Handle input interrupts while waiting for an ACK.
10498 (input_interrupt): Use signal_pid method.
10499 (getpkt): Flush after debug output and use stderr.
10500 (outreg): Use collect_register_as_string.
10501 (new_thread_notify, dead_thread_notify): New functions.
10502 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10503 and general_thread.
10504 (look_up_one_symbol): Flush after debug output.
10505 * server.c (step_thread, server_waiting): New variables.
10506 (start_inferior): Don't use signal_pid. Update call to mywait.
10507 (attach_inferior): Update call to mywait.
10508 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10509 (main): Don't fetch/store registers explicitly. Use
10510 set_desired_inferior. Support proposed ``Hs'' packet. Update
10511 calls to mywait.
10512 * server.h: Update.
10513 (struct inferior_list, struct_inferior_list_entry): New.
10514 * target.c (set_desired_inferior): New.
10515 (write_inferior_memory): Constify.
10516 (mywait): New function.
10517 * target.h: Update.
10518 (struct target_ops): New signal_pid method.
10519 (mywait): Removed macro, added prototype.
10520
10521 * linux-low.h (regset_func): Removed.
10522 (regset_fill_func, regset_store_func): New.
10523 (enum regset_type): New.
10524 (struct regset_info): Add type field. Use new operation types.
10525 (struct linux_target_ops): stop_pc renamed to get_pc.
10526 Add decr_pc_after_break and breakpoint_at.
10527 (get_process, get_thread_proess, get_process_thread)
10528 (strut process_info, all_processes, linux_attach_lwp)
10529 (thread_db_init): New.
10530
10531 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10532 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10533 (the_low_target): Add new members.
10534 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10535 (i386_store_fpxregset): Constify.
10536 (target_regsets): Add new kind identifier.
10537 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10538 (i386_set_pc): Add debugging.
10539 (i386_breakpoint_at): New function.
10540 (the_low_target): Add new members.
10541 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10542 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10543 (mips_breakpoint_at): New.
10544 (the_low_target): Add new members.
10545 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10546 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10547 (the_low_target): Add new members.
10548 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10549 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10550 (the_low_target): Add new members.
10551 * linux-x86-64-low.c (target_regsets): Add new kind
10552 identifier.
10553
10554 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
10555
10556 From Martin Pool <mbp@samba.org>:
10557 * server.c (gdbserver_usage): New function.
10558 (main): Call it.
10559
10560 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
10561
10562 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10563 stop_at -> stop_pc.
10564
10565 2002-05-04 Andrew Cagney <ac131313@redhat.com>
10566
10567 * Makefile.in: Remove obsolete code.
10568
10569 2002-04-24 Michal Ludvig <mludvig@suse.cz>
10570
10571 * linux-low.c (regsets_fetch_inferior_registers),
10572 (regsets_store_inferior_registers): Removed cast to int from
10573 ptrace() calls.
10574 * regcache.h: Added declaration of struct inferior_info.
10575
10576 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10577
10578 * inferiors.c (struct inferior_info): Add regcache_data.
10579 (add_inferior): Call create_register_cache.
10580 (clear_inferiors): Call free_register_cache.
10581 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10582 * regcache.c (struct inferior_regcache_data): New.
10583 (registers): Remove.
10584 (get_regcache): New function.
10585 (create_register_cache, free_register_cache): New functions.
10586 (set_register_cache): Don't initialize the register cache here.
10587 (registers_to_string, registers_from_string, register_data): Call
10588 get_regcache.
10589 * regcache.h: Add prototypes.
10590 * server.h: Likewise.
10591
10592 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10593
10594 * mem-break.c: New file.
10595 * mem-break.h: New file.
10596 * Makefile.in: Add mem-break.o rule; update server.h
10597 dependencies.
10598 * inferiors.c (struct inferior_info): Add target_data
10599 member.
10600 (clear_inferiors): Free target_data member if set.
10601 (inferior_target_data, set_inferior_target_data): New functions.
10602 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10603 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10604 * linux-low.c (linux_bp_reinsert): New variable.
10605 (struct inferior_linux_data): New.
10606 (linux_create_inferior): Use set_inferior_target_data.
10607 (linux_attach): Likewise. Call add_inferior.
10608 (linux_wait_for_one_inferior): New function.
10609 (linux_wait): Call it.
10610 (linux_write_memory): Add const.
10611 (initialize_low): Call set_breakpoint_data.
10612 * linux-low.h (struct linux_target_ops): Add breakpoint
10613 handling members.
10614 * server.c (attach_inferior): Remove extra add_inferior
10615 call.
10616 * server.h: Include mem-break.h. Update inferior.c
10617 prototypes.
10618 * target.c (read_inferior_memory)
10619 (write_inferior_memory): New functions.
10620 * target.h (read_inferior_memory)
10621 (write_inferior_memory): Change macros to prototypes.
10622 (struct target_ops): Update comments. Add const to write_memory
10623 definition.
10624
10625 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
10626
10627 * linux-low.c (usr_store_inferior_registers): Support
10628 registers which are allowed to fail to store.
10629 * linux-low.h (linux_target_ops): Likewise.
10630 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10631 (ppc_cannot_store_register): FPSCR may not be storable.
10632
10633 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10634
10635 * server.h: Include <string.h> if HAVE_STRING_H.
10636 * ChangeLog: Correct paths in last ChangeLog entry.
10637
10638 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10639
10640 * linux-low.h: Remove obsolete prototypes.
10641 (struct linux_target_ops): New.
10642 (extern the_low_target): New.
10643 * linux-low.c (num_regs, regmap): Remove declarations.
10644 (register_addr): Use the_low_target explicitly.
10645 (fetch_register): Likewise.
10646 (usr_fetch_inferior_registers): Likewise.
10647 (usr_store_inferior_registers): Likewise.
10648 * linux-arm-low.c (num_regs): Remove.
10649 (arm_num_regs): Define.
10650 (arm_regmap): Renamed from regmap, made static.
10651 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10652 made static.
10653 (arm_cannot_store_register): Renamed from cannot_store_register,
10654 made static.
10655 (the_low_target): New.
10656 * linux-i386-low.c (num_regs): Remove.
10657 (i386_num_regs): Define.
10658 (i386_regmap): Renamed from regmap, made static.
10659 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10660 made static.
10661 (i386_cannot_store_register): Renamed from cannot_store_register,
10662 made static.
10663 (the_low_target): New.
10664 * linux-ia64-low.c (num_regs): Remove.
10665 (ia64_num_regs): Define.
10666 (ia64_regmap): Renamed from regmap, made static.
10667 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10668 made static.
10669 (ia64_cannot_store_register): Renamed from cannot_store_register,
10670 made static.
10671 (the_low_target): New.
10672 * linux-m68k-low.c (num_regs): Remove.
10673 (m68k_num_regs): Define.
10674 (m68k_regmap): Renamed from regmap, made static.
10675 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10676 made static.
10677 (m68k_cannot_store_register): Renamed from cannot_store_register,
10678 made static.
10679 (the_low_target): New.
10680 * linux-mips-low.c (num_regs): Remove.
10681 (mips_num_regs): Define.
10682 (mips_regmap): Renamed from regmap, made static.
10683 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10684 made static.
10685 (mips_cannot_store_register): Renamed from cannot_store_register,
10686 made static.
10687 (the_low_target): New.
10688 * linux-ppc-low.c (num_regs): Remove.
10689 (ppc_num_regs): Define.
10690 (ppc_regmap): Renamed from regmap, made static.
10691 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10692 made static.
10693 (ppc_cannot_store_register): Renamed from cannot_store_register,
10694 made static.
10695 (the_low_target): New.
10696 * linux-s390-low.c (num_regs): Remove.
10697 (s390_num_regs): Define.
10698 (s390_regmap): Renamed from regmap, made static.
10699 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10700 made static.
10701 (s390_cannot_store_register): Renamed from cannot_store_register,
10702 made static.
10703 (the_low_target): New.
10704 * linux-sh-low.c (num_regs): Remove.
10705 (sh_num_regs): Define.
10706 (sh_regmap): Renamed from regmap, made static.
10707 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10708 made static.
10709 (sh_cannot_store_register): Renamed from cannot_store_register,
10710 made static.
10711 (the_low_target): New.
10712 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10713 (the_low_target): New.
10714
10715 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10716
10717 * Makefile.in: Add stamp-h target.
10718 * configure.in: Create stamp-h.
10719 * configure: Regenerated.
10720
10721 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10722
10723 * inferiors.c: New file.
10724 * target.c: New file.
10725 * target.h: New file.
10726 * Makefile.in: Add target.o and inferiors.o. Update
10727 dependencies.
10728 * linux-low.c (inferior_pid): New static variable,
10729 moved from server.c.
10730 (linux_create_inferior): Renamed from create_inferior.
10731 Call add_inferior. Return 0 on success instead of a PID.
10732 (linux_attach): Renamed from myattach.
10733 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10734 (linux_thread_alive): Renamed from mythread_alive.
10735 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10736 child dies.
10737 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10738 (regsets_store_inferior_registers): Correct error message.
10739 Add missing ``return 0''.
10740 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10741 (linux_store_registers): Renamed from store_inferior_registers.
10742 (linux_read_memory): Renamed from read_inferior_memory.
10743 (linux_write_memory): Renamed from write_inferior_memory.
10744 (linux_target_ops): New structure.
10745 (initialize_low): Call set_target_ops ().
10746 * remote-utils.c (unhexify): New function.
10747 (hexify): New function.
10748 (input_interrupt): Send signals to ``signal_pid''.
10749 * server.c (inferior_pid): Remove.
10750 (start_inferior): Update create_inferior call.
10751 (attach_inferior): Call add_inferior.
10752 (handle_query): New function.
10753 (main): Call handle_query for `q' packets.
10754 * server.h: Include "target.h". Remove obsolete prototypes.
10755 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10756
10757 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10758
10759 * Makefile.in: Add WARN_CFLAGS. Update configury
10760 dependencies.
10761 * configure.in: Check for <string.h>
10762 * configure: Regenerate.
10763 * config.in: Regenerate.
10764 * gdbreplay.c: Include needed system headers.
10765 (remote_open): Remove strchr prototype.
10766 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10767 * regcache.c (supply_register): Change buf argument to const void *.
10768 (supply_register_by_name): Likewise.
10769 (collect_register): Change buf argument to void *.
10770 (collect_register_by_name): Likewise.
10771 * regcache.h: Add missing prototypes.
10772 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10773 * server.c (handle_query): New function.
10774 (attached): New static variable, moved out of main.
10775 (main): Quiet longjmp clobber warnings.
10776 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10777 * utils.c (error): Remove NORETURN.
10778 (fatal): Likewise.
This page took 0.316111 seconds and 5 git commands to generate.