Introduce basic LWP accessors
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-03-24 Gary Benson <gbenson@redhat.com>
2
3 * linux-low.c (ptid_of_lwp): New function.
4 (lwp_is_stopped): Likewise.
5 (lwp_stop_reason): Likewise.
6 * linux-x86-low.c (update_debug_registers_callback):
7 Use lwp_is_stopped.
8 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
9 lwp_stop_reason.
10
11 2015-03-24 Gary Benson <gbenson@redhat.com>
12
13 * linux-low.h (linux_stop_lwp): Remove declaration.
14
15 2015-03-24 Gary Benson <gbenson@redhat.com>
16
17 * linux-low.h: Include nat/linux-nat.h.
18 * linux-low.c (iterate_over_lwps_args): New structure.
19 (iterate_over_lwps_filter): New function.
20 (iterate_over_lwps): Likewise.
21 * linux-x86-low.c (update_debug_registers_callback):
22 Update signature to what iterate_over_lwps expects.
23 Remove PID check that iterate_over_lwps now performs.
24 (x86_dr_low_set_addr): Use iterate_over_lwps.
25 (x86_dr_low_set_control): Likewise.
26
27 2015-03-24 Gary Benson <gbenson@redhat.com>
28
29 * linux-x86-low.c (x86_debug_reg_state): New function.
30 (x86_linux_prepare_to_resume): Use the above.
31
32 2015-03-24 Gary Benson <gbenson@redhat.com>
33
34 * linux-low.c (current_lwp_ptid): New function.
35 * linux-x86-low.c: Include nat/linux-nat.h.
36 (x86_dr_low_get_addr): Use current_lwp_ptid.
37 (x86_dr_low_get_control): Likewise.
38 (x86_dr_low_get_status): Likewise.
39
40 2015-03-20 Pedro Alves <palves@redhat.com>
41
42 * tracepoint.c (cmd_qtstatus): Make "str" const.
43
44 2015-03-20 Pedro Alves <palves@redhat.com>
45
46 * server.c (handle_general_set): Make "req_str" const.
47
48 2015-03-19 Pedro Alves <palves@redhat.com>
49
50 * linux-low.c (linux_resume_one_lwp): Rename to ...
51 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
52 instead call perror_with_name.
53 (check_ptrace_stopped_lwp_gone): New function.
54 (linux_resume_one_lwp): Reimplement as wrapper around
55 linux_resume_one_lwp_throw that swallows errors if the LWP is
56 gone.
57
58 2015-03-19 Pedro Alves <palves@redhat.com>
59
60 * linux-low.c (count_events_callback, select_event_lwp_callback):
61 No longer check whether the thread has resume_stop as last resume
62 kind.
63
64 2015-03-19 Pedro Alves <palves@redhat.com>
65
66 * linux-low.c (count_events_callback, select_event_lwp_callback):
67 Use the lwp's status_pending_p field, not the thread's.
68
69 2015-03-19 Pedro Alves <palves@redhat.com>
70
71 * linux-low.c (select_event_lwp_callback): Update comments to
72 no longer mention SIGTRAP.
73
74 2015-03-18 Gary Benson <gbenson@redhat.com>
75
76 * server.c (handle_query): Do not report vFile:fstat as supported.
77
78 2015-03-11 Gary Benson <gbenson@redhat.com>
79
80 * hostio.c (sys/types.h): New include.
81 (sys/stat.h): Likewise.
82 (common-remote-fileio.h): Likewise.
83 (handle_fstat): New function.
84 (handle_vFile): Handle vFile:fstat packets.
85
86 2015-03-11 Gary Benson <gbenson@redhat.com>
87
88 * configure.ac (AC_CHECK_MEMBERS): Add checks for
89 struct stat.st_blocks and struct stat.st_blksize.
90 * configure: Regenerate.
91 * config.in: Likewise.
92 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
93 (OBS): Add common-remote-fileio.o.
94 (common-remote-fileio.o): New rule.
95
96 2015-03-09 Pedro Alves <palves@redhat.com>
97
98 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
99 'struct sockaddr' pointer in 'accept' call.
100
101 2015-03-09 Pedro Alves <palves@redhat.com>
102
103 Revert:
104 2015-03-07 Pedro Alves <palves@redhat.com>
105 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
106 or <winsock2.h> here. Instead include "gdb_socket.h".
107 (remote_open): Use union gdb_sockaddr_u.
108 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
109 or <winsock2.h> here. Instead include "gdb_socket.h".
110 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
111 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
112 or <sys/un.h>.
113 (init_named_socket, gdb_agent_helper_thread): Use union
114 gdb_sockaddr_u.
115
116 2015-03-07 Pedro Alves <palves@redhat.com>
117
118 * configure.ac (build_warnings): Move
119 -Wdeclaration-after-statement to the C-specific set.
120 * configure: Regenerate.
121
122 2015-03-07 Pedro Alves <palves@redhat.com>
123
124 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
125 or <winsock2.h> here. Instead include "gdb_socket.h".
126 (remote_open): Use union gdb_sockaddr_u.
127 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
128 or <winsock2.h> here. Instead include "gdb_socket.h".
129 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
130 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
131 or <sys/un.h>.
132 (init_named_socket, gdb_agent_helper_thread): Use union
133 gdb_sockaddr_u.
134
135 2015-03-07 Pedro Alves <palves@redhat.com>
136
137 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
138 instead.
139
140 2015-03-06 Yao Qi <yao.qi@linaro.org>
141
142 * linux-aarch64-low.c (aarch64_insert_point): Use
143 show_debug_regs as a boolean.
144 (aarch64_remove_point): Likewise.
145
146 2015-03-05 Pedro Alves <palves@redhat.com>
147
148 * lynx-low.c (lynx_target_ops): Install NULL hooks for
149 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
150 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
151 * nto-low.c (nto_target_ops): Likewise.
152 * spu-low.c (spu_target_ops): Likewise.
153 * win32-low.c (win32_target_ops): Likewise.
154
155 2015-03-04 Pedro Alves <palves@redhat.com>
156
157 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
158 Decide whether a breakpoint triggered based on the SIGTRAP's
159 siginfo.si_code.
160 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
161 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
162 (linux_low_filter_event): Check for breakpoints before checking
163 watchpoints.
164 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
165 siginfo.si_code.
166 (linux_stopped_by_sw_breakpoint)
167 (linux_supports_stopped_by_sw_breakpoint)
168 (linux_stopped_by_hw_breakpoint)
169 (linux_supports_stopped_by_hw_breakpoint): New functions.
170 (linux_target_ops): Install new target methods.
171
172 2015-03-04 Pedro Alves <palves@redhat.com>
173
174 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
175 * server.c (swbreak_feature, hwbreak_feature): New globals.
176 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
177 (captured_main): Clear swbreak_feature and hwbreak_feature.
178 * server.h (swbreak_feature, hwbreak_feature): Declare.
179 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
180 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
181 supports_stopped_by_hw_breakpoint>: New fields.
182 (target_supports_stopped_by_sw_breakpoint)
183 (target_stopped_by_sw_breakpoint)
184 (target_supports_stopped_by_hw_breakpoint)
185 (target_stopped_by_hw_breakpoint): Declare.
186
187 2015-03-04 Pedro Alves <palves@redhat.com>
188
189 enum lwp_stop_reason -> enum target_stop_reason
190 * linux-low.c (check_stopped_by_breakpoint): Adjust.
191 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
192 (linux_wait_1, stuck_in_jump_pad_callback)
193 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
194 (linux_stopped_by_watchpoint):
195 * linux-low.h (enum lwp_stop_reason): Delete.
196 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
197 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
198
199 2015-03-04 Yao Qi <yao.qi@linaro.org>
200
201 * Makefile.in (SFILES): Add linux-aarch64-low.c.
202
203 2015-03-03 Gary Benson <gbenson@redhat.com>
204
205 * hostio.c (handle_vFile): Fix prefix lengths.
206
207 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
208
209 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
210 ptr_bits.
211
212 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
213
214 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
215 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
216 (clean): Add "rm -f" for above C files.
217 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
218 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
219 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
220 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
221 * linux-s390-low.c (HWCAP_S390_VX): New macro.
222 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
223 (init_registers_s390x_vx_linux64)
224 (init_registers_s390x_tevx_linux64)
225 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
226 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
227 declarations.
228 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
229 (s390_store_vxrs_high): New functions.
230 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
231 NT_S390_VXRS_HIGH.
232 (s390_arch_setup): Add logic for selecting one of the new target
233 descriptions. Activate the new vector regsets if applicable.
234 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
235 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
236 and init_registers_s390x_tevx_linux64.
237
238 2015-03-01 Pedro Alves <palves@redhat.com>
239
240 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
241 parameter.
242
243 2015-02-27 Pedro Alves <palves@redhat.com>
244
245 * linux-x86-low.c (u_debugreg_offset): New function.
246 (x86_linux_dr_get, x86_linux_dr_set): Use it.
247
248 2015-02-27 Pedro Alves <palves@redhat.com>
249
250 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
251 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
252 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
253 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
254 (ps_lsetfpregs, ps_getpid)
255 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
256 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
257 (ps_lsetxregs, ps_plog): Declare.
258
259 2015-02-27 Pedro Alves <palves@redhat.com>
260
261 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
262 IP_AGENT_EXPORT_FUNC.
263 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
264 IP_AGENT_EXPORT_FUNC.
265 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
266 (IP_AGENT_EXPORT): Delete.
267 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
268 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
269 (gdb_trampoline_buffer_error, collecting, gdb_collect)
270 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
271 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
272 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
273 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
274 (traceframe_read_count, traceframe_write_count)
275 (traceframes_created, trace_state_variables, get_raw_reg)
276 (get_trace_state_variable_value, set_trace_state_variable_value)
277 (ust_loaded, helper_thread_id, cmd_buf): Use
278 IPA_SYM_EXPORTED_NAME.
279 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
280 (tracepoints) Use IP_AGENT_EXPORT_VAR.
281 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
282 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
283 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
284 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
285 EXTERN_C_PUSH/EXTERN_C_POP.
286 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
287 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
288 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
289 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
290 (traceframe_write_count, traceframe_read_count)
291 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
292 (about_to_request_buffer_space, get_trace_state_variable_value)
293 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
294 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
295 EXTERN_C_PUSH/EXTERN_C_POP.
296 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
297 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
298 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
299 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
300 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
301 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
302 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
303 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
304 Define.
305 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
306 (IP_AGENT_EXPORT_VAR_DECL): Define.
307 (tracing): Declare.
308 (gdb_agent_get_raw_reg): Declare.
309
310 2015-02-27 Tom Tromey <tromey@redhat.com>
311 Pedro Alves <palves@redhat.com>
312
313 Rename symbols whose names are reserved C++ keywords throughout.
314
315 2015-02-27 Pedro Alves <palves@redhat.com>
316
317 * Makefile.in (COMPILER): New, get it from autoconf.
318 (CXX): Get from autoconf instead.
319 (COMPILE.pre): Use COMPILER.
320 (CC-LD): Rename to ...
321 (CC_LD): ... this. Use COMPILER.
322 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
323 (CXX_FOR_TARGET): Default to g++ instead of gcc.
324 * acinclude.m4: Include build-with-cxx.m4.
325 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
326 Disable -Werror by default if building in C++ mode.
327 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
328 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
329 the C++ compiler. Save/restore CXXFLAGS too.
330 * configure: Regenerate.
331
332 2015-02-27 Pedro Alves <palves@redhat.com>
333
334 * acinclude.m4: Include libiberty.m4.
335 * configure.ac: Call libiberty_INIT.
336 * config.in, configure: Regenerate.
337
338 2015-02-26 Pedro Alves <palves@redhat.com>
339
340 * linux-low.c (linux_wait_1): When incrementing the PC past a
341 program breakpoint always use the_low_target.breakpoint_len as
342 increment, rather than the maximum between that and
343 the_low_target.decr_pc_after_break.
344
345 2015-02-23 Pedro Alves <palves@redhat.com>
346
347 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
348 thread was doing a step-over; always adjust the PC if
349 we stepped over a permanent breakpoint.
350 (linux_wait_1): If we stepped over breakpoint that was on top of a
351 permanent breakpoint, manually advance the PC past it.
352
353 2015-02-23 Pedro Alves <palves@redhat.com>
354
355 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
356 modes.
357 (x86_fill_gregset, x86_store_gregset): Use it when handling
358 $orig_eax.
359
360 2015-02-20 Pedro Alves <palves@redhat.com>
361
362 * thread-db.c: Include "nat/linux-procfs.h".
363 (thread_db_init): Skip listing new threads if the kernel supports
364 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
365
366 2015-02-20 Pedro Alves <palves@redhat.com>
367
368 * linux-low.c (status_pending_p_callback): Use ptid_match.
369
370 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
371
372 PR breakpoints/16812
373 * linux-low.c (wstatus_maybe_breakpoint): Remove.
374 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
375 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
376
377 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
378
379 PR breakpoints/15956
380 * tracepoint.c (cmd_qtinit): Add check for current_thread.
381
382 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
383
384 * linux-low.c (linux_low_btrace_conf): Print size.
385 * server.c (handle_btrace_conf_general_set): New.
386 (hanle_general_set): Call handle_btrace_conf_general_set.
387 (handle_query): Report Qbtrace-conf:bts:size as supported.
388
389 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
390
391 * linux-low.c (linux_low_enable_btrace): Update parameters.
392 (linux_low_btrace_conf): New.
393 (linux_target_ops)<to_btrace_conf>: Initialize.
394 * server.c (current_btrace_conf): New.
395 (handle_btrace_enable): Rename to ...
396 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
397 to target_enable_btrace. Update comment. Update users.
398 (handle_qxfer_btrace_conf): New.
399 (qxfer_packets): Add btrace-conf entry.
400 (handle_query): Report qXfer:btrace-conf:read as supported packet.
401 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
402 (target_ops)<read_btrace_conf>: New.
403 (target_enable_btrace): Update parameters.
404 (target_read_btrace_conf): New.
405
406 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
407
408 * server.c (handle_btrace_general_set): Remove call to
409 target_supports_btrace.
410 (supported_btrace_packets): New.
411 (handle_query): Call supported_btrace_packets.
412 * target.h: include btrace-common.h.
413 (btrace_target_info): Removed.
414 (supports_btrace, target_supports_btrace): Update parameters.
415
416 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
417
418 * Makefile.in (SFILES): Add common/btrace-common.c.
419 (OBS): Add common/btrace-common.o.
420 (btrace-common.o): Add build rules.
421 * linux-low: Include btrace-common.h.
422 (linux_low_read_btrace): Use struct btrace_data. Call
423 btrace_data_init and btrace_data_fini.
424
425 2015-02-06 Pedro Alves <palves@redhat.com>
426
427 * thread-db.c (find_new_threads_callback): Add debug output.
428
429 2015-02-04 Pedro Alves <palves@redhat.com>
430
431 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
432 (resume_stopped_resumed_lwps): New function.
433 (linux_wait_for_event_filtered): Use it.
434
435 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
436
437 * Makefile.in (SFILES): Add linux-personality.c.
438 (linux-personality.o): New rule.
439 * configure.srv (srv_linux_obj): Add linux-personality.o to the
440 list of objects to be built.
441 * linux-low.c: Include nat/linux-personality.h.
442 (linux_create_inferior): Remove code to disable address space
443 randomization (moved to ../nat/linux-personality.c). Create
444 cleanup to disable address space randomization.
445
446 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
447
448 * Makefile.in (posix-strerror.o): New rule.
449 (mingw-strerror.o): Likewise.
450 * configure: Regenerated.
451 * configure.ac: Source file ../common/common.host. Initialize new
452 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
453
454 2015-01-14 Yao Qi <yao@codesourcery.com>
455
456 * Makefile.in (SFILES): Add nat/ppc-linux.c.
457 (ppc-linux.o): New rule.
458 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
459 * configure.ac: AC_CHECK_FUNCS(getauxval).
460 * config.in: Re-generated.
461 * configure: Re-generated.
462 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
463 ppc64_64bit_inferior_p
464
465 2015-01-14 Yao Qi <yao@codesourcery.com>
466
467 * linux-ppc-low.c: Include "nat/ppc-linux.h".
468 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
469 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
470 (PT_ORIG_R3, PT_TRAP): Likewise.
471 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
472 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
473 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
474
475 2015-01-10 Joel Brobecker <brobecker@adacore.com>
476
477 * i387-fp.c (i387_cache_to_xsave): In look over
478 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
479 zmmh_low_space field by use of zmmh_high_space.
480
481 2015-01-09 Pedro Alves <palves@redhat.com>
482
483 * linux-low.c (step_over_bkpt): Move higher up in the file.
484 (handle_extended_wait): Don't store the stop_pc here.
485 (get_stop_pc): Adjust comments and rename to ...
486 (check_stopped_by_breakpoint): ... this. Record whether the LWP
487 stopped for a software breakpoint or hardware breakpoint.
488 (thread_still_has_status_pending_p): New function.
489 (status_pending_p_callback): Use
490 thread_still_has_status_pending_p. If the event is no longer
491 interesting, resume the LWP.
492 (handle_tracepoints): Add assert.
493 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
494 (wstatus_maybe_breakpoint): New function.
495 (cancel_breakpoint): Delete function.
496 (check_stopped_by_watchpoint): New function, factored out from
497 linux_low_filter_event.
498 (lp_status_maybe_breakpoint): Delete function.
499 (linux_low_filter_event): Remove filter_ptid argument.
500 Leave thread group exits pending here. Store the LWP's stop PC.
501 Always leave events pending.
502 (linux_wait_for_event_filtered): Pull all events out of the
503 kernel, and leave them all pending.
504 (count_events_callback, select_event_lwp_callback): Consider all
505 events.
506 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
507 (select_event_lwp): Only give preference to the stepping LWP in
508 all-stop mode. Adjust comments.
509 (ignore_event): New function.
510 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
511 references to cancel_breakpoints. Adjust to renames. Also give
512 equal priority to all LWPs that have had events in non-stop mode.
513 If reporting a software breakpoint event, unadjust the LWP's PC.
514 (linux_wait): If linux_wait_1 returned an ignored event, retry.
515 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
516 Adjust.
517 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
518 (resume_status_pending_p): Use thread_still_has_status_pending_p.
519 (linux_stopped_by_watchpoint): Adjust.
520 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
521 * linux-low.h (enum lwp_stop_reason): New.
522 (struct lwp_info) <stop_pc>: Adjust comment.
523 <stopped_by_watchpoint>: Delete field.
524 <stop_reason>: New field.
525 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
526 * mem-break.c (software_breakpoint_inserted_here)
527 (hardware_breakpoint_inserted_here): New function.
528 * mem-break.h (software_breakpoint_inserted_here)
529 (hardware_breakpoint_inserted_here): Declare.
530 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
531 (cancel_breakpoints): Delete.
532 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
533 (upload_fast_traceframes): Remove references to
534 cancel_breakpoints.
535
536 2015-01-09 Pedro Alves <palves@redhat.com>
537
538 * thread-db.c (find_new_threads_callback): Ignore thread if the
539 kernel thread ID is -1.
540
541 2015-01-09 Pedro Alves <palves@redhat.com>
542
543 * linux-low.c (linux_attach_fail_reason_string): Move to
544 nat/linux-ptrace.c, and rename.
545 (linux_attach_lwp): Update comment.
546 (attach_proc_task_lwp_callback): New function.
547 (linux_attach): Adjust to rename and use
548 linux_proc_attach_tgid_threads.
549 (linux_attach_fail_reason_string): Delete declaration.
550
551 2015-01-01 Joel Brobecker <brobecker@adacore.com>
552
553 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
554 * server.c (gdbserver_version): Likewise.
555
556 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
557
558 * remote-utils.c: Include ctype.h.
559 (input_interrupt): Explicitly handle the case when the char
560 received is the NUL byte. Improve the printing of non-ASCII
561 characters.
562
563 2014-12-16 Joel Brobecker <brobecker@adacore.com>
564
565 * linux-low.c (linux_low_filter_event): Update call to
566 linux_enable_event_reporting following the addition of
567 a new parameter to that function.
568
569 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
570
571 PR server/17457
572 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
573 (AARCH64_FPCR_REGNO): Likewise.
574 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
575 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
576 (aarch64_store_fpregset): Likewise.
577
578 2014-12-15 Joel Brobecker <brobecker@adacore.com>
579
580 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
581 Remove FIXME comment about assumption about N.
582
583 2014-12-13 Joel Brobecker <brobecker@adacore.com>
584
585 * configure.ac: If large-file support is disabled in GDBserver,
586 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
587 * configure: Regenerate.
588
589 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
590
591 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
592 warning upon ENODATA from ptrace.
593 * linux-s390-low.c (s390_store_tdb): New.
594 (s390_regsets): Add regset for NT_S390_TDB.
595
596 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
597
598 * linux-low.c (regsets_store_inferior_registers): Skip regsets
599 without a fill_function.
600 * linux-s390-low.c (s390_fill_last_break): Remove.
601 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
602 (s390_arch_setup): Use regset's size instead of fill_function for
603 loop end condition.
604
605 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
606
607 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
608 the regset's store function when ptrace returned an error.
609 * regcache.c (get_thread_regcache): Invalidate register cache
610 before fetching inferior's registers.
611
612 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
613
614 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
615 while-loop as for-loop.
616 (regsets_store_inferior_registers): Likewise.
617
618 2014-11-28 Yao Qi <yao@codesourcery.com>
619
620 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
621 * config.in, configure: Re-generate.
622 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
623 is defined.
624
625 2014-11-21 Yao Qi <yao@codesourcery.com>
626
627 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
628 (AC_CHECK_HEADERS): Remove malloc.h.
629 * configure: Re-generated.
630 * config.in: Re-generated.
631 * server.h: Don't include alloca.h and malloc.h.
632 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
633 Don't include malloc.h.
634
635 2014-11-17 Joel Brobecker <brobecker@adacore.com>
636
637 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
638 corresponding ERRNO check in same block.
639
640 2014-11-12 Pedro Alves <palves@redhat.com>
641
642 * server.c (cont_thread): Update comment.
643 (start_inferior, attach_inferior): No longer clear cont_thread.
644 (handle_v_cont): No longer set cont_thread.
645 (captured_main): Clear cont_thread each time a GDB connects.
646
647 2014-11-12 Pedro Alves <palves@redhat.com>
648
649 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
650 thread, and don't resume all threads if the Hc thread has exited.
651
652 2014-11-12 Pedro Alves <palves@redhat.com>
653
654 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
655 the process group instead of to a specific LWP.
656
657 2014-10-15 Pedro Alves <palves@redhat.com>
658
659 PR server/17487
660 * win32-arm-low.c (arm_set_thread_context): Remove current_event
661 parameter.
662 (arm_set_thread_context): Delete.
663 (the_low_target): Adjust.
664 * win32-i386-low.c (debug_registers_changed)
665 (debug_registers_used): Delete.
666 (update_debug_registers_callback): New function.
667 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
668 needing to update their debug registers.
669 (win32_get_current_dr): New function.
670 (x86_dr_low_get_addr, x86_dr_low_get_control)
671 (x86_dr_low_get_status): Fetch the debug register from the thread
672 record's context.
673 (i386_initial_stuff): Adjust.
674 (i386_get_thread_context): Remove current_event parameter. Don't
675 clear debug_registers_changed nor copy DR values to
676 debug_reg_state.
677 (i386_set_thread_context): Delete.
678 (i386_prepare_to_resume): New function.
679 (i386_thread_added): Mark the thread as needing to update irs
680 debug registers.
681 (the_low_target): Remove i386_set_thread_context and install
682 i386_prepare_to_resume.
683 * win32-low.c (win32_get_thread_context): Adjust.
684 (win32_set_thread_context): Use SetThreadContext
685 directly.
686 (win32_prepare_to_resume): New function.
687 (win32_require_context): New function, factored out from ...
688 (thread_rec): ... this.
689 (continue_one_thread): Call win32_prepare_to_resume on each thread
690 we're about to continue.
691 (win32_resume): Call win32_prepare_to_resume on the event thread.
692 * win32-low.h (struct win32_thread_info)
693 <debug_registers_changed>: New field.
694 (struct win32_target_ops): Change prototype of set_thread_context,
695 delete set_thread_context and add prepare_to_resume.
696 (win32_require_context): New declaration.
697
698 2014-10-08 Gary Benson <gbenson@redhat.com>
699
700 * server.h: Do not include common-exceptions.h.
701
702 2014-10-08 Gary Benson <gbenson@redhat.com>
703
704 * server.h: Do not include cleanups.h.
705
706 2014-09-30 James Hogan <james.hogan@imgtec.com>
707
708 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
709 mips64-dsp-linux.c.
710
711 2014-09-23 Yao Qi <yao@codesourcery.com>
712
713 * linux-low.c (lp_status_maybe_breakpoint): New function.
714 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
715 (count_events_callback): Likewise.
716 (select_event_lwp_callback): Likewise.
717 (cancel_breakpoints_callback): Likewise.
718
719 2014-09-19 Don Breazeal <donb@codesourcery.com>
720
721 * linux-low.c (handle_extended_wait): Call
722 linux_ptrace_get_extended_event.
723 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
724 linux_is_extended_waitstatus.
725
726 2014-09-16 Joel Brobecker <brobecker@adacore.com>
727
728 * Makefile.in (CPPFLAGS): Define.
729 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
730 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
731
732 2014-09-16 Gary Benson <gbenson@redhat.com>
733
734 * inferiors.h (current_inferior): Renamed as...
735 (current_thread): New variable. All uses updated.
736 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
737 (maybe_move_out_of_jump_pad): Likewise.
738 (cancel_breakpoint): Likewise.
739 (linux_low_filter_event): Likewise.
740 (wait_for_sigstop): Likewise.
741 (linux_resume_one_lwp): Likewise.
742 (need_step_over_p): Likewise.
743 (start_step_over): Likewise.
744 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
745 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
746 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
747 and save_inferior as saved_thread.
748 * regcache.c (get_thread_regcache): Renamed saved_inferior as
749 saved_thread.
750 (regcache_invalidate_thread): Likewise.
751 * remote-utils.c (prepare_resume_reply): Likewise.
752 * thread-db.c (thread_db_get_tls_address): Likewise.
753 (disable_thread_event_reporting): Likewise.
754 (remove_thread_event_breakpoints): Likewise.
755 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
756 as saved_thread.
757 * target.h (set_desired_inferior): Renamed as...
758 (set_desired_thread): New declaration. All uses updated.
759 * server.c (myresume): Updated comment to reference thread instead
760 of inferior.
761 (handle_serial_event): Likewise.
762 (handle_target_event): Likewise.
763
764 2014-09-12 Tom Tromey <tromey@redhat.com>
765 Gary Benson <gbenson@redhat.com>
766
767 * regcache.h: Include common-regcache.h.
768 (regcache_read_pc): Don't declare.
769 * regcache.c (get_thread_regcache_for_ptid): New function.
770
771 2014-09-11 Tom Tromey <tromey@redhat.com>
772 Gary Benson <gbenson@redhat.com>
773
774 * symbol.c: New file.
775 * Makefile.in (SFILES): Add symbol.c.
776 (OBS): Add symbol.o.
777
778 2014-09-11 Gary Benson <gbenson@redhat.com>
779
780 * target.c (target_stop_ptid, target_continue_ptid): New
781 functions.
782
783 2014-09-11 Tom Tromey <tromey@redhat.com>
784 Gary Benson <gbenson@redhat.com>
785
786 * target.h: Include target/target.h.
787 * target.c (target_read_memory, target_read_uint32)
788 (target_write_memory): New functions.
789
790 2014-09-11 Gary Benson <gbenson@redhat.com>
791
792 * server.h (debug_hw_points): Don't declare.
793 * server.c (debug_hw_points): Don't define. Replace all uses
794 with show_debug_regs.
795 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
796 all uses with show_debug_regs.
797
798 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
799
800 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
801 endianness into account.
802 (ppc_supply_ptrace_register): Likewise.
803
804 2014-09-03 James Hogan <james.hogan@imgtec.com>
805
806 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
807 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
808
809 2014-09-03 Gary Benson <gbenson@redhat.com>
810
811 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
812 ALL_DEBUG_ADDRESS_REGISTERS.
813
814 2014-09-02 Gary Benson <gbenson@redhat.com>
815
816 * i386-low.h: Renamed as...
817 * x86-low.h: New file. All type, function and variable name
818 prefixes changed from "i386_" to "x86_". All references updated.
819 * i386-low.c: Renamed as...
820 * x86-low.c: New file. All type, function and variable name
821 prefixes changed from "i386_" to "x86_". All references updated.
822
823 2014-09-02 Gary Benson <gbenson@redhat.com>
824
825 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
826 (x86_linux_new_thread): Likewise.
827
828 2014-08-29 Gary Benson <gbenson@redhat.com>
829
830 * server.h (setjmp.h): Do not include.
831 (toplevel): Do not declare.
832 (common-exceptions.h): Include.
833 (cleanups.h): Likewise.
834 * server.c (toplevel): Do not define.
835 (exit_code): New static global.
836 (detach_or_kill_for_exit_cleanup): New function.
837 (main): New function. Original main renamed to...
838 (captured_main): New function.
839 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
840
841 2014-08-29 Gary Benson <gbenson@redhat.com>
842
843 * Makefile.in (SFILES): Add common/common-exceptions.c.
844 (OBS): Add common-exceptions.o.
845 (common-exceptions.o): New rule.
846 * utils.c (prepare_to_throw_exception): New function.
847
848 2014-08-29 Gary Benson <gbenson@redhat.com>
849
850 * config.in: Regenerate.
851 * configure: Likewise.
852
853 2014-08-29 Gary Benson <gbenson@redhat.com>
854
855 * Makefile.in (SFILES): Add common/cleanups.c.
856 (OBS): cleanups.o.
857 (cleanups.o): New rule.
858
859 2014-08-29 Gary Benson <gbenson@redhat.com>
860
861 * utils.c (internal_vwarning): New function.
862
863 2014-08-28 Gary Benson <gbenson@redhat.com>
864
865 * utils.h (fatal): Remove declaration.
866 * utils.c (fatal): Remove function.
867
868 2014-08-28 Gary Benson <gbenson@redhat.com>
869
870 * tracepoint.c (gdb_agent_init): Replace fatal with
871 perror_with_name.
872 (initialize_tracepoint): Likewise.
873
874 2014-08-28 Gary Benson <gbenson@redhat.com>
875
876 * remote-utils.c (remote_prepare): Replace fatal with error.
877
878 2014-08-28 Gary Benson <gbenson@redhat.com>
879
880 * linux-low.c (linux_async): Replace fatal with warning.
881 Tidy up and return.
882 (linux_start_non_stop): Return -1 if linux_async failed.
883
884 2014-08-28 Gary Benson <gbenson@redhat.com>
885
886 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
887 gdb_assert.
888 (i386_dr_low_get_addr): Remove vague comment.
889 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
890 gdb_assert.
891
892 2014-08-28 Gary Benson <gbenson@redhat.com>
893
894 * inferiors.c (get_thread_process): Replace check with gdb_assert.
895 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
896 internal_error.
897 (linux_resume_one_lwp): Likewise.
898 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
899 gdb_assert.
900 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
901 with internal_error.
902 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
903 (init_register_cache): Replace fatal with gdb_assert_not_reached.
904 (find_register_by_name): Replace fatal with internal_error.
905 (find_regno): Likewise.
906 * tdesc.c (init_target_desc): Replace check with gdb_assert.
907 * thread-db.c (thread_db_create_event): Likewise.
908 (thread_db_load_search): Likewise.
909 (try_thread_db_load_1): Likewise.
910 * tracepoint.c (get_jump_space_head): Replace fatal with
911 internal_error.
912 (claim_trampoline_space): Likewise.
913 (have_fast_tracepoint_trampoline_buffer): Likewise.
914 (cmd_qtstart): Likewise.
915 (stop_tracing): Likewise.
916 (fast_tracepoint_collecting): Likewise.
917 (target_malloc): Likewise.
918 (download_tracepoint): Likewise.
919 (download_trace_state_variables): Replace check with gdb_assert.
920 (upload_fast_traceframes): Replace fatal with internal_error.
921
922 2014-08-19 Tom Tromey <tromey@redhat.com>
923 Gary Benson <gbenson@redhat.com>
924
925 * Makefile.in (SFILES): Add common/common-debug.c.
926 (OBS): Add common-debug.o.
927 (common-debug.o): New rule.
928 * debug.h (debug_printf): Don't declare.
929 * debug.c (debug_printf): Renamed and rewritten as...
930 (debug_vprintf): New function.
931
932 2014-08-19 Gary Benson <gbenson@redhat.com>
933
934 * utils.h: Do not include print-utils.h.
935
936 2014-08-19 Tom Tromey <tromey@redhat.com>
937 Gary Benson <gbenson@redhat.com>
938
939 * server.h: Add static assertion.
940 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
941
942 2014-08-19 Tom Tromey <tromey@redhat.com>
943 Gary Benson <gbenson@redhat.com>
944
945 * Makefile.in (SFILES): Add common/errors.c.
946 (OBS): Add errors.o.
947 (IPA_OBS): Add errors-ipa.o.
948 (errors.o): New rule.
949 (errors-ipa.o): Likewise.
950 * utils.h (perror_with_name, error, warning): Don't declare.
951 * utils.c (warning): Renamed and rewritten as...
952 (vwarning): New function.
953 (error): Renamed and rewritten as...
954 (verror): New function.
955 (internal_error): Renamed and rewritten as...
956 (internal_verror): New function.
957
958 2014-08-07 Gary Benson <gbenson@redhat.com>
959
960 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
961 * configure: Regenerate.
962 * config.in: Likewise.
963 * server.h: Do not include errno.h.
964 * event-loop.c: Likewise.
965 * hostio-errno.c: Likewise.
966 * linux-low.c: Likewise.
967 * remote-utils.c: Likewise.
968 * spu-low.c: Likewise.
969 * utils.c: Likewise.
970 * gdbreplay.c: Unconditionally include errno.h.
971
972 2014-08-07 Gary Benson <gbenson@redhat.com>
973
974 * server.h: Do not include string.h.
975 * event-loop.c: Likewise.
976 * linux-low.c: Likewise.
977 * regcache.c: Likewise.
978 * remote-utils.c: Likewise.
979 * spu-low.c: Likewise.
980 * utils.c: Likewise.
981
982 2014-08-07 Gary Benson <gbenson@redhat.com>
983
984 * server.h: Do not include gdb_assert.h.
985
986 2014-08-07 Gary Benson <gbenson@redhat.com>
987
988 * server.h: Do not include common-utils.h.
989
990 2014-08-07 Gary Benson <gbenson@redhat.com>
991
992 * server.h: Do not include ptid.h.
993 * notif.h: Likewise.
994
995 2014-08-07 Gary Benson <gbenson@redhat.com>
996
997 * server.h: Do not include gdb_locale.h.
998
999 2014-08-07 Gary Benson <gbenson@redhat.com>
1000
1001 * server.h: Do not include gdb/signals.h.
1002 * win32-low.c: Likewise.
1003
1004 2014-08-07 Gary Benson <gbenson@redhat.com>
1005
1006 * server.h: Do not include pathmax.h.
1007
1008 2014-08-07 Gary Benson <gbenson@redhat.com>
1009
1010 * server.h: Do not include libiberty.h.
1011 * linux-bfin-low.c: Likewise.
1012
1013 2014-08-07 Gary Benson <gbenson@redhat.com>
1014
1015 * server.h: Do not include ansidecl.h.
1016
1017 2014-08-07 Gary Benson <gbenson@redhat.com>
1018
1019 * linux-x86-low.c: Do not include stddef.h.
1020 * lynx-ppc-low.c: Likewise.
1021 * tracepoint.c: Likewise.
1022
1023 2014-08-07 Gary Benson <gbenson@redhat.com>
1024
1025 * server.h: Do not include stdarg.h.
1026 * nto-low.c: Likewise.
1027
1028 2014-08-07 Gary Benson <gbenson@redhat.com>
1029
1030 * server.h: Do not include stdlib.h.
1031 * inferiors.c: Likewise.
1032 * linux-low.c: Likewise.
1033 * regcache.c: Likewise.
1034 * spu-low.c: Likewise.
1035 * tracepoint.c: Likewise.
1036 * utils.c: Likewise.
1037
1038 2014-08-07 Gary Benson <gbenson@redhat.com>
1039
1040 * server.h: Do not include stdio.h.
1041 * linux-low.c: Likewise.
1042 * remote-utils.c: Likewise.
1043 * spu-low.c: Likewise.
1044 * utils.c: Likewise.
1045 * wincecompat.c: Likewise.
1046
1047 2014-08-06 Gary Benson <gbenson@redhat.com>
1048
1049 * regcache.c (init_register_cache): Move conditionals inside if.
1050
1051 2014-08-06 Gary Benson <gbenson@redhat.com>
1052
1053 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1054
1055 2014-07-31 Gary Benson <gbenson@redhat.com>
1056
1057 * ax.h: Do not include server.h.
1058 * gdbthread.h: Likewise.
1059 * lynx-low.h: Likewise.
1060 * notif.h: Likewise.
1061
1062 2014-07-30 Gary Benson <gbenson@redhat.com>
1063
1064 * server.h: Include common-defs.h.
1065 Do not include config.h or build-gnulib-gdbserver/config.h.
1066
1067 2014-07-30 Gary Benson <gbenson@redhat.com>
1068
1069 * hostio-errno.c: Move server.h to top of includes list.
1070 * inferiors.c: Likewise.
1071 * linux-x86-low.c: Likewise.
1072 * notif.c: Include server.h.
1073
1074 2014-07-24 Tom Tromey <tromey@redhat.com>
1075 Gary Benson <gbenson@redhat.com>
1076
1077 * server.h (CORE_ADDR): Now unsigned.
1078
1079 2014-07-16 Pedro Alves <palves@redhat.com>
1080
1081 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1082
1083 2014-07-15 Pedro Alves <palves@redhat.com>
1084
1085 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1086 copy.
1087
1088 2014-07-11 Pedro Alves <palves@redhat.com>
1089
1090 * linux-low.c (kill_wait_lwp): New function, based on
1091 kill_one_lwp_callback, but use my_waitpid directly.
1092 (kill_one_lwp_callback, linux_kill): Use it.
1093
1094 2014-06-23 Pedro Alves <palves@redhat.com>
1095
1096 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1097 before setting DR0..DR3.
1098
1099 2014-06-20 Gary Benson <gbenson@redhat.com>
1100
1101 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1102 * configure: Regenerated.
1103 * config.in: Likewise.
1104
1105 2014-06-20 Gary Benson <gbenson@redhat.com>
1106
1107 * Makefile.in (SFILES): Update locations for files moved
1108 from common to nat.
1109 (object file files): Reordered.
1110
1111 2014-06-20 Gary Benson <gbenson@redhat.com>
1112
1113 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1114 (i386_dr_low_set_addr): Likewise.
1115 (i386_dr_low_get_addr): Likewise.
1116 (i386_dr_low_can_set_control): Likewise.
1117 (i386_dr_low_set_control): Likewise.
1118 (i386_dr_low_get_control): Likewise.
1119 (i386_dr_low_get_status): Likewise.
1120 (i386_get_debug_register_length): Likewise.
1121 * linux-x86-low.c (i386_dr_low_set_addr):
1122 Changed signature. Made static.
1123 (i386_dr_low_get_addr): Likewise.
1124 (i386_dr_low_set_control): Likewise.
1125 (i386_dr_low_get_control): Likewise.
1126 (i386_dr_low_get_status): Likewise.
1127 (i386_dr_low): New global variable.
1128 * win32-i386-low.c (i386_dr_low_set_addr):
1129 Changed signature. Made static.
1130 (i386_dr_low_get_addr): Likewise.
1131 (i386_dr_low_set_control): Likewise.
1132 (i386_dr_low_get_control): Likewise.
1133 (i386_dr_low_get_status): Likewise.
1134 (i386_dr_low): New global variable.
1135
1136 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1137
1138 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1139 * Makefile.in (AR, AR_FLAGS): Define.
1140 * configure: Regenerate.
1141
1142 2014-06-19 Gary Benson <gbenson@redhat.com>
1143
1144 * Makefile.in (i386-dregs.o): New rule.
1145 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1146 * i386-low.c (target.h): Remove include.
1147 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1148 (DR_CONTROL_SHIFT): Likewise.
1149 (DR_CONTROL_SIZE): Likewise.
1150 (DR_RW_EXECUTE): Likewise.
1151 (DR_RW_WRITE): Likewise.
1152 (DR_RW_READ): Likewise.
1153 (DR_RW_IORW): Likewise.
1154 (DR_LEN_1): Likewise.
1155 (DR_LEN_2): Likewise.
1156 (DR_LEN_4): Likewise.
1157 (DR_LEN_8): Likewise.
1158 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1159 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1160 (DR_ENABLE_SIZE): Likewise.
1161 (DR_LOCAL_SLOWDOWN): Likewise.
1162 (DR_GLOBAL_SLOWDOWN): Likewise.
1163 (DR_CONTROL_RESERVED): Likewise.
1164 (I386_DR_CONTROL_MASK): Likewise.
1165 (I386_DR_VACANT): Likewise.
1166 (I386_DR_LOCAL_ENABLE): Likewise.
1167 (I386_DR_GLOBAL_ENABLE): Likewise.
1168 (I386_DR_DISABLE): Likewise.
1169 (I386_DR_SET_RW_LEN): Likewise.
1170 (I386_DR_GET_RW_LEN): Likewise.
1171 (I386_DR_WATCH_HIT): Likewise.
1172 (i386_wp_op_t): Likewise.
1173 (i386_show_dr): Likewise.
1174 (i386_length_and_rw_bits): Likewise.
1175 (i386_insert_aligned_watchpoint): Likewise.
1176 (i386_remove_aligned_watchpoint): Likewise.
1177 (i386_handle_nonaligned_watchpoint): Likewise.
1178 i386_update_inferior_debug_regs(): Likewise.
1179 (i386_dr_insert_watchpoint): Likewise.
1180 (i386_dr_remove_watchpoint): Likewise.
1181 (i386_dr_region_ok_for_watchpoint): Likewise.
1182 (i386_dr_stopped_data_address): Likewise.
1183 (i386_dr_stopped_by_watchpoint): Likewise.
1184
1185 2014-06-19 Gary Benson <gbenson@redhat.com>
1186
1187 * i386-low.c (i386_dr_show): Renamed to
1188 i386_show_dr and made static. All uses updated.
1189 (i386_dr_length_and_rw_bits): Renamed to
1190 i386_length_and_rw_bits and made static.
1191 All uses updated.
1192 (i386_dr_insert_aligned_watchpoint): Renamed to
1193 i386_insert_aligned_watchpoint and made static.
1194 All uses updated.
1195 (i386_dr_remove_aligned_watchpoint): Renamed to
1196 i386_remove_aligned_watchpoint and made static.
1197 All uses updated.
1198 (i386_dr_update_inferior_debug_regs): Renamed to
1199 i386_update_inferior_debug_regs and made static.
1200 All uses updated.
1201
1202 2014-06-18 Gary Benson <gbenson@redhat.com>
1203
1204 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1205 (i386_dr_low_can_set_control): Likewise.
1206 (i386_get_debug_register_length): Likewise.
1207 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1208 (i386_dr_low_can_set_control): Likewise.
1209 (i386_get_debug_register_length): Likewise.
1210
1211 2014-06-17 Gary Benson <gbenson@redhat.com>
1212
1213 * i386-low.h (i386-dregs.h): New include.
1214 (DR_FIRSTADDR): Now in i386-dregs.h.
1215 (DR_LASTADDR): Likewise.
1216 (DR_NADDR): Likewise.
1217 (DR_STATUS): Likewise.
1218 (DR_CONTROL): Likewise.
1219 (i386_debug_reg_state): Likewise.
1220 (i386_dr_insert_watchpoint): Likewise.
1221 (i386_dr_remove_watchpoint): Likewise.
1222 (i386_dr_region_ok_for_watchpoint): Likewise.
1223 (i386_dr_stopped_data_address): Likewise.
1224 (i386_dr_stopped_by_watchpoint): Likewise.
1225 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1226
1227 2014-06-18 Gary Benson <gbenson@redhat.com>
1228
1229 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1230 i386_dr_insert_watchpoint.
1231 (i386_low_remove_watchpoint): Renamed to
1232 i386_dr_remove_watchpoint.
1233 (i386_low_region_ok_for_watchpoint): Renamed to
1234 i386_dr_region_ok_for_watchpoint.
1235 (i386_low_stopped_data_address): Renamed to
1236 i386_dr_stopped_data_address.
1237 (i386_low_stopped_by_watchpoint): Renamed to
1238 i386_dr_stopped_by_watchpoint.
1239 * i386-low.c (i386_show_dr): Renamed to
1240 i386_dr_show and made nonstatic. All uses updated.
1241 (i386_length_and_rw_bits): Renamed to
1242 i386_dr_length_and_rw_bits and made nonstatic.
1243 All uses updated.
1244 (i386_insert_aligned_watchpoint): Renamed to
1245 i386_dr_insert_aligned_watchpoint and made nonstatic.
1246 All uses updated.
1247 (i386_remove_aligned_watchpoint): Renamed to
1248 i386_dr_remove_aligned_watchpoint and made nonstatic.
1249 All uses updated.
1250 (i386_update_inferior_debug_regs): Renamed to
1251 i386_dr_update_inferior_debug_regs and made nonstatic.
1252 All uses updated.
1253 (i386_low_insert_watchpoint): Renamed to
1254 i386_dr_insert_watchpoint. All uses updated.
1255 (i386_low_remove_watchpoint): Renamed to
1256 i386_dr_remove_watchpoint. All uses updated.
1257 (i386_low_region_ok_for_watchpoint): Renamed to
1258 i386_dr_region_ok_for_watchpoint. All uses updated.
1259 (i386_low_stopped_data_address): Renamed to
1260 i386_dr_stopped_data_address. All uses updated.
1261 (i386_low_stopped_by_watchpoint): Renamed to
1262 i386_dr_stopped_by_watchpoint. All uses updated.
1263
1264 2014-06-18 Gary Benson <gbenson@redhat.com>
1265
1266 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1267 (i386_dr_low_can_set_control): Likewise.
1268 (i386_insert_aligned_watchpoint): New check.
1269
1270 2014-06-18 Gary Benson <gbenson@redhat.com>
1271
1272 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1273 Renamed to state.
1274
1275 2014-06-18 Gary Benson <gbenson@redhat.com>
1276
1277 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1278 instead of fatal and error.
1279 (i386_handle_nonaligned_watchpoint): Likewise.
1280
1281 2014-06-18 Gary Benson <gbenson@redhat.com>
1282
1283 * i386-low.c (i386_get_debug_register_length): New macro.
1284 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1285 (i386_show_dr): Use debug_printf instead of fprintf. Use
1286 phex to format values.
1287
1288 2014-06-18 Gary Benson <gbenson@redhat.com>
1289
1290 * i386-low.h: Comment changes.
1291 * i386-low.c: Likewise.
1292
1293 2014-06-18 Gary Benson <gbenson@redhat.com>
1294
1295 * i386-low.c: Whitespace changes.
1296
1297 2014-06-12 Tom Tromey <tromey@redhat.com>
1298
1299 * utils.c (freeargv): Remove.
1300
1301 2014-06-12 Tom Tromey <tromey@redhat.com>
1302
1303 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1304 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1305 (parse_debug_format_options): Likewise.
1306 (gdbserver_usage): Likewise.
1307 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1308 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1309 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1310 against libiberty.
1311 ($(LIBGNU)): Depend on libiberty.
1312 (all-lib): Recurse into all subdirs.
1313 (install-only): Invoke "install" target in subdirs.
1314 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1315 targets.
1316 * configure: Rebuild.
1317 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1318 for vasprintf, vsnprintf, or gettimeofday.
1319 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1320 srv_tgtobj.
1321
1322 2014-06-05 Joel Brobecker <brobecker@adacore.com>
1323
1324 * development.sh: Delete.
1325 * Makefile.in (config.status): Adjust dependency on development.sh.
1326 * configure.ac: Adjust development.sh source call.
1327 * configure: Regenerate.
1328
1329 2014-06-02 Pedro Alves <palves@redhat.com>
1330
1331 * ax.c (gdb_free_agent_expr): New function.
1332 * ax.h (gdb_free_agent_expr): New declaration.
1333 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1334 list.
1335 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1336 static.
1337 (clear_breakpoint_conditions_and_commands): New function.
1338 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1339 (clear_breakpoint_conditions_and_commands): New declaration.
1340
1341 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1342
1343 * linux-aarch64-low.c (asm/ptrace.h): Include.
1344
1345 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1346
1347 Fix TLS access for -static -pthread.
1348 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1349 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1350 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1351
1352 2014-05-20 Pedro Alves <palves@redhat.com>
1353
1354 * linux-aarch64-low.c (aarch64_insert_point)
1355 (aarch64_remove_point): No longer check whether the type is
1356 supported here. Adjust to new interface.
1357 (the_low_target): Install aarch64_supports_z_point_type as
1358 supports_z_point_type method.
1359 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1360 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1361 instead of a Z packet char. Adjust.
1362 (arm_supports_z_point_type): New function.
1363 (arm_insert_point, arm_remove_point): Adjust to new interface.
1364 (the_low_target): Install arm_supports_z_point_type.
1365 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1366 (cris_insert_point, cris_remove_point): Adjust to new interface.
1367 Don't check whether the type is supported here.
1368 (the_low_target): Install cris_supports_z_point_type.
1369 * linux-low.c (linux_supports_z_point_type): New function.
1370 (linux_insert_point, linux_remove_point): Adjust to new interface.
1371 * linux-low.h (struct linux_target_ops) <insert_point,
1372 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1373 raw_breakpoint pointer parameter.
1374 <supports_z_point_type>: New method.
1375 * linux-mips-low.c (mips_supports_z_point_type): New function.
1376 (mips_insert_point, mips_remove_point): Adjust to new interface.
1377 Use mips_supports_z_point_type.
1378 (the_low_target): Install mips_supports_z_point_type.
1379 * linux-ppc-low.c (the_low_target): Install NULL as
1380 supports_z_point_type method.
1381 * linux-s390-low.c (the_low_target): Install NULL as
1382 supports_z_point_type method.
1383 * linux-sparc-low.c (the_low_target): Install NULL as
1384 supports_z_point_type method.
1385 * linux-x86-low.c (x86_supports_z_point_type): New function.
1386 (x86_insert_point): Adjust to new insert_point interface. Use
1387 insert_memory_breakpoint. Adjust to new
1388 i386_low_insert_watchpoint interface.
1389 (x86_remove_point): Adjust to remove_point interface. Use
1390 remove_memory_breakpoint. Adjust to new
1391 i386_low_remove_watchpoint interface.
1392 (the_low_target): Install x86_supports_z_point_type.
1393 * lynx-low.c (lynx_target_ops): Install NULL as
1394 supports_z_point_type callback.
1395 * nto-low.c (nto_supports_z_point_type): New.
1396 (nto_insert_point, nto_remove_point): Adjust to new interface.
1397 (nto_target_ops): Install nto_supports_z_point_type.
1398 * mem-break.c: Adjust intro comment.
1399 (struct raw_breakpoint) <raw_type, size>: New fields.
1400 <inserted>: Update comment.
1401 <shlib_disabled>: Delete field.
1402 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1403 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1404 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1405 (raw_bkpt_type_to_target_hw_bp_type): New function.
1406 (find_enabled_raw_code_breakpoint_at): New function.
1407 (find_raw_breakpoint_at): New type and size parameters. Use them.
1408 (insert_memory_breakpoint): New function, based off
1409 set_raw_breakpoint_at.
1410 (remove_memory_breakpoint): New function.
1411 (set_raw_breakpoint_at): Reimplement.
1412 (set_breakpoint): New, based on set_breakpoint_at.
1413 (set_breakpoint_at): Reimplement.
1414 (delete_raw_breakpoint): Go through the_target->remove_point
1415 instead of assuming memory breakpoints.
1416 (find_gdb_breakpoint_at): Delete.
1417 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1418 (find_gdb_breakpoint): New function.
1419 (set_gdb_breakpoint_at): Delete.
1420 (z_type_supported): New function.
1421 (set_gdb_breakpoint_1): New function, loosely based off
1422 set_gdb_breakpoint_at.
1423 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1424 (delete_gdb_breakpoint_at): Delete.
1425 (delete_gdb_breakpoint_1): New function, loosely based off
1426 delete_gdb_breakpoint_at.
1427 (delete_gdb_breakpoint): New function.
1428 (clear_gdb_breakpoint_conditions): Rename to ...
1429 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1430 breakpoint.
1431 (add_condition_to_breakpoint): Make static.
1432 (add_breakpoint_condition): Take a struct breakpoint pointer
1433 instead of an address. Adjust.
1434 (gdb_condition_true_at_breakpoint): Rename to ...
1435 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1436 z_type parameter.
1437 (gdb_condition_true_at_breakpoint): Reimplement.
1438 (add_breakpoint_commands): Take a struct breakpoint pointer
1439 instead of an address. Adjust.
1440 (gdb_no_commands_at_breakpoint): Rename to ...
1441 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1442 parameter. Return true if no breakpoint was found. Change debug
1443 output.
1444 (gdb_no_commands_at_breakpoint): Reimplement.
1445 (run_breakpoint_commands): Rename to ...
1446 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1447 and change return type to boolean.
1448 (run_breakpoint_commands): New function.
1449 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1450 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1451 breakpoint. Go through the_target->remove_point instead of
1452 assuming memory breakpoint.
1453 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1454 software and hardware breakpoints.
1455 (reinsert_raw_breakpoint): Go through the_target->insert_point
1456 instead of assuming memory breakpoint.
1457 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1458 software and hardware breakpoints.
1459 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1460 Check both software and hardware breakpoints.
1461 (validate_inserted_breakpoint): Assert the breakpoint is a
1462 software breakpoint. Set the inserted flag to -1 instead of
1463 setting shlib_disabled.
1464 (delete_disabled_breakpoints): Adjust.
1465 (validate_breakpoints): Only validate software breakpoints.
1466 Adjust to inserted flag change.
1467 (check_mem_read, check_mem_write): Skip breakpoint types other
1468 than software breakpoints. Adjust to inserted flag change.
1469 * mem-break.h (enum raw_bkpt_type): New enum.
1470 (raw_breakpoint, struct process_info): Forward declare.
1471 (Z_packet_to_target_hw_bp_type): Delete declaration.
1472 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1473 (set_gdb_breakpoint, delete_gdb_breakpoint)
1474 (clear_breakpoint_conditions): New declarations.
1475 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1476 (breakpoint_inserted_here): Update comment.
1477 (add_breakpoint_condition, add_breakpoint_commands): Replace
1478 address parameter with a breakpoint pointer parameter.
1479 (gdb_breakpoint_here): Update comment.
1480 (delete_gdb_breakpoint_at): Delete.
1481 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1482 * server.c (process_point_options): Take a struct breakpoint
1483 pointer instead of an address. Adjust.
1484 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1485 delete_gdb_breakpoint.
1486 * spu-low.c (spu_target_ops): Install NULL as
1487 supports_z_point_type method.
1488 * target.h: Include mem-break.h.
1489 (struct target_ops) <prepare_to_access_memory>: Update comment.
1490 <supports_z_point_type>: New field.
1491 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1492 instead of a char. Also take a raw breakpoint pointer.
1493 * win32-arm-low.c (the_low_target): Install NULL as
1494 supports_z_point_type.
1495 * win32-i386-low.c (i386_supports_z_point_type): New function.
1496 (i386_insert_point, i386_remove_point): Adjust to new interface.
1497 (the_low_target): Install i386_supports_z_point_type.
1498 * win32-low.c (win32_supports_z_point_type): New function.
1499 (win32_insert_point, win32_remove_point): Adjust to new interface.
1500 (win32_target_ops): Install win32_supports_z_point_type.
1501 * win32-low.h (struct win32_target_ops):
1502 <supports_z_point_type>: New method.
1503 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1504 instead of a char. Also take a raw breakpoint pointer.
1505
1506 2014-05-20 Pedro Alves <palves@redhat.com>
1507
1508 * mem-break.h: Include break-common.h.
1509 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1510 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1511 (Z_packet_to_target_hw_bp_type): New declaration.
1512 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1513 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1514 (Z_PACKET_ACCESS_WP): Delete macros.
1515 (Z_packet_to_hw_type): Delete function.
1516 * i386-low.h: Don't include break-common.h here.
1517 (Z_packet_to_hw_type): Delete declaration.
1518 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1519 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1520 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1521 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1522 * linux-aarch64-low.c: Don't include break-common.h here.
1523 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1524 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1525 (Z_packet_to_target_hw_bp_type): Delete function.
1526 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1527 function.
1528 (mips_insert_point, mips_remove_point): Use
1529 Z_packet_to_target_hw_bp_type.
1530
1531 2014-05-20 Pedro Alves <palves@redhat.com>
1532
1533 * linux-aarch64-low.c: Include break-common.h.
1534 (enum target_point_type): Delete.
1535 (Z_packet_to_point_type): Rename to ...
1536 (Z_packet_to_target_hw_bp_type): ... this, and return a
1537 target_hw_bp_type instead.
1538 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1539 instead of an enum target_point_type.
1540 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1541 breakpoint type.
1542 (aarch64_dr_state_insert_one_point)
1543 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1544 (aarch64_handle_aligned_watchpoint)
1545 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1546 Take an enum target_hw_bp_type instead of an enum
1547 target_point_type.
1548 (aarch64_supports_z_point_type): New function.
1549 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1550 use Z_packet_to_target_hw_bp_type.
1551
1552 2014-05-20 Joel Brobecker <brobecker@adacore.com>
1553
1554 * configure.ac: Only use -Werror by default when DEVELOPMENT
1555 is true.
1556 * configure: Regenerate.
1557
1558 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1559
1560 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1561 * linux-x86-low.c (X86_64_USER_REGS): New.
1562 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1563
1564 2014-04-28 Yao Qi <yao@codesourcery.com>
1565
1566 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1567 name.
1568
1569 2014-04-25 Pedro Alves <palves@redhat.com>
1570
1571 PR server/16255
1572 * linux-low.c (linux_attach_fail_reason_string): New function.
1573 (linux_attach_lwp): Delete.
1574 (linux_attach_lwp_1): Rename to ...
1575 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1576 argument. Remove "initial" parameter. Return int instead of
1577 void. Don't error or warn here.
1578 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1579 failure to attach to the tgid. Call warning when failing to
1580 attach to an lwp.
1581 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1582 argument. Remove "initial" parameter. Return int instead of
1583 void. Don't error or warn here.
1584 (linux_attach_fail_reason_string): New declaration.
1585 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1586 interface change. Use linux_attach_fail_reason_string.
1587
1588 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
1589 Walfred Tedeschi <walfred.tedeschi@intel.com>
1590
1591 * Makefile.in: Added rules to handle new files
1592 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1593 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1594 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1595 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1596 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1597 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1598 x32-avx512-linux.o.
1599 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1600 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1601 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1602 i386/x32-avx512.xml.
1603 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1604 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1605 i386/x32-avx512-linux.xml.
1606 * i387-fp.c (num_avx512_k_registers): New constant for number
1607 of K registers.
1608 (num_avx512_zmmh_low_registers): New constant for number of
1609 lower ZMM registers (0-15).
1610 (num_avx512_zmmh_high_registers): New constant for number of
1611 higher ZMM registers (16-31).
1612 (num_avx512_ymmh_registers): New contant for number of higher
1613 YMM registers (ymm16-31 added by avx521 on x86_64).
1614 (num_avx512_xmm_registers): New constant for number of higher
1615 XMM registers (xmm16-31 added by AVX512 on x86_64).
1616 (struct i387_xsave): Add space for AVX512 registers.
1617 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1618 Add code to handle AVX512 registers.
1619 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1620 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1621 prototypei from generated file.
1622 (tdesc_amd64_avx512_linux): Likewise.
1623 (init_registers_x32_avx512_linux): Likewise.
1624 (tdesc_x32_avx512_linux): Likewise.
1625 (init_registers_i386_avx512_linux): Likewise.
1626 (tdesc_i386_avx512_linux): Likewise.
1627 (x86_64_regmap): Add AVX512 registers.
1628 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1629 mask.
1630 (initialize_low_arch): Add code to initialize AVX512 registers.
1631
1632 2014-04-23 Pedro Alves <palves@redhat.com>
1633
1634 * mem-break.c (find_gdb_breakpoint_at): Make static.
1635 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1636
1637 2014-04-23 Pedro Alves <palves@redhat.com>
1638
1639 * i386-low.c: Don't include break-common.h here.
1640 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1641 prototype to take target_hw_bp_type as argument instead of a Z
1642 packet char.
1643 * i386-low.h: Include break-common.h here.
1644 (Z_packet_to_hw_type): Declare.
1645 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1646 prototypes.
1647 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1648 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1649 (x86_remove_point): Convert the packet number to a
1650 target_hw_bp_type before calling i386_low_remove_watchpoint.
1651 * win32-i386-low.c (i386_insert_point): Convert the packet number
1652 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1653 (i386_remove_point): Convert the packet number to a
1654 target_hw_bp_type before calling i386_low_remove_watchpoint.
1655
1656 2014-04-23 Pedro Alves <palves@redhat.com>
1657
1658 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1659
1660 2014-04-10 Pedro Alves <palves@redhat.com>
1661
1662 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1663 Check if the condition or command is NULL before checking if the
1664 breakpoint is known. On success, return true.
1665 * mem-break.h (add_breakpoint_condition): Document return.
1666 (add_breakpoint_commands): Add describing comment.
1667 * server.c (skip_to_semicolon): New function.
1668 (process_point_options): Use it.
1669
1670 2014-04-09 Pedro Alves <palves@redhat.com>
1671
1672 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1673 to lwpid_of.
1674
1675 2014-02-27 Pedro Alves <palves@redhat.com>
1676
1677 PR 12702
1678 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1679 macros.
1680 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1681 output.
1682 (last_thread_of_process_p): Take a PID argument instead of a
1683 thread pointer.
1684 (linux_wait_for_lwp): Delete.
1685 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1686 functions.
1687 (linux_low_filter_event): New function, party factored out from
1688 linux_wait_for_event.
1689 (linux_wait_for_event): Rename to ...
1690 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1691 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1692 sigsuspend. Check for zombie leaders.
1693 (linux_wait_for_event): Reimplement as wrapper around
1694 linux_wait_for_event_filtered.
1695 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1696 a normal or signal exit is seen, it's the whole process exiting.
1697 (wait_for_sigstop): No longer a for_each_inferior callback.
1698 Rewrite on top of linux_wait_for_event_filtered.
1699 (stop_all_lwps): Call wait_for_sigstop directly.
1700 * server.c (resume, handle_target_event): Handle
1701 TARGET_WAITKIND_NO_RESUMED.
1702
1703 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1704
1705 * win32-low.c (psapi_get_dll_name,
1706 * win32_CreateToolhelp32Snapshot): Delete.
1707 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1708 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1709 Delete.
1710 (handle_load_dll): Add function description.
1711 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1712
1713 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1714
1715 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1716 Add comment.
1717 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1718 base address when calling win32_add_one_solib.
1719 (handle_load_dll): Delete local variable load_addr.
1720 Remove 0x1000 offset applied to DLL base address when calling
1721 win32_add_one_solib.
1722 (handle_unload_dll): Add comment.
1723
1724 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1725
1726 * win32-low.c (win32_add_all_dlls): Renames
1727 win32_ensure_ntdll_loaded. Rewrite function documentation.
1728 Adjust implementation to always load all DLLs.
1729 Add 0x1000 offset to DLL base address when calling
1730 win32_add_one_solib.
1731 (child_initialization_done): New static global.
1732 (do_initial_child_stuff): Set child_initialization_done to
1733 zero during child initialization, and 1 after. Replace call
1734 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1735 Add comment.
1736 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1737 (handle_unload_dll): Add function documentation.
1738 (get_child_debug_event): Ignore load and unload DLL events
1739 during child initialization.
1740
1741 2014-02-20 Doug Evans <dje@google.com>
1742
1743 Remove global all_lwps.
1744 * inferiors.h (ptid_of): Move here from linux-low.h.
1745 (pid_of, lwpid_of): Ditto.
1746 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1747 parameter is a struct thread_info * now.
1748 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1749 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1750 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1751 directly.
1752 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1753 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1754 * linux-arm-low.c (update_registers_callback): Update, "entry"
1755 parameter is a struct thread_info * now.
1756 Fetch lwpid from current_inferior directly.
1757 (arm_insert_point): Pass &all_threads to find_inferior instead of
1758 &all_lwps.
1759 (arm_remove_point): Ditto.
1760 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1761 (arm_prepare_to_resume): Fetch pid from thread.
1762 (arm_read_description): Fetch lwpid from current_inferior directly.
1763 * linux-low.c (all_lwps): Delete.
1764 (delete_lwp): Delete call to remove_inferior.
1765 (handle_extended_wait): Fetch lwpid from thread.
1766 (add_lwp): Don't set lwp->entry.id. Remove call to
1767 add_inferior_to_list.
1768 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1769 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1770 (kill_one_lwp_callback): Ditto.
1771 (linux_kill): Don't dereference NULL pointer.
1772 Fetch ptid,lwpid from thread.
1773 (get_detach_signal): Fetch ptid from thread.
1774 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1775 Simplify call to regcache_invalidate_thread.
1776 (delete_lwp_callback): Update, "entry" parameter is a
1777 struct thread_info * now. Fetch pid from thread.
1778 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1779 (status_pending_p_callback): Update, "entry" parameter is a
1780 struct thread_info * now. Fetch ptid from thread.
1781 (find_lwp_pid): Update, "entry" parameter is a
1782 struct thread_info * now.
1783 (linux_wait_for_lwp): Fetch pid from thread.
1784 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1785 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1786 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1787 (dequeue_one_deferred_signal): Ditto.
1788 (cancel_breakpoint): Fetch ptid from current_inferior.
1789 (linux_wait_for_event): Pass &all_threads to find_inferior,
1790 not &all_lwps. Fetch ptid, lwpid from thread.
1791 (count_events_callback): Update, "entry" parameter is a
1792 struct thread_info * now.
1793 (select_singlestep_lwp_callback): Ditto.
1794 (select_event_lwp_callback): Ditto.
1795 (cancel_breakpoints_callback): Ditto.
1796 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1797 not &all_lwps.
1798 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1799 (unsuspend_one_lwp): Update, "entry" parameter is a
1800 struct thread_info * now.
1801 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1802 not &all_lwps.
1803 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1804 Fetch lwpid from thread, not lwp.
1805 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1806 Pass &all_threads to find_inferior, not &all_lwps.
1807 (send_sigstop): Fetch lwpid from thread, not lwp.
1808 (send_sigstop_callback): Update, "entry" parameter is a
1809 struct thread_info * now.
1810 (suspend_and_send_sigstop_callback): Ditto.
1811 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1812 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1813 struct thread_info * now.
1814 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1815 from thread, lwp.
1816 (lwp_running): Update, "entry" parameter is a
1817 struct thread_info * now.
1818 (stop_all_lwps): Fetch ptid from thread.
1819 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1820 (linux_resume_one_lwp): Fetch lwpid from thread.
1821 (linux_set_resume_request): Update, "entry" parameter is a
1822 struct thread_info * now. Fetch pid, lwpid from thread.
1823 (resume_status_pending_p): Update, "entry" parameter is a
1824 struct thread_info * now.
1825 (need_step_over_p): Ditto. Fetch lwpid from thread.
1826 (start_step_over): Fetch lwpid from thread.
1827 (linux_resume_one_thread): Update, "entry" parameter is a
1828 struct thread_info * now. Fetch lwpid from thread.
1829 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1830 (proceed_one_lwp): Update, "entry" parameter is a
1831 struct thread_info * now. Fetch lwpid from thread.
1832 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1833 struct thread_info * now.
1834 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1835 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1836 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1837 directly.
1838 (regsets_store_inferior_registers): Ditto.
1839 (fetch_register, store_register): Ditto.
1840 (linux_read_memory, linux_write_memory): Ditto.
1841 (linux_request_interrupt): Ditto.
1842 (linux_read_auxv): Ditto.
1843 (linux_xfer_siginfo): Ditto.
1844 (linux_qxfer_spu): Ditto.
1845 (linux_qxfer_libraries_svr4): Ditto.
1846 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1847 moved to inferiors.h.
1848 (get_lwp): Delete.
1849 (get_thread_lwp): Update.
1850 (struct lwp_info): Delete member "entry". Simplify comment for
1851 member "thread".
1852 (all_lwps): Delete.
1853 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1854 current_inferior directly.
1855 (update_watch_registers_callback): Update, "entry" parameter is a
1856 struct thread_info * now. Fetch pid from thread.
1857 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1858 (mips_insert_point): Fetch lwpid from current_inferior.
1859 Pass &all_threads to find_inferior, not &all_lwps.
1860 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1861 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1862 directly.
1863 (mips_stopped_data_address): Ditto.
1864 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1865 directly.
1866 * linux-tile-low.c (tile_arch_setup): Ditto.
1867 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1868 (update_debug_registers_callback): Update, "entry" parameter is a
1869 struct thread_info * now. Fetch pid from thread.
1870 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1871 Pass &all_threads to find_inferior, not &all_lwps.
1872 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1873 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1874 Pass &all_threads to find_inferior, not &all_lwps.
1875 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1876 (i386_dr_low_get_status): Ditto.
1877 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1878 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1879 (x86_linux_read_description): Ditto.
1880 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1881
1882 2014-02-20 Doug Evans <dje@google.com>
1883
1884 * inferiors.c (get_first_inferior): Fix buglet.
1885
1886 2014-02-19 Doug Evans <dje@google.com>
1887
1888 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1889 * inferiors.c (add_thread): Change result type to struct thread_info *.
1890 All callers updated.
1891 (add_lwp): Call add_thread here instead of in callers.
1892 All callers updated.
1893 * linux-low.h (get_lwp_thread): Rewrite.
1894 (struct lwp_info): New member "thread".
1895
1896 2014-02-19 Doug Evans <dje@google.com>
1897
1898 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1899 All callers updated.
1900
1901 2014-02-19 Doug Evans <dje@google.com>
1902
1903 * inferiors.c (add_thread): Fix whitespace.
1904
1905 2014-02-19 Doug Evans <dje@google.com>
1906
1907 * dll.c (clear_dlls): Replace accessing list implemention details
1908 with API function.
1909 * gdbthread.h (get_first_thread): Declare.
1910 * inferiors.c (for_each_inferior_with_data): New function.
1911 (get_first_thread): New function.
1912 (find_thread_ptid): Simplify.
1913 (get_first_inferior): New function.
1914 (clear_list): Delete.
1915 (one_inferior_p): New function.
1916 (clear_inferior_list): New function.
1917 (clear_inferiors): Update.
1918 * inferiors.h (for_each_inferior_with_data): Declare.
1919 (clear_inferior_list): Declare.
1920 (one_inferior_p): Declare.
1921 (get_first_inferior): Declare.
1922 * linux-low.c (linux_wait_for_event): Replace accessing list
1923 implemention details with API function.
1924 * server.c (target_running): Ditto.
1925 (accumulate_file_name_length): New function.
1926 (emit_dll_description): New function.
1927 (handle_qxfer_libraries): Replace accessing list implemention
1928 details with API function.
1929 (handle_qxfer_threads_worker): New function.
1930 (handle_qxfer_threads_proper): Replace accessing list implemention
1931 details with API function.
1932 (handle_query): Ditto.
1933 (visit_actioned_threads_callback_ftype): New typedef.
1934 (visit_actioned_threads_data): New struct.
1935 (visit_actioned_threads): Rewrite to be find_inferior callback.
1936 (resume): Call find_inferior.
1937 (handle_status): Replace accessing list implemention
1938 details with API function.
1939 (process_serial_event): Replace accessing list implemention details
1940 with API function.
1941 * target.c (set_desired_inferior): Replace accessing list implemention
1942 details with API function.
1943 * tracepoint.c (same_process_p): New function.
1944 (gdb_agent_about_to_close): Replace accessing list implemention
1945 details with API function.
1946 * win32-low.c (child_delete_thread): Replace accessing list
1947 implemention details with API function.
1948 (match_dll_by_basename): New function.
1949 (dll_is_loaded_by_basename): New function.
1950 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1951 details call to dll_is_loaded_by_basename.
1952
1953 2014-02-19 Doug Evans <dje@google.com>
1954
1955 * dll.h (struct dll_info): Add comment.
1956 * gdbthread.h (struct thread_info): Add comment.
1957 (current_ptid): Simplify.
1958 * inferiors.c (add_process): Update.
1959 (remove_process): Update.
1960 * inferiors.h (struct process_info): Rename member "head" to "entry".
1961 * linux-low.c (delete_lwp): Update.
1962 (add_lwp): Update.
1963 (last_thread_of_process_p): Update.
1964 (kill_one_lwp_callback, linux_kill): Update.
1965 (status_pending_p_callback): Update.
1966 (wait_for_sigstop): Update. Simplify read of ptid.
1967 (start_step_over): Update.
1968 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1969 (get_lwp_thread): Update.
1970 (struct lwp_info): Rename member "head" to "entry".
1971 * regcache.h (inferior_list_entry): Delete.
1972 * server.c (kill_inferior_callback): Update.
1973 (detach_or_kill_inferior_callback): Update.
1974 (print_started_pid): Update.
1975 (print_attached_pid): Update.
1976 (process_serial_event): Simplify read of ptid.
1977 * thread-db.c (thread_db_create_event): Update.
1978 (thread_db_get_tls_address): Update.
1979 * win32-low.c (current_inferior_ptid): Simplify.
1980
1981 2014-02-19 Tom Tromey <tromey@redhat.com>
1982
1983 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1984 argument.
1985 (target_supports_btrace): Update.
1986
1987 2014-02-14 Yao Qi <yao@codesourcery.com>
1988
1989 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1990 (rsp-low-ipa.o): New target.
1991
1992 2014-02-12 Tom Tromey <tromey@redhat.com>
1993
1994 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1995 convert_ascii_to_int.
1996 * regcache.c (registers_to_string): Likewise.
1997 * remote-utils.c (decode_M_packet): Likewise.
1998 * server.c (process_serial_event): Likewise.
1999
2000 2014-02-12 Tom Tromey <tromey@redhat.com>
2001
2002 * server.c (handle_query, handle_v_run): Use hex2bin, not
2003 unhexify.
2004 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2005
2006 2014-02-12 Tom Tromey <tromey@redhat.com>
2007
2008 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2009 convert_int_to_ascii.
2010 * regcache.c (registers_to_string, collect_register_as_string):
2011 Likewise.
2012 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2013 Likewise.
2014 * server.c (process_serial_event): Likewise.
2015 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2016 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2017
2018 2014-02-12 Tom Tromey <tromey@redhat.com>
2019
2020 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2021 bin2hex, not hexify.
2022 * tracepoint.c (cmd_qtstatus): Likewise.
2023
2024 2014-02-12 Tom Tromey <tromey@redhat.com>
2025
2026 * remote-utils.c (monitor_output): Pass explicit length to
2027 hexify.
2028
2029 2014-02-12 Tom Tromey <tromey@redhat.com>
2030
2031 * tracepoint.c: Include rsp-low.h.
2032 * server.c: Include rsp-low.h.
2033 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2034 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2035 declare.
2036 * remote-utils.c: Include rsp-low.h.
2037 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2038 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2039 (convert_int_to_ascii, convert_ascii_to_int): Move to
2040 common/rsp-low.c.
2041 * regcache.c: Include rsp-low.h.
2042 * ax.c: Include rsp-low.h.
2043 * Makefile.in (SFILES): Add common/rsp-low.c.
2044 (OBS): Add rsp-low.o.
2045 (rsp-low.o): New target.
2046
2047 2014-02-12 Tom Tromey <tromey@redhat.com>
2048
2049 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2050 Include print-utils.h.
2051 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2052 (plongest, thirty_two, phex_nz): Remove.
2053 * Makefile.in (SFILES): Add common/print-utils.c.
2054 (OBS): Add print-utils.o.
2055 (print-utils-ipa.o): New target.
2056 (print-utils.o): New target.
2057 (IPA_OBJS): Add print-utils-ipa.o.
2058
2059 2014-02-06 Tom Tromey <tromey@redhat.com>
2060
2061 * Makefile.in (SFILES): Fix indentation.
2062
2063 2014-02-05 Doug Evans <dje@google.com>
2064
2065 * linux-low.c (linux_wait_for_event): Improve comment.
2066 (linux_wait_1): Keep current_inferior in sync with event_child.
2067
2068 2014-01-22 Doug Evans <dje@google.com>
2069
2070 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2071
2072 2014-01-22 Doug Evans <dje@google.com>
2073
2074 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2075 * configure: Regenerate.
2076 * config.in: Regenerate.
2077 * Makefile.in (SFILES): Add debug.c.
2078 (OBS): Add debug.o.
2079 * debug.c: New file.
2080 * debug.h: New file.
2081 * linux-aarch64-low.c (*): Update all debugging printfs to use
2082 debug_printf instead of fprintf.
2083 * linux-arm-low.c (*): Ditto.
2084 * linux-cris-low.c (*): Ditto.
2085 * linux-crisv32-low.c (*): Ditto.
2086 * linux-m32r-low.c (*): Ditto.
2087 * linux-sparc-low.c (*): Ditto.
2088 * linux-x86.c (*): Ditto.
2089 * linux-low.c (*): Ditto.
2090 (linux_wait_1): Add calls to debug_enter, debug_exit.
2091 (linux_wait): Remove redundant debugging printf.
2092 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2093 (linux_resume, unstop_all_lwps): Ditto.
2094 * mem-break.c (*): Update all debugging printfs to use
2095 debug_printf instead of fprintf.
2096 * remote-utils.c (*): Ditto.
2097 * thread-db.c (*): Ditto.
2098 * server.c #include <ctype.h>, "gdb_vecs.h".
2099 (debug_threads): Moved to debug.c.
2100 (*): Update all debugging printfs to use debug_printf instead of
2101 fprintf.
2102 (start_inferior): Replace call to fflush with call to debug_flush.
2103 (monitor_show_help): Mention set debug-format.
2104 (parse_debug_format_options): New function.
2105 (handle_monitor_command): Handle "monitor set debug-format".
2106 (gdbserver_usage): Mention --debug-format.
2107 (main): Parse --debug-format.
2108 * server.h (debug_threads): Declaration moved to debug.h.
2109 #include "debug.h".
2110 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2111 trace_debug_1 that uses debug_printf.
2112 (tracepoint_look_up_symbols): Update all debugging printfs to use
2113 debug_printf instead of fprintf.
2114
2115 2014-01-20 Baruch Siach <baruch@tkos.co.il>
2116
2117 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2118 sys/ptrace.h.
2119
2120 2014-01-17 Pedro Alves <palves@redhat.com>
2121
2122 PR build/16445
2123 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2124 defined after including gdb_proc_service.h.
2125
2126 2014-01-16 Doug Evans <dje@google.com>
2127
2128 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2129 (match_dll): Use it.
2130
2131 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2132
2133 * target.h (target_ops) <read_btrace>: Change parameters and
2134 return type to allow error reporting.
2135 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2136 trace reading errors on.
2137 * linux-low.c (linux_low_read_btrace): Pass trace reading
2138 errors on.
2139 (linux_low_disable_btrace): New.
2140
2141 2014-01-15 Doug Evans <dje@google.com>
2142
2143 * inferiors.c (thread_id_to_gdb_id): Delete.
2144 * inferiors.h (thread_id_to_gdb_id): Delete.
2145
2146 2014-01-13 Eli Zaretskii <eliz@gnu.org>
2147
2148 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2149 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2150 versions.
2151
2152 2014-01-08 Pedro Alves <palves@redhat.com>
2153
2154 * server.c (handle_status): Don't discard previous queued stop
2155 replies or thread's pending status here.
2156 (main) <disconnection>: Do it here instead.
2157
2158 2014-01-08 Pedro Alves <palves@redhat.com>
2159
2160 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2161 * server.c (visit_actioned_threads, handle_pending_status): New
2162 function.
2163 (handle_v_cont): Factor out parts to ...
2164 (resume): ... this new function. If in all-stop, and a thread
2165 being resumed has a pending status, report it without actually
2166 resuming.
2167 (myresume): Adjust to use the new 'resume' function.
2168 (clear_pending_status_callback, set_pending_status_callback)
2169 (find_status_pending_thread_callback): New functions.
2170 (handle_status): Handle the case of multiple threads having
2171 interesting statuses to report. Report threads' real last signal
2172 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2173 with an interesting thread to report the status for, instead of
2174 always reporting the status of the first thread.
2175
2176 2014-01-01 Joel Brobecker <brobecker@adacore.com>
2177
2178 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2179 * gdbreplay.c (gdbreplay_version): Likewise.
2180
2181 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2182
2183 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2184 iov.iov_len with the real length in use.
2185
2186 2013-12-13 Joel Brobecker <brobecker@adacore.com>
2187
2188 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2189 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2190 for all targets that use win32-low.c.
2191 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2192 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2193
2194 2013-12-13 Pedro Alves <palves@redhat.com>
2195
2196 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2197 if equal to TARGET_WAITKIND_LOADED.
2198 * win32-low.c (cached_status): New static global.
2199 (win32_wait): Add declaration.
2200 (do_initial_child_stuff): Flush all initial pending debug events
2201 up to the initial breakpoint.
2202 (win32_wait): If CACHED_STATUS was set, return that instead
2203 of doing a real wait. Remove the code resuming the execution
2204 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2205 during the initial phase. Also remove the code changing
2206 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2207 TARGET_WAITKIND_STOPPED.
2208
2209 2013-12-11 Yao Qi <yao@codesourcery.com>
2210
2211 * notif.c (handle_notif_ack): Return 0 if no notification
2212 matches.
2213
2214 2013-11-20 Doug Evans <dje@google.com>
2215
2216 * linux-low.c (linux_set_resume_request): Fix comment.
2217
2218 2013-11-20 Doug Evans <dje@google.com>
2219
2220 * linux-low.c (resume_status_pending_p): Tweak comment.
2221
2222 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2223
2224 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2225 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2226 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2227 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2228 (srv_amd64_regobj): Add amd64-mpx.o.
2229 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2230 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2231 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2232 * i387-fp.c (num_pl_bnd_register) Added constant.
2233 (num_pl_bnd_cfg_registers) Added constant.
2234 (struct i387_xsave) Added reserved area and MPX fields.
2235 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2236 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2237 function.
2238 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2239 (init_registers_amd64_mpx_linux): Declare new function.
2240 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2241 (x86_64_regmap): Add MPX registers.
2242 (x86_linux_read_description): Add MPX case.
2243 (initialize_low_arch): Initialize MPX targets.
2244
2245 2013-11-18 Tom Tromey <tromey@redhat.com>
2246
2247 * configure: Rebuild.
2248 * configure.ac: Don't check for stdlib.h.
2249 * gdbreplay.c: Unconditionally include stdlib.h.
2250
2251 2013-11-18 Tom Tromey <tromey@redhat.com>
2252
2253 * config.in: Rebuild.
2254 * configure: Rebuild.
2255 * configure.ac: Don't use AC_HEADER_DIRENT.
2256
2257 2013-11-18 Tom Tromey <tromey@redhat.com>
2258
2259 * server.h: Don't check HAVE_STRING_H.
2260 * gdbreplay.c: Don't check HAVE_STRING_H.
2261 * configure: Rebuild.
2262
2263 2013-11-18 Tom Tromey <tromey@redhat.com>
2264
2265 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2266 LIBGNU.
2267
2268 2013-11-08 Tom Tromey <tromey@redhat.com>
2269
2270 * configure, config.in: Rebuild.
2271 * configure.ac: Remove unused configury.
2272
2273 2013-11-08 Tom Tromey <tromey@redhat.com>
2274
2275 * acinclude.m4: Include common.m4, codeset.m4.
2276 * configure, config.in: Rebuild.
2277 * configure.ac: Use GDB_AC_COMMON.
2278
2279 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2280
2281 * linux-s390-low.c (HWCAP_S390_TE): New define.
2282 (s390_arch_setup): Consider the TE field in the HWCAP for
2283 determining 'have_regset_tdb'.
2284
2285 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2286
2287 PR gdb/16014
2288 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2289 call to sizeof.
2290
2291 2013-10-02 Pedro Alves <palves@redhat.com>
2292
2293 * server.c (process_serial_event): Don't output "GDBserver
2294 exiting" if GDB is connected through stdio.
2295 * target.c (mywait): Likewise, be silent if GDB is connected
2296 through stdio.
2297
2298 2013-10-01 Joel Brobecker <brobecker@adacore.com>
2299
2300 * lynx-low.c (lynx_add_threads_after_attach): New function.
2301 (lynx_attach): Remove call to add_thread. Add call to
2302 lynx_add_threads_after_attach instead.
2303
2304 2013-09-28 Mike Frysinger <vapier@gentoo.org>
2305
2306 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2307 * config.in, configure: Regenerated.
2308
2309 2013-09-18 Yao Qi <yao@codesourcery.com>
2310
2311 PR server/15959
2312 * server.c (start_inferior): Clear 'resume_info'.
2313
2314 2013-09-16 Jiong Wang <jiwang@tilera.com>
2315
2316 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2317 for each register.
2318
2319 2013-09-16 Jiong Wang <jiwang@tilera.com>
2320
2321 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2322 linux-tile-low.o to srv_tgtobj.
2323
2324 2013-09-16 Will Newton <will.newton@linaro.org>
2325
2326 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2327 out regs.
2328
2329 2013-09-06 Pedro Alves <palves@redhat.com>
2330
2331 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2332 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2333 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2334 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2335 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2336 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2337
2338 2013-09-06 Pedro Alves <palves@redhat.com>
2339
2340 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2341 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2342
2343 2013-09-06 Pedro Alves <palves@redhat.com>
2344
2345 * linux-amd64-ipa.c: Include tracepoint.h.
2346 * linux-i386-ipa.c: Include tracepoint.h.
2347
2348 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2349
2350 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2351 (ps_get_thread_area): New function.
2352
2353 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2354
2355 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2356 (initialize_low_arch): Call init_registers_crisv32 rather than
2357 init_register_crisv32.
2358
2359 2013-09-05 Pedro Alves <palves@redhat.com>
2360
2361 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2362 to ...
2363 * hostio.h: ... this new file.
2364 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2365 win32-low.c: Include hostio.h.
2366
2367 2013-09-05 Pedro Alves <palves@redhat.com>
2368
2369 * server.h (gdb_client_data, handler_func, callback_handler_func)
2370 (delete_file_handler, add_file_handler, append_callback_event)
2371 (delete_callback_event, start_event_loop, initialize_event_loop):
2372 Move to event-loop.h and include it.
2373 * event-loop.h: New file.
2374
2375 2013-09-05 Pedro Alves <palves@redhat.com>
2376
2377 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2378 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2379 (loaded_dll, unloaded_dll): Move to ...
2380 * dll.h: ... this new file.
2381 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2382
2383 2013-09-05 Pedro Alves <palves@redhat.com>
2384
2385 * server.h (current_process, get_thread_process, all_processes)
2386 (add_inferior_to_list, for_each_inferior, current_inferior)
2387 (remove_inferior, add_process, remove_process, find_process_pid)
2388 (have_started_inferiors_p, have_attached_inferiors_p)
2389 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2390 (clear_inferiors, find_inferior, find_inferior_id)
2391 (inferior_target_data, set_inferior_target_data)
2392 (inferior_regcache_data, set_inferior_regcache_data): Move to
2393 inferiors.h, and include it.
2394 * inferiors.h: New file.
2395
2396 2013-09-05 Pedro Alves <palves@redhat.com>
2397
2398 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2399 Move ...
2400 * ax.h: ... here.
2401
2402 2013-09-05 Pedro Alves <palves@redhat.com>
2403
2404 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2405 tracepoint.h.
2406 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2407 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2408 (handle_tracepoint_general_set, handle_tracepoint_query)
2409 (tracepoint_finished_step, tracepoint_was_hit)
2410 (release_while_stepping_state_list, current_traceframe)
2411 (in_readonly_region, traceframe_read_mem)
2412 (fetch_traceframe_registers, traceframe_read_sdata)
2413 (traceframe_read_info, struct fast_tpoint_collect_status)
2414 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2415 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2416 (supply_fast_tracepoint_registers)
2417 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2418 (ipa_tdesc, claim_trampoline_space)
2419 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2420 (agent_mem_read, agent_get_trace_state_variable_value)
2421 (agent_set_trace_state_variable_value, agent_tsv_read)
2422 (agent_mem_read_string, get_raw_reg_func_addr)
2423 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2424 * tracepoint.h: ... this new file.
2425
2426 2013-09-05 Pedro Alves <palves@redhat.com>
2427
2428 * server.h (perror_with_name, error, fatal, warning, paddress)
2429 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2430 include it.
2431 * utils.h: New file.
2432
2433 2013-09-05 Pedro Alves <palves@redhat.com>
2434
2435 * server.h (remote_debug, noack_mode, transport_is_reliable)
2436 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2437 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2438 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2439 (write_enn, initialize_async_io, enable_async_io)
2440 (disable_async_io, check_remote_input_interrupt_request)
2441 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2442 (dead_thread_notify, prepare_resume_reply)
2443 (decode_address_to_semicolon, decode_address, decode_m_packet)
2444 (decode_M_packet, decode_X_packet, decode_xfer_write)
2445 (decode_search_memory_packet, unhexify, hexify)
2446 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2447 (look_up_one_symbol, relocate_instruction)
2448 (monitor_output): Move to remote-utils.h, and include it.
2449 * remote-utils.h: New file.
2450
2451 2013-09-05 Pedro Alves <palves@redhat.com>
2452
2453 * server.h (_): Delete.
2454
2455 2013-09-02 Pedro Alves <palves@redhat.com>
2456
2457 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2458 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2459 allocated.
2460 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2461
2462 2013-09-02 Pierre Muller <muller@sourceware.org>
2463
2464 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2465 or WriteProcessMemory complete successfully and handle
2466 ERROR_PARTIAL_COPY error.
2467
2468 2013-09-02 Pedro Alves <palves@redhat.com>
2469
2470 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2471 error instead of EIO.
2472
2473 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2474
2475 PR server/15604
2476 * linux-low.c: Include filestuff.h.
2477 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2478 * lynx-low.c: Include filestuff.h.
2479 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2480 * server.c: Include filestuff.h.
2481 (main): Call notice_open_fds.
2482 * spu-low.c: Include filestuff.h.
2483 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2484
2485 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
2486
2487 * Makefile.in: Explain why ../target and ../nat are not
2488 listed as include file search paths.
2489 (linux-waitpid.o): New object file rule.
2490 * configure.srv (srv_native_linux_obj): New variable.
2491 Replace all occurrences of linux native object files with
2492 $srv_native_linux_obj.
2493 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2494 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2495 (linux_enable_event_reporting): Remove declaration.
2496 (my_waitpid): Moved to common/linux-waitpid.c.
2497 (linux_wait_for_event): Pass ptid when calling
2498 linux_enable_event_reporting.
2499 (linux_supports_tracefork_flag): Remove.
2500 (linux_enable_event_reporting): Likewise.
2501 (linux_tracefork_grandchild): Remove.
2502 (STACK_SIZE): Moved to common/linux-ptrace.c.
2503 (linux_tracefork_child): Remove.
2504 (linux_test_for_tracefork): Remove.
2505 (linux_look_up_symbols): Call linux_supports_traceclone.
2506 (initialize_low): Remove call to linux_test_for_tracefork.
2507 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2508 common/linux-ptrace.h.
2509 (PTRACE_TYPE_ARG4): Likewise.
2510 Include linux-ptrace.h.
2511
2512 2013-08-21 Pedro Alves <palves@redhat.com>
2513
2514 * config.in: Renegerate.
2515
2516 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
2517
2518 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2519 (SFILES): Remove $(srcdir)/common/target-common.c and
2520 add $(srcdir)/target/waitstatus.c.
2521 (OBS): Remove target-common.o and add waitstatus.o.
2522 (server_h): Remove $(srcdir)/../common/target-common.h and
2523 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2524 and $(srcdir)/../target/waitstatus.h.
2525 (target-common.o): Remove.
2526 (waitstatus.o): New target object file.
2527 * target.h: Do not include target-common.h and
2528 include target/resume.h, target/wait.h and
2529 target/waitstatus.h.
2530
2531 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
2532
2533 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2534 to PTRACE_TYPE_ARG3.
2535 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2536 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2537 PTRACE_TYPE_ARG4.
2538 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2539 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2540
2541 2013-07-27 Jie Zhang <jie@codesourcery.com>
2542 Daniel Jacobowitz <dan@codesourcery.com>
2543 Yao Qi <yao@codesourcery.com>
2544
2545 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2546 (mips-linux-watch.o): New rule.
2547 (mips_linux_watch_h): New variable.
2548 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2549 srv_tgtobj.
2550 * linux-mips-low.c: Include mips-linux-watch.h.
2551 (struct arch_process_info, struct arch_lwp_info): New.
2552 (update_watch_registers_callback): New function.
2553 (mips_linux_new_process, mips_linux_new_thread) New functions.
2554 (mips_linux_prepare_to_resume, mips_insert_point): New
2555 functions.
2556 (mips_remove_point, mips_stopped_by_watchpoint): New
2557 functions.
2558 (rsp_bp_type_to_target_hw_bp_type): New function.
2559 (mips_stopped_data_address): New function.
2560 (the_low_target): Add watchpoint support functions.
2561
2562 2013-07-27 Yao Qi <yao@codesourcery.com>
2563
2564 * i386-low.c: Include break-common.h.
2565 (enum target_hw_bp_type): Remove.
2566
2567 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
2568
2569 * Makefile.in (SFILES): /common/target-common.c.
2570 (OBS): Add target-common.o.
2571 (server_h): Add $(srcdir)/../common/target-common.h.
2572 (target-common.o): New target.
2573 * server.c (queue_stop_reply_callback): Free
2574 status string after use.
2575 * target.c (target_waitstatus_to_string): Remove.
2576 * target.h: Include target-common.h.
2577 (resume_kind): Likewise.
2578 (target_waitkind): Likewise.
2579 (target_waitstatus): Likewise.
2580 (TARGET_WNOHANG): Likewise.
2581
2582 2013-07-04 Yao Qi <yao@codesourcery.com>
2583
2584 * Makefile.in (host_alias): Use @host_noncanonical@.
2585 (target_alias): Use @target_noncanonical@.
2586 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2587 ACX_NONCANONICAL_HOST.
2588 * configure: Regenerated.
2589
2590 Revert:
2591 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2592
2593 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2594 * configure: Rebuild.
2595 * Makefile.in (version_host, version_target): Get from configure.
2596 (version.c): Use $(version_host) and $(version_target).
2597
2598 2013-07-03 Pedro Alves <palves@redhat.com>
2599
2600 * Makefile.in (config.status): Depend on development.sh.
2601 * acinclude.m4: Include libmcheck.m4.
2602 * configure: Regenerate.
2603
2604 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2605
2606 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2607 attribute inside the parentheses.
2608 (winapi_DebugSetProcessKillOnExit): Ditto.
2609 (winapi_DebugBreakProcess): Ditto.
2610 (winapi_GenerateConsoleCtrlEvent): Ditto.
2611
2612 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2613
2614 * notif.h (notif_event): Add a dummy member to avoid compiler
2615 errors.
2616
2617 2013-07-01 Pedro Alves <palves@redhat.com>
2618
2619 * hostio.c (HOSTIO_PATH_MAX): Define.
2620 (require_filename, handle_open, handle_unlink, handle_readlink):
2621 Use it.
2622
2623 2013-07-01 Pedro Alves <palves@redhat.com>
2624
2625 * server.h: Include "pathmax.h".
2626 * linux-low.c: Don't include sys/param.h.
2627 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2628 MAXPATHLEN.
2629 * win32-low.c: Don't include sys/param.h.
2630 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2631
2632 2013-07-01 Pedro Alves <palves@redhat.com>
2633
2634 * event-loop.c: Don't check HAVE_UNISTD_H before including
2635 <unistd.h>.
2636 * gdbreplay.c: Likewise.
2637 * remote-utils.c: Likewise.
2638 * server.c: Likewise.
2639 * configure.ac: Don't check for unistd.h.
2640 * configure: Regenerate.
2641
2642 2013-06-28 Tom Tromey <tromey@redhat.com>
2643
2644 * Makefile.in (version.c): Use version.in, not
2645 common/version.in.
2646
2647 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2648
2649 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2650 * configure: Rebuild.
2651 * Makefile.in (version_host, version_target): Get from configure.
2652 (version.c): Use $(version_host) and $(version_target).
2653
2654 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2655
2656 Fix trace-status to output user name without trailing colon.
2657 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2658
2659 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2660
2661 Fix trace-status to output proper start-time and stop-time.
2662 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2663 output start time and stop time in hex as gdb expects.
2664
2665 2013-06-26 Pedro Alves <pedro@codesourcery.com>
2666
2667 * tracepoint.c (build_traceframe_info_xml): Output trace state
2668 variables present in the trace buffer.
2669
2670 2013-06-24 Tom Tromey <tromey@redhat.com>
2671
2672 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2673 create-version.sh.
2674 (version.o): Remove.
2675 * gdbreplay.c: Include version.h.
2676 (version, host_name): Don't declare.
2677 * server.h: Include version.h.
2678 (version, host_name): Don't declare.
2679
2680 2013-06-12 Pedro Alves <palves@redhat.com>
2681
2682 * linux-x86-low.c (linux_is_elf64): Delete global.
2683 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2684 with local linux_pid_exe_is_elf_64_file use.
2685
2686 2013-06-11 Pedro Alves <palves@redhat.com>
2687
2688 * linux-low.c (regset_disabled, disable_regset): New functions.
2689 (regsets_fetch_inferior_registers)
2690 (regsets_store_inferior_registers): Use them.
2691 (initialize_regsets_info); Don't allocate the disabled_regsets
2692 array here.
2693 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2694 comment.
2695
2696 2013-06-11 Pedro Alves <palves@redhat.com>
2697
2698 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2699 xmalloc.
2700
2701 2013-06-11 Pedro Alves <palves@redhat.com>
2702
2703 * linux-x86-low.c (initialize_low_arch): Call
2704 init_registers_x32_avx_linux.
2705
2706 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2707
2708 Fix compatibility with Android Bionic.
2709 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2710 it is not empty.
2711
2712 2013-06-07 Pedro Alves <palves@redhat.com>
2713
2714 PR server/14823
2715 * Makefile.in (OBS): Add tdesc.o.
2716 (IPA_OBJS): Add tdesc-ipa.o.
2717 (tdesc-ipa.o): New rule.
2718 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2719 interface.
2720 * linux-low.c (new_inferior): Delete.
2721 (disabled_regsets, num_regsets): Delete.
2722 (linux_add_process): Adjust to set the new per-process
2723 new_inferior flag.
2724 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2725 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2726 was a stop. When calling arch_setup, switch the current inferior
2727 to the thread that got an event.
2728 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2729 (regsets_fetch_inferior_registers)
2730 (regsets_store_inferior_registers): New regsets_info parameter.
2731 Adjust to use it.
2732 (linux_register_in_regsets): New regs_info parameter. Adjust to
2733 use it.
2734 (register_addr, fetch_register, store_register): New usrregs_info
2735 parameter. Adjust to use it.
2736 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2737 parameter regs_info. Adjust to use it.
2738 (linux_fetch_registers): Get the current inferior's regs_info, and
2739 adjust to use it.
2740 (linux_store_registers): Ditto.
2741 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2742 (initialize_low): Don't initialize the target_regsets here. Call
2743 initialize_low_arch.
2744 * linux-low.h (target_regsets): Delete declaration.
2745 (struct regsets_info): New.
2746 (struct usrregs_info): New.
2747 (struct regs_info): New.
2748 (struct process_info_private) <new_inferior>: New field.
2749 (struct linux_target_ops): Delete the num_regs, regmap, and
2750 regset_bitmap fields. New field regs_info.
2751 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2752 * i387-fp.c (num_xmm_registers): Delete.
2753 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2754 calls to new interface.
2755 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2756 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2757 Infer the number of xmm registers from the regcache's target
2758 description.
2759 * i387-fp.h (num_xmm_registers): Delete.
2760 * inferiors.c (add_thread): Don't install the thread's regcache
2761 here.
2762 * proc-service.c (gregset_info): Fetch the current inferior's
2763 regs_info. Adjust to use it.
2764 * regcache.c: Include tdesc.h.
2765 (register_bytes, reg_defs, num_registers)
2766 (gdbserver_expedite_regs): Delete.
2767 (get_thread_regcache): If the thread doesn't have a regcache yet,
2768 create one, instead of aborting gdbserver.
2769 (regcache_invalidate_one): Rename to ...
2770 (regcache_invalidate_thread): ... this.
2771 (regcache_invalidate_one): New.
2772 (regcache_invalidate): Only invalidate registers of the current
2773 process.
2774 (init_register_cache): Add target_desc parameter, and use it.
2775 (new_register_cache): Ditto. Assert the target description has a
2776 non zero registers_size.
2777 (regcache_cpy): Add assertions. Adjust.
2778 (realloc_register_cache, set_register_cache): Delete.
2779 (registers_to_string, registers_from_string): Adjust.
2780 (find_register_by_name, find_regno, find_register_by_number)
2781 (register_cache_size): Add target_desc parameter, and use it.
2782 (free_register_cache_thread, free_register_cache_thread_one)
2783 (regcache_release, register_cache_size): New.
2784 (register_size): Add target_desc parameter, and use it.
2785 (register_data, supply_register, supply_register_zeroed)
2786 (supply_regblock, supply_register_by_name, collect_register)
2787 (collect_register_as_string, collect_register_by_name): Adjust.
2788 * regcache.h (struct target_desc): Forward declare.
2789 (struct regcache) <tdesc>: New field.
2790 (init_register_cache, new_register_cache): Add target_desc
2791 parameter.
2792 (regcache_invalidate_thread): Declare.
2793 (regcache_invalidate_one): Delete declaration.
2794 (regcache_release): Declare.
2795 (find_register_by_number, register_cache_size, register_size)
2796 (find_regno): Add target_desc parameter.
2797 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2798 declarations.
2799 * remote-utils.c: Include tdesc.h.
2800 (outreg, prepare_resume_reply): Adjust.
2801 * server.c: Include tdesc.h.
2802 (gdbserver_xmltarget): Delete declaration.
2803 (get_features_xml, process_serial_event): Adjust.
2804 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2805 declare.
2806 (struct process_info) <tdesc>: New field.
2807 (ipa_tdesc): Declare.
2808 * tdesc.c: New file.
2809 * tdesc.h: New file.
2810 * tracepoint.c: Include tdesc.h.
2811 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2812 (get_context_regcache): Adjust to pass ipa_tdesc down.
2813 (do_action_at_tracepoint): Adjust to get the register cache size
2814 from the context regcache's description.
2815 (traceframe_walk_blocks): Adjust to get the register cache size
2816 from the current trace frame's description.
2817 (traceframe_get_pc): Adjust to get current trace frame's
2818 description and pass it down.
2819 (gdb_collect): Adjust to get the register cache size from the
2820 IPA's description.
2821 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2822 (gdbserver_xmltarget): Delete.
2823 (initialize_low_tracepoint): Set the ipa's target description.
2824 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2825 (initialize_low_tracepoint): Set the ipa's target description.
2826 * linux-x86-low.c: Include tdesc.h.
2827 [__x86_64__] (is_64bit_tdesc): New.
2828 (ps_get_thread_area, x86_get_thread_area): Use it.
2829 (i386_cannot_store_register): Rename to ...
2830 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2831 (i386_cannot_fetch_register): Rename to ...
2832 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2833 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2834 to new interface.
2835 (target_regsets): Rename to ...
2836 (x86_regsets): ... this.
2837 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2838 interface.
2839 (x86_siginfo_fixup): Use is_64bit_tdesc.
2840 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2841 (tdesc_x32_avx_linux, tdesc_x32_linux)
2842 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2843 Declare.
2844 (x86_linux_update_xmltarget): Delete.
2845 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2846 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2847 (AMD64_LINUX_USER64_CS): New.
2848 (x86_linux_read_description): New, based on
2849 x86_linux_update_xmltarget.
2850 (same_process_callback): New.
2851 (x86_arch_setup_process_callback): New.
2852 (x86_linux_update_xmltarget): New.
2853 (x86_regsets_info): New.
2854 (amd64_linux_regs_info): New.
2855 (i386_linux_usrregs_info): New.
2856 (i386_linux_regs_info): New.
2857 (x86_linux_regs_info): New.
2858 (x86_arch_setup): Reimplement.
2859 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2860 (x86_emit_ops): Ditto.
2861 (the_low_target): Adjust. Install x86_linux_regs_info,
2862 x86_cannot_fetch_register, and x86_cannot_store_register.
2863 (initialize_low_arch): New.
2864 * linux-ia64-low.c (tdesc_ia64): Declare.
2865 (ia64_fetch_register): Adjust.
2866 (ia64_usrregs_info, regs_info): New globals.
2867 (ia64_regs_info): New function.
2868 (the_low_target): Adjust.
2869 (initialize_low_arch): New function.
2870 * linux-sparc-low.c (tdesc_sparc64): Declare.
2871 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2872 Adjust.
2873 (sparc_arch_setup): New function.
2874 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2875 (the_low_target): Adjust.
2876 (initialize_low_arch): New function.
2877 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2878 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2879 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2880 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2881 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2882 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2883 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2884 (tdesc_powerpc_isa205_vsx64l): Declare.
2885 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2886 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2887 (ppc_set_pc, ppc_get_hwcap): Adjust.
2888 (ppc_usrregs_info): Forward declare.
2889 (!__powerpc64__) ppc_regmap_adjusted: New global.
2890 (ppc_arch_setup): Adjust to the current process'es target
2891 description.
2892 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2893 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2894 (ppc_store_evrregset): Adjust.
2895 (target_regsets): Rename to ...
2896 (ppc_regsets): ... this, and make static.
2897 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2898 (ppc_regs_info): New function.
2899 (the_low_target): Adjust.
2900 (initialize_low_arch): New function.
2901 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2902 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2903 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2904 (tdesc_s390x_linux64v2): Declare.
2905 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2906 (s390_fill_gregset, s390_store_last_break): Adjust.
2907 (target_regsets): Rename to ...
2908 (s390_regsets): ... this, and make static.
2909 (s390_get_pc, s390_set_pc): Adjust.
2910 (s390_get_hwcap): New target_desc parameter, and use it.
2911 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2912 (s390_arch_setup): Adjust to set the current process'es target
2913 description. Don't adjust the regmap.
2914 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2915 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2916 (regs_info_3264): New globals.
2917 (s390_regs_info): New function.
2918 (the_low_target): Adjust.
2919 (initialize_low_arch): New function.
2920 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2921 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2922 [__mips64] (init_registers_mips_linux)
2923 (init_registers_mips_dsp_linux): Delete defines.
2924 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2925 (have_dsp): New global.
2926 (mips_read_description): New, based on mips_arch_setup.
2927 (mips_arch_setup): Reimplement.
2928 (get_usrregs_info): New function.
2929 (mips_cannot_fetch_register, mips_cannot_store_register)
2930 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2931 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2932 (target_regsets): Rename to ...
2933 (mips_regsets): ... this, and make static.
2934 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2935 (dsp_regs_info, regs_info): New globals.
2936 (mips_regs_info): New function.
2937 (the_low_target): Adjust.
2938 (initialize_low_arch): New function.
2939 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2940 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2941 Declare.
2942 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2943 (arm_read_description): New, with bits factored from
2944 arm_arch_setup.
2945 (arm_arch_setup): Reimplement.
2946 (target_regsets): Rename to ...
2947 (arm_regsets): ... this, and make static.
2948 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2949 (arm_regs_info): New function.
2950 (the_low_target): Adjust.
2951 (initialize_low_arch): New function.
2952 * linux-m68k-low.c (tdesc_m68k): Declare.
2953 (target_regsets): Rename to ...
2954 (m68k_regsets): ... this, and make static.
2955 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2956 (m68k_regs_info): New function.
2957 (m68k_arch_setup): New function.
2958 (the_low_target): Adjust.
2959 (initialize_low_arch): New function.
2960 * linux-sh-low.c (tdesc_sharch): Declare.
2961 (target_regsets): Rename to ...
2962 (sh_regsets): ... this, and make static.
2963 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2964 (sh_regs_info, sh_arch_setup): New functions.
2965 (the_low_target): Adjust.
2966 (initialize_low_arch): New function.
2967 * linux-bfin-low.c (tdesc_bfin): Declare.
2968 (bfin_arch_setup): New function.
2969 (bfin_usrregs_info, regs_info): New globals.
2970 (bfin_regs_info): New function.
2971 (the_low_target): Adjust.
2972 (initialize_low_arch): New function.
2973 * linux-cris-low.c (tdesc_cris): Declare.
2974 (cris_arch_setup): New function.
2975 (cris_usrregs_info, regs_info): New globals.
2976 (cris_regs_info): New function.
2977 (the_low_target): Adjust.
2978 (initialize_low_arch): New function.
2979 * linux-cris-low.c (tdesc_crisv32): Declare.
2980 (cris_arch_setup): New function.
2981 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2982 (cris_regs_info): New function.
2983 (the_low_target): Adjust.
2984 (initialize_low_arch): New function.
2985 * linux-m32r-low.c (tdesc_m32r): Declare.
2986 (m32r_arch_setup): New function.
2987 (m32r_usrregs_info, regs_info): New globals.
2988 (m32r_regs_info): Adjust.
2989 (initialize_low_arch): New function.
2990 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2991 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2992 (tic6x_usrregs_info): Forward declare.
2993 (tic6x_read_description): New function, based on ...
2994 (tic6x_arch_setup): ... this. Reimplement.
2995 (target_regsets): Rename to ...
2996 (tic6x_regsets): ... this, and make static.
2997 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2998 (tic6x_regs_info): New function.
2999 (the_low_target): Adjust.
3000 (initialize_low_arch): New function.
3001 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3002 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3003 (target_regsets): Rename to ...
3004 (xtensa_regsets): ... this, and make static.
3005 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3006 globals.
3007 (xtensa_arch_setup, xtensa_regs_info): New functions.
3008 (the_low_target): Adjust.
3009 (initialize_low_arch): New function.
3010 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3011 (nios2_arch_setup): Set the current process'es tdesc.
3012 (target_regsets): Rename to ...
3013 (nios2_regsets): ... this.
3014 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3015 (nios2_regs_info): New function.
3016 (the_low_target): Adjust.
3017 (initialize_low_arch): New function.
3018 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3019 (aarch64_arch_setup): Set the current process'es tdesc.
3020 (target_regsets): Rename to ...
3021 (aarch64_regsets): ... this.
3022 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3023 (aarch64_regs_info): New function.
3024 (the_low_target): Adjust.
3025 (initialize_low_arch): New function.
3026 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3027 globals.
3028 (target_regsets): Rename to ...
3029 (tile_regsets): ... this.
3030 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3031 (tile_regs_info): New function.
3032 (tile_arch_setup): Set the current process'es tdesc.
3033 (the_low_target): Adjust.
3034 (initialize_low_arch): New function.
3035 * spu-low.c (tdesc_spu): Declare.
3036 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3037 * win32-arm-low.c (tdesc_arm): Declare.
3038 (arm_arch_setup): New function.
3039 (the_low_target): Install arm_arch_setup instead of
3040 init_registers_arm.
3041 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3042 (init_windows_x86): Rename to ...
3043 (i386_arch_setup): ... this. Set `win32_tdesc'.
3044 (the_low_target): Adjust.
3045 * win32-low.c (win32_tdesc): New global.
3046 (child_add_thread): Don't create the thread cache here.
3047 (do_initial_child_stuff): Set the new process'es tdesc.
3048 * win32-low.h (struct target_desc): Forward declare.
3049 (win32_tdesc): Declare.
3050 * lynx-i386-low.c (tdesc_i386): Declare global.
3051 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3052 * lynx-low.c (lynx_tdesc): New global.
3053 (lynx_add_process): Set the new process'es tdesc.
3054 * lynx-low.h (struct target_desc): Forward declare.
3055 (lynx_tdesc): Declare global.
3056 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3057 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3058 * nto-low.c (nto_tdesc): New global.
3059 (do_attach): Set the new process'es tdesc.
3060 * nto-low.h (struct target_desc): Forward declare.
3061 (nto_tdesc): Declare.
3062 * nto-x86-low.c (tdesc_i386): Declare.
3063 (nto_x86_arch_setup): Set `nto_tdesc'.
3064
3065 2013-06-04 Gary Benson <gbenson@redhat.com>
3066
3067 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3068 to qSupported response when appropriate.
3069 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3070 with nonzero-length annex.
3071 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3072 arguments supplied in annex.
3073
3074 2013-05-31 Doug Evans <dje@google.com>
3075
3076 PR server/15594
3077 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3078 64 bits in 64-cross-32 environment.
3079
3080 2013-05-28 Pedro Alves <palves@redhat.com>
3081
3082 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3083 (aarch64-without-fpu.c): Delete rule.
3084 * configure.srv (aarch64*-*-linux*): Remove references to
3085 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3086 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3087 declaration.
3088
3089 2013-05-24 Pedro Alves <palves@redhat.com>
3090
3091 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3092 instead of strchr/decode_address. Error if the range isn't split
3093 with a ','. Don't assume there's be a ':' in the action.
3094
3095 2013-05-23 Yao Qi <yao@codesourcery.com>
3096 Pedro Alves <palves@redhat.com>
3097
3098 * linux-low.c (lwp_in_step_range): New function.
3099 (linux_wait_1): If the thread was range stepping and stopped
3100 outside the stepping range, report the stop to GDB. Otherwise,
3101 continue stepping. Add range stepping debug output.
3102 (linux_set_resume_request): Copy the step range from the resume
3103 request to the lwp.
3104 (linux_supports_range_stepping): New.
3105 (linux_target_ops) <supports_range_stepping>: Set to
3106 linux_supports_range_stepping.
3107 * linux-low.h (struct linux_target_ops)
3108 <supports_range_stepping>: New field.
3109 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3110 * linux-x86-low.c (x86_supports_range_stepping): New.
3111 (the_low_target) <supports_range_stepping>: Set to
3112 x86_supports_range_stepping.
3113 * server.c (handle_v_cont): Handle 'r' action.
3114 (handle_v_requests): Append ";r" if the target supports range
3115 stepping.
3116 * target.h (struct thread_resume) <step_range_start,
3117 step_range_end>: New fields.
3118 (struct target_ops) <supports_range_stepping>:
3119 New field.
3120 (target_supports_range_stepping): New macro.
3121
3122 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3123
3124 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3125 confusion in comment.
3126
3127 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3128
3129 * lynx-low.c (struct process_info_private): New type.
3130 (lynx_add_process): New function.
3131 (lynx_create_inferior, lynx_attach): Replace calls to
3132 add_process by calls to lynx_add_process.
3133 (lynx_resume): If PTID is null, then try using
3134 current_process()->private->last_wait_event_ptid.
3135 Add comments.
3136 (lynx_clear_inferiors): Delete. The contents of that function
3137 has been inlined in lynx_mourn;
3138 (lynx_wait_1): Save the ptid in the process's private data.
3139 (lynx_mourn): Free the process' private data. Replace call
3140 to lynx_clear_inferiors by call to clear_inferiors.
3141
3142 2013-05-17 Yao Qi <yao@codesourcery.com>
3143
3144 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3145 the right place.
3146
3147 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
3148
3149 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3150 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3151 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3152 PT_TEXT_END_ADDR guards. Update comments.
3153 (linux_target_op) <read_offsets>: Conditionally define to
3154 linux_read_offsets if the target is UCLIBC and if it defines
3155 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3156
3157 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3158 Andrew Jenner <andrew@codesourcery.com>
3159
3160 * Makefile.in (SFILES): Add linux-nios2-low.c.
3161 (clean): Add action to delete nios2-linux.c.
3162 (nios2-linux.c): New rule.
3163 * configure.srv: Add nios2*-*-linux*.
3164 * linux-nios2-low.c: New.
3165
3166 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3167
3168 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3169
3170 2013-04-25 Hui Zhu <hui@codesourcery.com>
3171
3172 PR gdb/15186
3173 * ax.c (ax_printf): Add fflush.
3174
3175 2013-04-22 Tom Tromey <tromey@redhat.com>
3176
3177 * Makefile.in (SFILES): Add filestuff.c.
3178 (OBS): Add filestuff.o.
3179 (filestuff.o): New target.
3180 * config.in, configure: Rebuild.
3181 * configure.ac: Check for fdwalk, pipe2.
3182
3183 2013-04-17 Pedro Alves <palves@redhat.com>
3184
3185 * configure.ac (USE_THREAD_DB): Delete variable.
3186 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3187 Don't AC_SUBST USE_THREAD_DB.
3188 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3189 * config.in, configure: Regenerate.
3190
3191 2013-04-16 Pedro Alves <palves@redhat.com>
3192
3193 * linux-low.h (struct lwp_info) <thread_known>: Move under
3194 the USE_THREAD_DB #ifdef.
3195
3196 2013-04-16 Pedro Alves <palves@redhat.com>
3197
3198 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3199 (linux-low.o): Delete rule.
3200 * linux-low.h: Always include "gdb_thread_db.h" instead of
3201 conditionally including thread_db.h.
3202 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3203 HAVE_THREAD_DB_H.
3204
3205 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3206
3207 * Makefile.in (install-only): Fix make install regression.
3208
3209 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3210
3211 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3212 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3213 installation.
3214 * gdbserver.1: Remove.
3215
3216 2013-03-22 Pedro Alves <palves@redhat.com>
3217
3218 * linux-low.c (handle_extended_wait): Don't call
3219 linux_enable_event_reporting.
3220
3221 2013-03-15 Tony Theodore <tonyt@logyst.com>
3222
3223 PR build/9098:
3224 * Makefile.in (SHELL): Use @SHELL@.
3225
3226 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3227
3228 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3229 compiler warning.
3230
3231 2013-03-13 Joel Brobecker <brobecker@adacore.com>
3232
3233 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3234 Remove extraneous NULL element.
3235
3236 2013-03-13 Yao Qi <yao@codesourcery.com>
3237
3238 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3239 'V' block in trace frame.
3240
3241 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3242
3243 * target.h (struct target_ops): Add btrace ops.
3244 (target_supports_btrace): New macro.
3245 (target_enable_btrace): New macro.
3246 (target_disable_btrace): New macro.
3247 (target_read_btrace): New macro.
3248 * gdbthread.h (struct thread_info): Add btrace field.
3249 * server.c: Include btrace-common.h.
3250 (handle_btrace_general_set): New function.
3251 (handle_btrace_enable): New function.
3252 (handle_btrace_disable): New function.
3253 (handle_general_set): Call handle_btrace_general_set.
3254 (handle_qxfer_btrace): New function.
3255 (struct qxfer qxfer_packets[]): Add btrace entry.
3256 * inferiors.c (remove_thread): Disable btrace.
3257 * linux-low: Include linux-btrace.h.
3258 (linux_low_enable_btrace): New function.
3259 (linux_low_read_btrace): New function.
3260 (linux_target_ops): Add btrace ops.
3261 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3262 Add srv_linux_btrace=yes.
3263 (x86_64-*-linux*): Add linux-btrace.o.
3264 Add srv_linux_btrace=yes.
3265 * configure.ac: Define HAVE_LINUX_BTRACE.
3266 * config.in: Regenerated.
3267 * configure: Regenerated.
3268
3269 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3270
3271 * server.c (handle_qxfer): Preserve error message if -3 is
3272 returned.
3273 (qxfer): Document the -3 return value.
3274
3275 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3276
3277 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3278 (linux_btrace_h): New variable.
3279 (linux-btrace.o): New rule.
3280
3281 2013-03-08 Stan Shebs <stan@codesourcery.com>
3282 Hafiz Abid Qadeer <abidh@codesourcery.com>
3283
3284 * tracepoint.c (trace_buffer_size): New global.
3285 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3286 (init_trace_buffer): Change to one-argument function. Allocate
3287 trace buffer memory.
3288 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3289 handle QTBuffer:size packet.
3290 (cmd_bigqtbuffer_size): New function.
3291 (initialize_tracepoint): Call init_trace_buffer with
3292 DEFAULT_TRACE_BUFFER_SIZE.
3293 * server.c (handle_query): Add QTBuffer:size in the
3294 supported packets.
3295
3296 2013-03-07 Yao Qi <yao@codesourcery.com>
3297
3298 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3299 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3300 of -1.
3301 (cmd_qtsp): Adjust condition. Do post increment.
3302 Set cur_action and cur_step_action back to 0.
3303
3304 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3305
3306 PR server/15236
3307 * linux-low.c (linux_write_memory): Return early success if LEN is
3308 zero.
3309
3310 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
3311
3312 * configure.srv: Add x86_64-*-cygwin* as target.
3313
3314 2013-02-28 Tom Tromey <tromey@redhat.com>
3315
3316 * configure.ac: Invoke AC_SYS_LARGEFILE.
3317 * configure, config.in: Rebuild.
3318
3319 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
3320
3321 * win32-low.c: Throughout, fix format strings and casts of
3322 printf-like functions to avoid type related warnings on all
3323 platforms.
3324 (get_child_debug_event): Print dwDebugEventCode as hex since
3325 that's how it's usually documented.
3326
3327 2013-02-28 Yao Qi <yao@codesourcery.com>
3328
3329 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3330 pulongest.
3331
3332 2013-02-27 Jiong Wang <jiwang@tilera.com>
3333
3334 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3335 (reg-tilegx32.c): New rule.
3336 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3337 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3338 different register info initializer according to elf class.
3339 (init_registers_tilgx32): New function. The tilegx32 register info
3340 initializer.
3341 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3342 (tile_store_gregset): Likewise.
3343
3344 2013-02-27 Yao Qi <yao@codesourcery.com>
3345
3346 * server.c (process_point_options): Print debug message when
3347 debug_threads is true.
3348
3349 2013-02-26 Yao Qi <yao@codesourcery.com>
3350
3351 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3352
3353 2013-02-19 Pedro Alves <palves@redhat.com>
3354 Kai Tietz <ktietz@redhat.com>
3355
3356 PR gdb/15161
3357
3358 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3359 instead of strtoul to extract address from packet.
3360 (process_serial_event) <'z'>: Likewise.
3361
3362 2013-02-18 Yao Qi <yao@codesourcery.com>
3363
3364 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3365
3366 2013-02-14 Pedro Alves <palves@redhat.com>
3367
3368 Plug memory leak.
3369
3370 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3371 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3372
3373 2013-02-14 Pedro Alves <palves@redhat.com>
3374
3375 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3376
3377 2013-02-14 Pedro Alves <palves@redhat.com>
3378
3379 * tracepoint.c (save_string): Delete.
3380 (add_tracepoint_action): Use savestring instead of save_string.
3381
3382 2013-02-12 Pedro Alves <palves@redhat.com>
3383
3384 * linux-xtensa-low.c: Ditto.
3385 * xtensa-xtregs.c: Ditto.
3386
3387 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3388
3389 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3390 thread_db.
3391
3392 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3393
3394 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3395 aarch64_num_wp_regs and aarch64_num_bp_regs to
3396 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3397
3398 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3399
3400 * linux-aarch64-low.c (ps_get_thread_area): Replace
3401 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3402
3403 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3404 Marcus Shawcroft <marcus.shawcroft@arm.com>
3405 Nigel Stephens <nigel.stephens@arm.com>
3406 Yufeng Zhang <yufeng.zhang@arm.com>
3407
3408 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3409 (aarch64.c, aarch64-without-fpu.c): New targets.
3410 * configure.srv (aarch64*-*-linux*): New.
3411 * linux-aarch64-low.c: New file.
3412
3413 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3414
3415 * linux-low.c (handle_extended_wait, linux_create_inferior)
3416 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3417 (dequeue_one_deferred_signal, linux_resume_one_thread)
3418 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3419 (linux_tracefork_grandchild, linux_test_for_tracefork)
3420 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3421 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3422 where the argument is 0.
3423
3424 2013-01-25 Yao Qi <yao@codesourcery.com>
3425
3426 * event-loop.c: Include "queue.h".
3427 (gdb_event_p): New typedef.
3428 (struct gdb_event) <next_event>: Remove.
3429 (event_queue): Change to QUEUE(gdb_event_p).
3430 (async_queue_event): Remove.
3431 (gdb_event_xfree): New.
3432 (initialize_event_loop): New.
3433 (process_event): Use API from QUEUE.
3434 (wait_for_event): Likewise.
3435 * server.c (main): Call initialize_event_loop.
3436 * server.h (initialize_event_loop): Declare.
3437
3438 2013-01-18 Yao Qi <yao@codesourcery.com>
3439
3440 * ax.h (struct eval_agent_expr_context): New.
3441 (gdb_eval_agent_expr): Update declaration.
3442 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3443 TFRAME. Add new argument CTX.
3444 * server.h (struct eval_agent_expr_context): Declare.
3445 (agent_mem_read, agent_tsv_read): Update declaration.
3446 (agent_mem_read_string): Likewise.
3447 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3448 (add_traceframe_block): Add new argument TPOINT.
3449 Increase TPOINT->traceframe_usage.
3450 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3451 eval_tracepoint_agent_expr.
3452 (condition_true_at_tracepoint): Likewise.
3453 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3454 (agent_mem_read_string, agent_tsv_read): Likewise.
3455
3456 2013-01-16 Yao Qi <yao@codesourcery.com>
3457
3458 * linux-low.c (linux_resume_one_lwp): Don't check
3459 'lwp->bp_reinsert != 0'.
3460
3461 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3462 Pedro Alves <palves@redhat.com>
3463
3464 * lynx-low.c (ptrace_request_to_str): Define a temporary
3465 macro and use it to simplify this function's implementation.
3466
3467 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3468
3469 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3470 sets errno.
3471
3472 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3473
3474 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3475
3476 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3477
3478 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3479
3480 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3481
3482 * lynx-low.c (lynx_resume): Use the resume_info parameter
3483 to determine the ptid for the lynx_ptrace call, unless
3484 it is equal to minus_one_ptid, in which case we use the
3485 ptid of the current_inferior.
3486 (lynx_wait_1): After having received a thread create/exit
3487 event, resume the inferior's execution using the signaling
3488 thread's ptid, rather than the old ptid.
3489
3490 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3491
3492 * lynx-low.c (lynx_resume): Delete variable ret.
3493
3494 2013-01-01 Joel Brobecker <brobecker@adacore.com>
3495
3496 * gdbreplay.c (gdbreplay_version): Update copyright year.
3497 * server.c (gdbserver_version): Likewise.
3498
3499 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3500
3501 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3502 new thread.
3503
3504 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3505
3506 * lynx-low.c (ptrace_request_to_str): Add handling for
3507 PTRACE_GETTRACESIG.
3508
3509 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3510
3511 * lynx-low.c (lynx_attach): Delete variable new_process.
3512
3513 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3514
3515 * lynx-low.c (lynx_create_inferior): Delete variable
3516 new_process.
3517
3518 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3519
3520 * lynx-low.c (ptrace_request_to_str): Do not handle
3521 PTRACE_GETTHREADLIST if this macro does not exist.
3522
3523 2012-12-15 Yao Qi <yao@codesourcery.com>
3524
3525 * Makefile.in (OBS): Add notif.o.
3526 * notif.c, notif.h: New.
3527 * server.c: Include "notif.h".
3528 (struct vstop_notif) <next>: Remove.
3529 <base>: New field.
3530 (queue_stop_reply): Update.
3531 (push_event, send_next_stop_reply): Remove.
3532 (discard_queued_stop_replies): Update.
3533 (notif_stop): New variable.
3534 (handle_v_stopped): Remove.
3535 (handle_v_requests): Don't call handle_v_stopped. Call
3536 handle_ack_notif instead.
3537 (queue_stop_reply_callback): Call notif_event_enque instead
3538 of queue_stop_reply.
3539 (handle_status): Don't call send_next_stop_reply, call
3540 notif_write_event instead.
3541 (kill_inferior_callback): Likewise.
3542 (detach_or_kill_inferior_callback): Likewise.
3543 (main): Call initialize_notif.
3544 (process_serial_event): Call QUEUE_is_empty.
3545 (handle_target_event): Call notif_push instead of push event.
3546 * server.h (push_event): Remove declaration.
3547
3548 2012-12-10 Tom Tromey <tromey@redhat.com>
3549
3550 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3551 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3552 macros.
3553 (.c.o): Rewrite.
3554 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3555 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3556 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3557 (amd64-linux-ipa.o, ax.o): Rewrite.
3558 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3559 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3560 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3561 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3562 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3563 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3564 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3565 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3566 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3567 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3568 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3569 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3570 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3571 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3572 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3573 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3574 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3575 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3576 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3577 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3578 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3579 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3580 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3581 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3582 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3583 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3584 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3585 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3586 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3587 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3588 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3589 (reg-tilegx.o): Remove.
3590 (all_object_files): New macro.
3591 Include .deps files.
3592 * aclocal.m4, configure: Rebuild.
3593 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3594 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3595 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3596
3597 2012-12-05 Tom Tromey <tromey@redhat.com>
3598
3599 PR gdb/14917:
3600 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3601
3602 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
3603
3604 * configure.ac: Check for linux/perf_event.h.
3605 * config.in: Regenerated.
3606 * configure: Regenerated.
3607
3608 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3609
3610 * hostio.c (handle_readlink): Decrease buffer size
3611 parameter passed to readlink by one byte.
3612
3613 2012-11-26 Yao Qi <yao@codesourcery.com>
3614
3615 * configure.ac (build_warnings): Append '-Wempty-body'.
3616 * configure: Regenerated.
3617 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3618 body.
3619
3620 2012-11-15 Pierre Muller <muller@sourceware.org>
3621
3622 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3623 * config.in: Regenerate.
3624 * configure: Regenerate.
3625 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3626 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3627 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3628 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3629 header.
3630 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3631 instead of <sys/wait.h> header.
3632 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3633
3634 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3635
3636 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3637 (various make rules): Remove -DGDBSERVER
3638
3639 2012-11-09 Yao Qi <yao@codesourcery.com>
3640
3641 * spu-low.c (current_ptid): Move it to ..
3642 * gdbthread.h: ... here. New.
3643 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3644 * server.c (myresume, process_serial_event): Likewise.
3645 * thread-db.c (thread_db_find_new_threads): Likewise.
3646 * tracepoint.c (run_inferior_command): Likewise.
3647
3648 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
3649
3650 * server.c (handle_search_memory_1): Include access length in
3651 warning message.
3652
3653 2012-09-05 Michael Brandt <michael.brandt@axis.com>
3654
3655 * linux-crisv32-low.c: Fix compile errors.
3656
3657 2012-09-04 Yao Qi <yao@codesourcery.com>
3658
3659 * tracepoint.c (cmd_qtsv): Adjust debug message.
3660 Don't check CUR_TPOINT.
3661
3662 2012-08-28 Yao Qi <yao@codesourcery.com>
3663
3664 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3665 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3666 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3667 Remove declarations of xmalloc, xreallloc, xstrdup and
3668 freeargv.
3669 * Makefile.in (libiberty_h): New.
3670 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3671 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3672
3673 2012-08-23 Yao Qi <yao@codesourcery.com>
3674
3675 * server.h: Remove declaration of 'xsnprintf'.
3676
3677 2012-08-22 Keith Seitz <keiths@redhat.com>
3678
3679 * server.h: Include build-gnulib-gbserver/config.h.
3680 * gdbreplay.c: Likewise.
3681
3682 2012-08-08 Doug Evans <dje@google.com>
3683
3684 * Makefile.in (SFILES): Add gdb_vecs.c.
3685 (OBS): Add gdb_vecs.o.
3686 (gdb_vecs_h, host_defs_h): New variables.
3687 (thread-db.o): Add $(gdb_vecs_h) dependency.
3688 (gdb_vecs.o): New rule.
3689 * thread-db.c: #include "gdb_vecs.h".
3690 (thread_db_load_search): Use a vector to iterate over path elements.
3691 Handle text appearing after "$pdir".
3692
3693 * configure.ac: Add check for strstr.
3694 * config.in: Regenerate.
3695 * configure: Regenerate.
3696
3697 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3698
3699 * hostio.c (handle_pread): If pread fails, fall back to attempting
3700 lseek/read.
3701 (handle_pwrite): Likewise for pwrite.
3702
3703 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3704
3705 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3706 between unsupported TYPE and unimplementable ADDR/LEN combination.
3707 (arm_insert_point): Act on new return value.
3708
3709 2012-07-31 Pedro Alves <palves@redhat.com>
3710
3711 * server.c (process_point_options): Only skip tokens if we find
3712 one that is unrecognized. Don't treat 'X' specially while
3713 skipping unrecognized tokens.
3714
3715 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3716
3717 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3718 to 4-byte-align HW breakpoint addresses for Thumb.
3719
3720 2012-07-27 Yao Qi <yao@codesourcery.com>
3721
3722 PR remote/14161.
3723
3724 * server.h: Declare gdb_agent_about_to_close.
3725 * target.c (kill_inferior): Include "agent.h".
3726 New. Send command 'kill'.
3727 * target.h (kill_inferior): Removed macro.
3728 * tracepoint.c (gdb_agent_about_to_close): New.
3729 (gdb_agent_helper_thread): Handle command 'close'.
3730 Wait endlessly until the inferior stops.
3731 Install gdb_agent_remove_socket to atexit hook.
3732 (agent_socket_name): New static variable.
3733 (gdb_agent_socket_init): Replace local variable 'name' with
3734 'agent_socket_name'.
3735 (gdb_agent_remove_socket): New.
3736
3737 2012-07-27 Yao Qi <yao@codesourcery.com>
3738
3739 * server.c (process_point_options): Stop at 'X' when parsing.
3740
3741 2012-07-19 Michael Eager <eager@eagercon.com>
3742
3743 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
3744 to hw_execute.
3745 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3746 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3747 hardware breakpoint.
3748
3749 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3750
3751 * gdbserver/linux-low.c (initialize_low): Call
3752 linux_ptrace_init_warnings.
3753
3754 2012-07-02 Doug Evans <dje@google.com>
3755
3756 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3757 pointer to int.
3758
3759 2012-07-02 Stan Shebs <stan@codesourcery.com>
3760
3761 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3762 (ax.o): Add it to build rule.
3763 (ax-ipa.o): Ditto.
3764 (OBS): Add format.o.
3765 (IPA_OBS): Add format.o.
3766 * server.c (handle_query): Claim support for breakpoint commands.
3767 (process_point_options): Add command case.
3768 (process_serial_event): Leave running if there are printfs in
3769 effect.
3770 * mem-break.h (any_persistent_commands): Declare.
3771 (add_breakpoint_commands): Declare.
3772 (gdb_no_commands_at_breakpoint): Declare.
3773 (run_breakpoint_commands): Declare.
3774 * mem-break.c (struct point_command_list): New struct.
3775 (struct breakpoint): New field command_list.
3776 (any_persistent_commands): New function.
3777 (add_commands_to_breakpoint): New function.
3778 (add_breakpoint_commands): New function.
3779 (gdb_no_commands_at_breakpoint): New function.
3780 (run_breakpoint_commands): New function.
3781 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3782 locally.
3783 * ax.c: Include format.h.
3784 (ax_printf): New function.
3785 (gdb_eval_agent_expr): Add printf opcode.
3786
3787 2012-06-13 Yao Qi <yao@codesourcery.com>
3788
3789 * server.c (start_inferior): Remove duplicated writes to fields
3790 'last_resume_kind' and 'last_status' of 'current_inferior'.
3791
3792 2012-06-12 Yao Qi <yao@codesourcery.com>
3793 Pedro Alves <palves@redhat.com>
3794
3795 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3796 comment.
3797 * server.c (handle_v_cont): Extend comment.
3798
3799 2012-06-11 Yao Qi <yao@codesourcery.com>
3800
3801 * linux-low.c (linux_attach): Add 'static'.
3802
3803 2012-06-06 Yao Qi <yao@codesourcery.com>
3804
3805 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3806
3807 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3808
3809 Fix gcc -flto compilation warning.
3810 * server.c (main): Make variable multi_mode and attach volatile.
3811
3812 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3813
3814 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3815 if the platform doesn't know about it.
3816
3817 2012-05-30 Jeff Kenton <jkenton@tilera.com>
3818
3819 * Makefile.in (SFILES): Add linux-tile-low.c.
3820 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3821 * configure.srv: Handle tilegx-*-linux*.
3822 * linux-tile-low.c: New file.
3823
3824 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3825
3826 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3827
3828 2012-05-24 Pedro Alves <palves@redhat.com>
3829
3830 PR gdb/7205
3831
3832 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
3833
3834 2012-05-24 Pedro Alves <palves@redhat.com>
3835
3836 PR gdb/7205
3837
3838 Replace target_signal with gdb_signal throughout.
3839
3840 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3841
3842 * linux-low.c (linux_store_registers): Avoid the copying sequence
3843 when no data has been retrieved by ptrace.
3844
3845 2012-05-22 Will Deacon <will.deacon@arm.com>
3846
3847 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3848 Include asm/ptrace.h.
3849 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3850 already defined.
3851
3852 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3853
3854 * linux-low.c (linux_store_registers): Don't re-retrieve data
3855 with ptrace that has already been obtained from /proc. Always
3856 copy any data retrieved with ptrace to the buffer supplied.
3857
3858 2012-05-11 Yao Qi <yao@codesourcery.com>
3859 Pedro Alves <palves@redhat.com>
3860
3861 * linux-low.c (enum stopping_threads_kind): New.
3862 (stopping_threads): Change type to `enum stopping_threads_kind'.
3863 (handle_extended_wait): If stopping and suspending threads, leave
3864 the new_lwp suspended too.
3865 (linux_wait_for_event): Adjust.
3866 (stop_all_lwps): Set `stopping_threads' to
3867 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3868 whether we're suspending threads or just stopping them. Assert no
3869 recursion happens.
3870
3871 2012-04-29 Yao Qi <yao@codesourcery.com>
3872
3873 * server.h: Move some code to ...
3874 * gdbthread.h: ... here. New.
3875 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3876 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3877 (nto-low.o, win32-low.o): Likewise.
3878 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3879 * regcache.c, remote-utils.c, server.c: Likewise.
3880 * target.c, tracepoint.c, win32-low.c: Likewise.
3881
3882 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3883
3884 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3885 (PTRACE_ARG4_TYPE): Likewise.
3886 (PTRACE_XFER_TYPE): Likewise.
3887 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3888 ptrace to PTRACE_ARG3_TYPE.
3889 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3890 (PTRACE_ARG4_TYPE): Likewise.
3891 (PTRACE_XFER_TYPE): Likewise.
3892 (linux_detach_one_lwp): Cast fourth argument of
3893 ptrace to long then PTRACE_ARG4_TYPE.
3894 (regsets_fetch_inferior_registers): Cast third argument of
3895 ptrace to long then PTRACE_ARG3_TYPE.
3896 (regsets_store_inferior_registers): Likewise.
3897
3898 2012-04-20 Pedro Alves <palves@redhat.com>
3899
3900 * configure: Regenerate.
3901
3902 2012-04-19 Pedro Alves <palves@redhat.com>
3903
3904 * Makefile.in (GNULIB_BUILDDIR): New.
3905 (LIBGNU, INCGNU, GNULIB_H): Adjust.
3906 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3907 (all, install-only, uninstall, clean-info, all-lib, clean): No
3908 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3909 (maintainer-clean realclean distclean): Use subdir_do.
3910 (subdir_do): New.
3911 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
3912 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
3913 * acinclude.m4: Include acx_configure_dir.m4.
3914 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3915 calls. Call AC_PROG_RANLIB. Configure gnulib using
3916 ACX_CONFIGURE_DIR.
3917 (GNULIB): New.
3918 (GNULIB_STDINT_H): Adjust.
3919 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3920 * gdbreplay.c: Include build-gnulib/config.h.
3921 * server.h: Likewise.
3922 * aclocal.m4: Regenerate.
3923 * config.in: Regenerate.
3924 * configure: Regenerate.
3925
3926 2012-04-19 Pedro Alves <palves@redhat.com>
3927
3928 * Makefile.in (LIBGNU, INCGNU): Adjust.
3929 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3930 (all, install-only, uninstall, clean-info, all-lib, clean)
3931 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3932 * configure.ac: Adjust AC_OUTPUT output.
3933 * aclocal.m4: Regenerate.
3934 * configure: Regenerate.
3935
3936 2012-04-19 Pedro Alves <palves@redhat.com>
3937
3938 * Makefile.in (generated_files): New.
3939 (server_h): Remove the explicit dependency on config.h, and depend
3940 on $generated_files.
3941
3942 2012-04-19 Pedro Alves <palves@redhat.com>
3943
3944 * Makefile.in (INCGNU): Add -Ignulib.
3945
3946 2012-04-19 Pedro Alves <palves@redhat.com>
3947
3948 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3949 (INCGNU): ... this, and spell out -I here.
3950 (GNULIB_LIB): Rename to ...
3951 (LIBGNU): ... this.
3952 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3953
3954 2012-04-19 Pedro Alves <palves@redhat.com>
3955
3956 * config.in: Regenerate.
3957
3958 2012-04-19 Pedro Alves <palves@redhat.com>
3959
3960 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3961 * server.h (memmem): Remove declaration.
3962 * config.in: Regenerate.
3963 * configure: Regenerate.
3964
3965 2012-04-19 Yao Qi <yao@codesourcery.com>
3966
3967 * Makefile.in (SFILES): Add common/vec.c.
3968 (OBS): Add vec.o.
3969 (vec.o): New rule.
3970
3971 2012-04-19 Yao Qi <yao@codesourcery.com>
3972
3973 * remote-utils.c (prepare_resume_reply): Replace with macro
3974 target_core_of_thread.
3975 * server.c (handle_qxfer_threads_proper): Likewise.
3976 * target.h (traget_core_of_thread): New macro.
3977
3978 2012-04-18 Pedro Alves <palves@redhat.com>
3979
3980 * aclocal.m4: Regenerate.
3981 * configure: Regenerate.
3982
3983 2012-04-16 Yao Qi <yao@codesourcery.com>
3984
3985 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3986 duplicated on address.
3987
3988 2012-04-16 Yao Qi <yao@codesourcery.com>
3989
3990 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3991 (struct tracepoint_action_ops) <send>: New field.
3992 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3993 (agent_expr_send, x_tracepoint_action_send): New.
3994 (l_tracepoint_action_send): New.
3995 (cmd_qtdp): Download and install tracepoint
3996 according to `use_agent'.
3997 (run_inferior_command): Add one more parameter `len'.
3998 Update callers.
3999 (tracepoint_send_agent): New.
4000 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4001
4002 2012-04-16 Yao Qi <yao@codesourcery.com>
4003
4004 * tracepoint.c (download_tracepoints): Moved to ...
4005 (cmd_qtstart): ... here.
4006
4007 2012-04-14 Yao Qi <yao@codesourcery.com>
4008
4009 * tracepoint.c: Include inttypes.h.
4010 (struct collect_memory_action): Use sized types.
4011 (struct tracepoint): Likewise.
4012 (cmd_qtdp, stop_tracing): Update print specifiers.
4013 (cmd_qtp, response_tracepoint): Likewise.
4014 (collect_data_at_tracepoint): Likewise.
4015 (collect_data_at_step): Likewise.
4016
4017 2012-04-14 Yao Qi <yao@codesourcery.com>
4018
4019 Import gnulib module inttypes.
4020 * aclocal.m4, config.in, configure: Regenerated.
4021
4022 2012-04-14 Yao Qi <yao@codesourcery.com>
4023
4024 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4025 Makefile and config.status at last.
4026
4027 2012-04-13 Yao Qi <yao@codesourcery.com>
4028
4029 * tracepoint.c: Include stdint.h unconditionally.
4030
4031 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4032
4033 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4034 on BFD_HAVE_SYS_PROCFS_TYPE.
4035 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4036 * configure: Regenerate.
4037 * config.in: Likewise.
4038
4039 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4040
4041 * Makefile.in (clean): Also remove x32.c x32-linux.c
4042 x32-avx.c x32-avx-linux.c.
4043 (x32.o): New target.
4044 (x32.c): Likewise.
4045 (x32-linux.o): Likewise.
4046 (x32-linux.c): Likewise.
4047 (x32-avx.o): Likewise.
4048 (x32-avx.c): Likewise.
4049 (x32-avx-linux.o): Likewise.
4050 (x32-avx-linux.c): Likewise.
4051
4052 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4053 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4054 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4055 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4056 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4057 i386/x32-avx-linux.xml.
4058
4059 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4060 (init_registers_x32_avx_linux): Likwise.
4061 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4062 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4063
4064 2012-04-13 Pedro Alves <palves@redhat.com>
4065
4066 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4067 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4068 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4069 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4070 the sub-make.
4071
4072 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4073
4074 * linux-x86-low.c (compat_x32_clock_t): New.
4075 (compat_x32_siginfo_t): Likewise.
4076 (compat_x32_siginfo_from_siginfo): Likewise.
4077 (siginfo_from_compat_x32_siginfo): Likewise.
4078 (linux_is_elf64): Likewise.
4079 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4080 and siginfo_from_compat_x32_siginfo for x32.
4081 (x86_arch_setup): Set linux_is_elf64.
4082
4083 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4084
4085 PR gdb/13969
4086 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4087 e_machine field.
4088 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4089 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4090 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4091 compatible with process.
4092
4093 2012-04-12 Yao Qi <yao@codesourcery.com>
4094
4095 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4096 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4097 (install-only, install-info, clean): Handle sub dir gnulib.
4098 (all-lib, am--refresh): New targets.
4099 (memmem.o): Remove target.
4100 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4101 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4102 (AC_REPLACE_FUNCS): Remove memmem.
4103 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4104 (AC_OUTPUT): Generate Makefile in gnulib/.
4105 * aclocal.m4, config.in, configure: Regenerated.
4106
4107 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4108
4109 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4110
4111 2012-04-05 Pedro Alves <palves@redhat.com>
4112
4113 -Werror=strict-aliasing
4114
4115 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4116 pointer.
4117
4118 2012-04-04 Pedro Alves <palves@redhat.com>
4119
4120 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4121 (sparc_store_gregset_from_stack, sparc_store_gregset)
4122 (sparc_breakpoint_at): Fix formatting.
4123
4124 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4125
4126 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4127 are available.
4128 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4129 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4130 * config.in: Regenerate.
4131 * configure: Likewise.
4132
4133 2012-03-29 Pedro Alves <palves@redhat.com>
4134
4135 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4136 Correct ptrace arguments.
4137
4138 2012-03-28 Pedro Alves <palves@redhat.com>
4139
4140 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4141 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4142 (IA64_FR1_REGNUM): New defines.
4143 (ia64_fetch_register): New.
4144 (the_low_target): Install it.
4145 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4146 field.
4147 * linux-low.c (linux_fetch_registers): Try the
4148 the_low_target.fetch_register hook first.
4149
4150 * linux-arm-low.c (the_low_target): Adjust.
4151 * linux-bfin-low.c (the_low_target): Adjust.
4152 * linux-cris-low.c (the_low_target): Adjust.
4153 * linux-crisv32-low.c (the_low_target): Adjust.
4154 * linux-m32r-low.c (the_low_target): Adjust.
4155 * linux-m68k-low.c (the_low_target): Adjust.
4156 * linux-mips-low.c (the_low_target): Adjust.
4157 * linux-ppc-low.c (the_low_target): Adjust.
4158 * linux-s390-low.c (the_low_target): Adjust.
4159 * linux-sh-low.c (the_low_target): Adjust.
4160 * linux-sparc-low.c (the_low_target): Adjust.
4161 * linux-tic6x-low.c (the_low_target): Adjust.
4162 * linux-x86-low.c (the_low_target): Adjust.
4163 * linux-xtensa-low.c (the_low_target): Adjust.
4164
4165 2012-03-26 Pedro Alves <palves@redhat.com>
4166
4167 * server.c (handle_qxfer_libraries): Don't bail early if
4168 the_target->qxfer_libraries_svr4 is not NULL.
4169
4170 2012-03-26 Pedro Alves <palves@redhat.com>
4171
4172 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4173
4174 2012-03-23 Pedro Alves <palves@redhat.com>
4175
4176 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4177 "library-list-svr4" element's start tag when the the DSO list is
4178 empty.
4179
4180 2012-03-23 Pedro Alves <palves@redhat.com>
4181
4182 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4183 a variable whose type size is the same as the inferior's pointer
4184 size.
4185
4186 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4187
4188 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4189 struct siginfo.
4190 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4191 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4192 * linux-low.h: Include <signal.h>.
4193 (struct siginfo): Remove forward declaration.
4194 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4195 struct siginfo.
4196
4197 2012-03-21 Mike Frysinger <vapier@gentoo.org>
4198
4199 * .gitignore: Ignore more files.
4200
4201 2012-03-19 Pedro Alves <palves@redhat.com>
4202 Jan Kratochvil <jan.kratochvil@redhat.com>
4203
4204 * server.c (cont_thread, general_thread): Add describing comments.
4205 (start_inferior): Clear `cont_thread'.
4206 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4207 of a process.
4208
4209 2012-03-15 Yao Qi <yao@codesourcery.com>
4210
4211 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4212 handling to ...
4213 (cmd_qtdp): ... here.
4214
4215 2012-03-15 Yao Qi <yao@codesourcery.com>
4216
4217 * tracepoint.c (struct tracepoint_action_ops): New.
4218 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4219 (m_tracepoint_action_download): New.
4220 (r_tracepoint_action_download): New.
4221 (x_tracepoint_action_download): New.
4222 (l_tracepoint_action_download): New.
4223 (add_tracepoint_action): Install `action->ops' according type.
4224 (download_tracepoint_1): Move code `download' function pointer
4225 of various tracepoint_action_ops.
4226
4227 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4228
4229 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4230 linux_ptrace_attach_warnings.
4231
4232 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4233
4234 * Makefile.in (linux-ptrace.o): New.
4235 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4236 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4237 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4238 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4239 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4240 of these targets.
4241 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4242
4243 2012-03-08 Yao Qi <yao@codesourcery.com>
4244 Pedro Alves <palves@redhat.com>
4245
4246 Fix PR server/13392.
4247 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4248 offset of JMP insn.
4249 * tracepoint.c (remove_tracepoint): New.
4250 (cmd_qtdp): Call remove_tracepoint when failed to install.
4251
4252 2012-03-07 Pedro Alves <palves@redhat.com>
4253
4254 * linux-low.c (get_detach_signal): New.
4255 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4256 Pass on pending signals to PTRACE_DETACH. Check the result of the
4257 ptrace call.
4258 * server.c (program_signals, program_signals_p): New.
4259 (handle_general_set): Handle QProgramSignals.
4260 * server.h (program_signals, program_signals_p): Declare.
4261
4262 2012-03-05 Pedro Alves <palves@redhat.com>
4263 Jan Kratochvil <jan.kratochvil@redhat.com>
4264
4265 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4266 New comment why.
4267
4268 2012-03-03 Yao Qi <yao@codesourcery.com>
4269
4270 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4271 agent_look_up_symbols.
4272
4273 2012-03-03 Yao Qi <yao@codesourcery.com>
4274
4275 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4276 (linux-x86-low.o): Likewise.
4277 * server.h: Remove in_process_agent_loaded.
4278 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4279 common/agent.c.
4280 Update callers.
4281
4282 2012-03-03 Yao Qi <yao@codesourcery.com>
4283
4284 * tracepoint.c (gdb_agent_capability): New global.
4285 (in_process_agent_loaded_ust): Renamed to
4286 `in_process_agent_supports_ust'.
4287 Update callers.
4288 (in_process_agent_supports_ust): Call agent_capability_check.
4289 (clear_installed_tracepoints): Assert that agent supports
4290 agent.
4291
4292 2012-03-03 Yao Qi <yao@codesourcery.com>
4293
4294 * linux-low.c (linux_supports_agent): New.
4295 (linux_target_ops): Initialize field `supports_agent' with
4296 linux_supports_agent.
4297 * target.h (struct target_ops) <supports_agent>: New.
4298 (target_supports_agent): New macro.
4299 * server.c (handle_general_set): Handle packet 'QAgent'.
4300 (handle_query): Send `QAgent+'.
4301 * Makefile.in (server.o): Depends on agent.h.
4302
4303 2012-03-03 Yao Qi <yao@codesourcery.com>
4304
4305 * Makefile.in (OBS): Add agent.o.
4306 Add new rule for agent.o.
4307 Track dependence of tracepoint.c on agent.h.
4308 * tracepoint.c (run_inferior_command_1):
4309 (run_inferior_command): Call agent_run_command.
4310 (gdb_ust_connect_sync_socket): Deleted. Move it to
4311 common/agent.c.
4312 (resume_thread, stop_thread): Likewise.
4313 (gdb_ust_socket_init): Renamed to ...
4314 (gdb_agent_socket_init): ... New.
4315 (gdb_ust_thread): Renamed to ...
4316 (gdb_agent_helper_thread): ... New.
4317 (gdb_ust_init): Move some code to ...
4318 (gdb_agent_init): ... here. New.
4319 [HAVE_UST]: Call gdb_ust_init.
4320 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4321 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4322 * config.in, configure: Regenerated.
4323
4324 2012-03-02 Pedro Alves <palves@redhat.com>
4325
4326 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4327 * linux-low.c (struct simple_pid_list): New.
4328 (stopped_pids): New a struct simple_pid_list pointer.
4329 (add_to_pid_list, pull_pid_from_list): New.
4330 (handle_extended_wait): Don't assume the first signal new children
4331 report is SIGSTOP. Adjust call to pull_pid_from_list.
4332 (linux_wait_for_lwp): Adjust.
4333
4334 2012-03-02 Yao Qi <yao@codesourcery.com>
4335
4336 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4337 debug log.
4338
4339 2012-03-02 Yao Qi <yao@codesourcery.com>
4340
4341 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4342 `stop_pc' and `tpoint'. Update caller.
4343
4344 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4345
4346 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4347 * linux-low.c (use_linux_regsets): New macro.
4348 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4349 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4350 (linux_register_in_regsets): New function.
4351 (usr_fetch_inferior_registers): Skip registers covered by
4352 regsets.
4353 (usr_store_inferior_registers): Likewise.
4354 (usr_fetch_inferior_registers): New macro.
4355 (usr_store_inferior_registers): Likewise.
4356 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4357 (linux_store_registers): Likewise.
4358 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4359 prototype.
4360 (init_registers_mips64_dsp_linux): Likewise.
4361 (init_registers_mips_linux): New macro.
4362 (init_registers_mips_dsp_linux): Likewise.
4363 (mips_dsp_num_regs): Likewise.
4364 (DSP_BASE, DSP_CONTROL): New fallback macros.
4365 (mips_base_regs): New macro.
4366 (mips_regmap): Use it. Fix the size.
4367 (mips_dsp_regmap): New variable.
4368 (mips_dsp_regset_bitmap): Likewise.
4369 (mips_arch_setup): New function.
4370 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4371 than mips_regmap.
4372 (mips_cannot_store_register): Likewise.
4373 (the_low_target): Update .arch_setup, .num_regs and .regmap
4374 initializers. Add .regset_bitmap initializer.
4375 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4376 initializer.
4377 * linux-bfin-low.c (the_low_target): Likewise.
4378 * linux-cris-low.c (the_low_target): Likewise.
4379 * linux-crisv32-low.c (the_low_target): Likewise.
4380 * linux-ia64-low.c (the_low_target): Likewise.
4381 * linux-m32r-low.c (the_low_target): Likewise.
4382 * linux-m68k-low.c (the_low_target): Likewise.
4383 * linux-ppc-low.c (the_low_target): Likewise.
4384 * linux-s390-low.c (the_low_target): Likewise.
4385 * linux-sh-low.c (the_low_target): Likewise.
4386 * linux-sparc-low.c (the_low_target): Likewise.
4387 * linux-tic6x-low.c (the_low_target): Likewise.
4388 * linux-x86-low.c (the_low_target): Likewise.
4389 * linux-xtensa-low.c (the_low_target): Likewise.
4390 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4391 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4392 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4393 srv_xmlfiles.
4394 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4395 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4396
4397 2012-02-29 Yao Qi <yao@codesourcery.com>
4398 Pedro Alves <palves@redhat.com>
4399
4400 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4401 `step_over_finished' is true.
4402
4403 2012-02-27 Pedro Alves <palves@redhat.com>
4404
4405 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4406 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4407
4408 2012-02-27 Pedro Alves <palves@redhat.com>
4409
4410 PR server/9684
4411 * linux-low.c (pid_is_stopped): New.
4412 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4413
4414 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
4415
4416 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4417 of conditions.
4418
4419 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4420
4421 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4422
4423 2012-02-24 Luis Machado <lgustavo@codesourcery>
4424
4425 * server.c (handle_query): Advertise support for target-side
4426 breakpoint condition evaluation.
4427 (process_point_options): New function.
4428 (process_serial_event): When inserting a breakpoint, check for
4429 a target-side condition that should be evaluated.
4430
4431 * mem-break.c: Include regcache.h and ax.h.
4432 (point_cond_list_t): New data structure.
4433 (breakpoint) <cond_list>: New field.
4434 (find_gdb_breakpoint_at): Make non-static.
4435 (delete_gdb_breakpoint_at): Clear any target-side
4436 conditions.
4437 (clear_gdb_breakpoint_conditions): New function.
4438 (add_condition_to_breakpoint): Likewise.
4439 (add_breakpoint_condition): Likewise.
4440 (gdb_condition_true_at_breakpoint): Likewise.
4441 (gdb_breakpoint_here): Return result directly instead
4442 of going through a local variable.
4443
4444 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4445 (clear_gdb_breakpoint_conditions): Likewise.
4446 (add_breakpoint_condition): Likewise.
4447 (gdb_condition_true_at_breakpoint): Likewise.
4448
4449 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4450 (need_step_over_p): Take target-side breakpoint condition into
4451 consideration.
4452
4453 2012-02-24 Luis Machado <lgustavo@codesourcery>
4454
4455 * server.h: Include tracepoint.h.
4456 (agent_mem_read, agent_get_trace_state_variable_value,
4457 agent_set_trace_state_variable_value,
4458 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4459 get_set_tsv_func_addr): New prototypes.
4460
4461 * ax.h: New include file.
4462 * ax.c: New source file.
4463
4464 * tracepoint.c: Include ax.h.
4465 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4466 agent_expr, eval_result_type): Move to ax.h.
4467 (parse_agent_expr): Rename to ...
4468 (gdb_parse_agent_expr): ... this, make it non-static and move
4469 to ax.h.
4470 (unparse_agent_expr) Rename to ...
4471 (gdb_unparse_agent_expr): ... this, make it non-static and move
4472 to ax.h.
4473 (eval_agent_expr): Rename to ...
4474 (eval_tracepoint_agent_expr): ... this.
4475 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4476 forward declarations.
4477 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4478 (agent_get_trace_state_variable_value): New function.
4479 (agent_set_trace_state_variable_value): New function.
4480 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4481 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4482 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4483 (condition_true_at_tracepoint): Likewise.
4484 (parse_agent_expr): Rename to ...
4485 (gdb_parse_agent_expr): ... this and move to ax.c.
4486 (unparse_agent_expr): Rename to ...
4487 (gdb_unparse_agent_expr): ... this and move to ax.c.
4488 (gdb_agent_op_name): Move to ax.c.
4489 (eval_agent_expr): Rename to ...
4490 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4491 and move to ax.c.
4492 (eval_tracepoint_agent_expr): New function.
4493 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
4494 non-static.
4495 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4496 ax.c.
4497 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4498 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4499 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4500 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4501 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4502 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4503 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4504 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4505 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4506 (compile_bytecodes): Remove forward declaration.
4507 (is_goto_target): Move to ax.c.
4508 (compile_bytecodes): Move to ax.c and call
4509 agent_get_trace_state_variable_value (...) and
4510 agent_set_trace_state_variable_value (...).
4511
4512 * Makefile.in: Update ax.c and IPA dependencies.
4513
4514 2012-02-24 Pedro Alves <palves@redhat.com>
4515
4516 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4517 (cmd_bigqtbuffer_circular): ... this. Only handle
4518 'QTBuffer:circular:'.
4519 (handle_tracepoint_general_set): Adjust.
4520
4521 2012-02-16 Yao Qi <yao@codesourcery.com>
4522
4523 * inferiors.c: Move code to ...
4524 * dll.c: .... here. New.
4525 * server.h: Declare clear_dlls.
4526 * Makefile.in (SFILES): Add dll.c.
4527 (OBS): Add dll.o
4528 (dll.o): New rule.
4529
4530 2012-02-11 Yao Qi <yao@codesourcery.com>
4531
4532 * server.c: (handle_monitor_command): Add a new parameter
4533 `own_buf'.
4534 (handle_query): Update caller.
4535
4536 2012-02-09 Joel Brobecker <brobecker@adacore.com>
4537
4538 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4539 * configure, config.in: Regenerate.
4540 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4541 is not defined.
4542
4543 2012-02-02 Pedro Alves <palves@redhat.com>
4544
4545 Try SIGKILL first, then PTRACE_KILL.
4546 * linux-low.c (linux_kill_one_lwp): New.
4547 (linux_kill_one_lwp): Rename to ...
4548 (kill_one_lwp_callback): ... this. Use the new
4549 linux_kill_one_lwp.
4550
4551 2012-02-02 Pedro Alves <palves@redhat.com>
4552
4553 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4554 inferior.
4555
4556 2012-01-27 Pedro Alves <palves@redhat.com>
4557
4558 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4559 (elf_64_file_p): Make static.
4560 (linux_pid_exe_is_elf_64_file): New.
4561 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4562 Delete declarations.
4563 (linux_pid_exe_is_elf_64_file): Declare.
4564 * linux-x86-low.c (x86_arch_setup): Use
4565 linux_pid_exe_is_elf_64_file.
4566
4567 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4568
4569 * linux-low.c (linux_wait_for_event_1): Rename to ...
4570 (linux_wait_for_event): ... here and merge it with former
4571 linux_wait_for_event - new variable wait_ptid, use it.
4572 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4573
4574 2012-01-23 Pedro Alves <palves@redhat.com>
4575
4576 * server.c (main): Avoid yet another case of infinite loop while
4577 detaching/killing after a longjmp.
4578
4579 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4580
4581 Code cleanup.
4582 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4583
4584 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4585
4586 * hostio.c (handle_readlink): New function.
4587 (handle_vFile): Call it to handle "vFile:readlink" packets.
4588
4589 2012-01-20 Pedro Alves <palves@redhat.com>
4590 Ulrich Weigand <ulrich.weigand@linaro.org>
4591
4592 * server.c (handle_v_requests): Only support vAttach and vRun to
4593 start multiple processes when in extended protocol mode.
4594
4595 2012-01-17 Pedro Alves <palves@redhat.com>
4596
4597 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4598 memalign plus mprotect to allocate the scratch buffer.
4599
4600 2012-01-13 Pedro Alves <palves@redhat.com>
4601
4602 * server.c (attach_inferior): Clear `cont_thread'.
4603
4604 2012-01-13 Pedro Alves <palves@redhat.com>
4605
4606 * server.c (main): Avoid infinite loop while detaching/killing
4607 after a longjmp.
4608
4609 2012-01-09 Doug Evans <dje@google.com>
4610
4611 * server.c (start_inferior): Set last_ptid in --wrapper case.
4612
4613 2012-01-06 Yao Qi <yao@codesourcery.com>
4614
4615 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4616 defined.
4617 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4618
4619 2012-01-04 Yao Qi <yao@codesourcery.com>
4620
4621 * tracepoint.c (cmd_qtdp): Print debug message
4622 for static tracepoint.
4623
4624 2012-01-04 Yao Qi <yao@codesourcery.com>
4625
4626 * tracepoint.c (trace_vdebug): Differentiate debug message
4627 between gdbserver and IPA.
4628
4629 2012-01-03 Yao Qi <yao@codesourcery.com>
4630
4631 * tracepoint.c (tracepoint_was_hit): Don't collect for
4632 static tracepoint.
4633
4634 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4635
4636 * terminal.h: Reformat copyright header.
4637
4638 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4639
4640 * server.c (gdbserver_version): Update copyright year.
4641 * gdbreplay.c (gdbreplay_version): Likewise.
4642
4643 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4644
4645 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4646
4647 Revert:
4648 2011-12-18 Hui Zhu <teawater@gmail.com>
4649 * linux-low.c (linux_create_inferior): Save return value to ret.
4650
4651 2011-12-18 Hui Zhu <teawater@gmail.com>
4652
4653 * linux-low.c (linux_create_inferior): Save return value to ret.
4654
4655 2011-12-16 Doug Evans <dje@google.com>
4656
4657 * linux-low.c (linux_create_inferior): If stdio connection,
4658 redirect stdin from /dev/null, stdout to stderr.
4659 * remote-utils.c (remote_is_stdio): New static global.
4660 (remote_connection_is_stdio): New function.
4661 (remote_prepare): Handle stdio connection.
4662 (remote_open): Ditto.
4663 (remote_close): Don't close stdin for stdio connections.
4664 (read_prim,write_prim): New functions. Replace all calls to
4665 read/write to these.
4666 * server.c (main): Watch for "-" argument. Move call to
4667 remote_prepare before start_inferior.
4668 * server.h (STDIO_CONNECTION_NAME): New macro.
4669 (remote_connection_is_stdio): Declare.
4670
4671 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4672 in debugging output.
4673
4674 2011-12-15 Yao Qi <yao@codesourcery.com>
4675
4676 * tracepoint.c: Include sys/syscall.h.
4677 (gdb_ust_thread): Remove preprocessor conditional.
4678
4679 2011-12-14 Pedro Alves <pedro@codesourcery.com>
4680
4681 * linux-low.c (linux_detach_one_lwp): Call
4682 the_low_target.prepare_to_resume before detaching.
4683
4684 2011-12-14 Yao Qi <yao@codesourcery.com>
4685
4686 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4687 of write.
4688
4689 2011-12-14 Yao Qi <yao@codesourcery.com>
4690
4691 * i386-low.c (i386_low_stopped_data_address): Initialize local
4692 variable `control'.
4693
4694 2011-12-13 Pedro Alves <pedro@codesourcery.com>
4695
4696 PR remote/13492
4697
4698 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4699 DR_CONTROL unless necessary. Extend comments.
4700 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4701 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4702
4703 2011-12-13 Yao Qi <yao@codesourcery.com>
4704
4705 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4706 macros.
4707 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4708
4709 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4710
4711 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4712 Print new debug message for such case.
4713
4714 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4715
4716 Fix overlapping memcpy.
4717 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4718 the read_inferior_memory transfer.
4719 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4720 write_inferior_memory transfer.
4721 (set_fast_tracepoint_jump): New variable buf. Use it for the
4722 read_inferior_memory and write_inferior_memory transfers.
4723 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4724 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4725 Use it for the write_inferior_memory transfer.
4726 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4727 buffers.
4728
4729 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4730
4731 * linux-low.c (fetch_register, store_register): Make code
4732 consistent, fix formatting.
4733
4734 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4735
4736 * linux-low.c (usr_store_inferior_registers): Factor out code
4737 to handle individual registers into...
4738 (store_register): ... this new function.
4739
4740 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4741
4742 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4743 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4744 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4745 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4746 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4747 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4748 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4749 (srv_xmlfiles): Add new XML files.
4750
4751 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4752 and <sys/uio.h>.
4753 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4754 (init_registers_s390_linux32v1): Add prototype.
4755 (init_registers_s390_linux32v2): Likewise.
4756 (init_registers_s390_linux64v1): Likewise.
4757 (init_registers_s390_linux64v2): Likewise.
4758 (init_registers_s390x_linux64v1): Likewise.
4759 (init_registers_s390x_linux64v2): Likewise.
4760 (s390_num_regs): Increment to 52.
4761 (s390_regmap): Add orig_r2 register.
4762 (s390_num_regs_3264): Increment to 68.
4763 (s390_regmap_3264): Add orig_r2 register.
4764 (s390_collect_ptrace_register): Handle orig_r2 register.
4765 (s390_supply_ptrace_register): Likewise.
4766 (s390_fill_last_break): New function.
4767 (s390_store_last_break): Likewise.
4768 (s390_fill_system_call): New function.
4769 (s390_store_system_call): Likewise.
4770 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4771 register sets.
4772 (s390_check_regset): New function.
4773 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4774 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4775 Update target_regsets for available register sets.
4776
4777 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4778 Jan Kratochvil <jan.kratochvil@redhat.com>
4779
4780 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4781 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4782 New.
4783 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4784 * linux-low.h (struct process_info_private): New member r_debug.
4785 * server.c (handle_qxfer_libraries): Call
4786 the_target->qxfer_libraries_svr4.
4787 (handle_qxfer_libraries_svr4): New function.
4788 (qxfer_packets): New entry "libraries-svr4".
4789 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4790 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4791 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4792 PACKET_qXfer_libraries_svr4.
4793
4794 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4795
4796 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4797 PSW address/mask between 8-byte and 16-byte formats.
4798 (s390_supply_ptrace_register): Likewise.
4799 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4800 basic addressing mode bit.
4801
4802 2011-11-24 Stan Shebs <stan@codesourcery.com>
4803
4804 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4805
4806 2011-11-17 Stan Shebs <stan@codesourcery.com>
4807
4808 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4809 (tracing_start_time): New global.
4810 (tracing_stop_time): New global.
4811 (tracing_user_name): New global.
4812 (tracing_notes): New global.
4813 (tracing_stop_note): New global.
4814 (cmd_qtstart): Set traceframe_usage, start_time.
4815 (stop_tracing): Set stop_time.
4816 (cmd_qtstatus): Report additional status.
4817 (cmd_qtp): New function.
4818 (handle_tracepoint_query): Call it.
4819 (cmd_qtnotes): New function.
4820 (handle_tracepoint_general_set): Call it.
4821 (get_timestamp): Rename from tsv_get_timestamp.
4822
4823 2011-11-14 Stan Shebs <stan@codesourcery.com>
4824 Kwok Cheung Yeung <kcy@codesourcery.com>
4825
4826 * linux-x86-low.c (small_jump_insn): New.
4827 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4828 trampoline and error message, build a trampoline and issue a small
4829 jump instruction to it.
4830 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4831 trampoline and error message.
4832 (x86_get_min_fast_tracepoint_insn_len): New.
4833 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4834 * linux-low.h (struct linux_target_ops): Add arguments to
4835 install_fast_tracepoint_jump_pad operation, add new operation.
4836 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4837 arguments.
4838 (linux_get_min_fast_tracepoint_insn_len): New function.
4839 (linux_target_op): Add new operation.
4840 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4841 (gdb_trampoline_buffer_end): Ditto.
4842 (gdb_trampoline_buffer_error): Ditto.
4843 (struct ipa_sym_addresses): Add fields for new IPA variables.
4844 (symbol_list): Add entries for new IPA variables.
4845 (struct tracepoint): Add fields to hold the address range of the
4846 trampoline used by the tracepoint.
4847 (trampoline_buffer_head): New static variable.
4848 (trampoline_buffer_tail): Ditto.
4849 (claim_trampoline_space): New function.
4850 (have_fast_tracepoint_trampoline_buffer): New function.
4851 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4852 structure.
4853 (install_fast_tracepoint): Ditto, also add error buffer argument.
4854 (cmd_qtminftpilen): New function.
4855 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4856 (fast_tracepoint_from_trampoline_address): New function.
4857 (fast_tracepoint_collecting): Handle trampoline as part of jump
4858 pad space.
4859 (set_trampoline_buffer_space): New function.
4860 (initialize_tracepoint): Initialize new IPA variables.
4861 * target.h (struct target_ops): Add arguments to
4862 install_fast_tracepoint_jump_pad operation, add new
4863 get_min_fast_tracepoint_insn_len operation.
4864 (target_get_min_fast_tracepoint_insn_len): New.
4865 (install_fast_tracepoint_jump_pad): Add arguments.
4866 * server.h (IPA_BUFSIZ): Define.
4867 * linux-i386-ipa.c: Include extra header files.
4868 (initialize_fast_tracepoint_trampoline_buffer): New function.
4869 (initialize_low_tracepoint): Call it.
4870 * server.h (set_trampoline_buffer_space): Declare.
4871 (claim_trampoline_space): Ditto.
4872 (have_fast_tracepoint_trampoline_buffer): Ditto.
4873
4874 2011-11-14 Yao Qi <yao@codesourcery.com>
4875
4876 * server.c (handle_query): Handle InstallInTrace for qSupported.
4877 * tracepoint.c (add_tracepoint): Sort list.
4878 (install_tracepoint, download_tracepoint): New.
4879 (cmd_qtdp): Call them to install and download tracepoints.
4880 (sort_tracepoints): Removed.
4881 (cmd_qtstart): Update.
4882
4883 2011-11-14 Yao Qi <yao@codesourcery.com>
4884
4885 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4886 * mem-break.h: Declare.
4887 * tracepoint.c (cmd_qtstart): Move some code to ...
4888 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4889 New.
4890 (download_tracepoints): Move some code to ...
4891 (download_tracepoint_1): ... here. New.
4892
4893 2011-11-08 Yao Qi <yao@codesourcery.com>
4894
4895 * remote-utils.c (relocate_instruction): A comment fix.
4896
4897 2011-11-07 Joel Brobecker <brobecker@adacore.com>
4898
4899 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4900 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4901 dr_status_mirror and dr_control_mirror from debug_reg_state.
4902 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4903 (i386_initial_stuff): Remove use of deleted globals.
4904 (i386_get_thread_context, i386_set_thread_context,
4905 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4906 from debug_reg_state.
4907
4908 2011-11-05 Yao Qi <yao@codesourcery.com>
4909
4910 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4911 address as TPOINT's.
4912
4913 2011-11-02 Stan Shebs <stan@codesourcery.com>
4914
4915 * tracepoint.c (agent_mem_read_string): New function.
4916 (eval_agent_expr): Call it for tracenz.
4917 * server.c (handle_query): Report support for tracenz.
4918
4919 2011-11-02 Yao Qi <yao@codesourcery.com>
4920
4921 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4922
4923 2011-11-02 Yao Qi <yao@codesourcery.com>
4924
4925 * target.h: Fix a typo in comment.
4926
4927 2011-10-31 Pedro Alves <pedro@codesourcery.com>
4928
4929 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4930 clobber the breakpoints' shadows with fast tracepoint jumps.
4931 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4932 * target.c (write_inferior_memory): Also pass MYADDR down to
4933 check_mem_write.
4934
4935 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4936
4937 * configure.ac: Check support for personality routine.
4938 * configure: Regenerate.
4939 * config.in: Likewise.
4940 * linux-low.c: Include <sys/personality.h>.
4941 Define ADDR_NO_RANDOMIZE if necessary.
4942 (linux_create_inferior): Disable address space randomization when
4943 forking inferior, if requested.
4944 (linux_supports_disable_randomization): New function.
4945 (linux_target_ops): Install it.
4946 * server.h (disable_randomization): Declare.
4947 * server.c (disable_randomization): New global variable.
4948 (handle_general_set): Handle QDisableRandomization.
4949 (handle_query): Likewise for qSupported.
4950 (main): Support --disable-randomization and --no-disable-randomization
4951 command line arguments.
4952 * target.h (struct target_ops): Add supports_disable_randomization.
4953 (target_supports_disable_randomization): New macro.
4954
4955 2011-09-29 Mike Frysinger <vapier@gentoo.org>
4956
4957 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4958 ifdef check.
4959 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4960 [!PT_GETDSBT] (target_loadmap): New definition.
4961 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4962 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4963 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4964 and PT_GETDSBT to LINUX_LOADMAP.
4965 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4966 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4967
4968 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4969
4970 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4971 (arm_linux_hwbp_cap): New static variable.
4972 (arm_linux_get_hwbp_cap): Replace by ...
4973 (arm_linux_init_hwbp_cap): ... this new function.
4974 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4975 (arm_linux_get_hw_watchpoint_count): Likewise.
4976 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4977 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4978 (arm_prepare_to_resume): Use perror_with_name instead of error.
4979
4980 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4981
4982 * linux-arm-low.c: Include <signal.h>.
4983 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4984 (struct arm_linux_hwbp_cap): New data type.
4985 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4986 (struct arm_linux_hw_breakpoint): New data type.
4987 (MAX_BPTS, MAX_WPTS): Define.
4988 (struct arch_process_info, struct arch_lwp_info): New data types.
4989 (arm_linux_get_hwbp_cap): New function.
4990 (arm_linux_get_hw_breakpoint_count): Likewise.
4991 (arm_linux_get_hw_watchpoint_count): Likewise.
4992 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4993 (arm_hwbp_control_initialize): Likewise.
4994 (arm_hwbp_control_is_enabled): Likewise.
4995 (arm_hwbp_control_is_initialized): Likewise.
4996 (arm_hwbp_control_disable): Likewise.
4997 (arm_linux_hw_breakpoint_equal): Likewise.
4998 (arm_linux_hw_point_initialize): Likewise.
4999 (struct update_registers_data): New data structure.
5000 (update_registers_callback: New function.
5001 (arm_insert_point): Likewise.
5002 (arm_remove_point): Likewise.
5003 (arm_stopped_by_watchpoint): Likewise.
5004 (arm_stopped_data_address): Likewise.
5005 (arm_new_process): Likewise.
5006 (arm_new_thread): Likewise.
5007 (arm_prepare_to_resume): Likewise.
5008 (the_low_target): Register arm_insert_point, arm_remove_point,
5009 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5010 arm_new_thread, and arm_prepare_to_resume.
5011
5012 2011-09-15 Stan Shebs <stan@codesourcery.com>
5013
5014 * server.h (struct emit_ops): Add compare-goto fields.
5015 * tracepoint.c (gdb_agent_op_sizes): New table.
5016 (emit_eq_goto): New function.
5017 (emit_ne_goto): New function.
5018 (emit_lt_goto): New function.
5019 (emit_le_goto): New function.
5020 (emit_gt_goto): New function.
5021 (emit_ge_goto): New function.
5022 (is_goto_target): New function.
5023 (compile_bytecodes): Recognize special cases of compare-goto
5024 combinations and call specialized emitters for them.
5025 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5026 (amd64_emit_ne_goto): New function.
5027 (amd64_emit_lt_goto): New function.
5028 (amd64_emit_le_goto): New function.
5029 (amd64_emit_gt_goto): New function.
5030 (amd64_emit_ge_goto): New function.
5031 (amd64_emit_ops): Add the new functions.
5032 (i386_emit_eq_goto): New function.
5033 (i386_emit_ne_goto): New function.
5034 (i386_emit_lt_goto): New function.
5035 (i386_emit_le_goto): New function.
5036 (i386_emit_gt_goto): New function.
5037 (i386_emit_ge_goto): New function.
5038 (i386_emit_ops): Add the new functions.
5039
5040 2011-09-08 Stan Shebs <stan@codesourcery.com>
5041
5042 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5043 (i386_emit_epilogue): Restore %ebx.
5044
5045 2011-08-31 Jie Zhang <jzhang918@gmail.com>
5046
5047 * server.c (step_thread): Remove definition.
5048 (process_serial_event): Don't handle Hs.
5049 * server.h (step_thread): Remove declaration.
5050 * target.c (set_desired_inferior): Remove use of step_thread.
5051
5052 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5053
5054 * linux-low.c: Include linux-procfs.h.
5055 (linux_attach_lwp_1): Update comments.
5056 (linux_attach): Scan for existing threads when attaching to a
5057 process that is the tgid.
5058 * Makefile.in: Update dependencies.
5059
5060 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5061
5062 * configure.srv: Add linux-procfs.o dependencies.
5063
5064 2011-08-14 Yao Qi <yao@codesourcery.com>
5065
5066 * target.h (struct target_ops): Fix indent.
5067 * win32-low.c (win32_target_ops): Fix comment.
5068
5069 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
5070 Yao Qi <yao@codesourcery.com>
5071
5072 * Makefile.in (clean): Remove tic6x-*.c files.
5073 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5074 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5075 (tic6x-c64xp-linux.c): Likewise.
5076 * configure.srv: Add support for tic6x-*-uclinux.
5077 * linux-tic6x-low.c: New.
5078 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5079
5080 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
5081 Yao Qi <yao@codesourcery.com>
5082
5083 * target.h (struct target_ops): Add read_loadmap.
5084 * linux-low.c (struct target_loadseg): New type.
5085 (struct target_loadmap): New type.
5086 (linux_read_loadmap): New function.
5087 (linux_target_ops): Add linux_read_loadmap.
5088 * server.c (handle_query): Support qXfer:fdpic:read packet.
5089 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5090 to NULL.
5091
5092 2011-08-05 Eli Zaretskii <eliz@gnu.org>
5093
5094 * win32-low.c: Include <stdint.h>.
5095
5096 2011-07-22 Pedro Alves <pedro@codesourcery.com>
5097
5098 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5099 to the inferior here.
5100 (i386_remove_aligned_watchpoint): Ditto.
5101 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5102 fit part of the watchpoint in the debug registers.
5103 (i386_update_inferior_debug_regs): New.
5104 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5105 registers, and only update the inferior on success.
5106 (i386_low_remove_watchpoint): Ditto.
5107
5108 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5109
5110 * linux-low.c (compare_ints, unique, list_threads, show_process,
5111 linux_core_of_thread): Delete.
5112 (linux_target_ops): Change linux_core_of_thread to
5113 linux_common_core_of_thread.
5114 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5115 * utils.c (malloc_failure): Change type of argument.
5116 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5117 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5118 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5119 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5120 (IPA_OBJS): Add common-utils-ipa.o.
5121 (ptid_h, linux_osdata_h): New macros.
5122 (server_h): Add common/common-utils.h, common/xml-utils.h,
5123 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5124 common/ptid.h.
5125 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5126 ptid.o, buffer.o): New rules.
5127 (linux-low.o): Add common/linux-osdata.h as a dependency.
5128 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5129 * configure.ac: Add AC_HEADER_DIRENT check.
5130 * config.in: Regenerate.
5131 * configure: Regenerate.
5132 * remote-utils.c (xml_escape_text): Delete.
5133 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5134 buffer_xml_printf): Move to common/buffer.c.
5135 * server.c (main): Remove call to initialize_inferiors.
5136 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5137 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5138 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5139 internal_error, gdb_assert, gdb_assert_fail): Delete.
5140 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5141 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5142 common/buffer.h.
5143 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5144 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5145 initialize_inferiors): Delete.
5146
5147 2011-07-20 Pedro Alves <pedro@codesourcery.com>
5148
5149 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5150 symbol error.
5151
5152 2011-05-31 Pedro Alves <pedro@codesourcery.com>
5153
5154 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5155 assertion.
5156 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5157
5158 2011-05-26 Yao Qi <yao@codesourcery.com>
5159
5160 * Makefile.in (thread-db.o): Track dependence to
5161 common/gdb_thread_db.h.
5162 * thread-db.c: include gdb_thread_db.h from right place.
5163
5164 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5165
5166 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5167 __FILE__ and __LINE__ to internal_error.
5168
5169 2011-05-13 Doug Evans <dje@google.com>
5170
5171 * thread-db.c (try_thread_db_load_from_sdir): New function.
5172 (try_thread_db_load_from_dir): New function.
5173 (thread_db_load_search): Handle $sdir, ignore $pdir.
5174 Remove trying of system directories if search of
5175 libthread-db-search-path fails, that is now done via $sdir.
5176
5177 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5178
5179 * server.c (handle_query): Add EnableDisableTracepoints to the list
5180 of supported features.
5181 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
5182 tracepoints.
5183 (cmd_qtenable_disable): New.
5184 (cmd_qtstart): Install tracepoints even if disabled.
5185 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5186 receiving a QTEnable or QTDisable packet.
5187 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5188 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5189 tracepoints.
5190 (gdb_probe): Skip data collection if static tracepoint is disabled.
5191
5192 2011-05-10 Doug Evans <dje@google.com>
5193
5194 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5195
5196 2011-05-04 Doug Evans <dje@google.com>
5197
5198 * linux-low.c (linux_join): Skip process lookup.
5199 * spu-low.c (spu_join): Ditto.
5200 * server.c (join_inferiors_callback): Delete.
5201 (process_serial_event): For 'D' packet (detach) call join_inferior
5202 directly.
5203
5204 2011-05-04 Joseph Myers <joseph@codesourcery.com>
5205
5206 * README: Don't mention xscale*-*-linux*.
5207 * configure.srv (xscale*-*-linux*): Don't handle target.
5208
5209 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5210
5211 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5212 casting pointers.
5213 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5214 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5215 (i386_emit_void_call_2): Likewise.
5216
5217 2011-04-26 Yao Qi <yao@codesourcery.com>
5218
5219 * linux-low.c: Move common macros to linux-ptrace.h.
5220 Include linux-ptrace.h.
5221 * Makefile.in (linux_ptrace_h): New.
5222 (linux-low.o): Depends on linux-ptrace.h.
5223
5224 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5225
5226 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5227 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5228 (remote_prepare): New function with most of the TCP code from ...
5229 (remote_open): ... here. Detect PORT here unconditionally. Move also
5230 setting transport_is_reliable.
5231 * server.c (run_once): New variable.
5232 (gdbserver_usage): Document it.
5233 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5234 the first run if RUN_ONCE.
5235 * server.h (run_once, remote_prepare): New declarations.
5236
5237 2011-04-19 Tom Tromey <tromey@redhat.com>
5238
5239 * win32-low.c (handle_load_dll): Remove duplicate "the".
5240
5241 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5242
5243 Remove support for old Cygwin 1.5 versions.
5244 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5245 function to avoid warning.
5246 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5247 warning.
5248
5249 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5250
5251 * gdbserver/server.h (Macro _): Define it if not available.
5252
5253 2011-03-14 Michael Snyder <msnyder@vmware.com>
5254
5255 * hostio.c (handle_close): Remove unnecessary null test.
5256
5257 2011-03-10 Joel Brobecker <brobecker@adacore.com>
5258
5259 * Makefile.in (maintainer-clean realclean distclean): Remove
5260 "make ... subdir_do" command.
5261
5262 2011-03-10 Michael Snyder <msnyder@vmware.com>
5263
5264 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5265
5266 * server.c (handle_v_run): Free alloced buffer on early return.
5267
5268 2011-03-09 Yao Qi <yao@codesourcery.com>
5269
5270 Revert:
5271 2011-03-04 Yao Qi <yao@codesourcery.com>
5272
5273 * Makefile.in: Remove GNU make feature --directory.
5274
5275 2011-03-05 Yao Qi <yao@codesourcery.com>
5276
5277 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5278 (subdir_do): New make target. Copied from gdb/Makefile.
5279 (maintainer-clean, realclean, distclean, clean): Call corresponding
5280 make targets in common/Makefile.
5281
5282 2011-02-11 Yao Qi <yao@codesourcery.com>
5283
5284 * configure.ac: Call AC_PROG_RANLIB.
5285 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5286 * configure: Regenerate.
5287
5288 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5289
5290 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5291
5292 2011-03-06 Yao Qi <yao@codesourcery.com>
5293
5294 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5295
5296 2011-03-05 Yao Qi <yao@codesourcery.com>
5297
5298 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5299 (subdir_do): New make target. Copied from gdb/Makefile.
5300 (maintainer-clean, realclean, distclean, clean): Call corresponding
5301 make targets in common/Makefile.
5302
5303 2011-03-04 Yao Qi <yao@codesourcery.com>
5304
5305 * Makefile.in: Remove GNU make feature --directory.
5306
5307 2011-03-04 Michael Snyder <msnyder@vmware.com>
5308
5309 * server.c (queue_stop_reply): Call xmalloc not malloc.
5310
5311 2011-03-02 Michael Snyder <msnyder@vmware.com>
5312
5313 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5314
5315 2011-02-28 Michael Snyder <msnyder@vmware.com>
5316
5317 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5318 (cmd_qtframe): Ditto.
5319 (cmd_qtbuffer): Ditto.
5320 (cmd_bigqtbuffer): Ditto.
5321
5322 * utils.c (decimal2str): Initialize 'width' to nine, then
5323 don't mess with it.
5324
5325 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5326
5327 * hostio.c (require_data): Free *data, not data.
5328
5329 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5330
5331 * hostio.c (require_data): Use free, not xfree.
5332
5333 2011-02-27 Michael Snyder <msnyder@vmware.com>
5334
5335 * server.c (handle_query): Discard unused value.
5336
5337 * hostio.c (require_data): Free malloc memory before returning
5338 error.
5339
5340 2011-02-26 Michael Snyder <msnyder@vmware.com>
5341
5342 * linux-low.c (list_threads): Call closedir for dirent.
5343
5344 2011-02-27 Michael Snyder <msnyder@vmware.com>
5345
5346 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5347 a case statement falls through.
5348
5349 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5350
5351 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5352 in comparison.
5353
5354 2011-02-26 Michael Snyder <msnyder@vmware.com>
5355
5356 * utils.c (decimal2str): Eliminate dead code and dead param.
5357 (pulongest): Drop dead param from call to decimal2str.
5358 (plongest): Ditto.
5359
5360 2011-02-24 Joel Brobecker <brobecker@adacore.com>
5361
5362 Revert the following patch (not approved yet):
5363 2011-02-21 Hui Zhu <teawater@gmail.com>
5364 * tracepoint.c (tp_printf): New function.
5365 (eval_agent_expr): Handle gdb_agent_op_printf.
5366
5367 2011-02-21 Hui Zhu <teawater@gmail.com>
5368
5369 * tracepoint.c (tp_printf): New function.
5370 (eval_agent_expr): Handle gdb_agent_op_printf.
5371
5372 2011-02-18 Tom Tromey <tromey@redhat.com>
5373
5374 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5375 (tracepoint.o): Likewise.
5376 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5377 (gdb_agent_op_names): Likewise.
5378
5379 2011-02-18 Tom Tromey <tromey@redhat.com>
5380
5381 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5382 gdb_agent_op_rot>: New constants.
5383 (gdb_agent_op_names): Add pick and roll.
5384 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5385 cases.
5386
5387 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5388
5389 * aclocal.m4: Regenerated with aclocal-1.11.1.
5390
5391 2011-02-14 Pedro Alves <pedro@codesourcery.com>
5392
5393 * server.c (handle_qxfer_traceframe_info): New.
5394 (qxfer_packets): Register "traceframe-info".
5395 (handle_query): Report support for qXfer:traceframe-info:read+.
5396 * tracepoint.c (match_blocktype): New.
5397 (traceframe_find_block_type): Rename to ...
5398 (traceframe_walk_blocks): ... this. Add callback filter argument,
5399 and use it.
5400 (traceframe_find_block_type): New, reimplemented on top of
5401 traceframe_walk_blocks.
5402 (build_traceframe_info_xml): New.
5403 (traceframe_read_info): New.
5404 * server.h (traceframe_read_info): Declare.
5405
5406 2011-02-11 Yao Qi <yao@codesourcery.com>
5407
5408 * configure.ac: Call AC_PROG_RANLIB.
5409 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5410 * configure: Regenerate.
5411
5412 2011-02-07 Pedro Alves <pedro@codesourcery.com>
5413
5414 * server.c (gdb_read_memory): Change return semantics to allow
5415 partial transfers.
5416 (handle_search_memory_1): Adjust.
5417 (process_serial_event) <'m' packet>: Handle partial transfers.
5418 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5419
5420 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5421
5422 * regcache.c (init_register_cache): Initialize
5423 regcache->register_status.
5424 (free_register_cache): Release regcache->register_status.
5425 (regcache_cpy): Copy register_status.
5426 (registers_to_string): Print 'x's for unavailable registers.
5427 (supply_register): Mark the register's status valid or
5428 unavailable, depending on whether a buffer was passed in or not.
5429 (supply_register_zeroed): New.
5430 (supply_regblock): Mark the registers' status valid or
5431 unavailable, depending on whether a buffer was passed in or not.
5432 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5433 (struct regcache): New `register_status' field.
5434 (supply_register_zeroed): Declare.
5435 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5436 supply_register_zeroed, rather than passing a NULL buffer to
5437 supply_register.
5438 * tracepoint.c (fetch_traceframe_registers): Update comment.
5439
5440 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5441
5442 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5443 buffer explicit.
5444
5445 2011-01-25 Pedro Alves <pedro@codesourcery.com>
5446
5447 * server.h (decode_xfer_write): Change prototype.
5448 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5449 and don't extract the annex here.
5450 * server.c (decode_xfer_read): Remove `annex' parameter,
5451 and don't extract the annex here.
5452 (decode_xfer): New.
5453 (struct qxfer): New.
5454 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5455 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5456 (handle_qxfer_statictrace): New functions, abstracted out from
5457 handle_query, and made to use the struct qxfer interface.
5458 (handle_threads_qxfer_proper): Rename to ...
5459 (handle_qxfer_threads_proper): ... this.
5460 (handle_threads_qxfer): Rename to ...
5461 (handle_qxfer_threads): ... this. Adjust.
5462 (qxfer_packets): New array.
5463 (handle_qxfer): New function.
5464 (handle_query): Use handle_qxfer.
5465
5466 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5467
5468 * gdbreplay.c: Shorten lines of >= 80 columns.
5469 * linux-low.c: Ditto.
5470 * linux-ppc-low.c: Ditto.
5471 * linux-s390-low.c: Ditto.
5472 * linux-sparc-low.c: Ditto.
5473 * linux-x86-low.c: Ditto.
5474 * linux-xtensa-low.c: Ditto.
5475 * mem-break.c: Ditto.
5476 * nto-low.c: Ditto.
5477 * regcache.h: Ditto.
5478 * remote-utils.c: Ditto.
5479 * server.c: Ditto.
5480 * server.h: Ditto.
5481 * thread-db.c: Ditto.
5482 * tracepoint.c: Ditto.
5483 * utils.c: Ditto.
5484 * win32-low.h: Ditto.
5485
5486 2011-01-05 Joel Brobecker <brobecker@adacore.com>
5487
5488 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5489 update.
5490
5491 2011-01-01 Joel Brobecker <brobecker@adacore.com>
5492
5493 * server.c (gdbserver_version): Update copyright year in version
5494 output.
5495 * gdbreplay.c (gdbreplay_version): Ditto.
5496
5497 2010-12-29 Jie Zhang <jie.zhang@analog.com>
5498
5499 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5500 * linux-bfin-low.c: New file.
5501 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5502 PT_DATA_ADDR for BFIN targets.
5503 * Makefile.in (SFILES): Add linux-bfin-low.c.
5504 (clean): Remove reg-bfin.c.
5505 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5506 * README: Mention supported Blackfin targets.
5507
5508 2010-12-23 Mike Frysinger <vapier@gentoo.org>
5509
5510 * .gitignore: New file.
5511
5512 2010-11-16 Mike Frysinger <vapier@gentoo.org>
5513
5514 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5515
5516 2010-10-22 Jie Zhang <jie@codesourcery.com>
5517
5518 * Makefile.in: Add FLAGS_TO_PASS variable.
5519 (install): Remove dependency of install-only and recursively
5520 invoke make for install-only.
5521
5522 2010-10-04 Doug Evans <dje@google.com>
5523
5524 * Makefile.in (uninstall): Use $(DESTDIR).
5525
5526 2010-09-24 Pedro Alves <pedro@codesourcery.com>
5527
5528 PR gdb/11842
5529
5530 * linux-x86-low.c (compat_siginfo_from_siginfo)
5531 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5532 si_code is < 0. Check for si_code == SI_TIMER before checking for
5533 si_code < 0.
5534
5535 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5536
5537 * lynx-i386-low.c: New file.
5538 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5539
5540 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5541
5542 * lynx-low.c (ptrace_request_to_str): Remove handling for
5543 request values that have been removed in LynxOS 5.x.
5544
5545 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5546
5547 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5548 <ptrace.h>
5549
5550 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5551
5552 * configure.ac: Add --enable-inprocess-agent option.
5553 * configure: Rebuilt.
5554
5555 2010-09-06 Yao Qi <yao@codesourcery.com>
5556
5557 * linux-low.c (linux_kill): Remove unused variable.
5558 (linux_stabilize_threads): Likewise.
5559 * server.c (start_inferior): Likewise.
5560 (queue_stop_reply_callback): Likewise.
5561 * tracepoint.c (do_action_at_tracepoint): Likewise.
5562
5563 2010-09-06 Yao Qi <yao@codesourcery.com>
5564
5565 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5566 on return.
5567
5568 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5569
5570 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5571
5572 2010-09-06 Pedro Alves <pedro@codesourcery.com>
5573
5574 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5575 "$(IPA_DEPFILES)".
5576
5577 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5578
5579 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5580 gdbserver/lynx-ppc-low.c: New files.
5581 * Makefile.in (lynx_low_h): New variable.
5582 (lynx-low.o, lynx-ppc-low.o): New rules.
5583 * configure.ac: On LynxOS, link with -lnetinet.
5584 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5585 * configure: regenerate.
5586
5587 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5588
5589 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5590 * configure.ac: Add check for vasprintf and vsnprintf.
5591 * configure, config.in: Regenerate.
5592 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5593
5594 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5595
5596 * gdbreplay.c: Move include of alloca.h up, next to include of
5597 malloc.h.
5598 * server.h: Add include of malloc.h.
5599 * mem-break.c: Remove include of malloc.h.
5600 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5601
5602 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5603
5604 * Makefile.in (memmem.o): Build with -Wno-error.
5605
5606 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5607
5608 * utils.c (xsnprintf): Make non-static.
5609 * server.h: Add xsnprintf declaration.
5610 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5611 replace calls to snprintf by calls to xsnprintf throughout.
5612
5613 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5614
5615 * configure.ac: Add configure check for alloca.
5616 * configure, config.in: Regenerate.
5617 * server.h: Include alloca.h if it exists.
5618 * gdbreplay.c: Include alloca.h if it exists.
5619
5620 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5621
5622 * linux-low.c (__SIGRTMIN): Define if not already defined.
5623 (linux_create_inferior): Check for __ANDROID__ rather than
5624 __SIGRTMIN.
5625 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5626 are already deferred.
5627 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5628 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5629 stopped and already has a pending signal to report.
5630 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5631 a pending signal to report or is moving out of a jump pad.
5632 (linux_init_signals): Check for __ANDROID__ rather than
5633 __SIGRTMIN.
5634
5635 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5636
5637 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5638 debug_threads check. Avoid a linear search when not doing debug
5639 output.
5640
5641 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5642
5643 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5644 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5645 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5646 (process_event): Change local fd's type to gdb_fildes_t.
5647 (create_file_handler): Adjust prototype.
5648 (delete_file_handler): Adjust prototype.
5649 (handle_file_event): Adjust prototype. Use pfildes.
5650 (create_file_event): Adjsut prototype.
5651 * remote-utils.c (remote_desc, listen_desc): Change type to
5652 gdb_fildes_t.
5653 * server.h: New gdb_fildes_t typedef.
5654 [USE_WIN32API]: Include winsock2.h.
5655 (delete_file_handler, add_file_handler): Adjust prototypes.
5656 (pfildes): Declare.
5657 * utils.c (pfildes): New.
5658
5659 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5660
5661 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5662 * configure: Regenerate.
5663
5664 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5665
5666 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5667 (linux_done_accessing_memory): ... this.
5668 (linux_target_ops): Adjust.
5669 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5670 * nto-low.c (nto_target_ops): Adjust comment.
5671 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5672 * spu-low.c (spu_target_ops): Adjust comment.
5673 * target.h (target_ops): Rename unprepare_to_access_memory field
5674 to done_accessing_memory.
5675 (unprepare_to_access_memory): Rename to ...
5676 (done_accessing_memory): ... this.
5677
5678 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5679
5680 * linux-low.c (linux_prepare_to_access_memory): New.
5681 (linux_unprepare_to_access_memory): New.
5682 (linux_target_ops): Install them.
5683 * server.c (read_memory): Rename to ...
5684 (gdb_read_memory): ... this. Use
5685 prepare_to_access_memory/prepare_to_access_memory.
5686 (write_memory): Rename to ...
5687 (gdb_write_memory): ... this. Use
5688 prepare_to_access_memory/prepare_to_access_memory.
5689 (handle_search_memory_1): Adjust.
5690 (process_serial_event): Adjust.
5691 * target.h (struct target_ops): New fields
5692 prepare_to_access_memory and unprepare_to_access_memory.
5693 (prepare_to_access_memory, unprepare_to_access_memory): New.
5694 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5695 prepare_to_access_memory/prepare_to_access_memory.
5696 * nto-low.c (nto_target_ops): Adjust.
5697 * spu-low.c (spu_target_ops): Adjust.
5698 * win32-low.c (win32_target_ops): Adjust.
5699
5700 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5701
5702 * Makefile.in (WARN_CFLAGS): Get it from configure.
5703 (WERROR_CFLAGS): New.
5704 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5705 * configure.ac: Introduce --enable-werror, which adds -Werror to
5706 the compiler command line. Enabled by default. Disable with
5707 --disable-werror. Add -Wdeclaration-after-statement
5708 Wpointer-arith and -Wformat-nonliteral to warning flags.
5709 * configure: Regenerate.
5710
5711 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5712
5713 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5714
5715 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5716
5717 * gdbreplay.c (remote_error): New.
5718 (gdbchar): New.
5719 (expect): Use gdbchar. Check for error reading from GDB.
5720 Clarify sync error output.
5721 (play): Check for errors writing to GDB.
5722 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5723 * remote-utils.c (getpkt): Check for errors writing to the remote
5724 descriptor.
5725
5726 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5727
5728 * linux-low.c (linux_wait_1): Move non-debugging code out of
5729 `debug_threads' control.
5730
5731 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5732
5733 * linux-low.c (linux_wait_1): Don't set last_status here.
5734 * server.c (push_event, queue_stop_reply_callback): Assert we're
5735 not pushing a TARGET_WAITKIND_IGNORE event.
5736 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5737 (myresume, handle_target_event): Set the thread's last_resume_kind
5738 and last_status from the target returned status.
5739
5740 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5741
5742 PR threads/10729
5743
5744 * linux-x86-low.c (update_debug_registers_callback): New.
5745 (i386_dr_low_set_addr): Use it.
5746 (i386_dr_low_get_addr): New.
5747 (i386_dr_low_set_control): Use update_debug_registers_callback.
5748 (i386_dr_low_get_control): New.
5749 (i386_dr_low_get_status): Adjust.
5750 * linux-low.c (linux_stop_lwp): New.
5751 * linux-low.h (linux_stop_lwp): Declare.
5752
5753 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5754 argument instead of a i386_debug_reg_state.
5755 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5756 a i386_debug_reg_state.
5757 (i386_insert_aligned_watchpoint): Adjust.
5758 (i386_remove_aligned_watchpoint): Adjust.
5759 (i386_low_stopped_data_address): Read the debug registers from the
5760 inferior instead of from the mirrors.
5761 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5762 (i386_dr_low_get_addr): Declare.
5763 (i386_dr_low_get_control): Declare.
5764 (i386_dr_low_get_status): Change prototype.
5765
5766 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5767 (i386_dr_low_get_addr): New.
5768 (i386_dr_low_get_control): New.
5769 (i386_dr_low_get_status): Adjust prototype. Return
5770 dr_status_mirror.
5771 (i386_initial_stuff): Clear dr_status_mirror and
5772 dr_control_mirror.
5773 (i386_get_thread_context): Adjust.
5774 (i386_set_thread_context): Adjust.
5775 (i386_thread_added): Adjust.
5776
5777 2010-08-24 Pedro Alves <pedro@codesourcery.com>
5778
5779 * linux-low.h (linux_thread_area): Delete declaration.
5780
5781 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5782
5783 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5784 after its termination.
5785
5786 2010-08-09 Pedro Alves <pedro@codesourcery.com>
5787
5788 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5789 (gdb_wants_all_stopped): Delete.
5790 (linux_wait_1): Don't call them.
5791 * server.c (handle_v_cont): Tag all threads as want-stopped.
5792 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5793 stopped as "client-wants-stopped".
5794
5795 2010-07-31 Pedro Alves <pedro@codesourcery.com>
5796
5797 * Makefile.in (signals_h): New.
5798 (server_h): Depend on it.
5799 (server.o): Don't depend on $(signals_def).
5800 (signals.o): Depend on $(signals_def).
5801
5802 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5803
5804 * Makefile.in (signals_def): New.
5805 (server_h): Append include/gdb/signals.h and signals_def.
5806 (server.o): Append signals_def.
5807
5808 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5809
5810 * server.c (handle_target_event): Use target_signal_to_host for
5811 resume_info.sig initialization.
5812 * target.h (struct thread_resume) <sig>: New comment.
5813
5814 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5815
5816 * server.c (handle_query): strcpy() the returned string from paddress()
5817 instead of sprintf().
5818 * utils.c (paddress): Return phex_nz().
5819
5820 2010-07-07 Joel Brobecker <brobecker@adacore.com>
5821
5822 * server.c (handle_v_cont): Call mourn_inferior if process
5823 just exited.
5824 (myresume): Likewise.
5825
5826 2010-07-01 Pedro Alves <pedro@codesourcery.com>
5827
5828 Static tracepoints, and integration with UST.
5829
5830 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5831 * mem-break.c (uninsert_all_breakpoints)
5832 (reinsert_all_breakpoints): New.
5833 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5834 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5835 (gdb_agent_ust_loaded, helper_thread_id)
5836 (gdb_agent_helper_thread_id): New macros.
5837 (struct ipa_sym_addresses): Add addr_ust_loaded,
5838 addr_helper_thread_id, addr_cmd_buf.
5839 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5840 (in_process_agent_loaded_ust): New.
5841 (write_e_ust_not_loaded): New.
5842 (maybe_write_ipa_ust_not_loaded): New.
5843 (struct collect_static_trace_data_action): New.
5844 (enum tracepoint_type) <static_tracepoint>: New.
5845 (struct tracepoint) <handle>: Mention static tracepoints.
5846 (struct static_tracepoint_ctx): New.
5847 (CMD_BUF_SIZE): New.
5848 (add_tracepoint_action): Handle static tracepoint actions.
5849 (unprobe_marker_at): New.
5850 (clear_installed_tracepoints): Handle static tracepoints.
5851 (cmd_qtdp): Handle static tracepoints.
5852 (probe_marker_at): New.
5853 (cmd_qtstart): Handle static tracepoints.
5854 (response_tracepoint): Handle static tracepoints.
5855 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5856 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5857 (get_context_regcache): Handle static tracepoints.
5858 (do_action_at_tracepoint): Handle static tracepoint actions.
5859 (traceframe_find_block_type): Handle static trace data blocks.
5860 (traceframe_read_sdata): New.
5861 (download_tracepoints): Download static tracepoint actions.
5862 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5863 (GDB_PROBE_NAME): New.
5864 (ust_ops): New.
5865 (GET_UST_SYM): New.
5866 (USTF): New.
5867 (dlsym_ust): New.
5868 (ust_marker_to_static_tracepoint): New.
5869 (gdb_probe): New.
5870 (collect_ust_data_at_tracepoint): New.
5871 (gdb_ust_probe): New.
5872 (UNIX_PATH_MAX, SOCK_DIR): New.
5873 (gdb_ust_connect_sync_socket): New.
5874 (resume_thread, stop_thread): New.
5875 (run_inferior_command): New.
5876 (init_named_socket): New.
5877 (gdb_ust_socket_init): New.
5878 (cstr_to_hexstr): New.
5879 (next_st): New.
5880 (first_marker, next_marker): New.
5881 (response_ust_marker): New.
5882 (cmd_qtfstm, cmd_qtsstm): New.
5883 (unprobe_marker_at, probe_marker_at): New.
5884 (cmd_qtstmat, gdb_ust_thread): New.
5885 (gdb_ust_init): New.
5886 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5887 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5888 (ST_REGENTRY): New.
5889 (x86_64_st_collect_regmap): New.
5890 (X86_64_NUM_ST_COLLECT_GREGS): New.
5891 (AMD64_RIP_REGNUM): New.
5892 (supply_static_tracepoint_registers): New.
5893 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5894 (ST_REGENTRY): New.
5895 (i386_st_collect_regmap): New.
5896 (i386_NUM_ST_COLLECT_GREGS): New.
5897 (supply_static_tracepoint_registers): New.
5898 * server.c (handle_query): Handle qXfer:statictrace:read.
5899 <qSupported>: Report support for StaticTracepoints, and
5900 qXfer:statictrace:read features.
5901 * server.h (traceframe_read_sdata)
5902 (supply_static_tracepoint_registers): Declare.
5903 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5904 (unpack_varlen_hex): Include in IPA build.
5905 * Makefile.in (ustlibs, ustinc): New.
5906 (IPA_OBJS): Add remote-utils-ipa.o.
5907 ($(IPA_LIB)): Link -ldl and -lpthread.
5908 (UST_CFLAGS): New.
5909 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5910 * config.in, configure: Regenerate.
5911
5912 2010-06-20 Ian Lance Taylor <iant@google.com>
5913 Pedro Alves <pedro@codesourcery.com>
5914
5915 * linux-x86-low.c (always_true): Delete.
5916 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5917 trying to fool the compiler with always_true.
5918
5919 2010-06-20 Pedro Alves <pedro@codesourcery.com>
5920
5921 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5922 conditions in gdbserver.
5923
5924 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5925
5926 * spu-low.c (spu_read_memory): Wrap around local store limit.
5927 (spu_write_memory): Likewise.
5928
5929 2010-06-15 Pedro Alves <pedro@codesourcery.com>
5930
5931 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5932 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5933 LONGEST uses.
5934 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5935 uses.
5936 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5937 uses with LONGEST uses.
5938
5939 2010-06-14 Stan Shebs <stan@codesourcery.com>
5940 Pedro Alves <pedro@codesourcery.com>
5941
5942 Bytecode compiler.
5943
5944 * linux-x86-low.c: Include limits.h.
5945 (add_insns): New.
5946 (always_true): New.
5947 (EMIT_ASM): New.
5948 (EMIT_ASM32): New.
5949 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5950 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5951 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5952 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5953 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5954 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5955 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5956 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5957 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5958 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5959 (amd64_emit_void_call_2): New.
5960 (amd64_emit_ops): New.
5961 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5962 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5963 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5964 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5965 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5966 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5967 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5968 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5969 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5970 (i386_emit_stack_adjust, i386_emit_int_call_1)
5971 (i386_emit_void_call_2): New.
5972 (i386_emit_ops): New.
5973 (x86_emit_ops): New.
5974 (the_low_target): Install x86_emit_ops.
5975 * server.h (struct emit_ops): New.
5976 (get_raw_reg_func_addr): Declare.
5977 (current_insn_ptr, emit_error): Declare.
5978 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5979 (set_trace_state_variable_value): New defines.
5980 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5981 addr_get_trace_state_variable_value and
5982 addr_set_trace_state_variable_value.
5983 (symbol_list): New fields for get_raw_reg,
5984 get_trace_state_variable_value and set_trace_state_variable_value.
5985 (condfn): New typedef.
5986 (struct tracepoint): New field `compiled_cond'.
5987 (do_action_at_tracepoint): Clear compiled_cond.
5988 (get_trace_state_variable_value, set_trace_state_variable_value):
5989 Export in the IPA.
5990 (condition_true_at_tracepoint): If there's a compiled condition,
5991 run that.
5992 (current_insn_ptr, emit_error): New globals.
5993 (struct bytecode_address): New.
5994 (get_raw_reg_func_addr): New.
5995 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5996 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5997 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5998 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5999 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6000 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6001 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6002 (compile_tracepoint_condition, compile_bytecodes): New.
6003 * target.h (emit_ops): Forward declare.
6004 (struct target_ops): New field emit_ops.
6005 (target_emit_ops): New.
6006 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6007 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6008 * linux-low.c (linux_emit_ops): New.
6009 (linux_target_ops): Install it.
6010 * linux-low.h (struct linux_target_ops): New field emit_ops.
6011
6012 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6013
6014 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6015 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6016
6017 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6018 Stan Shebs <stan@codesourcery.com>
6019
6020 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6021 (all): Depend on $(extra_libraries).
6022 (install-only): Install the IPA.
6023 (IPA_OBJS, IPA_LIB): New.
6024 (clean): Remove the IPA lib.
6025 (IPAGENT_CFLAGS): New.
6026 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6027 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6028 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6029 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6030 * configure.ac: Check for atomic builtins support in the compiler.
6031 (IPA_DEPFILES, extra_libraries): Define.
6032 * configure.srv (ipa_obj): Add description.
6033 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6034 (i[34567]86-*-linux*): Set ipa_obj.
6035 (x86_64-*-linux*): Set ipa_obj.
6036 * linux-low.c (stabilizing_threads): New.
6037 (supports_fast_tracepoints): New.
6038 (linux_detach): Stabilize threads before detaching.
6039 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6040 the lwp is either not stabilizing, or is moving out of a jump pad.
6041 (linux_fast_tracepoint_collecting): New.
6042 (maybe_move_out_of_jump_pad): New.
6043 (enqueue_one_deferred_signal): New.
6044 (dequeue_one_deferred_signal): New.
6045 (linux_wait_for_event_1): If moving out of a jump pad, defer
6046 pending signals to later.
6047 (linux_stabilize_threads): New.
6048 (linux_wait_1): Check if threads need moving out of jump pads, and
6049 do it if so.
6050 (stuck_in_jump_pad_callback): New.
6051 (move_out_of_jump_pad_callback): New.
6052 (lwp_running): New.
6053 (linux_resume_one_lwp): Handle moving out of jump pads.
6054 (linux_set_resume_request): Dequeue deferred signals.
6055 (need_step_over_p): Also step over fast tracepoint jumps.
6056 (start_step_over): Also uninsert fast tracepoint jumps.
6057 (finish_step_over): Also reinsert fast tracepoint jumps.
6058 (linux_install_fast_tracepoint_jump): New.
6059 (linux_target_ops): Install linux_stabilize_threads and
6060 linux_install_fast_tracepoint_jump_pad.
6061 * linux-low.h (linux_target_ops) <get_thread_area,
6062 install_fast_tracepoint_jump_pad>: New fields.
6063 (struct lwp_info) <collecting_fast_tracepoint,
6064 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6065 (linux_get_thread_area): Declare.
6066 * linux-x86-low.c (jump_insn): New.
6067 (x86_get_thread_area): New.
6068 (append_insns): New.
6069 (push_opcode): New.
6070 (amd64_install_fast_tracepoint_jump_pad): New.
6071 (i386_install_fast_tracepoint_jump_pad): New.
6072 (x86_install_fast_tracepoint_jump_pad): New.
6073 (the_low_target): Install x86_get_thread_area and
6074 x86_install_fast_tracepoint_jump_pad.
6075 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6076 (struct fast_tracepoint_jump): New.
6077 (fast_tracepoint_jump_insn): New.
6078 (fast_tracepoint_jump_shadow): New.
6079 (find_fast_tracepoint_jump_at): New.
6080 (fast_tracepoint_jump_here): New.
6081 (delete_fast_tracepoint_jump): New.
6082 (set_fast_tracepoint_jump): New.
6083 (uninsert_fast_tracepoint_jumps_at): New.
6084 (reinsert_fast_tracepoint_jumps_at): New.
6085 (set_breakpoint_at): Use write_inferior_memory.
6086 (uninsert_raw_breakpoint): Use write_inferior_memory.
6087 (check_mem_read): Mask out fast tracepoint jumps.
6088 (check_mem_write): Mask out fast tracepoint jumps.
6089 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6090 (set_fast_tracepoint_jump): Declare.
6091 (delete_fast_tracepoint_jump)
6092 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6093 (reinsert_fast_tracepoint_jumps_at): Declare.
6094 * regcache.c: Don't compile many functions when building the
6095 in-process agent library.
6096 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6097 the register buffer in the heap.
6098 (free_register_cache): If the register buffer isn't owned by the
6099 regcache, don't free it.
6100 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6101 pre-existing register caches.
6102 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6103 type.
6104 (convert_ascii_to_int): : Constify `from' parameter type.
6105 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6106 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6107 the needed buffer in-place.
6108 (relocate_instruction): New.
6109 * server.c (handle_query) <qSymbols>: If the target supports
6110 tracepoints, give it a chance of looking up symbols. Report
6111 support for fast tracepoints.
6112 (handle_status): Stabilize threads.
6113 (process_serial_event): Adjust.
6114 * server.h (struct fast_tracepoint_jump): Forward declare.
6115 (struct process_info) <fast_tracepoint_jumps>: New field.
6116 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6117 (decode_X_packet, decode_M_packet): Adjust.
6118 (relocate_instruction): Declare.
6119 (in_process_agent_loaded): Declare.
6120 (tracepoint_look_up_symbols): Declare.
6121 (struct fast_tpoint_collect_status): Declare.
6122 (fast_tracepoint_collecting): Declare.
6123 (force_unlock_trace_buffer): Declare.
6124 (handle_tracepoint_bkpts): Declare.
6125 (initialize_low_tracepoint)
6126 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6127 * target.h (struct target_ops) <stabilize_threads,
6128 install_fast_tracepoint_jump_pad>: New fields.
6129 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6130 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6131 [HAVE_STDINT_H]: Include stdint.h.
6132 (trace_debug_1): Rename to ...
6133 (trace_vdebug): ... this.
6134 (trace_debug): Rename to ...
6135 (trace_debug_1): ... this. Add `level' parameter.
6136 (trace_debug): New.
6137 (ATTR_USED, ATTR_NOINLINE): New.
6138 (IP_AGENT_EXPORT): New.
6139 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6140 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6141 (about_to_request_buffer_space, trace_buffer_is_full)
6142 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6143 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6144 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6145 (traceframe_write_count, traceframes_created)
6146 (trace_state_variables)
6147 New renaming defines.
6148 (struct ipa_sym_addresses): New.
6149 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6150 (symbol_list): New.
6151 (ipa_sym_addrs): New.
6152 (all_tracepoint_symbols_looked_up): New.
6153 (in_process_agent_loaded): New.
6154 (write_e_ipa_not_loaded): New.
6155 (maybe_write_ipa_not_loaded): New.
6156 (tracepoint_look_up_symbols): New.
6157 (debug_threads) [IN_PROCESS_AGENT]: New.
6158 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6159 (UNKNOWN_SIDE_EFFECTS): New.
6160 (stop_tracing): New.
6161 (flush_trace_buffer): New.
6162 (stop_tracing_bkpt): New.
6163 (flush_trace_buffer_bkpt): New.
6164 (read_inferior_integer): New.
6165 (read_inferior_uinteger): New.
6166 (read_inferior_data_pointer): New.
6167 (write_inferior_data_pointer): New.
6168 (write_inferior_integer): New.
6169 (write_inferior_uinteger): New.
6170 (struct collect_static_trace_data_action): Delete.
6171 (enum tracepoint_type): New.
6172 (struct tracepoint) <type>: New field `type'.
6173 <actions_str, step_actions, step_actions_str>: Only include in
6174 GDBserver.
6175 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6176 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6177 (tracepoints): Use IP_AGENT_EXPORT.
6178 (last_tracepoint): Don't include in the IPA.
6179 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6180 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6181 (alloced_trace_state_variables): New.
6182 (trace_state_variables): Use IP_AGENT_EXPORT.
6183 (traceframe_t): Delete unused variable.
6184 (circular_trace_buffer): Don't include in the IPA.
6185 (trace_buffer_start): Delete.
6186 (struct trace_buffer_control): New.
6187 (trace_buffer_free): Delete.
6188 (struct ipa_trace_buffer_control): New.
6189 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6190 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6191 New.
6192 (trace_buffer_ctrl): New.
6193 (TRACE_BUFFER_CTRL_CURR): New.
6194 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6195 Reimplement as macros.
6196 (trace_buffer_wrap): Delete.
6197 (traceframe_write_count, traceframe_read_count)
6198 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6199 (struct tracepoint_hit_ctx) <type>: New field.
6200 (struct fast_tracepoint_ctx): New.
6201 (memory_barrier): New.
6202 (cmpxchg): New.
6203 (record_tracepoint_error): Update atomically in the IPA.
6204 (clear_inferior_trace_buffer): New.
6205 (about_to_request_buffer_space): New.
6206 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6207 updating the same buffer.
6208 (add_tracepoint): Default the tracepoint's type to trap
6209 tracepoint, and orig_size to -1.
6210 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6211 internal variables.
6212 (create_trace_state_variable): New parameter `gdb'. Handle it.
6213 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6214 (cmd_qtdp): Handle fast tracepoints.
6215 (cmd_qtdv): Adjust.
6216 (max_jump_pad_size): New.
6217 (gdb_jump_pad_head): New.
6218 (get_jump_space_head): New.
6219 (claim_jump_space): New.
6220 (sort_tracepoints): New.
6221 (MAX_JUMP_SIZE): New.
6222 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6223 IPA.
6224 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6225 support. Upload fast traceframes, and delete internal IPA
6226 breakpoints.
6227 (stop_tracing_handler): New.
6228 (flush_trace_buffer_handler): New.
6229 (cmd_qtstop): Upload fast tracepoints.
6230 (response_tracepoint): Handle fast tracepoints.
6231 (tracepoint_finished_step): Upload fast traceframes. Set the
6232 tracepoint hit context's tracepoint type.
6233 (handle_tracepoint_bkpts): New.
6234 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6235 type. Add comment about fast tracepoints.
6236 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6237 non-existing action_str field.
6238 (get_context_regcache): Handle fast tracepoints.
6239 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6240 to the regcache.
6241 (fast_tracepoint_from_jump_pad_address): New.
6242 (fast_tracepoint_from_ipa_tpoint_address): New.
6243 (collecting_t): New.
6244 (force_unlock_trace_buffer): New.
6245 (fast_tracepoint_collecting): New.
6246 (collecting): New.
6247 (gdb_collect): New.
6248 (write_inferior_data_ptr): New.
6249 (target_tp_heap): New.
6250 (target_malloc): New.
6251 (download_agent_expr): New.
6252 (UALIGN): New.
6253 (download_tracepoints): New.
6254 (download_trace_state_variables): New.
6255 (upload_fast_traceframes): New.
6256 (IPA_FIRST_TRACEFRAME): New.
6257 (IPA_NEXT_TRACEFRAME_1): New.
6258 (IPA_NEXT_TRACEFRAME): New.
6259 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6260 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6261 (gdb_jump_pad_buffer_end): New.
6262 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6263 (initialize_tracepoint): Adjust.
6264 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6265 buffer. Initialize the low module.
6266 * utils.c (PREFIX, TOOLNAME): New.
6267 (malloc_failure): Use PREFIX.
6268 (error): In the IPA, an error causes an exit.
6269 (fatal, warning): Use PREFIX.
6270 (internal_error): Use TOOLNAME.
6271 (NUMCELLS): Increase to 10.
6272 * configure, config.in: Regenerate.
6273
6274 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6275
6276 * server.c (handle_query) <qSupported>: Do two passes over the
6277 qSupported string to avoid nesting strtok.
6278
6279 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6280
6281 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6282 (CDEPS): New.
6283 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6284 -Wl,--dynamic-list.
6285 * configure: Regenerate.
6286 * proc-service.list: New.
6287
6288 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6289
6290 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6291 New comment.
6292
6293 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6294
6295 * gdbreplay.c (remote_open): Check error return from socket() call by
6296 its equality to -1 not by it being negative.
6297 * remote-utils.c (remote_open): Likewise.
6298
6299 2010-05-23 Pedro Alves <pedro@codesourcery.com>
6300
6301 * config.h: Regenerate.
6302
6303 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6304
6305 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6306 doesn't provide PTRACE_GET_THREAD_AREA.
6307
6308 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6309
6310 * linux-m68k-low.c: Include <asm/ptrace.h>
6311 (ps_get_thread_area): Implement.
6312
6313 2010-05-03 Doug Evans <dje@google.com>
6314
6315 * event-loop.c (struct callback_event): New struct.
6316 (callback_list): New global.
6317 (append_callback_event, delete_callback_event): New functions.
6318 (process_callback): New function.
6319 (start_event_loop): Call it.
6320 * remote-utils.c (NOT_SCHEDULED): Define.
6321 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6322 moved out of readchar.
6323 (readchar): Rewrite. Call reschedule before returning.
6324 (reset_readchar): New function.
6325 (remote_close): Call it.
6326 (process_remaining, reschedule): New functions.
6327 * server.h (callback_handler_func): New typedef.
6328 (append_callback_event, delete_callback_event): Declare.
6329
6330 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6331
6332 * proc-service.c (ps_pglobal_lookup): Use
6333 thread_db_look_up_one_symbol.
6334 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6335 parameter. Use it instead of all_symbols_looked_up.
6336 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6337 field.
6338 (all_symbols_looked_up): Don't declare.
6339 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6340 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6341 field.
6342 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6343 Set all_symbols_looked_up here.
6344 (thread_db_look_up_one_symbol): New.
6345 (thread_db_get_tls_address): Adjust.
6346 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6347 thread_db object on the heap, and tentatively set it in the
6348 process structure.
6349 (thread_db_init): Don't set all_symbols_looked_up here.
6350 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6351
6352 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6353
6354 * linux-low.c (linux_kill, linux_detach): Adjust.
6355 (status_pending_p_callback): Remove redundant statement. Check
6356 for !TARGET_WAITIKIND_IGNORE, instead of
6357 TARGET_WAITKIND_STOPPED.
6358 (handle_tracepoints): Make sure LWP is locked. Adjust.
6359 (linux_wait_for_event_1): Adjust.
6360 (linux_cancel_breakpoints): New.
6361 (unsuspend_one_lwp): New.
6362 (unsuspend_all_lwps): New.
6363 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6364 (send_sigstop_callback): Change return type to int, add new
6365 `except' parameter and handle it.
6366 (suspend_and_send_sigstop_callback): New.
6367 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6368 pass them down. If SUSPEND, also increment the lwp's suspend
6369 count.
6370 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6371 (need_step_over_p): Don't consider suspended LWPs.
6372 (start_step_over): Adjust.
6373 (proceed_one_lwp): Change return type to int, add new `except'
6374 parameter and handle it.
6375 (unsuspend_and_proceed_one_lwp): New.
6376 (proceed_all_lwps): Use find_inferior instead of
6377 for_each_inferior.
6378 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6379 also decrement the suspend count of LWPs. Pass `except' down,
6380 instead of hacking its suspend count.
6381 (linux_pause_all): Add `freeze' parameter. Adjust.
6382 (linux_unpause_all): New.
6383 (linux_target_ops): Install linux_unpause_all.
6384 * server.c (handle_status): Adjust.
6385 * target.h (struct target_ops): New fields `unpause_all' and
6386 `cancel_breakpoints'. Add new parameter to `pause_all'.
6387 (pause_all): Add new `freeze' parameter.
6388 (unpause_all): New.
6389 (cancel_breakpoints): New.
6390 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6391 cancel breakpoints.
6392 (cmd_qtstart): Pause threads.
6393 (stop_tracing): Pause threads, and cancel breakpoints.
6394 * win32-low.c (win32_target_ops): Adjust.
6395
6396 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6397
6398 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6399 the inferior right away from here...
6400 (linux_wait_1): ... to here, and adjust to check the thread's
6401 last_resume_kind instead of the lwp's step or stop_expected flags.
6402
6403 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6404
6405 * README: Use consistent `GDB' and `GDBserver' spellings.
6406
6407 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6408
6409 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6410 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6411 (linux_detach_one_lwp): Assume the lwp is stopped.
6412 (any_thread_of): Delete.
6413 (linux_detach): Stop all lwps here. Don't blindly delete all
6414 breakpoints.
6415 (delete_lwp_callback): New.
6416 (linux_mourn): Delete all lwps of the process that is gone.
6417 (linux_wait_1): Don't delete the last lwp of the process here.
6418 * mem-break.h (mark_breakpoints_out): Declare.
6419 * mem-break.c (mark_breakpoints_out): New.
6420 (free_all_breakpoints): Use it.
6421 * server.c (handle_target_event): If the process is gone, mark
6422 breakpoints out.
6423 * thread-db.c (struct thread_db) <create_bp>: New field.
6424 (thread_db_enable_reporting): Fix prototype. Store a thread event
6425 breakpoint reference in the thread_db struct.
6426 (thread_db_load_search): Clear the thread_db object.
6427 (try_thread_db_load_1): Ditto.
6428 (switch_to_process): New.
6429 (disable_thread_event_reporting): Use it.
6430 (remove_thread_event_breakpoints): New.
6431 (thread_db_detach, thread_db_mourn): Use it.
6432
6433 2010-05-01 Pedro Alves <pedro@codesourcery.com>
6434
6435 * linux-low.c (linux_enable_event_reporting): New.
6436 (linux_wait_for_event_1, handle_extended_wait): Use it.
6437
6438 2010-04-30 Pedro Alves <pedro@codesourcery.com>
6439
6440 * linux-low.c (linux_kill_one_lwp, linux_kill)
6441 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6442 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6443 SIGSTOP even if the LWP is stopped.
6444 (send_sigstop_callback): New.
6445 (stop_all_lwps): Use send_sigstop_callback instead.
6446 (linux_resume_one_thread): Adjust.
6447 (proceed_one_lwp): Still proceed an LWP that the client has
6448 requested to stop, if we haven't reported it as stopped yet. Make
6449 sure that LWPs the client want stopped, have a pending SIGSTOP.
6450
6451 2010-04-26 Doug Evans <dje@google.com>
6452
6453 * server.c (handle_general_set): Make static.
6454
6455 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6456 Print received char after testing for error/eof instead of before.
6457 (input_interrupt): Tweak comment.
6458
6459 2010-04-23 Doug Evans <dje@google.com>
6460
6461 * server.c (start_inferior): Print inferior argv if --debug.
6462
6463 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6464
6465 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6466 * nto-x86-low.c: Include server.h
6467
6468 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6469
6470 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6471 be consistent with other sources of this directory.
6472 (init_registers_amd64): Correct name of source file of this function
6473 in the comment.
6474
6475 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6476
6477 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6478 64-bit executables.
6479
6480 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6481
6482 * win32-i386-low.c: Add 64-bit support.
6483 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6484 (init_registers_amd64): Declare.
6485 (mappings): Add 64-bit version of array.
6486 (init_windows_x86): New function.
6487 (the_low_target): Change init_arch field to init_windows_x86.
6488
6489 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6490
6491 * win32-low.c: Adapt to support also 64-bit architecture.
6492 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6493 (get_image_name): Use SIZE_T type for local variable `done'.
6494 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6495 (toolhelp_get_dll_name): Idem.
6496 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6497 Use uintptr_t typecast to avoid warning.
6498 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6499 (handle_exception): Use phex_nz to avoid warning.
6500 (win32_wait): Remove unused local variable `process'.
6501
6502 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6503
6504 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6505 `amd64-avx.o'.
6506
6507 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6508
6509 * configure.ac: Use `ws2_32' library for srv_mingw.
6510 * configure: Regenerate.
6511 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6512 * remote-utils.c: Likewise.
6513
6514 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6515
6516 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6517 if __x86_64__ is defined.
6518
6519 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6520
6521 * configure: Regenerate.
6522
6523 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6524
6525 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6526 * target.h (target_ops): New get_tib_address field.
6527 * win32-low.h (win32_thread_info): Add thread_local_base field.
6528 * win32-low.c (child_add_thread): Add tlb argument.
6529 Set thread_local_base field to TLB.
6530 (get_child_debug_event): Adapt to child_add_thread change.
6531 (win32_get_tib_address): New function.
6532 (win32_target_ops): Set get_tib_address field to
6533 win32_get_tib_address.
6534 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6535
6536 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6537
6538 * linux-low.c (linux_mourn): Also remove the process.
6539 * server.c (handle_target_event): Don't remove the process here.
6540 * nto-low.c (nto_mourn): New.
6541 (nto_target_ops): Install it.
6542 * spu-low.c (spu_mourn): New.
6543 (spu_target_ops): Install it.
6544 * win32-low.c (win32_mourn): New.
6545 (win32_target_ops): Install it.
6546
6547 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6548
6549 * server.h (buffer_xml_printf): Remove redundant `;'.
6550
6551 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6552
6553 * regcache.c (set_register_cache): Invalidate regcaches before
6554 changing the register cache layout.
6555 (regcache_invalidate_one): Allow a NULL regcache.
6556 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6557 regcaches before changing the register cache layout or the target
6558 regsets.
6559
6560 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6561
6562 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6563 variable warning on Linux/x86-64.
6564
6565 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6566
6567 GDBserver disconnected tracing support.
6568
6569 * linux-low.c (linux_remove_process): Delete.
6570 (add_lwp): Don't set last_resume_kind here.
6571 (linux_kill): Use `mourn'.
6572 (linux_detach): Use `thread_db_detach', and `mourn'.
6573 (linux_mourn): New.
6574 (linux_attach_lwp_1): Adjust comment.
6575 (linux_attach): last_resume_kind moved the thread_info; adjust.
6576 (status_pending_p_callback): Adjust.
6577 (linux_wait_for_event_1): Adjust.
6578 (count_events_callback, select_singlestep_lwp_callback)
6579 (select_event_lwp_callback, cancel_breakpoints_callback)
6580 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6581 (proceed_one_lwp): Adjust.
6582 (linux_async): Add debug output.
6583 (linux_thread_stopped): New.
6584 (linux_pause_all): New.
6585 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6586 linux_pause_all.
6587 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6588 (thread_db_free): Delete declaration.
6589 (thread_db_detach, thread_db_mourn): Declare.
6590 * thread-db.c (thread_db_init): Use thread_db_mourn.
6591 (thread_db_free): Delete, split in two.
6592 (disable_thread_event_reporting): New.
6593 (thread_db_detach): New.
6594 (thread_db_mourn): New.
6595
6596 * server.h (struct thread_info) <last_resume_kind>: New field.
6597 <attached>: Add comment.
6598 <gdb_detached>: New field.
6599 (handler_func): Change return type to int.
6600 (handle_serial_event, handle_target_event): Ditto.
6601 (gdb_connected): Declare.
6602 (tracing): Delete.
6603 (disconnected_tracing): Declare.
6604 (stop_tracing): Declare.
6605
6606 * server.c (handle_query) <qSupported>: Report support for
6607 disconnected tracing.
6608 (queue_stop_reply_callback): Account for running threads.
6609 (gdb_wants_thread_stopped): New.
6610 (gdb_wants_all_threads_stopped): New.
6611 (gdb_reattached_process): New.
6612 (handle_status): Clear the `gdb_detached' flag of all processes.
6613 In all-stop, stop all threads.
6614 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6615 (process_serial_event): If the remote connection breaks, or if an
6616 exit was forced with "monitor exit", force an event loop exit.
6617 Handle disconnected tracing on detach.
6618 (handle_serial_event): Adjust.
6619 (handle_target_event): If GDB isn't connected, forward events back
6620 to the inferior, unless the last process exited, in which case,
6621 exit gdbserver. Adjust interface.
6622
6623 * remote-utils.c (remote_open): Don't block in accept. Instead
6624 register an event loop source on the listen socket file
6625 descriptor. Refactor bits into ...
6626 (listen_desc): ... this new global.
6627 (gdb_connected): ... this new function.
6628 (enable_async_notification): ... this new function.
6629 (handle_accept_event): ... this new function.
6630 (remote_close): Clear remote_desc.
6631
6632 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6633
6634 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6635 New fields.
6636 (mourn_inferior): Define.
6637 (target_process_qsupported): Avoid the dangling else problem.
6638 (thread_stopped): Define.
6639 (pause_all): Define.
6640 (target_waitstatus_to_string): Declare.
6641 * target.c (target_waitstatus_to_string): New.
6642
6643 * tracepoint.c (tracing): Make extern.
6644 (disconnected_tracing): New.
6645 (stop_tracing): Make extern. Handle tracing stops due to GDB
6646 disconnecting.
6647 (cmd_qtdisconnected): New.
6648 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6649 (handle_tracepoint_general_set): Handle QTDisconnected.
6650
6651 * event-loop.c (event_handler_func): Change return type to int.
6652 (process_event): Bail out if the event handler wants the event
6653 loop to stop.
6654 (handle_file_event): Ditto.
6655 (start_event_loop): Bail out if the event handler wants the event
6656 loop to stop.
6657
6658 * nto-low.c (nto_target_ops): Adjust.
6659 * spu-low.c (spu_wait): Don't remove the process here.
6660 (spu_target_ops): Adjust.
6661 * win32-low.c (win32_wait): Don't remove the process here.
6662 (win32_target_ops): Adjust.
6663
6664 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6665
6666 * regcache.c (realloc_register_cache): Invalidate inferior's
6667 regcache before recreating it.
6668
6669 2010-04-09 Pedro Alves <pedro@codesourcery.com>
6670
6671 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6672
6673 2010-04-09 Stan Shebs <stan@codesourcery.com>
6674 Pedro Alves <pedro@codesourcery.com>
6675
6676 * server.h (LONGEST): New.
6677 (struct thread_info) <while_stepping>: New field.
6678 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6679 Declare.
6680 (initialize_tracepoint, handle_tracepoint_general_set)
6681 (handle_tracepoint_query, tracepoint_finished_step)
6682 (tracepoint_was_hit, release_while_stepping_state_list):
6683 (current_traceframe): Declare.
6684 * server.c (handle_general_set): Handle tracepoint packets.
6685 (read_memory): New.
6686 (write_memory): New.
6687 (handle_search_memory_1): Use read_memory.
6688 (handle_query): Report support for conditional tracepoints, trace
6689 state variables, and tracepoint sources. Handle tracepoint
6690 queries.
6691 (main): Initialize the tracepoints module.
6692 (process_serial_event): Handle traceframe reads/writes.
6693
6694 * linux-low.c (handle_tracepoints): New.
6695 (linux_wait_1): Call it.
6696 (linux_resume_one_lwp): Handle while-stepping.
6697 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6698 (linux_target_ops): Install them.
6699 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6700 New field.
6701 * linux-x86-low.c (x86_supports_tracepoints): New.
6702 (the_low_target). Install it.
6703
6704 * mem-break.h (delete_breakpoint): Declare.
6705 * mem-break.c (delete_breakpoint): Make external.
6706
6707 * target.h (struct target_ops): Add `supports_tracepoints',
6708 `read_pc', and `write_pc' fields.
6709 (target_supports_tracepoints): Define.
6710 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6711 (phex_nz): New.
6712
6713 * regcache.h (struct regcache) <registers_owned>: New field.
6714 (init_register_cache, regcache_cpy): Declare.
6715 (regcache_read_pc, regcache_write_pc): Declare.
6716 (register_cache_size): Declare.
6717 (supply_regblock): Declare.
6718 * regcache.c (init_register_cache): New.
6719 (new_register_cache): Use it.
6720 (regcache_cpy): New.
6721 (register_cache_size): New.
6722 (supply_regblock): New.
6723 (regcache_read_pc, regcache_write_pc): New.
6724
6725 * tracepoint.c: New.
6726
6727 * Makefile.in (OBS): Add tracepoint.o.
6728 (tracepoint.o): New rule.
6729
6730 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6731
6732 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6733 (i386-mmx.o): New.
6734 (i386-mmx.c): Likewise.
6735 (i386-mmx-linux.o): Likewise.
6736 (i386-mmx-linux.c): Likewise.
6737
6738 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6739 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6740 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6741 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6742
6743 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6744 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6745 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6746
6747 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6748
6749 * Makefile.in (clean): Updated.
6750 (i386-avx.o): New.
6751 (i386-avx.c): Likewise.
6752 (i386-avx-linux.o): Likewise.
6753 (i386-avx-linux.c): Likewise.
6754 (amd64-avx.o): Likewise.
6755 (amd64-avx.c): Likewise.
6756 (amd64-avx-linux.o): Likewise.
6757 (amd64-avx-linux.c): Likewise.
6758
6759 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6760 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6761 (srv_amd64_regobj): Add amd64-avx.o.
6762 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6763 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6764 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6765 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6766 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6767 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6768 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6769
6770 * i387-fp.c: Include "i386-xstate.h".
6771 (i387_xsave): New.
6772 (i387_cache_to_xsave): Likewise.
6773 (i387_xsave_to_cache): Likewise.
6774 (x86_xcr0): Likewise.
6775
6776 * i387-fp.h (i387_cache_to_xsave): Likewise.
6777 (i387_xsave_to_cache): Likewise.
6778 (x86_xcr0): Likewise.
6779
6780 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6781 * linux-crisv32-low.c (target_regsets): Likewise.
6782 * linux-m68k-low.c (target_regsets): Likewise.
6783 * linux-mips-low.c (target_regsets): Likewise.
6784 * linux-ppc-low.c (target_regsets): Likewise.
6785 * linux-s390-low.c (target_regsets): Likewise.
6786 * linux-sh-low.c (target_regsets): Likewise.
6787 * linux-sparc-low.c (target_regsets): Likewise.
6788 * linux-xtensa-low.c (target_regsets): Likewise.
6789
6790 * linux-low.c: Include <sys/uio.h>.
6791 (regsets_fetch_inferior_registers): Support nt_type.
6792 (regsets_store_inferior_registers): Likewise.
6793 (linux_process_qsupported): New.
6794 (linux_target_ops): Add linux_process_qsupported.
6795
6796 * linux-low.h (regset_info): Add nt_type.
6797 (linux_target_ops): Add process_qsupported.
6798
6799 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6800 and <sys/uio.h>.
6801 (init_registers_i386_avx_linux): New.
6802 (init_registers_amd64_avx_linux): Likewise.
6803 (xmltarget_i386_linux_no_xml): Likewise.
6804 (xmltarget_amd64_linux_no_xml): Likewise.
6805 (PTRACE_GETREGSET): Likewise.
6806 (PTRACE_SETREGSET): Likewise.
6807 (x86_fill_xstateregset): Likewise.
6808 (x86_store_xstateregset): Likewise.
6809 (use_xml): Likewise.
6810 (x86_linux_update_xmltarget): Likewise.
6811 (x86_linux_process_qsupported): Likewise.
6812 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6813 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6814 init_registers_i386_linux here. Call
6815 x86_linux_update_xmltarget.
6816 (the_low_target): Add x86_linux_process_qsupported.
6817
6818 * server.c (handle_query): Call target_process_qsupported.
6819
6820 * target.h (target_ops): Add process_qsupported.
6821 (target_process_qsupported): New.
6822
6823 2010-04-03 Pedro Alves <pedro@codesourcery.com>
6824
6825 * inferiors.c (add_thread): Set last_status kind to
6826 TARGET_WAITKIND_IGNORE.
6827 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6828 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6829 (linux_wait_1): Move `thread' local definition to block that uses
6830 it. Don't NULL initialize `event_child'.
6831 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6832 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6833 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6834
6835 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6836
6837 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6838 an extended waitstatus, or by a watchpoint.
6839 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6840 thread was stepping or has been stopped by a watchpoint.
6841
6842 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6843
6844 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6845 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6846 of another, then delete the previous, and validate all
6847 breakpoints.
6848 (validate_inserted_breakpoint): New.
6849 (delete_disabled_breakpoints): New.
6850 (validate_breakpoints): New.
6851 (check_mem_read): Validate breakpoints before trusting their
6852 shadow. Delete disabled breakpoints.
6853 (check_mem_write): Validate breakpoints before trusting they
6854 should be inserted. Delete disabled breakpoints.
6855 * mem-break.h (validate_breakpoints):
6856 * server.c (handle_query): Validate breakpoints when we see a
6857 qSymbol query.
6858
6859 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6860
6861 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6862 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6863 if we could tell there's a GDB breakpoint at stop_pc.
6864 (need_step_over_p): Don't do a step over if we find a GDB
6865 breakpoint at the resume PC.
6866
6867 * mem-break.c (struct raw_breakpoint): New.
6868 (enum bkpt_type): New type `gdb_breakpoint'.
6869 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6870 fields. New field `raw'.
6871 (find_raw_breakpoint_at): New.
6872 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6873 breakpoint instead.
6874 (set_breakpoint_at): Adjust.
6875 (delete_raw_breakpoint): New.
6876 (release_breakpoint): New.
6877 (delete_breakpoint): Rename to...
6878 (delete_breakpoint_1): ... this. Add proc parameter. Use
6879 release_breakpoint. Return ENOENT.
6880 (delete_breakpoint): Reimplement.
6881 (find_breakpoint_at): Delete.
6882 (find_gdb_breakpoint_at): New.
6883 (delete_breakpoint_at): Delete.
6884 (set_gdb_breakpoint_at): New.
6885 (delete_gdb_breakpoint_at): New.
6886 (gdb_breakpoint_here): New.
6887 (set_reinsert_breakpoint): Use release_breakpoint.
6888 (uninsert_breakpoint): Rename to ...
6889 (uninsert_raw_breakpoint): ... this.
6890 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6891 (reinsert_raw_breakpoint): Change parameter type to
6892 raw_breakpoint.
6893 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6894 instead.
6895 (check_breakpoints): Adjust. Use release_breakpoint.
6896 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6897 (breakpoint_inserted_here): Ditto.
6898 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6899 Don't trust the breakpoint's shadow if it is not inserted.
6900 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6901 (delete_all_breakpoints): Adjust.
6902 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6903 use delete_breakpoint_1.
6904
6905 * mem-break.h (breakpoints_supported): Delete declaration.
6906 (set_gdb_breakpoint_at): Declare.
6907 (gdb_breakpoint_here): Declare.
6908 (delete_breakpoint_at): Delete.
6909 (delete_gdb_breakpoint_at): Declare.
6910
6911 * server.h (struct raw_breakpoint): Forward declare.
6912 (struct process_info): New field `raw_breakpoints'.
6913
6914 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6915 breakpoints.
6916
6917 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6918
6919 * linux-low.c (status_pending_p_callback): Fix comment.
6920 (linux_wait_for_event_1): Move most of the internal breakpoint
6921 handling from here...
6922 (linux_wait_1): ... to here.
6923 (count_events_callback): New.
6924 (select_singlestep_lwp_callback): New.
6925 (select_event_lwp_callback): New.
6926 (cancel_breakpoints_callback): New.
6927 (select_event_lwp): New.
6928 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6929 priority to all LWPs that have had events that should be reported
6930 to the client. Cancel breakpoints when about to reporting the
6931 event to the client, not while stopping lwps. No longer cancel
6932 finished single-steps here.
6933 (cancel_finished_single_step): Delete.
6934 (cancel_finished_single_steps): Delete.
6935
6936 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6937
6938 * mem-break.c (enum bkpt_type): New.
6939 (struct breakpoint): New field `type'.
6940 (set_breakpoint_at): Change return type to struct breakpoint
6941 pointer. Set type to `other_breakpoint' by default.
6942 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6943 in the breakpoint list.
6944 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6945 (reinsert_breakpoint): Rename to ...
6946 (reinsert_raw_breakpoint): ... this.
6947 (reinsert_breakpoints_at): Adjust.
6948 * mem-break.h (struct breakpoint): Declare.
6949 (set_breakpoint_at): Change return type to struct breakpoint
6950 pointer.
6951
6952 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6953
6954 * server.c (handle_query): Assign, not compare.
6955
6956 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6957
6958 Teach linux gdbserver to step-over-breakpoints.
6959
6960 * linux-low.c (can_hardware_single_step): New.
6961 (supports_breakpoints): New.
6962 (handle_extended_wait): If stopping threads, read the stop pc of
6963 the new cloned LWP.
6964 (get_pc): New.
6965 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6966 low target doesn't support retrieving the PC.
6967 (add_lwp): Set last_resume_kind to resume_continue.
6968 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6969 (linux_attach): Don't clear stop_expected. Set the lwp's
6970 last_resume_kind to resume_stop.
6971 (linux_detach_one_lwp): Don't check for removed breakpoints.
6972 (check_removed_breakpoint): Delete.
6973 (status_pending_p): Rename to ...
6974 (status_pending_p_callback): ... this. Don't check for removed
6975 breakpoints. Don't consider threads that are stopped from GDB's
6976 perspective.
6977 (linux_wait_for_lwp): Always read the stop_pc here.
6978 (cancel_breakpoint): New.
6979 (step_over_bkpt): New global.
6980 (linux_wait_for_event_1): Implement stepping over breakpoints.
6981 (gdb_wants_lwp_stopped): New.
6982 (gdb_wants_all_stopped): New.
6983 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6984 single-step traps here. Store the thread's last reported target
6985 wait status.
6986 (send_sigstop): Don't clear stop_expected. Always set it,
6987 instead.
6988 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6989 (cancel_finished_single_step): New.
6990 (cancel_finished_single_steps): New.
6991 (wait_for_sigstop): Don't cancel finished single-step traps here.
6992 (linux_resume_one_lwp): Don't check for removed breakpoints.
6993 Don't set `step' on non-hardware step archs.
6994 (linux_set_resume_request): Ignore resume_stop requests if already
6995 stopping or stopped. Set the lwp's last_resume_kind.
6996 (resume_status_pending_p): Don't check for removed breakpoints.
6997 (need_step_over_p): New.
6998 (start_step_over): New.
6999 (finish_step_over): New.
7000 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7001 requests. Clear the thread's last reported target waitstatus.
7002 Don't use the `suspended' flag. Don't consider pending breakpoints.
7003 (linux_resume): Start a step-over if necessary.
7004 (proceed_one_lwp): New.
7005 (proceed_all_lwps): New.
7006 (unstop_all_lwps): New.
7007 * linux-low.h (struct lwp_info): Rewrite comment for the
7008 `suspended' flag. Add the `stop_pc' field. Delete the
7009 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7010 Add `'last_resume_kind' and `need_step_over' fields.
7011 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7012 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7013 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7014 (set_raw_breakpoint_at): New.
7015 (set_breakpoint_at): Rewrite to use it.
7016 (reinsert_breakpoint_handler): Delete.
7017 (set_reinsert_breakpoint): New.
7018 (reinsert_breakpoint_by_bp): Delete.
7019 (delete_reinsert_breakpoints): New.
7020 (uninsert_breakpoint): Rewrite.
7021 (uninsert_breakpoints_at): New.
7022 (reinsert_breakpoint): Rewrite.
7023 (reinsert_breakpoints_at): New.
7024 (check_breakpoints): Rewrite.
7025 (breakpoint_here): New.
7026 (breakpoint_inserted_here): New.
7027 (check_mem_read): Adjust.
7028 * mem-break.h (breakpoints_supported, breakpoint_here)
7029 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7030 (reinsert_breakpoint_by_bp): Delete declaration.
7031 (delete_reinsert_breakpoints): Declare.
7032 (reinsert_breakpoint): Delete declaration.
7033 (reinsert_breakpoints_at): Declare.
7034 (uninsert_breakpoint): Delete declaration.
7035 (uninsert_breakpoints_at): Declare.
7036 (check_breakpoints): Adjust prototype.
7037 * server.h: Adjust include order.
7038 (struct thread_info): Declare here. Add a `last_status' field.
7039
7040 2010-03-23 Michael Snyder <msnyder@vmware.com>
7041
7042 * server.c (crc32): New function.
7043 (handle_query): Add handling for 'qCRC:' request.
7044
7045 2010-03-23 Pedro Alves <pedro@codesourcery.com>
7046
7047 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7048 lwp had been stopped by a watchpoint.
7049
7050 2010-03-16 Pedro Alves <pedro@codesourcery.com>
7051
7052 * server.h (internal_error): Declare.
7053 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7054 * utils.c (internal_error): New function.
7055
7056 2010-03-15 Andreas Schwab <schwab@redhat.com>
7057
7058 * configure.srv: Fix typo setting srv_regobj.
7059
7060 2010-03-15 Pedro Alves <pedro@codesourcery.com>
7061
7062 * linux-low.c (fetch_register): Avoid passing a non string literal
7063 format to `error'.
7064 (usr_store_inferior_registers): Ditto.
7065
7066 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7067
7068 * linux-low.c (linux_write_memory): Bail out early if peeking
7069 memory failed.
7070
7071 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7072
7073 * linux-low.h (struct lwp_info): New fields
7074 `stopped_by_watchpoint' and `stopped_data_address'.
7075 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7076 here, and cache them in the lwp object.
7077 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7078 directly.
7079 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7080 field.
7081 (linux_stopped_by_watchpoint): Rewrite.
7082 (linux_stopped_data_address): Rewrite.
7083
7084 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
7085
7086 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7087 switching the current inferior, not before.
7088
7089 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7090
7091 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7092 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7093 i386-linux.c and amd64-linux.c.
7094 (reg-i386.o): Removed.
7095 (reg-i386.c): Likewise.
7096 (reg-i386-linux.o): Likewise.
7097 (reg-i386-linux.c): Likewise.
7098 (reg-x86-64.o): Likewise.
7099 (reg-x86-64.c): Likewise.
7100 (reg-x86-64-linux.o): Likewise.
7101 (reg-x86-64-linux.c): Likewise.
7102 (i386.o): New.
7103 (i386.c): Likewise.
7104 (i386-linux.o): Likewise.
7105 (i386-linux.c): Likewise.
7106 (amd64.o): Likewise.
7107 (amd64.c): Likewise.
7108 (amd64-linux.o): Likewise.
7109 (amd64-linux.c): Likewise.
7110
7111 * configure.srv (srv_i386_regobj): New.
7112 (srv_i386_linux_regobj): Likewise.
7113 (srv_amd64_regobj): Likewise.
7114 (srv_amd64_linux_regobj): Likewise.
7115 (srv_i386_32bit_xmlfiles): Likewise.
7116 (srv_i386_64bit_xmlfiles): Likewise.
7117 (srv_i386_xmlfiles): Likewise.
7118 (srv_amd64_xmlfiles): Likewise.
7119 (srv_i386_linux_xmlfiles): Likewise.
7120 (srv_amd64_linux_xmlfiles): Likewise.
7121 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7122 srv_xmlfiles to $srv_i386_xmlfiles.
7123 (i[34567]86-*-mingw32ce*): Likewise.
7124 (i[34567]86-*-mingw*): Likewise.
7125 (i[34567]86-*-nto*): Likewise.
7126 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7127 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7128 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7129 (x86_64-*-linux*): Likewise.
7130
7131 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7132 (init_registers_amd64_linux): New.
7133 (x86_arch_setup): Replace init_registers_x86_64_linux with
7134 init_registers_amd64_linux.
7135
7136 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7137
7138 * configure.ac: Check for libdl. If it is not available link against
7139 static libthread_db.
7140 * configure: Regenerate.
7141
7142 2010-02-22 Pedro Alves <pedro@codesourcery.com>
7143
7144 PR9605
7145
7146 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7147 handing a read watchpoint.
7148 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7149
7150 2010-02-12 Doug Evans <dje@google.com>
7151
7152 * linux-low.c (linux_supports_tracefork_flag): Document.
7153 (linux_look_up_symbols): Add comment.
7154
7155 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7156
7157 * regcache.c (supply_register): Clear regcache if buf is NULL.
7158
7159 2010-02-02 Nicolas Roche <roche@sourceware.org>
7160 Joel Brobecker <brobecker@adacore.com>
7161
7162 * inferiors.c (find_inferior): Add function documentation.
7163 (unloaded_dll): Handle the case where the unloaded dll has not
7164 been previously registered in the dll list.
7165
7166 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7167
7168 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7169 (thumb2_breakpoint): New.
7170 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7171
7172 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7173
7174 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7175 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7176 breakpoints.
7177
7178 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7179
7180 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7181
7182 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7183
7184 * linux-s390-low.c (s390_collect_ptrace_register)
7185 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7186
7187 2010-01-21 Doug Evans <dje@google.com>
7188
7189 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7190 (PTRACE_ARG4_TYPE): New macro.
7191 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7192 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7193 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7194 (usr_store_inferior_registers): Ditto.
7195 (linux_read_memory, linux_write_memory): Ditto.
7196 (linux_test_for_tracefork): Ditto.
7197
7198 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7199 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7200
7201 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7202
7203 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7204 target.
7205
7206 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7207
7208 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7209 prototype to take a regcache. Adjust.
7210
7211 2010-01-20 Pedro Alves <pedro@codesourcery.com>
7212
7213 * regcache.h (struct thread_info): Forward declare.
7214 (struct regcache): New.
7215 (new_register_cache): Adjust prototype.
7216 (get_thread_regcache): Declare.
7217 (free_register_cache): Adjust prototype.
7218 (registers_to_string, registers_from_string): Ditto.
7219 (supply_register, supply_register_by_name, collect_register)
7220 (collect_register_as_string, collect_register_by_name): Ditto.
7221 * regcache.c (struct inferior_regcache_data): Delete.
7222 (get_regcache): Rename to ...
7223 (get_thread_regcache): ... this. Adjust. Switch inferior before
7224 fetching registers.
7225 (regcache_invalidate_one): Adjust.
7226 (regcache_invalidate): Fix prototype.
7227 (new_register_cache): Return the new register cache.
7228 (free_register_cache): Change prototype.
7229 (realloc_register_cache): Adjust.
7230 (registers_to_string): Change prototype to take a regcache. Adjust.
7231 (registers_from_string): Ditto.
7232 (register_data): Ditto.
7233 (supply_register): Ditto.
7234 (supply_register_by_name): Ditto.
7235 (collect_register): Ditto.
7236 (collect_register_as_string): Ditto.
7237 (collect_register_by_name): Ditto.
7238 * server.c (process_serial_event): Adjust.
7239 * linux-low.h (regset_fill_func, regset_store_func): Change
7240 prototype.
7241 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7242 Change prototype.
7243 * linux-low.c (get_stop_pc): Adjust.
7244 (check_removed_breakpoint): Adjust.
7245 (linux_wait_for_event): Adjust.
7246 (linux_resume_one_lwp): Adjust.
7247 (fetch_register): Add regcache parameter. Adjust.
7248 (usr_store_inferior_registers): Ditto.
7249 (regsets_fetch_inferior_registers): Ditto.
7250 (regsets_store_inferior_registers): Ditto.
7251 (linux_fetch_registers, linux_store_registers): Ditto.
7252 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7253 regcache. Adjust.
7254 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7255 Ditto.
7256 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7257 prototype to take a regcache.
7258 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7259 * remote-utils.c (convert_ascii_to_int, outreg)
7260 (prepare_resume_reply): Change prototype to take a regcache.
7261 Adjust.
7262 * target.h (struct target_ops) <fetch_registers, store_registers>:
7263 Change prototype to take a regcache.
7264 (fetch_inferior_registers, store_inferior_registers): Change
7265 prototype to take a regcache. Adjust.
7266 * proc-service.c (ps_lgetregs): Adjust.
7267 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7268 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7269 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7270 take a regcache. Adjust.
7271 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7272 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7273 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7274 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7275 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7276 (cris_cannot_fetch_register):
7277 (cris_breakpoint_at): Change prototype to take a regcache.
7278 Adjust.
7279 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7280 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7281 to take a regcache. Adjust.
7282 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7283 Adjust.
7284 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7285 take a regcache. Adjust.
7286 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7287 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7288 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7289 * linux-mips-low.c (mips_get_pc):
7290 (mips_set_pc): Change prototype to take a regcache. Adjust.
7291 (mips_reinsert_addr): Adjust.
7292 (mips_collect_register): Change prototype to take a regcache.
7293 Adjust.
7294 (mips_supply_register):
7295 (mips_collect_register_32bit, mips_supply_register_32bit)
7296 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7297 (mips_store_fpregset): Ditto.
7298 * linux-ppc-low.c (ppc_supply_ptrace_register)
7299 (ppc_supply_ptrace_register): Ditto.
7300 (parse_spufs_run): Adjust.
7301 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7302 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7303 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7304 take a regcache. Adjust.
7305 * linux-s390-low.c (s390_collect_ptrace_register)
7306 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7307 (s390_set_pc): Change prototype to take a regcache. Adjust.
7308 (s390_arch_setup): Adjust.
7309 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7310 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7311 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7312 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7313 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7314 regcache. Adjust.
7315 (sparc_breakpoint_at): Adjust.
7316 * linux-xtensa-low.c (xtensa_fill_gregset):
7317 (xtensa_store_gregset):
7318 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7319 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7320 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7321 prototype to take a regcache. Adjust.
7322 * win32-arm-low.c (arm_fetch_inferior_register)
7323 (arm_store_inferior_register): Change prototype to take a
7324 regcache. Adjust.
7325 * win32-i386-low.c (i386_fetch_inferior_register)
7326 (i386_store_inferior_register): Change prototype to take a
7327 regcache. Adjust.
7328 * win32-low.c (child_fetch_inferior_registers)
7329 (child_store_inferior_registers): Change prototype to take a
7330 regcache. Adjust.
7331 (win32_wait): Adjust.
7332 (win32_fetch_inferior_registers): Change prototype to take a
7333 regcache. Adjust.
7334 (win32_store_inferior_registers): Adjust.
7335 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7336 store_inferior_register>: Change prototype to take a regcache.
7337
7338 2010-01-20 Doug Evans <dje@google.com>
7339
7340 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7341 #ifdef.
7342 (linux_wait_for_event1, linux_init_signals): Ditto.
7343 (W_STOPCODE): Provide definition if missing.
7344
7345 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7346
7347 * linux-low.c (linux_core_of_thread): New.
7348 (compare_ints, show_process, list_threads): New.
7349 (linux_qxfer_osdata): Report threads and cores.
7350 (linux_target_op): Register linux_core_of_thread.
7351 * remote-utils.c (prepare_resume_reply): Report the core.
7352 (buffer_xml_printf): Support %d specifier.
7353 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7354 New.
7355 (handle_query): Handle qXfer:threads. Announce availability
7356 thereof.
7357 * target.h (struct target_ops): New field core_of_thread.
7358
7359 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7360
7361 * Makefile.in (clean): Remove new generated files.
7362 (reg-s390.o, reg-s390.c): Remove rules.
7363 (reg-s390x.o, reg-s390x.c): Likewise.
7364 (s390-linux32.o, s390-linux32.c): Add rules.
7365 (s390-linux64.o, s390-linux64.c): Likewise.
7366 (s390x-linux64.o, s390x-linux64.c): Likewise.
7367 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7368 * linux-s390-low.c: Include <elf.h>.
7369 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7370 (init_registers_s390): Remove prototype.
7371 (init_registers_s390x): Likewise.
7372 (init_registers_s390_linux32): Add prototype.
7373 (init_registers_s390_linux64): Likewise.
7374 (init_registers_s390x_linux64): Likewise.
7375 (s390_num_regs_3264): New define.
7376 (s390_regmap_3264): New global variable.
7377 (s390_cannot_fetch_register): Remove obsolete check.
7378 (s390_cannot_store_register): Likewise.
7379 (s390_collect_ptrace_register): Handle upper/lower register halves.
7380 (s390_supply_ptrace_register): Likewise.
7381 (s390_fill_gregset): Update to register number changes.
7382 (s390_get_hwcap): New routine.
7383 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7384 Install appropriate regmap and register set.
7385
7386 2010-01-01 Joel Brobecker <brobecker@adacore.com>
7387
7388 * server.c (gdbserver_version): Update copyright year to 2010.
7389 * gdbreplay.c (gdbreplay_version): Likewise.
7390
7391 2009-12-28 Doug Evans <dje@google.com>
7392
7393 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7394 elf/external.h. Include <elf.h> instead but only if necessary.
7395
7396 2009-12-28 Pedro Alves <pedro@codesourcery.com>
7397
7398 * linux-low.c (linux_remove_process): Remove `detaching'
7399 parameter. Don't release/detach from thread_db here.
7400 (linux_kill): Release/detach from thread_db here, ...
7401 (linux_detach): ... and here, before actually detaching.
7402 (linux_wait_1): ... and here, when a process exits.
7403 * thread-db.c (any_thread_of): New.
7404 (thread_db_free): Switch the current inferior to a thread of the
7405 passed in process.
7406
7407 2009-12-21 Doug Evans <dje@google.com>
7408
7409 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7410
7411 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7412 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7413 warning ifndef __NR_tkill. Move setting of errno there too.
7414 Delete unnecessary resetting of errno after syscall.
7415 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7416
7417 * configure.ac: Check for dladdr.
7418 * config.in: Regenerate.
7419 * configure: Regenerate.
7420 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7421 (try_thread_db_load): Update.
7422
7423 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7424
7425 2009-12-18 Doug Evans <dje@google.com>
7426
7427 * event-loop.c: Include unistd.h if it exists.
7428
7429 * linux-low.c (my_waitpid): Move definition away from being in
7430 between linux_tracefork_child/linux_test_for_tracefork.
7431
7432 * gdb_proc_service.h (psaddr_t): Fix type.
7433 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7434 signature to match glibc.
7435
7436 2009-12-16 Doug Evans <dje@google.com>
7437
7438 * linux-low.c (linux_read_memory): Fix argument to read.
7439
7440 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7441
7442 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7443 events, don't leave current_inferior pointing at null.
7444
7445 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7446
7447 * win32-low.c (LOG): Delete.
7448 (OUTMSG): Output to stderr.
7449 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7450 on compile time LOG macro.
7451 (win32_wait): Fix debug output.
7452
7453 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7454
7455 * win32-low.c (win32_add_one_solib): If the dll name is
7456 "ntdll.dll", prepend the system directory to the dll path.
7457
7458 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7459
7460 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7461
7462 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
7463 Vladimir Prus <vladimir@codesourcery.com>
7464
7465 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7466 * configure.ac: Check for __mcoldfire__ and set
7467 gdb_cv_m68k_is_coldfire.
7468 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7469 reg-cf.o and reg-m68k.o.
7470 * configure: Regenerated.
7471
7472 2009-11-16 Pedro Alves <pedro@codesourcery.com>
7473
7474 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7475 Pass it to thread_db_free.
7476 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7477 proper `detaching' argument to linux_remove_process.
7478 * linux-low.h (thread_db_free): Add `detaching' parameter.
7479 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7480 to thread_db_free.
7481 (thread_db_free): Add `detaching' parameter. Only
7482 call td_ta_clear_event if detaching from process.
7483
7484 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7485
7486 * thread-db.c (thread_db_free): Fix typo.
7487
7488 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7489
7490 PR gdb/10838
7491 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7492
7493 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7494
7495 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7496 with an i686 compiler.
7497 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7498 needed.
7499 * configure: Rebuilt.
7500
7501 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7502
7503 PR gdb/10783
7504
7505 * server.c (handle_search_memory_1): Correct read_addr initialization
7506 in loop for searching subsequent chunks.
7507
7508 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7509
7510 * configure.ac: New --with-libthread-db option.
7511 * thread-db.c: Allow direct dependence on libthread_db.
7512 (thread_db_free): Adjust.
7513 * config.in: Regenerate.
7514 * configure: Likewise.
7515
7516 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7517
7518 PR gdb/10757
7519 * thread-db.c (attach_thread): New function.
7520 (maybe_attach_thread): Return success/failure.
7521 (find_new_threads_callback): Adjust.
7522 (thread_db_find_new_threads): Loop until no new threads.
7523
7524 2009-10-13 Pedro Alves <pedro@codesourcery.com>
7525
7526 * proc-service.c (ps_lgetregs): Formatting.
7527
7528 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7529
7530 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7531 * configure.ac: Adjust.
7532 * linux-low.h (struct process_info_private): Move members to struct
7533 thread_db.
7534 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7535 * linux-low.c (linux_remove_process): Adjust.
7536 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7537 * server.c (handle_query): Move code ...
7538 (handle_monitor_command): ... here. New function.
7539 * target.h (struct target_ops): New member.
7540 * thread-db.c (struct thread_db): New.
7541 (libthread_db_search_path): New variable.
7542 (thread_db_create_event, thread_db_enable_reporting)
7543 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7544 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7545 (try_thread_db_load_1, dladdr_to_soname): New functions.
7546 (try_thread_db_load, thread_db_load_search): New functions.
7547 (thread_db_init): Search for libthread_db.
7548 (thread_db_free): New function.
7549 (thread_db_handle_monitor_command): Likewise.
7550 * config.in: Regenerate.
7551 * configure: Regenerate.
7552
7553 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7554
7555 * spu-low.c (spu_kill): Wait for inferior to terminate.
7556 Call clear_inferiors.
7557 (spu_detach): Call clear_inferiors.
7558
7559 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7560
7561 * aclocal.m4: Regenerate.
7562 * config.in: Likewise.
7563 * configure: Likewise.
7564
7565 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7566
7567 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7568 (parse_spufs_run): New function.
7569 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7570 (ppc_breakpoint_at): Handle SPU breakpoints.
7571
7572 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7573
7574 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7575 (SPUFS_MAGIC): Define.
7576 (spu_enumerate_spu_ids): New function.
7577 (linux_qxfer_spu): New function.
7578 (linux_target_ops): Install linux_qxfer_spu.
7579
7580 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7581
7582 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7583 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7584 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7585 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7586 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7587 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7588 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7589 (init_registers_powerpc_cell32l): Add prototype.
7590 (init_registers_powerpc_cell64l): Likewise.
7591 (ppc_arch_setup): Detect Cell/B.E. architecture.
7592
7593 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7594
7595 * Makefile.in (datarootdir): New variable.
7596
7597 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7598
7599 * linux-low.c (linux_write_memory): Update debugging output.
7600 * Makefile.in (clean): Add new descriptions.
7601 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7602 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7603 * configure.srv: Add new files for arm*-*-linux*.
7604 * linux-arm-low.c: Add new declarations.
7605 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7606 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7607 (HWCAP_VFPv3D16): New.
7608 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7609 instead of __IWMMXT__.
7610 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7611 (arm_arch_setup): New.
7612 (target_regsets): Remove #ifdef. Add VFP regset.
7613 (the_low_target): Use arm_arch_setup.
7614
7615 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7616
7617 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7618 the main thread again.
7619
7620 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7621
7622 Adding Neutrino gdbserver.
7623 * configure: Regenerated.
7624 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7625 * configure.srv (i[34567]86-*-nto*): New target.
7626 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7627 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7628 (nto_comctrl) [__QNX__]: New function.
7629 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7630
7631 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7632
7633 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7634 srv_tgtobj.
7635
7636 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7637 Pedro Alves <pedro@codesourcery.com>
7638
7639 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7640 don't support CONTEXT_EXTENDED_REGISTERS.
7641 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7642 (the_low_target): Install them.
7643 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7644 failing with ERROR_PIPE_NOT_CONNECTED.
7645
7646 2009-06-30 Doug Evans <dje@google.com>
7647 Pierre Muller <muller@ics.u-strasbg.fr>
7648
7649 Add h/w watchpoint support to x86-linux, win32-i386.
7650 * Makefile.in (SFILES): Add i386-low.c
7651 (i386_low_h): Define.
7652 (i386-low.o): Add dependencies.
7653 (linux-x86-low.o): Add i386-low.h dependency.
7654 (win32-i386-low.o): Ditto.
7655 * i386-low.c: New file.
7656 * i386-low.h: New file.
7657 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7658 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7659 * linux-low.c (linux_add_process): Initialize arch_private.
7660 (linux_remove_process): Free arch_private.
7661 (add_lwp): Initialize arch_private.
7662 (delete_lwp): Free arch_private.
7663 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7664 provided.
7665 * linux-low.h (process_info_private): New member arch_private.
7666 (lwp_info): New member arch_private.
7667 (linux_target_ops): New members new_process, new_thread,
7668 prepare_to_resume.
7669 (ptid_of): New macro.
7670 * linux-x86-low.c: Include stddef.h, i386-low.h.
7671 (arch_process_info): New struct.
7672 (arch_lwp_info): New struct.
7673 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7674 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7675 (i386_dr_low_get_status): New function.
7676 (x86_insert_point, x86_remove_point): New functions.
7677 (x86_stopped_by_watchpoint): New function.
7678 (x86_stopped_data_address): New function.
7679 (x86_linux_new_process, x86_linux_new_thread): New functions.
7680 (x86_linux_prepare_to_resume): New function.
7681 (the_low_target): Add entries for insert_point, remove_point,
7682 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7683 prepare_to_resume.
7684 * server.c (debug_hw_points): New global.
7685 (monitor_show_help): Document set debug-hw-points.
7686 (handle_query): Process "set debug-hw-points".
7687 * server.h (debug_hw_points): Declare.
7688 (paddress): Declare.
7689 * utils.c (NUMCELLS, CELLSIZE): New macros.
7690 (get_sell, xsnprintf, paddress): New functions.
7691 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7692 remove_point, stopped_by_watchpoint, stopped_data_address.
7693 * win32-i386-low.c: Include i386-low.h.
7694 (debug_reg_state): Replaces dr.
7695 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7696 (i386_dr_low_get_status): New function.
7697 (i386_insert_point, i386_remove_point): New functions.
7698 (i386_stopped_by_watchpoint): New function.
7699 (i386_stopped_data_address): New function.
7700 (i386_initial_stuff): Update.
7701 (get_thread_context,set_thread_context,i386_thread_added): Update.
7702 (the_low_target): Add entries for insert_point,
7703 remove_point, stopped_by_watchpoint, stopped_data_address.
7704 * win32-low.c (win32_insert_watchpoint): New function.
7705 (win32_remove_watchpoint): New function.
7706 (win32_stopped_by_watchpoint): New function.
7707 (win32_stopped_data_address): New function.
7708 (win32_target_ops): Add entries for insert_watchpoint,
7709 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7710 * win32-low.h (win32_target_ops): New members insert_point,
7711 remove_point, stopped_by_watchpoint, stopped_data_address.
7712
7713 2009-06-25 Pedro Alves <pedro@codesourcery.com>
7714
7715 * server.c (process_serial_event): Re-return unsupported, not
7716 error, if the type isn't recognized. Re-allow supporting only
7717 insert or remove packets. Also call require_running for
7718 breakpoints. Add missing break statement to default case. Tidy.
7719 * target.h (struct target_ops): Rename insert_watchpoint to
7720 insert_point, and remove_watchpoint to remove_point.
7721
7722 * linux-low.h (struct linux_target_ops): Likewise.
7723 * linux-low.c (linux_insert_watchpoint): Rename to ...
7724 (linux_insert_point): ... this. Adjust.
7725 (linux_remove_watchpoint): Rename to ...
7726 (linux_remove_point): ... this. Adjust.
7727 (linux_target_ops): Adjust.
7728 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7729 (cris_insert_point): ... this.
7730 (cris_remove_watchpoint): Rename to ...
7731 (cris_remove_point): ... this.
7732 (the_low_target): Adjust.
7733
7734 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7735
7736 * server.c (handle_v_kill): Pass signal_pid to
7737 kill_inferior if multi_process is zero.
7738
7739 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7740
7741 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7742 * target.h (target_ops): Comment for *_watchpoint to make it clear
7743 the functions can get types '0' and '1'.
7744
7745 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7746
7747 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7748 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7749 * regcache.c (get_regcache): Likewise.
7750 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7751 * win32-low.c (child_fetch_inferior_registers): Remove check for
7752 regno 0.
7753
7754 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7755 Pedro Alves <pedro@codesourcery.com>
7756
7757 * target.h (struct target_ops) <supports_multi_process>: New
7758 callback.
7759 (target_supports_multi_process): New.
7760 * server.c (handle_query): Even if GDB reports support, only
7761 enable multi-process if the target also supports it. Report
7762 multi-process support only if the target backend supports it.
7763 * linux-low.c (linux_supports_multi_process): New function.
7764 (linux_target_ops): Install it as target_supports_multi_process
7765 callback.
7766
7767 2009-05-24 Doug Evans <dje@google.com>
7768
7769 Global renaming of find_thread_pid to find_thread_ptid.
7770 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7771 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7772 All callers updated.
7773
7774 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7775 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7776 directly.
7777
7778 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7779 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7780 (linux_resume_one_lwp): Ditto.
7781
7782 2009-05-23 Doug Evans <dje@google.com>
7783
7784 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7785 from struct inferior_list_entry * to struct lwp_info *.
7786 All callers updated.
7787
7788 2009-05-13 Doug Evans <dje@google.com>
7789
7790 * linux-x86-low.c: Don't include assert.h.
7791 (x86_siginfo_fixup): Use fatal, not assert.
7792 (x86_arch_setup): Fix comment.
7793
7794 2009-05-12 Doug Evans <dje@google.com>
7795
7796 Biarch support for i386/amd64 gdbserver.
7797 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7798 Add linux-x86-low.c.
7799 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7800 (linux-x86-low.o): Add.
7801 * linux-x86-64-low.c: Delete.
7802 * linux-i386-low.c: Delete.
7803 * linux-x86-low.c: New file.
7804 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7805 linux-x86-low.o.
7806 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7807 linux-x86-low.o.
7808 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7809 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7810 (linux_child_pid_to_exec_file): New function.
7811 (elf_64_header_p, elf_64_file_p): New functions.
7812 (siginfo_fixup): New function.
7813 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7814 give target a chance to convert layout.
7815 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7816 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7817
7818 2009-05-07 Doug Evans <dje@google.com>
7819
7820 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7821 (regsets_store_inferior_registers): Ditto.
7822
7823 2009-05-06 Pedro Alves <pedro@codesourcery.com>
7824
7825 PR server/10048
7826
7827 * linux-low.c (must_set_ptrace_flags): Delete.
7828 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7829 of the global.
7830 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7831 `lwp->must_set_ptrace_flags' instead.
7832 (linux_wait_for_event_1): Set ptrace options here.
7833 (linux_wait_1): ... not here.
7834
7835 2009-04-30 Doug Evans <dje@google.com>
7836
7837 * inferiors.c (started_inferior_callback): New function.
7838 (attached_inferior_callback): New function.
7839 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7840 * server.c (print_started_pid, print_attached_pid): New functions.
7841 (detach_or_kill_for_exit): New function.
7842 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7843 * server.h (have_started_inferiors_p): Declare.
7844 (have_attached_inferiors_p): Declare.
7845
7846 * inferiors.c (remove_process): Fix memory leak, free process.
7847 * linux-low.c (linux_remove_process): New function.
7848 (linux_kill): Call it instead of remove_process.
7849 (linux_detach, linux_wait_1): Ditto.
7850
7851 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7852
7853 * configure.srv: Add x86 Windows CE target.
7854
7855 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7856
7857 * inferiors.c (get_thread_process): Make global.
7858 * server.h (get_thread_process): Add prototype.
7859 * thread-db.c (find_one_thread): Use get_thread_process
7860 instead of current_process.
7861 (thread_db_get_tls_address): Do not crash if called when
7862 thread layer is not yet initialized.
7863
7864 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7865
7866 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7867 * spu-low.c (current_tid): Rename to ...
7868 (current_ptid): ... this.
7869 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7870 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7871 ptid_get_lwp (current_ptid) instead of current_tid.
7872 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7873 instead of current_tid. Use find_process_pid to verify pid
7874 argument is valid. Pass proper argument to remove_process.
7875 (spu_thread_alive): Compare current_ptid instead of current_tid.
7876 (spu_resume): Likewise.
7877
7878 2009-04-02 Pedro Alves <pedro@codesourcery.com>
7879
7880 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7881 variable.
7882
7883 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7884
7885 Implement the multiprocess extensions, and add linux multiprocess
7886 support.
7887
7888 * server.h (ULONGEST): Declare.
7889 (struct ptid, ptid_t): New.
7890 (minus_one_ptid, null_ptid): Declare.
7891 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7892 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7893 (struct inferior_list_entry): Change `id' type from unsigned from
7894 to ptid_t.
7895 (struct sym_cache, struct breakpoint, struct
7896 process_info_private): Forward declare.
7897 (struct process_info): Declare.
7898 (current_process): Declare.
7899 (all_processes): Declare.
7900 (initialize_inferiors): Declare.
7901 (add_thread): Adjust to use ptid_t.
7902 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7903 (add_process, remove_process, find_thread_pid): Declare.
7904 (find_inferior_id): Adjust to use ptid_t.
7905 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7906 (multi_process): Declare.
7907 (push_event): Adjust to use ptid_t.
7908 (read_ptid, write_ptid): Declare.
7909 (prepare_resume_reply): Adjust to use ptid_t.
7910 (clear_symbol_cache): Declare.
7911 * inferiors.c (all_processes): New.
7912 (null_ptid, minus_one_ptid): New.
7913 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7914 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7915 (add_thread): Change unsigned long to ptid. Remove gdb_id
7916 parameter. Adjust.
7917 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7918 (gdb_id_to_thread): Rename to ...
7919 (find_thread_pid): ... this. Change unsigned long to ptid.
7920 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7921 (loaded_dll, pull_pid_from_list): Adjust.
7922 (add_process, remove_process, find_process_pid)
7923 (get_thread_process, current_process, initialize_inferiors): New.
7924 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7925 (struct target_waitstatus) <related_pid>: Ditto.
7926 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7927 return type to int.
7928 (struct target_ops) <join>: Add `pid' argument.
7929 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7930 (struct target_ops) <wait>: Add `ptid' field. Change return type
7931 to ptid.
7932 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7933 (mywait): Add `ptid' argument. Change return type to ptid_t.
7934 (target_pid_to_str): Declare.
7935 * target.c (set_desired_inferior): Adjust to use ptids.
7936 (mywait): Add new `ptid' argument. Adjust.
7937 (target_pid_to_str): New.
7938 * mem-break.h (free_all_breakpoints): Declare.
7939 * mem-break.c (breakpoints): Delelete.
7940 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7941 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7942 to use per-process breakpoint list.
7943 (free_all_breakpoints): New.
7944 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7945 (symbol_cache, all_symbols_looked_up): Delete.
7946 (hexchars): New.
7947 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7948 read_ptid): New.
7949 (prepare_resume_reply): Change ptid argument's type from unsigned
7950 long to ptid_t. Adjust. Implement W;process and X;process.
7951 (free_sym_cache, clear_symbol_cache): New.
7952 (look_up_one_symbol): Adjust to per-process symbol cache. *
7953 * server.c (cont_thread, general_thread, step_thread): Change type
7954 to ptid_t.
7955 (attached): Delete.
7956 (multi_process): New.
7957 (last_ptid): Change type to ptid_t.
7958 (struct vstop_notif) <ptid>: Change type to ptid_t.
7959 (queue_stop_reply, push_event): Change `ptid' argument's type to
7960 ptid_t.
7961 (discard_queued_stop_replies): Add `pid' argument.
7962 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7963 changes. Don't reference the `attached' global.
7964 (attach_inferior): Adjust to mywait interface changes.
7965 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7966 features. Handle and report "multiprocess+". Handle
7967 "qAttached:PID".
7968 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7969 changes.
7970 (handle_v_kill): New.
7971 (handle_v_stopped): Adjust to use target_pid_to_str.
7972 (handle_v_requests): Allow multiple attaches and runs when
7973 multiprocess extensions are in effect. Handle "vKill".
7974 (myresume): Adjust to use ptids.
7975 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7976 (handle_status): Adjust to discard_queued_stop_replies interface
7977 change.
7978 (first_thread_of, kill_inferior_callback)
7979 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7980 (main): Call initialize_inferiors. Adjust to use ptids, killing
7981 and detaching from all inferiors. Handle multiprocess packet
7982 variants.
7983 * linux-low.h: Include gdb_proc_service.h.
7984 (struct process_info_private): New.
7985 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7986 <lwpid_of>: Use ptid_get_lwp.
7987 (get_lwp_thread): Adjust.
7988 (struct lwp_info): Add `dead' member.
7989 (find_lwp_pid): Declare.
7990 * linux-low.c (thread_db_active): Delete.
7991 (new_inferior): Adjust comment.
7992 (inferior_pid): Delete.
7993 (linux_add_process): New.
7994 (handle_extended_wait): Adjust.
7995 (add_lwp): Change unsigned long to ptid.
7996 (linux_create_inferior): Add process to processes table. Adjust
7997 to use ptids. Don't set new_inferior here.
7998 (linux_attach_lwp): Rename to ...
7999 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8000 it. Adjust to use ptids.
8001 (linux_attach_lwp): New.
8002 (linux_attach): Add process to processes table. Don't set
8003 new_inferior here.
8004 (struct counter): New.
8005 (second_thread_of_pid_p, last_thread_of_process_p): New.
8006 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8007 multiple processes.
8008 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8009 processes. Remove process from process table.
8010 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8011 to multiple processes.
8012 (any_thread_of): New.
8013 (linux_detach): Add `pid' argument, and handle it. Remove process
8014 from processes table.
8015 (linux_join): Add `pid' argument. Handle it.
8016 (linux_thread_alive): Change unsighed long argument to ptid_t.
8017 Consider dead lwps as not being alive.
8018 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8019 threads we're not interested in.
8020 (same_lwp, find_lwp_pid): New.
8021 (linux_wait_for_lwp): Change `pid' argument's type from int to
8022 ptid_t. Adjust.
8023 (linux_wait_for_event): Rename to ...
8024 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8025 from int to ptid_t. Adjust.
8026 (linux_wait_for_event): New.
8027 (linux_wait_1): Add `ptid' argument. Change return type to
8028 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8029 that exit from the process table.
8030 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8031 Adjust.
8032 (mark_lwp_dead): New.
8033 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8034 stopping all threads, mark its main lwp as dead.
8035 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8036 ptids.
8037 (fetch_register, usr_store_inferior_registers)
8038 (regsets_fetch_inferior_registers)
8039 (regsets_store_inferior_registers, linux_read_memory)
8040 (linux_write_memory): Inline `inferior_pid'.
8041 (linux_look_up_symbols): Adjust to use per-process
8042 `thread_db_active'.
8043 (linux_request_interrupt): Adjust to use ptids.
8044 (linux_read_auxv): Inline `inferior_pid'.
8045 (initialize_low): Don't reference thread_db_active.
8046 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8047 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8048 (ps_getpid): Return the pid of the current inferior.
8049 * thread-db.c (proc_handle, thread_agent): Delete.
8050 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8051 per-process data.
8052 (find_one_thread): Change argument type to ptid_t. Adjust to
8053 per-process data.
8054 (maybe_attach_thread): Adjust to per-process data and ptids.
8055 (thread_db_find_new_threads): Ditto.
8056 (thread_db_init): Ditto.
8057 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8058 processes table. Adjust to use ptids.
8059 (spu_kill, spu_detach): Adjust interface. Remove process from
8060 processes table.
8061 (spu_join, spu_thread_alive): Adjust interface.
8062 (spu_wait): Adjust interface. Remove process from processes
8063 table. Adjust to use ptids.
8064 * win32-low.c (current_inferior_tid): Delete.
8065 (current_inferior_ptid): New.
8066 (debug_event_ptid): New.
8067 (thread_rec): Take a ptid. Adjust.
8068 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8069 (child_delete_thread): Ditto.
8070 (do_initial_child_stuff): Add `attached' argument. Add process to
8071 processes table.
8072 (child_fetch_inferior_registers, child_store_inferior_registers):
8073 Adjust.
8074 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8075 (win32_attach): Pass 1 to do_initial_child_stuff.
8076 (win32_kill): Adjust interface. Remove process from processes
8077 table.
8078 (win32_detach): Ditto.
8079 (win32_join): Adjust interface.
8080 (win32_thread_alive): Take a ptid.
8081 (win32_resume): Adjust to use ptids.
8082 (get_child_debug_event): Ditto.
8083 (win32_wait): Adjust interface. Remove exiting process from
8084 processes table.
8085
8086 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8087
8088 Non-stop mode support.
8089
8090 * server.h (non_stop): Declare.
8091 (gdb_client_data, handler_func): Declare.
8092 (delete_file_handler, add_file_handler, start_event_loop):
8093 Declare.
8094 (handle_serial_event, handle_target_event, push_event)
8095 (putpkt_notif): Declare.
8096 * target.h (enum resume_kind): New.
8097 (struct thread_resume): Replace `step' field by `kind' field.
8098 (TARGET_WNOHANG): Define.
8099 (struct target_ops) <wait>: Add `options' argument.
8100 <supports_non_stop, async, start_non_stop>: New fields.
8101 (target_supports_non_stop, target_async): New.
8102 (start_non_stop): Declare.
8103 (mywait): Add `options' argument.
8104 * target.c (mywait): Add `options' argument. Print child exit
8105 notifications here.
8106 (start_non_stop): New.
8107 * server.c (non_stop, own_buf, mem_buf): New globals.
8108 (struct vstop_notif): New.
8109 (notif_queue): New global.
8110 (queue_stop_reply, push_event, discard_queued_stop_replies)
8111 (send_next_stop_reply): New.
8112 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8113 interface changes.
8114 (attach_inferior): In non-stop mode, don't wait for the target
8115 here.
8116 (handle_general_set): Handle QNonStop.
8117 (handle_query): When handling qC, return the current general
8118 thread, instead of the first thread of the list.
8119 (handle_query): If the backend supports non-stop mode, include
8120 QNonStop+ in the qSupported query response.
8121 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8122 and non-stop mode.
8123 (handle_v_attach, handle_v_run): Handle non-stop mode.
8124 (handle_v_stopped): New.
8125 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8126 (myresume): Adjust to use resume_kind. Handle non-stop.
8127 (queue_stop_reply_callback): New.
8128 (handle_status): Handle non-stop mode.
8129 (main): Clear non_stop flag on reconnection. Use the event-loop.
8130 Refactor serial protocol handling from here ...
8131 (process_serial_event): ... to this new function. When GDB
8132 selects any thread, select one here. In non-stop mode, wait until
8133 GDB acks all pending events before exiting.
8134 (handle_serial_event, handle_target_event): New.
8135 * remote-utils.c (remote_open): Install remote_desc in the event
8136 loop.
8137 (remote_close): Remove remote_desc from the event loop.
8138 (putpkt_binary): Rename to...
8139 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8140 (putpkt_binary): New as wrapper around putpkt_binary_1.
8141 (putpkt_notif): New.
8142 (prepare_resume_reply): In non-stop mode, don't change the
8143 general_thread.
8144 * event-loop.c: New.
8145 * Makefile.in (OBJ): Add event-loop.o.
8146 (event-loop.o): New rule.
8147
8148 * linux-low.h (pid_of): Moved here.
8149 (lwpid_of): New.
8150 (get_lwp_thread): Use lwpid_of.
8151 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8152 * linux-low.c (pid_of): Delete.
8153 (inferior_pid): Use lwpid_of.
8154 (linux_event_pipe): New.
8155 (target_is_async_p): New.
8156 (delete_lwp): New.
8157 (handle_extended_wait): Use lwpid_of.
8158 (add_lwp): Don't set lwpid field.
8159 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8160 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8161 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8162 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8163 first. Adjust to linux_wait_for_event interface changes. Use
8164 lwpid_of.
8165 (linux_detach): Don't delete the main lwp here.
8166 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8167 (status_pending_p): Don't consider explicitly suspended lwps.
8168 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8169 pointer. Add OPTIONS argument. Change return type to int. Use
8170 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8171 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8172 pointer. Add status pointer argument. Return a pid instead of a
8173 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8174 changes. In non-stop mode, don't switch to a random thread.
8175 (linux_wait): Rename to...
8176 (linux_wait_1): ... this. Add target_options argument, and handle
8177 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8178 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8179 clean exit and signal exit code. Don't stop all threads in
8180 non-stop mode. In all-stop mode, only stop all threads when
8181 reporting a stop to GDB. Handle explicit thread stop requests.
8182 (async_file_flush, async_file_mark): New.
8183 (linux_wait): New.
8184 (send_sigstop): Use lwpid_of.
8185 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8186 interface changes. In non-stop mode, don't switch to a random
8187 thread.
8188 (linux_resume_one_lwp): Use lwpid_of.
8189 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8190 (linux_resume_one_thread): ... this. Handle resume_stop. In
8191 non-stop mode, don't look for pending flag in all threads.
8192 (resume_status_pending_p): Don't consider explicitly suspended
8193 threads.
8194 (my_waitpid): Reimplement. Emulate __WALL.
8195 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8196 Use lwpid_of.
8197 (sigchld_handler, linux_supports_non_stop, linux_async)
8198 (linux_start_non_stop): New.
8199 (linux_target_ops): Register linux_supports_non_stop, linux_async
8200 and linux_start_non_stop.
8201 (initialize_low): Install SIGCHLD handler.
8202 * thread-db.c (thread_db_create_event, find_one_thread)
8203 (thread_db_get_tls_address): Use lwpid_of.
8204 * win32-low.c (win32_detach): Adjust to use resume_kind.
8205 (win32_wait): Add `options' argument.
8206 * spu-low.c (spu_resume): Adjust to use resume_kind.
8207 (spu_wait): Add `options' argument.
8208
8209 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8210
8211 Decouple target code from remote protocol.
8212
8213 * target.h (enum target_waitkind): New.
8214 (struct target_waitstatus): New.
8215 (struct target_ops) <wait>: Return an unsigned long. Take a
8216 target_waitstatus pointer instead of a char pointer.
8217 (mywait): Likewise.
8218 * target.c (mywait): Change prototype to return an unsigned long.
8219 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8220 * server.h (thread_from_wait, old_thread_from_wait): Delete
8221 declarations.
8222 (prepare_resume_reply): Change prototype to take a
8223 target_waitstatus.
8224 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8225 (last_status, last_ptid): New.
8226 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8227 pid instead of a signal.
8228 (attach_inferior): Remove "status" and "signal" parameters.
8229 Adjust.
8230 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8231 not as an address.
8232 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8233 (handle_v_requests, myresume): Remove "status" and "signal"
8234 parameters. Adjust.
8235 (handle_status): New.
8236 (main): Delete local `status'. Adjust.
8237 * remote-utils.c: Include target.h.
8238 (prepare_resume_reply): Change prototype to take a
8239 target_waitstatus. Adjust.
8240
8241 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8242 interface.
8243 * spu-low.c (spu_wait): Adjust.
8244 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8245 Delete.
8246 (win32_wait): Adjust.
8247
8248 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8249
8250 * target.h (struct thread_resume): Delete leave_stopped member.
8251 (struct target_ops): Add a `n' argument to the `resume' callback.
8252 * server.c (start_inferior): Adjust.
8253 (handle_v_cont, myresume): Adjust.
8254 * linux-low.c (check_removed_breakpoint): Adjust to resume
8255 interface change, and to removed leave_stopped field.
8256 (resume_ptr): Delete.
8257 (struct thread_resume_array): New.
8258 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8259 resume interface change.
8260 (linux_continue_one_thread, linux_queue_one_thread)
8261 (resume_status_pending_p): Check if the resume field is NULL
8262 instead of checking the leave_stopped member.
8263 (linux_resume): Adjust to the target resume interface change.
8264 * spu-low.c (spu_resume): Adjust to the target resume interface
8265 change.
8266 * win32-low.c (win32_detach, win32_resume): Ditto.
8267
8268 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8269
8270 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8271 flag.
8272 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8273 pending.
8274 (linux_continue_one_thread): Only preserve the stepping flag if
8275 there's a pending breakpoint.
8276
8277 2009-03-31 Pedro Alves <pedro@codesourcery.com>
8278
8279 * server.c (main): After the inferior having exited, call
8280 remote_close before exiting gdbserver.
8281
8282 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8283
8284 Fix size of FPSCR in Power 7 processors.
8285 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8286 (PPC_FEATURE_HAS_DFP): New #define.
8287 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8288 size of the FPSCR.
8289
8290 2009-03-23 Pedro Alves <pedro@codesourcery.com>
8291
8292 * server.c (handle_query) Whitespace and formatting.
8293
8294 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8295
8296 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8297 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8298 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8299 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8300 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8301 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8302 Makefile.in, configure.ac: Fix whitespace throughout.
8303 * configure: Regenerate.
8304
8305 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8306
8307 * inferiors.c (find_inferior): Make it safe for the callback
8308 function to delete the currently iterated inferior.
8309
8310 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8311
8312 * Makefile.in (linuw_low_h): Move higher.
8313 (thread-db.o): Depend on $(linux_low_h).
8314
8315 2009-03-17 Pedro Alves <pedro@codesourcery.com>
8316
8317 Rename "process" to "lwp" throughout.
8318
8319 * linux-low.c (all_processes): Rename to...
8320 (all_lwps): ... this.
8321 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8322 (add_process): Rename to ...
8323 (add_lwp): ... this. Adjust.
8324 (linux_create_inferior): Adjust.
8325 (linux_attach_lwp): Adjust.
8326 (linux_attach): Adjust.
8327 (linux_kill_one_process): Rename to ...
8328 (linux_kill_one_lwp): ... this. Adjust.
8329 (linux_kill): Adjust.
8330 (linux_detach_one_process): Rename to ...
8331 (linux_detach_one_lwp): ... this. Adjust.
8332 (linux_detach): Adjust.
8333 (check_removed_breakpoint): Adjust.
8334 (status_pending_p): Adjust.
8335 (linux_wait_for_process): Rename to ...
8336 (linux_wait_for_lwp): ... this. Adjust.
8337 (linux_wait_for_event): Adjust.
8338 (send_sigstop): Adjust.
8339 (wait_for_sigstop): Adjust.
8340 (stop_all_processes): Rename to ...
8341 (stop_all_lwps): ... this.
8342 (linux_resume_one_process): Rename to ...
8343 (linux_resume_one_lwp): ... this. Adjust.
8344 (linux_set_resume_request, linux_continue_one_thread)
8345 (linux_queue_one_thread, resume_status_pending_p)
8346 (usr_store_inferior_registers, regsets_store_inferior_registers)
8347 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8348 Adjust.
8349 * linux-low.h (get_process): Rename to ...
8350 (get_lwp): ... this. Adjust.
8351 (get_thread_process): Rename to ...
8352 (get_thread_lwp): ... this. Adjust.
8353 (get_process_thread): Rename to ...
8354 (get_lwp_thread): ... this. Adjust.
8355 (struct process_info): Rename to ...
8356 (struct lwp_info): ... this.
8357 (all_processes): Rename to ...
8358 (all_lwps): ... this.
8359 * proc-service.c (ps_lgetregs): Adjust.
8360 * thread-db.c (thread_db_create_event, find_one_thread)
8361 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8362
8363 2009-03-14 Pedro Alves <pedro@codesourcery.com>
8364
8365 * server.c (handle_query): Handle "qAttached".
8366
8367 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8368
8369 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8370 GPLv3, update license URL.
8371
8372 2009-03-01 Doug Evans <dje@google.com>
8373
8374 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
8375 (server_h): Add gdb_signals.h.
8376 (signals.o): Update.
8377 * server.h (target_signal_from_host,target_signal_to_host_p)
8378 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8379
8380 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8381
8382 * remote-utils.c (getpkt): Also generate remote-debug
8383 information if noack_mode is set.
8384
8385 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8386
8387 * server.c (handle_query): Report qXfer:siginfo:read and
8388 qXfer:siginfo:write as supported and handle them.
8389 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8390 * linux-low.c (linux_xfer_siginfo): New.
8391 (linux_target_ops): Set it.
8392
8393 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8394
8395 * server.c (gdbserver_usage): Mention --remote-debug.
8396 (main): Accept '--remote-debug' switch.
8397
8398 2009-01-18 Doug Evans <dje@google.com>
8399
8400 * regcache.c (new_register_cache): No need to check result of xcalloc.
8401 * server.c (handle_search_memory): Back out calls to xmalloc,
8402 result is checked and error is returned to user upon failure.
8403 (handle_query): Ditto. Add more checks for result of malloc.
8404 (handle_v_cont): Check result of malloc, report error back to
8405 user upon failure.
8406 (handle_v_run): Ditto. Call freeargv.
8407 * server.h (freeargv): Declare.
8408 * utils.c (freeargv): New fn.
8409
8410 2009-01-15 Doug Evans <dje@google.com>
8411
8412 * gdbreplay.c (perror_with_name): Make arg const char *.
8413 * server.h (target_signal_to_name): Make return type const char *.
8414 * thread-db.c (thread_db_err_str): Make return type const char *.
8415 * utils.c (perror_with_name): Make arg const char *.
8416
8417 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8418
8419 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8420 when handling a EXIT_PROCESS_DEBUG_EVENT.
8421
8422 2009-01-06 Joel Brobecker <brobecker@adacore.com>
8423
8424 * gdbreplay.c (gdbreplay_version): Update copyright year.
8425 * server.c (gdbserver_version): Likewise.
8426
8427 2009-01-05 Doug Evans <dje@google.com>
8428
8429 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
8430 (handle_extended_wait): Improve comment.
8431
8432 2008-12-13 Doug Evans <dje@google.com>
8433
8434 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8435 * server.h (ATTR_MALLOC): New macro.
8436 (xmalloc,xcalloc,xstrdup): Declare.
8437 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8438 * inferiors.c: Ditto.
8439 * linux-low.c: Ditto.
8440 * mem-break.c: Ditto.
8441 * regcache.c: Ditto.
8442 * remote-utils.c: Ditto.
8443 * server.c: Ditto.
8444 * target.c: Ditto.
8445 * win32-low.c: Ditto.
8446
8447 2008-12-12 Doug Evans <dje@google.com>
8448
8449 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8450 in debugging printf.
8451
8452 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8453
8454 2008-12-09 Doug Evans <dje@google.com>
8455
8456 * linux-low.h (struct process_info): Delete member tid, unused.
8457 * thread-db.c (find_one_thread): Update.
8458 (maybe_attach_thread): Update.
8459
8460 2008-12-02 Pedro Alves <pedro@codesourcery.com>
8461
8462 * target.h (struct target_ops): Add qxfer_osdata member.
8463 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8464 and dirent.h.
8465 (linux_qxfer_osdata): New functions.
8466 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8467 callback.
8468 * server.c (handle_query): Handle "qXfer:osdata:read:".
8469 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8470 (buffer_xml_printf): New functions.
8471 * server.h (struct buffer): New.
8472 (buffer_grow_str, buffer_grow_str0): New macros.
8473 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8474 (buffer_xml_printf): Declare.
8475
8476 2008-11-24 Doug Evans <dje@google.com>
8477
8478 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8479
8480 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8481
8482 * server.c (handle_v_run): Always use the supplied argument list.
8483
8484 2008-11-19 Bob Wilson <bob.wilson@acm.org>
8485
8486 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8487 (xtensa_regmap_table): Add entry for scompare1.
8488
8489 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8490
8491 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8492 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8493 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8494 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8495 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8496 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8497 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8498 XML target descriptions.
8499 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8500 when inferior is running on an ISA 2.05 or later processor. Add
8501 special case to return offset for full 64-bit slot of FPSCR when
8502 in 32-bits.
8503
8504 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8505
8506 * Makefile.in (SFILES, clean): Added sparc64 files.
8507 (reg-sparc64.o, reg-sparc64.c): New.
8508 * configure.srv (sparc*-*-linux*): New configuration.
8509 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8510 syscall arguments for SPARC.
8511 (regsets_store_inferior_registers): Likewise.
8512 * linux-sparc-low.c: New file.
8513
8514 2008-10-21 Doug Evans <dje@google.com>
8515
8516 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8517 (READLINE_DIR,READLINE_DEP): Delete.
8518 (INTERNAL_CFLAGS): Update.
8519 (LINTFLAGS): Update.
8520
8521 2008-10-10 Pedro Alves <pedro@codesourcery.com>
8522
8523 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8524 whole argv from the last run, not just argv[0].
8525
8526 2008-09-08 Pedro Alves <pedro@codesourcery.com>
8527
8528 * regcache.c (new_register_cache): Return NULL if the register
8529 cache size isn't known yet.
8530 (free_register_cache): Avoid dereferencing a NULL regcache.
8531
8532 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8533
8534 * configure.srv: Merge MIPS and MIPS64.
8535
8536 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8537
8538 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8539
8540 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
8541
8542 * Makefile.in: Add required vsx dependencies.
8543
8544 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8545 Declare init_registers_powerpc_vsx32l.
8546 Declare init_registers_powerpc_vsx64l.
8547 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8548 (ppc_arch_setup): Check for VSX in hwcap.
8549 (ppc_fill_vsxregset): New function.
8550 (ppc_store_vsxregset): New function.
8551 Add new VSX entry in regset_info target_regsets.
8552
8553 * configure.srv: Add new VSX dependencies.
8554
8555 2008-08-12 Pedro Alves <pedro@codesourcery.com>
8556
8557 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8558 (remote_open): Set or clear transport_is_reliable.
8559 (putpkt_binary): Don't expect acks in noack mode.
8560 (getpkt): Don't send ack/nac in noack mode.
8561 * server.c (handle_general_set): Handle QStartNoAckMode.
8562 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8563 qSupported.
8564 (main): Reset noack_mode on every connection.
8565 * server.h (noack_mode): Declare.
8566
8567 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8568
8569 * Makefile.in (GDBREPLAY_OBS): New variable.
8570 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8571
8572 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8573 Daniel Jacobowitz <dan@codesourcery.com>
8574
8575 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8576 (usr_store_inferior_registers): Likewise.
8577 (regsets_store_inferior_registers): Likewise.
8578
8579 2008-07-31 Rolf Jansen <rj@surtec.com>
8580 Pedro Alves <pedro@codesourcery.com>
8581
8582 * configure.ac: Check for memmem declaration.
8583 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8584 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8585 (disable_packet_qfThreadInfo): Unconditionally compile.
8586 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8587 * configure, config.in: Regenerate.
8588
8589 2008-07-28 Doug Kwan <dougkwan@google.com>
8590
8591 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8592 (linux_write_memory): Remove declaration of errno.
8593
8594 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8595
8596 * linux-low.c (handle_extended_wait): Do not use "status"
8597 variable uninitialized.
8598
8599 2008-07-07 Pedro Alves <pedro@codesourcery.com>
8600
8601 * server.c (handle_v_attach): Inhibit reporting dll changes.
8602
8603 2008-06-27 Pedro Alves <pedro@codesourcery.com>
8604
8605 * remote-utils.c (prepare_resume_reply): If requested, don't
8606 output "thread:TID" in the T stop reply.
8607
8608 * server.c (disable_packet_vCont, disable_packet_Tthread)
8609 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8610 (handle_query): If requested, disable support for qC, qfThreadInfo
8611 and qsThreadInfo.
8612 (handle_v_requests): If requested, disable support for vCont.
8613 (gdbserver_show_disableable): New.
8614 (main): Handle --disable-packet and --disable-packet=LIST.
8615
8616 * server.h (disable_packet_vCont, disable_packet_Tthread)
8617 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8618
8619 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8620
8621 * server.c (gdbserver_usage): Mention --version.
8622
8623 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8624
8625 * Makefile.in (gdbreplay.o): New rule.
8626
8627 2008-06-06 Joseph Myers <joseph@codesourcery.com>
8628
8629 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8630 message, not gdbserver.
8631
8632 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
8633 Nathan Sidwell <nathan@codesourcery.com>
8634 Joseph Myers <joseph@codesourcery.com>
8635
8636 * acinclude.m4: Include ../../config/acx.m4.
8637 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8638 * configure, config.in: Regenerate.
8639 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8640 * server.c (gdbserver_version): Print PKGVERSION.
8641 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8642 (main): Adjust gdbserver_usage calls.
8643 * gdbreplay.c (version, host_name): Add declarations.
8644 (gdbreplay_version, gdbreplay_usage): New.
8645 (main): Accept --version and --help options.
8646
8647 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8648
8649 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8650 (arm_breakpoint_at): Handle Thumb.
8651 (the_low_target): Add comment.
8652
8653 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8654
8655 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8656
8657 2008-05-09 Doug Evans <dje@google.com>
8658
8659 * server.h (decode_search_memory_packet): Declare.
8660 * remote-utils.c (decode_search_memory_packet): New fn.
8661 * server.c (handle_search_memory_1): New fn.
8662 (handle_search_memory): New fn.
8663 (handle_query): Process qSearch:memory packets.
8664
8665 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8666
8667 * regcache.c (registers_length): Remove.
8668 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8669 full register packet.
8670 * regcache.h (registers_length): Remove prototype.
8671 * server.h (PBUFSIZ): Define to 16384.
8672
8673 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8674
8675 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8676 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8677 powerpc-64l.o, and powerpc-altivec64l.o.
8678 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8679 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8680 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8681 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8682 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8683 to srv_xmlfiles.
8684
8685 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8686 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8687 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8688 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8689 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8690 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8691 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8692 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8693 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8694 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8695 (clean): Update.
8696
8697 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8698 (init_registers_powerpc_32l): ... this new prototype.
8699 (init_registers_powerpc_32): Remove, replace by ...
8700 (init_registers_powerpc_altivec32l): ... this new prototype.
8701 (init_registers_powerpc_e500): Remove, replace by ...
8702 (init_registers_powerpc_e500l): ... this new prototype.
8703 (init_registers_ppc64): Remove, replace by ...
8704 (init_registers_powerpc_64l): ... this new prototype.
8705 (init_registers_powerpc_64): Remove, replace by ...
8706 (init_registers_powerpc_altivec64l): ... this new prototype.
8707 (ppc_num_regs): Set to 73.
8708 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8709 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8710 (ppc_cannot_store_register): Handle orig_r3 and trap.
8711 (ppc_arch_setup): Update init_registers_... calls.
8712 (ppc_fill_gregset): Handle orig_r3 and trap.
8713
8714 * inferiors.c (clear_inferiors): Reset current_inferior.
8715
8716 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
8717
8718 * acinclude.m4: Add override.m4.
8719 * configure: Regenerate.
8720
8721 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8722
8723 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8724 initial call to init_register_ppc64.
8725
8726 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8727
8728 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8729 single powerpc*-*-linux* case.
8730 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8731
8732 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8733
8734 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
8735 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
8736 from reg_xmlfiles.
8737 * linux-ppc-low.c: Include <elf.h>.
8738 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8739 (ppc_hwcap): New global variable.
8740 (ppc_regmap): Remove __SPE__ #ifdef sections.
8741 (ppc_regmap_e500): New global variable.
8742 (ppc_cannot_store_register): Update __SPE__ special case.
8743 (ppc_get_hwcap): New function.
8744 (ppc_arch_setup): Use it to determine whether inferior supports
8745 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8746 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8747 Do not access registers if target does not support AltiVec.
8748 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8749 Do not access registers if target does not support SPE.
8750 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8751
8752 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8753
8754 * linux-low.c (disabled_regsets, num_regsets): New.
8755 (use_regsets_p): Delete.
8756 (linux_wait_for_process): Clear disabled_regsets.
8757 (regsets_fetch_inferior_registers): Check and set it.
8758 (regsets_store_inferior_registers): Likewise.
8759 (linux_fetch_registers, linux_store_registers): Do not use
8760 use_regsets_p.
8761 (initialize_low): Allocate disabled_regsets.
8762
8763 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8764
8765 * Makefile.in (LIBOBJS): New.
8766 (OBS): Use LIBOBJS.
8767 (memmem.o): New rule.
8768 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8769 * configure: Regenerated.
8770
8771 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8772
8773 * server.c (handle_query): Never return "unsupported" for
8774 qXfer:features:read queries.
8775
8776 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8777
8778 * server.c (get_features_xml): Fix inverted condition.
8779 (handle_query): Always support qXfer:feature:read.
8780
8781 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8782
8783 * server.c (wrapper_argv): New.
8784 (start_inferior): Handle wrapper_argv. If set, expect an extra
8785 trap.
8786 (gdbserver_usage): Document --wrapper.
8787 (main): Parse --wrapper.
8788
8789 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8790
8791 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8792 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8793 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8794 (ppc_set_pc): Likewise.
8795 (ppc_arch_setup): New function.
8796 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8797 of collect_register.
8798 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
8799
8800 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8801
8802 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8803 instead of linux-ppc64-low.o.
8804 * linux-ppc64-low.c: Remove file.
8805 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8806 (linux-ppc64-low.o): Remove rule.
8807
8808 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8809 (init_registers_powerpc_64): Likewise.
8810 (ppc_regmap): Conditionally define depending on __powerpc64__.
8811 (ppc_cannot_store_register): Do not special-case "fpscr" when
8812 compiled on __powerpc64__.
8813 (ppc_collect_ptrace_register): New function.
8814 (ppc_supply_ptrace_register): New function.
8815 (ppc_breakpoint): Change type to "unsigned int".
8816 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8817 (the_low_target): Conditionally provide initializers for the
8818 arch_setup member depending on __powerpc64__. Install
8819 collect_ptrace_register and supply_ptrace_register members.
8820
8821 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8822
8823 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8824 * server.c (gdbserver_xmltarget): Define.
8825 (get_features_xml): Use it to replace "target.xml" and arch_string.
8826
8827 * configure.srv: Remove srv_xmltarget. Add XML files that were
8828 mentioned there to srv_xmlfiles instead. Remove conditional tests
8829 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8830 srv_xmlfiles and srv_regobj to include all possible choices.
8831 * configure.ac (srv_xmltarget): Remove.
8832 (srv_xmlfiles): Do not add "target.xml".
8833 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8834 checks for supplementary target information.
8835 * configure: Regenerate.
8836 * Makefile.in (XML_TARGET): Remove.
8837 (target.xml): Remove rule.
8838 (clean): Do not clean up target.xml.
8839 (.PRECIOUS): Do not mention target.xml.
8840
8841 * target.h (struct target_ops): Remove arch_string member.
8842 * linux-low.c (linux_arch_string): Remove.
8843 (linux_target_ops): Remove arch_string initializer.
8844 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8845 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8846 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8847 * spu-low.c (spu_arch_string): Remove.
8848 (spu_target_ops): Remove arch_string initializer.
8849 * win32-low.c (win32_arch_string): Remove.
8850 (win32_target_ops): Remove arch_string initializer.
8851 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8852 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8853 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8854
8855 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8856
8857 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8858 by collect_ptrace_register and supply_ptrace_register hooks.
8859 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8860 instead of checking for the_low_target.left_pad_xfer.
8861 (usr_store_inferior_registers): Use collect_ptrace_register callback
8862 instead of checking for the_low_target.left_pad_xfer.
8863
8864 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8865 (s390_supply_ptrace_register): Likewise.
8866 (s390_fill_gregset): Call s390_collect_ptrace_register.
8867 (the_low_target): Update.
8868
8869 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8870 (ppc_supply_ptrace_register): Likewise.
8871 (the_low_target): Update.
8872
8873 * linux-i386-low.c (the_low_target): Update.
8874 * linux-x86-64-low.c (the_low_target): Update.
8875
8876 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8877
8878 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8879 reg-s390.o and reg-s390x.o.
8880
8881 * linux-low.c (new_inferior): New global variable.
8882 (linux_create_inferior, linux_attach): Set it.
8883 (linux_wait_for_process): Call the_low_target.arch_setup after the
8884 target has stopped for the first time.
8885 (initialize_low): Do not call the_low_target.arch_setup.
8886
8887 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8888 (s390_set_pc): Likewise.
8889 (s390_arch_setup): New function.
8890 (the_low_target): Use s390_arch_setup as arch_setup routine.
8891
8892 * regcache.c (realloc_register_cache): New function.
8893 (set_register_cache): Call it for each existing regcache.
8894
8895 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8896
8897 * server.h (init_registers): Remove prototype.
8898
8899 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8900 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8901 instead of init_registers ().
8902 * linux-arm-low.c (init_registers_arm): Add prototype.
8903 (init_registers_arm_with_iwmmxt): Likewise.
8904 (the_low_target): Add initializer for arch_setup field.
8905 * linux-cris-low.c (init_registers_cris): Add prototype.
8906 (the_low_target): Add initializer for arch_setup field.
8907 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8908 (the_low_target): Add initializer for arch_setup field.
8909 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8910 (the_low_target): Add initializer for arch_setup field.
8911 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8912 (the_low_target): Add initializer for arch_setup field.
8913 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8914 (the_low_target): Add initializer for arch_setup field.
8915 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8916 (the_low_target): Add initializer for arch_setup field.
8917 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8918 (init_registers_mips64_linux): Likewise.
8919 (the_low_target): Add initializer for arch_setup field.
8920 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8921 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8922 (the_low_target): Add initializer for arch_setup field.
8923 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8924 (init_registers_powerpc_64): Likewise.
8925 (the_low_target): Add initializer for arch_setup field.
8926 * linux-s390-low.c (init_registers_s390): Add prototype.
8927 (init_registers_s390x): Likewise.
8928 (the_low_target): Add initializer for arch_setup field.
8929 * linux-sh-low.c (init_registers_sh): Add prototype.
8930 (the_low_target): Add initializer for arch_setup field.
8931 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8932 (the_low_target): Add initializer for arch_setup field.
8933 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8934 (the_low_target): Add initializer for arch_setup field.
8935
8936 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8937 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8938 instead of init_registers ().
8939 * win32-arm-low.c (init_registers_arm): Add prototype.
8940 (the_low_target): Add initializer for arch_setup field.
8941 * win32-i386-low.c (init_registers_i386): Add prototype.
8942 (the_low_target): Add initializer for arch_setup field.
8943
8944 * spu-low.c (init_registers_spu): Add prototype.
8945 (initialize_low): Call initialie_registers_spu () instead of
8946 initialize_registers ().
8947
8948 2008-02-19 Pedro Alves <pedro@codesourcery.com>
8949
8950 * server.c (handle_v_requests): When handling the vRun and vAttach
8951 packets, if already debugging a process, don't kill it. Return an
8952 error instead.
8953
8954 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8955
8956 * server.c (handle_query): Correct length check.
8957
8958 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8959
8960 * win32-low.c (do_initial_child_stuff): Add process handle
8961 parameter. Set current_process_handle and current_process_id from the
8962 parameters. Clear globals.
8963 (win32_create_inferior): Don't set current_process_handle and
8964 current_process_id here. Instead pass them on the call to
8965 do_initial_child_stuff.
8966 (win32_attach): Likewise.
8967 (win32_clear_inferiors): New.
8968 (win32_kill): Don't close the current process handle or the
8969 current thread handle here. Instead call win32_clear_inferiors.
8970 (win32_detach): Don't open a new handle to the process. Call
8971 win32_clear_inferiors.
8972 (win32_join): Don't rely on current_process_handle; open a new
8973 handle using the process id.
8974 (win32_wait): Call win32_clear_inferiors when the inferior process
8975 has exited.
8976
8977 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8978
8979 * server.c (monitor_show_help): Add "exit".
8980
8981 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8982
8983 * Makefile.in (SFILES): Add linux-xtensa-low.c.
8984 (clean): Add reg-xtensa.c.
8985 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
8986 * configure.srv (xtensa*-*-linux*) New target.
8987 * linux-xtensa-low.c: New.
8988 * xtensa-xtregs.c: New.
8989
8990 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8991
8992 * hostio.c: Don't include errno.h.
8993 (errno_to_fileio_errno): Move to hostio-errno.
8994 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8995 error number outputting to the target->hostio_last_error callback.
8996 (hostio_packet_error): Use FILEIO_EINVAL directly.
8997 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8998 calls to hostio_error.
8999 * hostio-errno.c: New.
9000 * server.h (hostio_last_error_from_errno): Declare.
9001 * target.h (target_ops): Add hostio_last_error member.
9002 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9003 as hostio_last_error handler.
9004 * spu-low.c (spu_target_ops): Likewise.
9005 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9006 (wince_hostio_last_error): New functions.
9007 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9008 as hostio_last_error handler.
9009 (win32_target_ops) [!_WIN32_WCE]: Register
9010 hostio_last_error_from_errno as hostio_last_error handler.
9011 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9012 (hostio-errno.o): New rule.
9013 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9014 * configure.srv (srv_hostio_err_objs): New variable. Default to
9015 hostio-errno.o.
9016 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9017 * configure: Regenerate.
9018
9019 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9020
9021 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9022 (linux_kill, linux_detach): Clean up the process list.
9023 * remote-utils.c (remote_open): Improve port number parsing.
9024 (putpkt_binary, input_interrupt): Only send interrupts if the target
9025 is running.
9026 * server.c (extended_protocol): Make static.
9027 (attached): Define earlier.
9028 (exit_requested, response_needed, program_argv): New variables.
9029 (target_running): New.
9030 (start_inferior): Clear attached here.
9031 (attach_inferior): Set attached here.
9032 (require_running): Define.
9033 (handle_query): Use require_running and target_running. Implement
9034 "monitor exit".
9035 (handle_v_attach, handle_v_run): New.
9036 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9037 (gdbserver_usage): Update.
9038 (main): Redo argument parsing. Handle --debug and --multi. Handle
9039 --attach along with other options or after the port. Save
9040 program_argv. Support no initial program. Resynchronize
9041 communication with GDB after an error. Handle "monitor exit".
9042 Use require_running and target_running. Always allow the extended
9043 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9044 restart in extended mode.
9045 * README: Refer to the GDB manual. Update --attach usage.
9046
9047 2007-12-20 Andreas Schwab <schwab@suse.de>
9048
9049 * linux-low.c (STACK_SIZE): Define.
9050 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9051 (linux_test_for_tracefork): Likewise.
9052
9053 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9054
9055 * linux-low.c (linux_wait_for_event): Update messages. Do not
9056 reinsert auto-delete breakpoints.
9057 * mem-break.c (struct breakpoint): Change return type of handler to
9058 int.
9059 (set_breakpoint_at): Update handler type.
9060 (reinsert_breakpoint_handler): Return 1 instead of calling
9061 delete_breakpoint.
9062 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9063 setting a new one.
9064 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9065 * mem-break.h (set_breakpoint_at): Update handler type.
9066 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9067 * win32-low.c (auto_delete_breakpoint): New.
9068 (get_child_debug_event): Use it.
9069
9070 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9071
9072 * configure.ac: Check for pread and pwrite.
9073 * hostio.c (handle_pread): Fall back to lseek and read.
9074 (handle_pwrite): Fall back to lseek and write.
9075 * config.in, configure: Regenerated.
9076
9077 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9078
9079 * server.c (myresume): Add own_buf argument.
9080 (main): Update calls.
9081
9082 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9083
9084 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9085 * remote-utils.c (remote_open): Do not call disable_async_io.
9086 (block_async_io): Delete.
9087 (unblock_async_io): Make static.
9088 (initialize_async_io): New.
9089 * server.c (handle_v_cont): Handle async I/O here.
9090 (myresume): Likewise. Move other common resume tasks here...
9091 (main): ... from here. Call initialize_async_io. Disable async
9092 I/O before the main loop.
9093 * server.h (initialize_async_io): Declare.
9094 (block_async_io, unblock_async_io): Delete prototypes.
9095 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9096
9097 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9098
9099 * remote-utils.c (readchar): Allow binary data in received messages.
9100
9101 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9102
9103 * win32-low.c (attaching): New global.
9104 (win32_create_inferior): Clear the `attaching' global.
9105 (win32_attach): Set the `attaching' global.
9106 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9107 attaching. Only set a breakpoint at the entry point if not
9108 attaching.
9109
9110 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9111
9112 * server.c (main): Don't report dll events on the initial
9113 connection on attaches.
9114
9115 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9116
9117 * server.c (main): Relax numerical bases supported for the pid of
9118 the --attach command line argument.
9119
9120 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9121
9122 * win32-low.c (win32_attach): Call OpenProcess before
9123 DebugActiveProcess, not after. Add last error output to error
9124 call.
9125
9126 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9127
9128 * win32-low.c (win32_get_thread_context)
9129 (win32_set_thread_context): New functions.
9130 (thread_rec): Use win32_get_thread_context.
9131 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9132 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9133 field.
9134
9135 2007-12-03 Leo Zayas
9136 Pedro Alves <pedro_alves@portugalmail.pt>
9137
9138 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9139 global variables.
9140 (child_add_thread): Minor cleanup.
9141 (child_continue): Resume artificially suspended threads before
9142 calling ContinueDebugEvent.
9143 (suspend_one_thread): New.
9144 (fake_breakpoint_event): New.
9145 (get_child_debug_event): Change return type to int. Check here if
9146 gdb sent an interrupt request. If a soft interrupt was requested,
9147 fake a breakpoint event. Return 0 if there is no event to handle,
9148 and 1 otherwise.
9149 (win32_wait): Don't check here if gdb sent an interrupt request.
9150 Ensure there is a valid event to handle.
9151 (win32_request_interrupt): Add soft interruption method as last
9152 resort.
9153
9154 2007-12-03 Leo Zayas
9155 Pedro Alves <pedro_alves@portugalmail.pt>
9156
9157 * win32-low.h (win32_thread_info): Add descriptions to the
9158 structure members. Replace `suspend_count' counter by a
9159 `suspended' flag.
9160 * win32-low.c (thread_rec): Update condition of when to get the
9161 context from the inferior. Rely on ContextFlags being set if it
9162 has already been retrieved. Only suspend the inferior thread if
9163 we haven't already. Warn if that fails.
9164 (continue_one_thread): s/suspend_count/suspended/. Only call
9165 ResumeThread once. Warn if that fails.
9166
9167 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9168
9169 * win32-low.c (win32_wait): Don't read from the inferior when it
9170 has already exited.
9171
9172 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9173
9174 * Makefile.in (win32_low_h): New variable.
9175 (win32-low.o): Add dependency on $(win32_low_h).
9176 (win32-arm-low.o, win32-i386-low.o): New rules.
9177
9178 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9179
9180 * hostio.c: Correct copyright year.
9181
9182 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9183
9184 * Makefile.in (OBS): Add hostio.o.
9185 (hostio.o): New rule.
9186 * server.h (handle_vFile): Declare.
9187 * hostio.c: New file.
9188 * server.c (handle_v_requests): Take packet_len and new_packet_len
9189 for binary packets. Call handle_vFile.
9190 (main): Update call to handle_v_requests.
9191
9192 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9193
9194 * linux-low.c: Include <sched.h>.
9195
9196 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9197
9198 * linux-low.c (linux_tracefork_grandchild): New.
9199 (linux_tracefork_child): Use clone.
9200 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9201
9202 2007-10-31 Joel Brobecker <brobecker@adacore.com>
9203
9204 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9205
9206 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9207
9208 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9209
9210 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9211
9212 * inferiors.c (change_inferior_id): Delete.
9213 (add_pid_to_list, pull_pid_from_list): New.
9214 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9215 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9216 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9217 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9218 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9219 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9220 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9221 (using_threads): Always set to 1.
9222 (handle_extended_wait): New.
9223 (add_process): Do not set TID.
9224 (linux_create_inferior): Set must_set_ptrace_flags.
9225 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9226 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9227 (linux_thread_alive): Rename TID argument to LWPID.
9228 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9229 (linux_wait_for_event): Do not use TID or check using_threads. Update
9230 call to dead_thread_notify. Call handle_extended_wait.
9231 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9232 (send_sigstop): Delete sigstop_sent.
9233 (wait_for_sigstop): Avoid TID.
9234 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9235 (linux_test_for_tracefork): New.
9236 (linux_lookup_signals): Use thread_db_active and
9237 linux_supports_tracefork_flag.
9238 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9239 * linux-low.h (get_process_thread): Avoid TID.
9240 (struct process_ifo): Move thread_known and tid to the end. Remove
9241 sigstop_sent.
9242 (linux_attach_lwp, thread_db_init): Update prototypes.
9243 * server.h (change_inferior_id): Delete prototype.
9244 (add_pid_to_list, pull_pid_from_list): New prototypes.
9245 * thread-db.c (thread_db_use_events): New.
9246 (find_first_thread): Rename to...
9247 (find_one_thread): ...this. Update callers and messages. Do not
9248 call fatal. Check thread_db_use_events. Do not call
9249 change_inferior_id or new_thread_notify.
9250 (maybe_attach_thread): Update. Do not call new_thread_notify.
9251 (thread_db_init): Set thread_db_use_events. Check use_events.
9252 * utils.c (fatal, warning): Correct message prefix.
9253
9254 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9255
9256 * Makefile.in (clean): Remove new files.
9257 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9258 (powerpc-64.o, powerpc-64.c): New rules.
9259 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9260 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9261 with SPE.
9262 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9263 SPE targets.
9264 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9265 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9266 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9267 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9268 (target_regsets): Add AltiVec and SPE register sets.
9269 * configure.ac: Check for AltiVec and SPE.
9270 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9271 (ppc_fill_vrregset, ppc_store_vrregset): New.
9272 (target_regsets): Add AltiVec register set.
9273 * configure: Regenerated.
9274
9275 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9276
9277 * linux-low.c (O_LARGEFILE): Define.
9278 (linux_read_memory): Use /proc/PID/mem.
9279 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9280 * configure, config.in: Regenerated.
9281
9282 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9283
9284 * linux-low.c (linux_wait_for_event): Do not pass signals while
9285 single-stepping.
9286
9287 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9288
9289 * win32-low.c (create_process): New.
9290 (win32_create_inferior): Use create_process instead of
9291 CreateProcess. If create_process failed retry appending an ".exe"
9292 suffix. Store the GetLastError result immediatelly after
9293 create_process calls and use it on the call to error.
9294
9295 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9296
9297 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9298
9299 2007-08-23 Joel Brobecker <brobecker@adacore.com>
9300
9301 * configure.ac: Switch license to GPLv3.
9302
9303 2007-08-01 Michael Snyder <msnyder@access-company.com>
9304
9305 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9306
9307 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9308
9309 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9310 typedef.
9311 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9312 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9313 CloseToolhelp32Snapshot.
9314 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9315 CloseToolhelp32Snapshot.
9316
9317 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
9318
9319 * server.c (main): Check for inferior exit before main loop.
9320
9321 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9322
9323 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9324 instead of on tmp_desc.
9325
9326 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9327 Daniel Jacobowitz <dan@codesourcery.com>
9328
9329 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9330 (add_thread): Minor cleanups.
9331 (clear_inferiors): Move lower in the file. Clear the DLL
9332 list.
9333 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9334 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9335 (xml_escape_text): New.
9336 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9337 for qSupported.
9338 (handle_v_cont): Report errors.
9339 (gdbserver_version): Update.
9340 (main): Correct size of own_buf. Do not report initial DLL events.
9341 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9342 (unloaded_dll, xml_escape_text): New.
9343 * win32-low.c (enum target_waitkind): Update comments.
9344 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9345 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9346 (win32_EnumProcessModules, win32_GetModuleInformation)
9347 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9348 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9349 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9350 (win32_Module32First, win32_Module32Next, load_toolhelp)
9351 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9352 (get_child_debug_event): Handle DLL events.
9353 (win32_wait): Likewise.
9354
9355 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9356
9357 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9358 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9359
9360 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9361
9362 * win32-low.c (handle_output_debug_string): Ignore event if not
9363 waiting.
9364
9365 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9366
9367 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9368
9369 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9370
9371 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9372
9373 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9374
9375 * inferiors.c (change_inferior_id): Add comment.
9376 * linux-low.c (check_removed_breakpoint): Add an early
9377 prototype. Improve debug output.
9378 (linux_attach): Doc update.
9379 (linux_detach_one_process, linux_detach): Clean up before releasing
9380 each process.
9381 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9382 * linux-low.h (struct process_info): Doc improvement.
9383 * mem-break.c (delete_all_breakpoints): New.
9384 * mem-break.h (delete_all_breakpoints): New prototype.
9385 * thread-db.c (find_first_thread): New.
9386 (thread_db_create_event): Call it instead of
9387 thread_db_find_new_threads. Clean up unused variables.
9388 (maybe_attach_thread): Remove first thread handling.
9389 (thread_db_find_new_threads): Use find_first_thread.
9390 (thread_db_get_tls_address): Likewise.
9391
9392 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9393
9394 * thread-db.c (thread_db_find_new_threads): Add prototype.
9395 (thread_db_create_event): Check for the main thread before adding
9396 a new thread.
9397 (maybe_attach_thread): Only enable event reporting if TID == 0.
9398 (thread_db_get_tls_address): Check for new threads.
9399
9400 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9401
9402 * linux-low.c (linux_create_inferior): Try execv before execvp.
9403 * spu-low.c (spu_create_inferior): Likewise.
9404
9405 2007-06-13 Mike Frysinger <vapier@gentoo.org>
9406
9407 * linux-low.c (linux_create_inferior): Change execv to execvp.
9408 * spu-low.c (spu_create_inferior): Likewies.
9409
9410 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9411
9412 * Makefile.in (clean): Clean new files instead of deleted ones.
9413 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9414 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9415 rules.
9416 * configure.srv: Specify XML files and new regformats for MIPS and
9417 MIPS64 GNU/Linux.
9418 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9419 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9420 an entry for the restart register.
9421 (mips_cannot_fetch_register, mips_cannot_store_register)
9422 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9423 register names to match the XML descriptions.
9424 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9425 restart register instead of $0.
9426
9427 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9428 Markus Deuling <deuling@de.ibm.com>
9429
9430 * remote-utils.c (decode_xfer_write): New function.
9431 * server.h (decode_xfer_write): Add prototype.
9432 * server.c (handle_query): Add PACKET_LEN argument. Support
9433 qXfer:spu:read and qXfer:spu:write packets.
9434 (main): Pass packet_len to handle_query.
9435 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9436 * target.h (target_ops): Add qxfer_spu.
9437
9438 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9439
9440 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9441 accessing non-seekable spufs files.
9442
9443 2007-05-16 Markus Deuling <deuling@de.ibm.com>
9444
9445 * server.c (handle_query): Add reply for qC packet.
9446
9447 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9448 Leo Zayas <lerele@champenstudios@com>
9449
9450 * server.h (check_remote_input_interrupt_request): New function.
9451 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9452 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9453 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9454 (check_remote_input_interrupt_request): New function.
9455 * server.h (check_remote_input_interrupt_request): Declare.
9456 * win32-low.c (winapi_DebugBreakProcess,
9457 winapi_GenerateConsoleCtrlEvent): New typedefs.
9458 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9459 to 250 ms.
9460 (win32_wait): Check for remote interrupt request
9461 with check_remote_input_interrupt_request.
9462 (win32_request_interrupt): New function.
9463 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9464
9465 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9466
9467 * win32-low.c (debug_registers_changed,
9468 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9469 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9470 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9471 (thread_rec): Get context using the low target.
9472 (child_add_thread): Call thread_added on the low target,
9473 which does the same thing.
9474 (regptr): Delete.
9475 (do_initial_child_stuff): Remove debug registers references.
9476 Set context using the low target. Resume threads after
9477 setting the contexts.
9478 (child_continue): Remove dead variable. Remove debug
9479 registers references.
9480 (child_fetch_inferior_registers): Go through the low target.
9481 (do_child_store_inferior_registers): Remove.
9482 (child_store_inferior_registers): Go through the low target.
9483 (win32_resume): Remove debug registers references.
9484 Set context using the low target.
9485 (handle_exception): Change return type to void. Don't record
9486 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9487 first chance exception.
9488 (get_child_debug_event): Change return type to void. Remove
9489 goto loop. Always return after waiting for debug event.
9490 (win32_wait): Convert to switch statement. Handle spurious
9491 events.
9492
9493 * win32-i386-low.c (debug_registers_changed,
9494 debug_registers_used): New.
9495 (initial_stuff): Rename to ...
9496 (i386_initial_stuff): ... this. Clear debug registers
9497 state variables.
9498 (store_debug_registers): Delete.
9499 (i386_get_thread_context): New.
9500 (load_debug_registers): Delete.
9501 (i386_set_thread_context): New.
9502 (i386_thread_added): New.
9503 (single_step): Rename to ...
9504 (i386_single_step): ... this.
9505 (do_fetch_inferior_registers): Rename to ...
9506 (i386_fetch_inferior_register): ... this.
9507 (i386_store_inferior_register): New.
9508 (the_low_target): Adapt to new interface.
9509
9510 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9511 (arm_get_thread_context): New.
9512 (arm_set_thread_context): New.
9513 (regptr): New.
9514 (do_fetch_inferior_registers): Rename to ...
9515 (arm_fetch_inferior_register): ... this.
9516 (arm_store_inferior_register): New.
9517 (arm_wince_breakpoint): Reimplement as unsigned long.
9518 (arm_wince_breakpoint_len): Define.
9519 (the_low_target): Adapt to new interface.
9520
9521 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9522 load_debug_registers. Add get_thread_context, set_thread_context,
9523 thread_added and store_inferior_register. Rename
9524 fetch_inferior_registers to fetch_inferior_register.
9525 (regptr): Remove declaration.
9526
9527 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9528
9529 * linux-low.c (linux_detach): Change return type to int. Return 0.
9530 * spu-low.c (spu_detach): Likewise.
9531
9532 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9533
9534 * target.h (target_ops): Change return type of detach to int.
9535 Add join.
9536 (join_inferior): New.
9537 * server.c (main): Don't skip detach support on mingw32.
9538 If the inferior doesn't support detaching return error.
9539 Call join_inferior instead of using waitpid.
9540 * linux-low.c (linux_join): New.
9541 (linux_target_op): Add linux_join.
9542 * spu-low.c (spu_join): New.
9543 (spu_target_ops): Add spu_join.
9544 * win32-low.c (win32_detach): Adapt to new interface.
9545 Reopen current_process_handle before detaching. Issue a child
9546 resume before detaching.
9547 (win32_join): New.
9548 (win32_target_op): Add win32_join.
9549
9550 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9551
9552 * win32-low.c (win32-attach): Fix return value.
9553 * target.h (target_ops): Describe ATTACH return values.
9554
9555 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9556
9557 * win32-low.c (GETPROCADDRESS): Define.
9558 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9559 (winapi_DebugSetProcessKillOnExit): Likewise.
9560 (win32_create_inferior): Force usage of ansi CreateProcessA.
9561 (win32_attach): Use GETPROCADDRESS.
9562 (win32_detach): Likewise.
9563
9564 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9565
9566 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9567
9568 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9569
9570 * win32-low.c: Commit leftover changes from 2007-03-29.
9571
9572 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9573
9574 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9575 fields short instead of int. Add explicit padding.
9576 (i387_cache_to_fsave): Remove unnecessary casts.
9577 (i387_fsave_to_cache): Doc fix.
9578 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9579
9580 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9581
9582 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9583 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9584
9585 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9586
9587 * configure.srv (arm*-*-mingw32ce*): Move near the other
9588 arm targets.
9589
9590 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9591
9592 * configure.ac: Add errno checking.
9593 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9594 sys/file.h and malloc.h.
9595 (AC_CHECK_DECLS): Add perror.
9596 (srv_mingwce): Handle.
9597 * configure.srv (i[34567]86-*-cygwin*): Add
9598 win32-i386-low.o to srv_tgtobj.
9599 (i[34567]86-*-mingw*): Likewise.
9600 (arm*-*-mingw32ce*): Add case.
9601 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9602 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9603 [__MINGW32CE__] (strerror): New function.
9604 [__MINGW32CE__] (errno): Define to GetLastError.
9605 [__MINGW32CE__] (COUNTOF): New macro.
9606 (remote_open): Remove extra close call.
9607 * mem-break.c (delete_breakpoint_at): New function.
9608 * mem-break.h (delete_breakpoint_at): Declare.
9609 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9610 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9611 [USE_WIN32API] (read, write): Add char* casts.
9612 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9613 * server.h: Include wincecompat.h on Windows CE.
9614 [HAVE_ERRNO_H]: Check.
9615 (perror): Declare if not declared.
9616 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9617 (perror_with_name): Remove errno declaration.
9618 * wincecompat.h: New.
9619 * wincecompat.c: New.
9620 * win32-low.h: New.
9621 * win32-arm-low.c: New.
9622 * win32-i386-low.c: New.
9623 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9624 (OUTMSG2): Make it safe.
9625 (_T): New macro.
9626 (COUNTOF): New macro.
9627 (NUM_REGS): Get it from the low target.
9628 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9629 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9630 (thread_rec): Let low target handle debug registers.
9631 (child_add_thread): Likewise.
9632 (child_init_thread_list): Likewise.
9633 (continue_one_thread): Likewise.
9634 (regptr): New.
9635 (do_child_fetch_inferior_registers): Move to ...
9636 * win32-i386-low.c: ... here, and rename to ...
9637 (do_fetch_inferior_registers): ... this.
9638 * win32-low.c (child_fetch_inferior_registers):
9639 Go through the low target.
9640 (do_child_store_inferior_registers): Use regptr.
9641 (strwinerror): New function.
9642 (win32_create_inferior): Handle Windows CE.
9643 Use strwinerror instead of strerror on Windows error
9644 codes. Add program to the error output.
9645 Don't close the main thread handle on Windows CE.
9646 (win32_attach): Use coredll.dll on Windows CE.
9647 (win32_kill): Close current process and current
9648 thread handles.
9649 (win32_detach): Use coredll.dll on Windows CE.
9650 (win32_resume): Let low target handle debug registers, and
9651 step request.
9652 (handle_exception): Add/Remove initial breakpoint. Avoid
9653 non-existant WSTOPSIG on Windows CE.
9654 (win32_read_inferior_memory): Cast to remove warning.
9655 (win32_arch_string): Go through the low target.
9656 (initialize_low): Call set_breakpoint_data with the low
9657 target's breakpoint.
9658 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9659 FOP_REGNUM, mappings): Move to ...
9660 * win32-i386-low.c: ... here.
9661 * win32-low.c (win32_thread_info): Move to ...
9662 * win32-low.h: ... here.
9663 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9664 win32-arm-low.c and wincecompat.c.
9665 (all:): Add $EXEEXT.
9666 (install-only:): Likewise.
9667 (gdbserver:): Likewise.
9668 (gdbreplay:): Likewise.
9669 * config.in: Regenerate.
9670 * configure: Regenerate.
9671
9672 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9673
9674 * win32-low.c: Rename typedef thread_info to
9675 win32_thread_info throughout.
9676
9677 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9678
9679 * win32-i386-low.c: Rename to ...
9680 * win32-low.c: ... this.
9681 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9682 * Makefile.in: Likewise.
9683
9684 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9685
9686 * remote-utils.c (monitor_output): Constify msg parameter.
9687 * server.h (monitor_output): Likewise.
9688 * win32-i386-low.c (handle_output_debug_string): New.
9689 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9690 handle_output_debug_string.
9691 (get_child_debug_event): Likewise.
9692
9693 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9694
9695 * server.c (main): Correct strtoul check.
9696
9697 2007-03-27 Jon Ringle <jon@ringle.org>
9698
9699 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9700
9701 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9702
9703 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9704
9705 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9706
9707 * terminal.h: Check HAVE_SGTTY_H.
9708
9709 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
9710
9711 * remote-utils.c (remote_open): Print out the assigned port number.
9712
9713 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9714
9715 * remote-utils.c (monitor_output): New function.
9716 * server.c (debug_threads): Define here.
9717 (monitor_show_help): New function.
9718 (handle_query): Handle qRcmd.
9719 (main): Do not handle 'd' packet.
9720 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9721 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9722 of debug_threads.
9723
9724 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9725
9726 * Makefile.in (EXEEXT): New.
9727 (clean): Use $(EXEEXT).
9728
9729 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9730
9731 * target.h (target_ops): Rename send_signal to request_interrupt,
9732 and remove enum target_signal parameter.
9733 * linux-low.c (linux_request_interrupt): Rename from
9734 linux_send_signal, and always send SIGINT.
9735 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9736 and always send SIGINT.
9737 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9738 of send_signal.
9739 (input_interrupt): Likewise.
9740
9741 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9742
9743 * server.c (get_features_xml): Check if target implemented
9744 arch_string.
9745 * win32-i386-low.c (win32_arch_string): New.
9746 (win32_target_ops): Add win32_arch_string as arch_string member.
9747
9748 2007-02-22 Markus Deuling <deuling@de.ibm.com>
9749
9750 * spu-low.c (spu_arch_string): New.
9751 (spu_target_ops): Add spu_arch_string.
9752
9753 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9754
9755 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9756 * configure.ac: Do not check for terminal.h.
9757 * configure, config.in: Regenerated.
9758
9759 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9760
9761 * Makefile.in (OBS): Add $(XML_BUILTIN).
9762 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9763 (clean): Update.
9764 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9765 (arm-with-iwmmxt.c): New.
9766 * config.in, configure: Regenerate.
9767 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9768 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9769 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9770 (arm*-*-linux*): Add iWMMXt and regset support.
9771 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9772 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9773 (arm_store_wmmxregset, target_regsets): New.
9774 * server.c (get_features_xml): Take annex argument. Check builtin
9775 XML documents.
9776 (handle_query): Handle multiple annexes.
9777
9778 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9779
9780 * remote-utils.c [USE_WIN32API] (read, write): Define.
9781 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9782 write.
9783
9784 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9785
9786 * linux-i386-low.c (the_low_target): Set arch_string.
9787 * linux-x86-64-low.c (the_low_target): Likewise.
9788 * linux-low.c (linux_arch_string): New.
9789 (linux_target_ops): Add it.
9790 * linux-low.h (struct linux_target_ops): Add arch_string.
9791 * server.c (write_qxfer_response): Use const void * for DATA.
9792 (get_features_xml): New.
9793 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9794 * target.h (struct target_ops): Add arch_string method.
9795
9796 2007-01-03 Denis Pilat <denis.pilat@st.com>
9797 Daniel Jacobowitz <dan@codesourcery.com>
9798
9799 * linux-low.c (linux_kill): Handle being called with no threads.
9800 * win32-i386-low.c (win32_kill): Likewise.
9801 (get_child_debug_event): Clear current_process_handle.
9802
9803 2006-12-30 Denis PILAT <denis.pilat@st.com>
9804 Daniel Jacobowitz <dan@codesourcery.com>
9805
9806 * remote-utils.c (remote_open): Check the type of specified
9807 serial port devices before opening them.
9808 * server.c (main): Kill the inferior if an error occurs during
9809 the first remote_open.
9810
9811 2006-12-05 Markus Deuling <deuling@de.ibm.com>
9812
9813 * README: Update supported targets.
9814
9815 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9816
9817 * Makefile.in (clean): Remove reg-mips64.c.
9818 (reg-mips64.c, reg-mips64.o): New rules.
9819 * configure.srv: Handle mips64. Include regset support for mips.
9820 * linux-mips-low.c (union mips_register): New.
9821 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9822 (mips_breakpoint, mips_breakpoint_at): Use int.
9823 (mips_collect_register, mips_supply_register)
9824 (mips_collect_register_32bit, mips_supply_register_32bit)
9825 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9826 (mips_store_fpregset, target_regsets): New.
9827 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9828
9829 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9830
9831 * configure.srv: Add target "spu*-*-*".
9832 * Makefile.in (clean): Remove reg-spu.c.
9833 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9834 * spu-low.c: New file.
9835
9836 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9837
9838 * configure.ac: Correct td_thr_tls_get_addr test.
9839 * configure: Regenerated.
9840
9841 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9842
9843 * linux-low.c (linux_wait_for_event): Reformat. Use the
9844 pass_signals array.
9845 * remote-utils.c (decode_address_to_semicolon): New.
9846 * server.c (pass_signals, handle_general_set): New.
9847 (handle_query): Mention QPassSignals for qSupported.
9848 (main): Call handle_general_set.
9849 * server.h (pass_signals, decode_address_to_semicolon): New.
9850
9851 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9852
9853 * server.c (handle_query): Correct error handling for read_auxv.
9854
9855 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9856
9857 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9858 and srv_linux_thread_db to yes.
9859 * linux-s390-low.c (s390_fill_gregset): New function.
9860 (target_regsets): Define data structure.
9861
9862 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9863
9864 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9865 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9866 * config.in, configure: Regenerated.
9867 * inferiors.c (gdb_id_to_thread): New function.
9868 (gdb_id_to_thread_id): Use it.
9869 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9870 * linux-low.h (struct process_info): Add th member.
9871 (thread_db_get_tls_address): New prototype.
9872 * remote-utils.c (decode_address): Make non-static.
9873 * server.c (handle_query): Handle qGetTLSAddr.
9874 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9875 * target.h (struct target_ops): Add get_tls_address.
9876 * thread-db.c (maybe_attach_thread): Save the thread handle.
9877 (thread_db_get_tls_address): New.
9878
9879 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9880
9881 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9882 (linux_resume_one_process): Take a siginfo_t *. Update all
9883 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9884 (struct pending_signals): Add a siginfo_t.
9885 (linux_wait_for_process): Always set last_status.
9886 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9887 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9888 * linux-low.h (struct process_info): Add last_status.
9889
9890 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9891
9892 * remote-utils.c (try_rle): New function.
9893 (putpkt_binary): Use it.
9894
9895 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9896
9897 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9898 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9899 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9900 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9901 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9902 point registers.
9903
9904 2006-08-08 Richard Sandiford <richard@codesourcery.com>
9905
9906 * server.c (terminal_fd): New variable.
9907 (old_foreground_pgrp): Likewise.
9908 (restore_old_foreground_pgrp): New function.
9909 (start_inferior): Record the terminal file descriptor in terminal_fd
9910 and its original foreground group in old_foreground_pgrp. Register
9911 restore_old_foreground_pgrp with atexit().
9912
9913 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9914
9915 * server.c (handle_query): Correct qPart to qXfer.
9916
9917 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9918
9919 * configure.ac: Check for more headers which are missing on
9920 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9921 * configure.srv: Add Cygwin and mingw32.
9922 * remote-utils.c: Don't include headers unconditionally which
9923 are missing on mingw32. Include <winsock.h> for mingw32.
9924 (remote_open): Adjust for mingw32 support. Flush
9925 standard error after writing to it.
9926 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9927 (unblock_async_io, enable_async_io, disable_async_io)
9928 (readchar, getpkt): Update for Winsock support.
9929 (prepare_resume_reply): Expect a protocol signal number.
9930 * server.c: Disable <sys/wait.h> on mingw32.
9931 (start_inferior): Adjust for mingw32 support. Flush
9932 standard error after writing to it.
9933 (attach_inferior): Likewise. Use protocol signal
9934 numbers.
9935 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9936 and names.
9937 * win32-i386-low.c: New file.
9938 * Makefile.in (XM_CLIBS): Set.
9939 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9940 (win32-i386-low.o): New dependency rule.
9941 * linux-low.c (linux_wait): Use target signal numbers.
9942 * target.h (struct target_ops): Doc fix.
9943 * server.h (target_signal_to_name): New prototype.
9944 * gdbreplay.c: Don't include headers unconditionally which
9945 are missing on mingw32. Include <winsock.h> for mingw32.
9946 (remote_close, remote_open): Adjust for Winsock support.
9947 * configure, config.in: Regenerated.
9948
9949 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9950
9951 * server.c (decode_xfer_read, write_qxfer_response): New.
9952 (handle_query): Take a packet length argument. Handle
9953 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9954 the qSupported response.
9955 (main): Update call to handle_query.
9956
9957 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9958
9959 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9960 (putpkt_binary): Renamed from putpkt and adjusted for binary
9961 data.
9962 (putpkt): New wrapper for putpkt_binary.
9963 (readchar): Don't mask off the high bit.
9964 (decode_X_packet): New function.
9965 * server.c (main): Call putpkt_binary if a handler sets the packet
9966 length. Save the length of the incoming packet. Handle 'X'.
9967 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9968
9969 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9970
9971 * server.c (handle_query): Handle qSupported.
9972
9973 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9974
9975 * remote-utils.c (all_symbols_looked_up): New variable.
9976 (look_up_one_symbol): Check it.
9977 * server.h (look_up_one_symbol): New declaration.
9978 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9979
9980 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9981
9982 * Makefile.in (linux-arm-low.o): Update dependencies.
9983 * linux-arm-low.c: Include "gdb_proc_service.h".
9984 (PTRACE_GET_THREAD_AREA): Define.
9985 (ps_get_thread_area): New function.
9986
9987 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9988
9989 * configure.srv (m68k*-*-uclinux*): New target.
9990 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9991 (linux_resume_one_process): Remove extraneous cast.
9992 (linux_read_offsets): New.
9993 (linux_target_op): Add linux_read_offsets on mmuless systems.
9994 * server.c (handle_query): Add qOffsets logic.
9995 * target.h (struct target_ops): Add read_offsets.
9996
9997 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9998
9999 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10000 (PTRACE_GET_THREAD_AREA): Define.
10001 (ps_get_thread_area): New function.
10002 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10003 (linux-x86-64-low.o): Update.
10004
10005 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10006
10007 * configure.ac: Remove checks for prfpregset_t.
10008 * gdb_proc_service.h: New file.
10009 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10010 new "gdb_proc_service.h".
10011 * proc-service.c: Likewise.
10012 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10013 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10014 * Makefile.in (gdb_proc_service_h): Updated.
10015 * configure, config.in: Regenerated.
10016
10017 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10018
10019 * remote-utils.c (prepare_resume_reply): Move declaration
10020 of gdb_id_from_wait to the top of the block.
10021
10022 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10023
10024 * linux-low.c (regsets_store_inferior_registers): Read the regset
10025 from the target before filling it.
10026
10027 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10028
10029 * server.c (attach_inferior): Return SIGTRAP for a successful
10030 attach.
10031
10032 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10033
10034 * Makefile.in (OBS): Add version.o.
10035 (STAGESTUFF): Delete.
10036 (version.o): Add dependencies.
10037 (version.c): Replace rule.
10038 (clean): Remove version.c.
10039 * server.c (gdbserver_version): New.
10040 (gdbserver_usage): Use printf.
10041 (main): Handle --version and --help.
10042 * server.h (version, host_name): Add declarations.
10043
10044 2005-12-23 Eli Zaretskii <eliz@gnu.org>
10045
10046 * linux-arm-low.c:
10047 * linux-arm-low.c:
10048 * inferiors.c:
10049 * i387-fp.h:
10050 * i387-fp.c:
10051 * gdbreplay.c:
10052 * regcache.c:
10053 * proc-service.c:
10054 * mem-break.h:
10055 * mem-break.c:
10056 * linux-x86-64-low.c:
10057 * linux-sh-low.c:
10058 * linux-s390-low.c:
10059 * linux-ppc64-low.c:
10060 * linux-ppc-low.c:
10061 * linux-mips-low.c:
10062 * linux-m68k-low.c:
10063 * linux-m32r-low.c:
10064 * linux-low.h:
10065 * linux-low.c:
10066 * linux-ia64-low.c:
10067 * linux-i386-low.c:
10068 * linux-crisv32-low.c:
10069 * thread-db.c:
10070 * terminal.h:
10071 * target.h:
10072 * target.c:
10073 * server.h:
10074 * server.c:
10075 * remote-utils.c:
10076 * regcache.h:
10077 * utils.c:
10078 * Makefile.in:
10079 * configure.ac:
10080 * gdbserver.1: Add (C) after Copyright. Update the FSF
10081 address.
10082
10083 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10084
10085 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10086 (arm_breakpoint_at): Recognize both breakpoints.
10087 (the_low_target): Use the correct breakpoint instruction.
10088
10089 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10090
10091 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10092 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10093 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10094 (the_low_target): Update.
10095
10096 2005-10-25 Andreas Schwab <schwab@suse.de>
10097
10098 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10099
10100 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10101 (ia64_num_regs): Reduce to 462.
10102
10103 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10104
10105 * acinclude.m4: Correct quoting.
10106 * aclocal.m4: Regenerated.
10107
10108 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10109 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10110 (thread_db_init): Call thread_db_err_str.
10111 * configure.ac: Check for TD_VERSION.
10112 * config.in, configure: Regenerated.
10113
10114 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10115
10116 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10117
10118 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10119
10120 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10121 is not available. Define HAVE_PTRACE_GETREGS if it is.
10122 * config.in, configure: Regenerated.
10123 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10124 * linux-i386-low.c, linux-m68k-low.c: Update to use
10125 HAVE_PTRACE_GETREGS.
10126 * linux-low.c (regsets_fetch_inferior_registers)
10127 (regsets_store_inferior_registers): Only return 0 if we processed
10128 GENERAL_REGS.
10129 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10130 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10131
10132 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10133
10134 * inferiors.c (struct thread_info): Add gdb_id.
10135 (add_thread): Add gdb_id argument.
10136 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10137 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10138 calls to add_thread.
10139 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10140 * server.c (handle_query): Use thread_to_gdb_id.
10141 (handle_v_cont, main): Use gdb_id_to_thread_id.
10142 * server.h (add_thread): Update prototype.
10143 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10144 prototypes.
10145
10146 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10147
10148 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10149 left-padded registers.
10150 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10151 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10152
10153 2005-07-01 Steve Ellcey <sje@cup.hp.com>
10154
10155 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10156 * configure: Regenerate.
10157 * config.in: Regenerate.
10158 * server.h (NEED_DECLARATION_STRERROR):
10159 Replace with !HAVE_DECL_STRERROR.
10160
10161 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10162
10163 * linux-low.c (linux_wait, linux_send_signal): Don't test
10164 an unsigned long variable for > 0 if it could be MAX_ULONG.
10165 * server.c (myresume): Likewise.
10166 * target.c (set_desired_inferior): Likewise.
10167
10168 2005-06-13 Mark Kettenis <kettenis@gnu.org>
10169
10170 * configure.ac: Simplify and improve check for socklen_t.
10171 * configure, config.in: Regenerate.
10172
10173 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10174
10175 * acconfig.h: Remove.
10176 * configure.ac: Add a test for socklen_t. Use three-argument
10177 AC_DEFINE throughout.
10178 * config.in: Regenerated using autoheader 2.59.
10179 * configure: Regenerated.
10180
10181 * gdbreplay.c (socklen_t): Provide a default.
10182 (remote_open): Use socklen_t.
10183 * remote-utils.c (socklen_t): Provide a default.
10184 (remote_open): Use socklen_t.
10185 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10186 unsigned char.
10187
10188 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10189 char for buffers.
10190 * linux-low.c (linux_read_memory, linux_write_memory)
10191 (linux_read_auxv): Likewise.
10192 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10193 (check_mem_write): Likewise.
10194 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10195 Likewise.
10196 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10197 (registers_from_string, register_data): Likewise.
10198 * server.c (handle_query, main): Likewise.
10199 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10200 (decode_M_packet): Likewise.
10201 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10202 * target.h (struct target_ops): Update read_memory, write_memory,
10203 and read_auxv.
10204 (read_inferior_memory, write_inferior_memory): Update.
10205 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10206 to unsigned char *.
10207 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10208 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10209 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10210 linux-s390-low.c, linux-sh-low.c: Update for changes in
10211 read_inferior_memory and the_low_target->breakpoint.
10212
10213 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10214
10215 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10216 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10217 * configure.srv: Add powerpc64-*-linux*.
10218 * linux-ppc64-low.c: New file.
10219
10220 2005-05-23 Orjan Friberg <orjanf@axis.com>
10221
10222 * linux-cris-low.c: New file with support for CRIS.
10223 * linux-crisv32-low.c: Ditto for CRISv32.
10224 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10225 (clean): Add reg-cris.c and reg-crisv32.c.
10226 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
10227 reg-crisv32.o, and reg-crisv32.c to make rules.
10228 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10229 recognized targets.
10230
10231 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10232
10233 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10234 of sizeof (PTRACE_XFER_TYPE).
10235 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10236
10237 2005-05-12 Orjan Friberg <orjanf@axis.com>
10238
10239 * target.h (struct target_ops): Add insert_watchpoint,
10240 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10241 pointers for hardware watchpoint support.
10242 * linux-low.h (struct linux_target_ops): Ditto.
10243 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10244 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10245 to linux_target_ops.
10246 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10247 reply packet.
10248 * server.c (main): Recognize 'Z' and 'z' packets.
10249
10250 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10251
10252 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10253 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10254 (the_low_target): Add new members.
10255
10256 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10257
10258 * proc-service.c (ps_lgetregs): Search all_processes instead of
10259 all_threads.
10260
10261 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10262
10263 * server.c (start_inferior): Change return type to int.
10264 (attach_inferior): Change sigptr to int *.
10265 (handle_v_cont, handle_v_requests): Change signal to int *.
10266 (main): Change signal to int.
10267
10268 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
10269
10270 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10271 * configure.srv: Add m32r*-*-linux*.
10272 * linux-m32r-low.c: New file.
10273
10274 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10275
10276 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10277
10278 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10279
10280 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10281 Take unsigned long arguments for PIDs.
10282 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10283 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10284 (wait_for_sigstop, linux_resume_one_process)
10285 (regsets_fetch_inferior_registers, linux_send_signal)
10286 (linux_read_auxv): Likewise. Update the types of variables holding
10287 PIDs. Update format string specifiers.
10288 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10289 * remote-utils.c (prepare_resume_reply): Likewise.
10290 * server.c (cont_thread, general_thread, step_thread)
10291 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10292 unsigned long.
10293 (handle_query): Update format specifiers.
10294 (handle_v_cont, main): Use strtoul for thread IDs.
10295 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10296 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10297 (general_thread, step_thread, thread_from_wait)
10298 (old_thread_from_wait): Update.
10299 * target.h (struct thread_resume): Use unsigned long for THREAD.
10300 (struct target_ops): Use unsigned long for arguments to attach and
10301 thread_alive.
10302
10303 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10304
10305 * acinclude.m4: Include bfd/bfd.m4 directly.
10306 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10307 <agriffis@toolchain.org>.
10308 * aclocal.m4, configure: Regenerated.
10309
10310 2005-01-07 Andrew Cagney <cagney@gnu.org>
10311
10312 * configure.ac: Rename configure.in, require autoconf 2.59.
10313 * configure: Re-generate.
10314
10315 2004-12-08 Daniel Jacobowitz <dan@debian.org>
10316
10317 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10318 LIBS when finished.
10319 * aclocal.m4: Regenerated.
10320 * configure: Regenerated.
10321
10322 2004-11-21 Andreas Schwab <schwab@suse.de>
10323
10324 * linux-m68k-low.c (m68k_num_gregs): Define.
10325 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10326 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10327 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10328 (m68k_breakpoint_at): New. Add to the_low_target.
10329
10330 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10331 srv_linux_thread_db to yes.
10332
10333 2004-10-20 Joel Brobecker <brobecker@gnat.com>
10334
10335 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10336 (ARCH_SET_FS): Likewise.
10337 (ARCH_GET_FS): Likewise.
10338 (ARCH_GET_GS): Likewise.
10339
10340 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10341
10342 * linux-i386-low.c (ps_get_thread_area): New.
10343 * linux-x86-64-low.c (ps_get_thread_area): New.
10344 * linux-low.c: Include <sys/syscall.h>.
10345 (linux_kill_one_process): Don't kill the first thread here.
10346 (linux_kill): Kill the first thread here.
10347 (kill_lwp): New function.
10348 (send_sigstop, linux_send_signal): Use it.
10349 * proc-service.c: Clean up #ifdefs.
10350 (fpregset_info): Delete.
10351 (ps_lgetregs): Update and enable implementation.
10352 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10353 implementations.
10354 * remote-utils.c (struct sym_cache, symbol_cache): New.
10355 (input_interrupt): Print a clearer message.
10356 (async_io_enabled): New variable.
10357 (enable_async_io, disable_async_io): Use it. Update comments.
10358 (look_up_one_symbol): Use the symbol cache.
10359 * thread-db.c (thread_db_look_up_symbols): New function.
10360 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10361
10362 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10363
10364 * configure.in: Test for -rdynamic.
10365 * configure: Regenerated.
10366 * Makefile (INTERNAL_LDFLAGS): New.
10367 (gdbserver, gdbreplay): Use it.
10368
10369 2004-09-02 Andrew Cagney <cagney@gnu.org>
10370
10371 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10372
10373 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
10374
10375 * linux-low.c (linux_wait): Clear all_processes list also.
10376
10377 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10378
10379 * linux-low.c: Include <errno.h>. Remove extern declaration of
10380 errno.
10381
10382 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10383
10384 * gdbreplay.c, server.h, utils.c: Update copyright years.
10385
10386 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10387
10388 * server.c (main): Print child status or termination signal from
10389 variable 'signal', not 'sig'.
10390
10391 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10392
10393 * linux-low.c (linux_read_memory): Change return type to
10394 int. Check for and return error from ptrace().
10395 * target.c (read_inferior_memory): Change return type to int. Pass
10396 back return status from the_target->read_memory().
10397 * target.h (struct target_ops): Adapt *read_memory() prototype.
10398 Update comment.
10399 (read_inferior_memory): Adapt prototype.
10400 * server.c (main): Return an error packet if
10401 read_inferior_memory() returns an error.
10402
10403 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
10404
10405 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10406 Unify with other clean targets.
10407
10408 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10409
10410 * server.c (handle_v_cont): Call set_desired_inferior.
10411
10412 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10413
10414 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10415
10416 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10417
10418 * linux-low.c (linux_wait): Unblock async I/O.
10419 (linux_resume): Block and enable async I/O.
10420 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10421 * server.h (block_async_io, unblock_async_io): Add prototypes.
10422
10423 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10424
10425 * remote-utils.c (remote_open): Print a status notice after
10426 opening a TCP port.
10427 * server.c (attach_inferior): Print a status notice after
10428 attaching.
10429
10430 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10431
10432 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10433
10434 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
10435
10436 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10437 error packet.
10438 * server.c, target.h: Update copyright years.
10439
10440 2004-02-25 Roland McGrath <roland@redhat.com>
10441
10442 * target.h (struct target_ops): New member `read_auxv'.
10443 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10444 * linux-low.c (linux_read_auxv): New function.
10445 (linux_target_ops): Initialize `read_auxv' member to that.
10446
10447 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10448
10449 Committed by Jim Blandy <jimb@redhat.com>.
10450
10451 * linux-s390-low.c (s390_num_regs): Update.
10452 (s390_regmap): Remove control registers. Use __s390x__ predefine
10453 instead of GPR_SIZE to distiguish s390 and s390x targets.
10454
10455 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
10456
10457 * linux-low.c: Update copyright year.
10458 (check_removed_breakpoint): Clear pending_is_breakpoint.
10459 (linux_set_resume_request, linux_queue_one_thread)
10460 (resume_status_pending_p): New functions.
10461 (linux_continue_one_thread): Use process->resume.
10462 (linux_resume): Only resume threads if there are no pending events.
10463 * linux-low.h (struct process_info): Add resume request
10464 pointer.
10465
10466 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
10467
10468 * regcache.c (new_register_cache): Clear the allocated register
10469 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10470
10471 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
10472
10473 * linux-low.c (linux_resume): Take a struct thread_resume *
10474 argument.
10475 (linux_wait): Update call.
10476 (resume_ptr): New static variable.
10477 (linux_continue_one_thread): Renamed from
10478 linux_continue_one_process. Use resume_ptr.
10479 (linux_resume): Use linux_continue_one_thread.
10480 * server.c (handle_v_cont, handle_v_requests): New functions.
10481 (myresume): New function.
10482 (main): Handle 'v' case.
10483 * target.h (struct thread_resume): New type.
10484 (struct target_ops): Change argument of "resume" to struct
10485 thread_resume *.
10486 (myresume): Delete macro.
10487
10488 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10489
10490 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10491 (uninstall): Support DESTDIR.
10492
10493 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10494
10495 * configure.srv: Add xscale*linux copy of arm*linux entry.
10496
10497 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
10498
10499 * linux-arm-low.c (arm_reinsert_addr): New function.
10500 (the_low_target): Add arm_reinsert_addr.
10501
10502 2003-07-08 Mark Kettenis <kettenis@gnu.org>
10503
10504 * mem-break.c: Remove whitespace at end of file.
10505
10506 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10507
10508 * configure.in: Check whether we need to prototype strerror.
10509 * server.h: Optionally prototype strerror.
10510 * gdbreplay.c (perror_with_name): Use strerror.
10511 * linux-low.c (linux_attach_lwp): Use strerror.
10512 * utils.c (perror_with_name): Use strerror.
10513 * config.in, configure: Regenerated.
10514
10515 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10516
10517 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10518 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10519
10520 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
10521
10522 * Makefile.in (SFILES): Update.
10523 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10524 low-sun3.c: Remove files.
10525
10526 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
10527
10528 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10529 (linux_detach_one_process, linux_detach): New functions.
10530 (linux_target_ops): Add linux_detach.
10531 * server.c (main): Handle 'D' packet.
10532 * target.h (struct target_ops): Add "detach" member.
10533 (detach_inferior): Define.
10534
10535 2003-06-13 Mark Kettenis <kettenis@gnu.org>
10536
10537 From Kelley Cook <kelleycook@wideopenwest.com>:
10538 * configure.srv: Accept i[34567]86 variants.
10539
10540 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
10541
10542 * linux-low.c (linux_wait_for_event): Correct comment typos.
10543 (linux_resume_one_process): Call check_removed_breakpoint.
10544 (linux_send_signal): New function.
10545 (linux_target_ops): Add linux_send_signal.
10546 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10547 of kill.
10548 * target.h (struct target_ops): Add send_signal.
10549
10550 2003-05-29 Jim Blandy <jimb@redhat.com>
10551
10552 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10553 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10554 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10555 away part of the register's value.
10556
10557 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
10558
10559 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10560 (linux_wait_for_event, linux_init_signals): Likewise.
10561
10562 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
10563
10564 * configure.in: Check for stdlib.h.
10565 * configure: Regenerated.
10566 * config.in: Regenerated.
10567
10568 2003-01-04 Andreas Schwab <schwab@suse.de>
10569
10570 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10571
10572 2003-01-02 Andrew Cagney <ac131313@redhat.com>
10573
10574 * Makefile.in: Remove obsolete code.
10575
10576 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
10577
10578 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10579 defined(PT_FPR0_HI).
10580
10581 2002-11-17 Stuart Hughes <seh@zee2.com>
10582
10583 * linux-arm-low.c (arm_num_regs): Increase.
10584 (arm_regmap): Include status register.
10585
10586 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
10587
10588 * linux-low.c (register_addr): Remove incorrect -1 check.
10589
10590 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
10591
10592 * linux-low.c (linux_create_inferior): Call setpgid. Return
10593 the new PID.
10594 (unstopped_p, linux_signal_pid): Remove.
10595 (linux_target_ops): Remove linux_signal_pid.
10596 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10597 global instead of target method.
10598 * target.h (struct target_ops): Remove signal_pid. Update comment
10599 for create_inferior.
10600 * server.c (signal_pid): New variable.
10601 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
10602 gdbserver. Set the child to be the foreground process group.
10603 (attach_inferior): Set signal_pid.
10604
10605 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
10606
10607 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10608
10609 2002-08-20 Jim Blandy <jimb@redhat.com>
10610
10611 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10612 default for this.
10613
10614 2002-08-01 Andrew Cagney <cagney@redhat.com>
10615
10616 * Makefile.in: Make chill references obsolete.
10617
10618 2002-07-24 Kevin Buettner <kevinb@redhat.com>
10619
10620 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10621 * configure: Regenerate.
10622 * config.in: Regenerate.
10623
10624 2002-07-09 David O'Brien <obrien@FreeBSD.org>
10625
10626 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10627 (perror_with_name, remote_close, remote_open, expect, play): Static.
10628
10629 2002-07-04 Michal Ludvig <mludvig@suse.cz>
10630
10631 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
10632 byte offsets instead of an array of indexes.
10633 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10634
10635 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
10636
10637 * regcache.c: Add comment.
10638
10639 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
10640
10641 * thread-db.c: New file.
10642 * proc-service.c: New file.
10643 * acinclude.m4: New file.
10644 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10645 proc-service.o, and thread-db.o.
10646 (linux-low.o): Add USE_THREAD_DB.
10647 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10648 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10649 * aclocal.m4: Regenerated.
10650 * config.in: Regenerated.
10651 * configure: Regenerated.
10652 * configure.in: Check for proc_service.h, sys/procfs.h,
10653 thread_db.h, and linux/elf.h headrs.
10654 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10655 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10656 Check for -lthread_db and thread support.
10657 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10658 PowerPC, and SuperH.
10659 * i387-fp.c: Constify arguments.
10660 * i387-fp.h: Likewise.
10661 * inferiors.c: (struct thread_info): Renamed from
10662 `struct inferior_info'. Remove PID member. Use generic inferior
10663 list header. All uses updated.
10664 (inferiors, signal_pid): Removed.
10665 (all_threads): New variable.
10666 (get_thread): Define.
10667 (add_inferior_to_list): New function.
10668 (for_each_inferior): New function.
10669 (change_inferior_id): New function.
10670 (add_inferior): Removed.
10671 (remove_inferior): New function.
10672 (add_thread): New function.
10673 (free_one_thread): New function.
10674 (remove_thread): New function.
10675 (clear_inferiors): Use for_each_inferior and free_one_thread.
10676 (find_inferior): New function.
10677 (find_inferior_id): New function.
10678 (inferior_target_data): Update argument type.
10679 (set_inferior_target_data): Likewise.
10680 (inferior_regcache_data): Likewise.
10681 (set_inferior_regcache_data): Likewise.
10682 * linux-low.c (linux_bp_reinsert): Remove.
10683 (all_processes, stopping_threads, using_thrads)
10684 (struct pending_signals, debug_threads, pid_of): New.
10685 (inferior_pid): Replace with macro.
10686 (struct inferior_linux_data): Remove.
10687 (get_stop_pc, add_process): New functions.
10688 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10689 Use add_process and add_thread.
10690 (linux_attach_lwp): New function, based on old linux_attach. Use
10691 add_process and add_thread. Set stop_expected for new threads.
10692 (linux_attach): New function.
10693 (linux_kill_one_process): New function.
10694 (linux_kill): Kill all LWPs.
10695 (linux_thread_alive): Use find_inferior_id.
10696 (check_removed_breakpoints, status_pending_p): New functions.
10697 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10698 Update. Use WNOHANG. Wait for cloned processes also. Update process
10699 struct for the found process.
10700 (linux_wait_for_event): New function.
10701 (linux_wait): Use it. Support LWPs.
10702 (send_sigstop, wait_for_sigstop, stop_all_processes)
10703 (linux_resume_one_process, linux_continue_one_process): New functions.
10704 (linux_resume): Support LWPs.
10705 (REGISTER_RAW_SIZE): Remove.
10706 (fetch_register): Use register_size instead. Call supply_register.
10707 (usr_store_inferior_registers): Likewise. Call collect_register.
10708 Fix recursive case.
10709 (regsets_fetch_inferior_registers): Improve error message.
10710 (regsets_store_inferior_registers): Add debugging.
10711 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10712 (unstopped_p, linux_signal_pid): New functions.
10713 (linux_target_ops): Add linux_signal_pid.
10714 (linux_init_signals): New function.
10715 (initialize_low): Call it. Initialize using_threads.
10716 * regcache.c (inferior_regcache_data): Add valid
10717 flag.
10718 (get_regcache): Fetch registers lazily. Add fetch argument
10719 and update all callers.
10720 (regcache_invalidate_one, regcache_invalidate): New
10721 functions.
10722 (new_register_cache): Renamed from create_register_cache.
10723 Return the new regcache.
10724 (free_register_cache): Change argument to a void *.
10725 (registers_to_string, registers_from_string): Call get_regcache
10726 with fetch flag set.
10727 (register_data): Make static. Pass fetch flag to get_regcache.
10728 (supply_register): Call get_regcache with fetch flag clear.
10729 (collect_register): Call get_regcache with fetch flag set.
10730 (collect_register_as_string): New function.
10731 * regcache.h: Update.
10732 * remote-utils.c (putpkt): Flush after debug output and use
10733 stderr.
10734 Handle input interrupts while waiting for an ACK.
10735 (input_interrupt): Use signal_pid method.
10736 (getpkt): Flush after debug output and use stderr.
10737 (outreg): Use collect_register_as_string.
10738 (new_thread_notify, dead_thread_notify): New functions.
10739 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10740 and general_thread.
10741 (look_up_one_symbol): Flush after debug output.
10742 * server.c (step_thread, server_waiting): New variables.
10743 (start_inferior): Don't use signal_pid. Update call to mywait.
10744 (attach_inferior): Update call to mywait.
10745 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10746 (main): Don't fetch/store registers explicitly. Use
10747 set_desired_inferior. Support proposed ``Hs'' packet. Update
10748 calls to mywait.
10749 * server.h: Update.
10750 (struct inferior_list, struct_inferior_list_entry): New.
10751 * target.c (set_desired_inferior): New.
10752 (write_inferior_memory): Constify.
10753 (mywait): New function.
10754 * target.h: Update.
10755 (struct target_ops): New signal_pid method.
10756 (mywait): Removed macro, added prototype.
10757
10758 * linux-low.h (regset_func): Removed.
10759 (regset_fill_func, regset_store_func): New.
10760 (enum regset_type): New.
10761 (struct regset_info): Add type field. Use new operation types.
10762 (struct linux_target_ops): stop_pc renamed to get_pc.
10763 Add decr_pc_after_break and breakpoint_at.
10764 (get_process, get_thread_proess, get_process_thread)
10765 (strut process_info, all_processes, linux_attach_lwp)
10766 (thread_db_init): New.
10767
10768 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10769 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10770 (the_low_target): Add new members.
10771 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10772 (i386_store_fpxregset): Constify.
10773 (target_regsets): Add new kind identifier.
10774 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10775 (i386_set_pc): Add debugging.
10776 (i386_breakpoint_at): New function.
10777 (the_low_target): Add new members.
10778 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10779 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10780 (mips_breakpoint_at): New.
10781 (the_low_target): Add new members.
10782 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10783 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10784 (the_low_target): Add new members.
10785 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10786 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10787 (the_low_target): Add new members.
10788 * linux-x86-64-low.c (target_regsets): Add new kind
10789 identifier.
10790
10791 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
10792
10793 From Martin Pool <mbp@samba.org>:
10794 * server.c (gdbserver_usage): New function.
10795 (main): Call it.
10796
10797 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
10798
10799 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10800 stop_at -> stop_pc.
10801
10802 2002-05-04 Andrew Cagney <ac131313@redhat.com>
10803
10804 * Makefile.in: Remove obsolete code.
10805
10806 2002-04-24 Michal Ludvig <mludvig@suse.cz>
10807
10808 * linux-low.c (regsets_fetch_inferior_registers),
10809 (regsets_store_inferior_registers): Removed cast to int from
10810 ptrace() calls.
10811 * regcache.h: Added declaration of struct inferior_info.
10812
10813 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10814
10815 * inferiors.c (struct inferior_info): Add regcache_data.
10816 (add_inferior): Call create_register_cache.
10817 (clear_inferiors): Call free_register_cache.
10818 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10819 * regcache.c (struct inferior_regcache_data): New.
10820 (registers): Remove.
10821 (get_regcache): New function.
10822 (create_register_cache, free_register_cache): New functions.
10823 (set_register_cache): Don't initialize the register cache here.
10824 (registers_to_string, registers_from_string, register_data): Call
10825 get_regcache.
10826 * regcache.h: Add prototypes.
10827 * server.h: Likewise.
10828
10829 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10830
10831 * mem-break.c: New file.
10832 * mem-break.h: New file.
10833 * Makefile.in: Add mem-break.o rule; update server.h
10834 dependencies.
10835 * inferiors.c (struct inferior_info): Add target_data
10836 member.
10837 (clear_inferiors): Free target_data member if set.
10838 (inferior_target_data, set_inferior_target_data): New functions.
10839 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10840 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10841 * linux-low.c (linux_bp_reinsert): New variable.
10842 (struct inferior_linux_data): New.
10843 (linux_create_inferior): Use set_inferior_target_data.
10844 (linux_attach): Likewise. Call add_inferior.
10845 (linux_wait_for_one_inferior): New function.
10846 (linux_wait): Call it.
10847 (linux_write_memory): Add const.
10848 (initialize_low): Call set_breakpoint_data.
10849 * linux-low.h (struct linux_target_ops): Add breakpoint
10850 handling members.
10851 * server.c (attach_inferior): Remove extra add_inferior
10852 call.
10853 * server.h: Include mem-break.h. Update inferior.c
10854 prototypes.
10855 * target.c (read_inferior_memory)
10856 (write_inferior_memory): New functions.
10857 * target.h (read_inferior_memory)
10858 (write_inferior_memory): Change macros to prototypes.
10859 (struct target_ops): Update comments. Add const to write_memory
10860 definition.
10861
10862 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
10863
10864 * linux-low.c (usr_store_inferior_registers): Support
10865 registers which are allowed to fail to store.
10866 * linux-low.h (linux_target_ops): Likewise.
10867 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10868 (ppc_cannot_store_register): FPSCR may not be storable.
10869
10870 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10871
10872 * server.h: Include <string.h> if HAVE_STRING_H.
10873 * ChangeLog: Correct paths in last ChangeLog entry.
10874
10875 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10876
10877 * linux-low.h: Remove obsolete prototypes.
10878 (struct linux_target_ops): New.
10879 (extern the_low_target): New.
10880 * linux-low.c (num_regs, regmap): Remove declarations.
10881 (register_addr): Use the_low_target explicitly.
10882 (fetch_register): Likewise.
10883 (usr_fetch_inferior_registers): Likewise.
10884 (usr_store_inferior_registers): Likewise.
10885 * linux-arm-low.c (num_regs): Remove.
10886 (arm_num_regs): Define.
10887 (arm_regmap): Renamed from regmap, made static.
10888 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10889 made static.
10890 (arm_cannot_store_register): Renamed from cannot_store_register,
10891 made static.
10892 (the_low_target): New.
10893 * linux-i386-low.c (num_regs): Remove.
10894 (i386_num_regs): Define.
10895 (i386_regmap): Renamed from regmap, made static.
10896 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10897 made static.
10898 (i386_cannot_store_register): Renamed from cannot_store_register,
10899 made static.
10900 (the_low_target): New.
10901 * linux-ia64-low.c (num_regs): Remove.
10902 (ia64_num_regs): Define.
10903 (ia64_regmap): Renamed from regmap, made static.
10904 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10905 made static.
10906 (ia64_cannot_store_register): Renamed from cannot_store_register,
10907 made static.
10908 (the_low_target): New.
10909 * linux-m68k-low.c (num_regs): Remove.
10910 (m68k_num_regs): Define.
10911 (m68k_regmap): Renamed from regmap, made static.
10912 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10913 made static.
10914 (m68k_cannot_store_register): Renamed from cannot_store_register,
10915 made static.
10916 (the_low_target): New.
10917 * linux-mips-low.c (num_regs): Remove.
10918 (mips_num_regs): Define.
10919 (mips_regmap): Renamed from regmap, made static.
10920 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10921 made static.
10922 (mips_cannot_store_register): Renamed from cannot_store_register,
10923 made static.
10924 (the_low_target): New.
10925 * linux-ppc-low.c (num_regs): Remove.
10926 (ppc_num_regs): Define.
10927 (ppc_regmap): Renamed from regmap, made static.
10928 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10929 made static.
10930 (ppc_cannot_store_register): Renamed from cannot_store_register,
10931 made static.
10932 (the_low_target): New.
10933 * linux-s390-low.c (num_regs): Remove.
10934 (s390_num_regs): Define.
10935 (s390_regmap): Renamed from regmap, made static.
10936 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10937 made static.
10938 (s390_cannot_store_register): Renamed from cannot_store_register,
10939 made static.
10940 (the_low_target): New.
10941 * linux-sh-low.c (num_regs): Remove.
10942 (sh_num_regs): Define.
10943 (sh_regmap): Renamed from regmap, made static.
10944 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10945 made static.
10946 (sh_cannot_store_register): Renamed from cannot_store_register,
10947 made static.
10948 (the_low_target): New.
10949 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10950 (the_low_target): New.
10951
10952 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10953
10954 * Makefile.in: Add stamp-h target.
10955 * configure.in: Create stamp-h.
10956 * configure: Regenerated.
10957
10958 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10959
10960 * inferiors.c: New file.
10961 * target.c: New file.
10962 * target.h: New file.
10963 * Makefile.in: Add target.o and inferiors.o. Update
10964 dependencies.
10965 * linux-low.c (inferior_pid): New static variable,
10966 moved from server.c.
10967 (linux_create_inferior): Renamed from create_inferior.
10968 Call add_inferior. Return 0 on success instead of a PID.
10969 (linux_attach): Renamed from myattach.
10970 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10971 (linux_thread_alive): Renamed from mythread_alive.
10972 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10973 child dies.
10974 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10975 (regsets_store_inferior_registers): Correct error message.
10976 Add missing ``return 0''.
10977 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10978 (linux_store_registers): Renamed from store_inferior_registers.
10979 (linux_read_memory): Renamed from read_inferior_memory.
10980 (linux_write_memory): Renamed from write_inferior_memory.
10981 (linux_target_ops): New structure.
10982 (initialize_low): Call set_target_ops ().
10983 * remote-utils.c (unhexify): New function.
10984 (hexify): New function.
10985 (input_interrupt): Send signals to ``signal_pid''.
10986 * server.c (inferior_pid): Remove.
10987 (start_inferior): Update create_inferior call.
10988 (attach_inferior): Call add_inferior.
10989 (handle_query): New function.
10990 (main): Call handle_query for `q' packets.
10991 * server.h: Include "target.h". Remove obsolete prototypes.
10992 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10993
10994 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10995
10996 * Makefile.in: Add WARN_CFLAGS. Update configury
10997 dependencies.
10998 * configure.in: Check for <string.h>
10999 * configure: Regenerate.
11000 * config.in: Regenerate.
11001 * gdbreplay.c: Include needed system headers.
11002 (remote_open): Remove strchr prototype.
11003 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11004 * regcache.c (supply_register): Change buf argument to const void *.
11005 (supply_register_by_name): Likewise.
11006 (collect_register): Change buf argument to void *.
11007 (collect_register_by_name): Likewise.
11008 * regcache.h: Add missing prototypes.
11009 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11010 * server.c (handle_query): New function.
11011 (attached): New static variable, moved out of main.
11012 (main): Quiet longjmp clobber warnings.
11013 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11014 * utils.c (error): Remove NORETURN.
11015 (fatal): Likewise.
This page took 0.258737 seconds and 5 git commands to generate.