]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
sim: bfin: fix up linux-fixed-code.h generation [PR sim/10143]
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
aac331e4
PA
12015-03-07 Pedro Alves <palves@redhat.com>
2
3 * configure.ac (build_warnings): Move
4 -Wdeclaration-after-statement to the C-specific set.
5 * configure: Regenerate.
6
366c75fc
PA
72015-03-07 Pedro Alves <palves@redhat.com>
8
9 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
10 or <winsock2.h> here. Instead include "gdb_socket.h".
11 (remote_open): Use union gdb_sockaddr_u.
12 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
13 or <winsock2.h> here. Instead include "gdb_socket.h".
14 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
15 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
16 or <sys/un.h>.
17 (init_named_socket, gdb_agent_helper_thread): Use union
18 gdb_sockaddr_u.
19
492d29ea
PA
202015-03-07 Pedro Alves <palves@redhat.com>
21
22 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
23 instead.
24
60a191ed
YQ
252015-03-06 Yao Qi <yao.qi@linaro.org>
26
27 * linux-aarch64-low.c (aarch64_insert_point): Use
28 show_debug_regs as a boolean.
29 (aarch64_remove_point): Likewise.
30
f5771b1d
PA
312015-03-05 Pedro Alves <palves@redhat.com>
32
33 * lynx-low.c (lynx_target_ops): Install NULL hooks for
34 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
35 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
36 * nto-low.c (nto_target_ops): Likewise.
37 * spu-low.c (spu_target_ops): Likewise.
38 * win32-low.c (win32_target_ops): Likewise.
39
3e572f71
PA
402015-03-04 Pedro Alves <palves@redhat.com>
41
42 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
43 Decide whether a breakpoint triggered based on the SIGTRAP's
44 siginfo.si_code.
45 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
46 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
47 (linux_low_filter_event): Check for breakpoints before checking
48 watchpoints.
49 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
50 siginfo.si_code.
51 (linux_stopped_by_sw_breakpoint)
52 (linux_supports_stopped_by_sw_breakpoint)
53 (linux_stopped_by_hw_breakpoint)
54 (linux_supports_stopped_by_hw_breakpoint): New functions.
55 (linux_target_ops): Install new target methods.
56
1ec68e26
PA
572015-03-04 Pedro Alves <palves@redhat.com>
58
59 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
60 * server.c (swbreak_feature, hwbreak_feature): New globals.
61 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
62 (captured_main): Clear swbreak_feature and hwbreak_feature.
63 * server.h (swbreak_feature, hwbreak_feature): Declare.
64 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
65 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
66 supports_stopped_by_hw_breakpoint>: New fields.
67 (target_supports_stopped_by_sw_breakpoint)
68 (target_stopped_by_sw_breakpoint)
69 (target_supports_stopped_by_hw_breakpoint)
70 (target_stopped_by_hw_breakpoint): Declare.
71
15c66dd6
PA
722015-03-04 Pedro Alves <palves@redhat.com>
73
74 enum lwp_stop_reason -> enum target_stop_reason
75 * linux-low.c (check_stopped_by_breakpoint): Adjust.
76 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
77 (linux_wait_1, stuck_in_jump_pad_callback)
78 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
79 (linux_stopped_by_watchpoint):
80 * linux-low.h (enum lwp_stop_reason): Delete.
81 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
82 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
83
98fc70d6
YQ
842015-03-04 Yao Qi <yao.qi@linaro.org>
85
86 * Makefile.in (SFILES): Add linux-aarch64-low.c.
87
dd2ac174
GB
882015-03-03 Gary Benson <gbenson@redhat.com>
89
90 * hostio.c (handle_vFile): Fix prefix lengths.
91
d68e53f4
MM
922015-03-03 Markus Metzger <markus.t.metzger@intel.com>
93
94 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
95 ptr_bits.
96
bf2d68ab
AA
972015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
98
99 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
100 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
101 (clean): Add "rm -f" for above C files.
102 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
103 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
104 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
105 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
106 * linux-s390-low.c (HWCAP_S390_VX): New macro.
107 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
108 (init_registers_s390x_vx_linux64)
109 (init_registers_s390x_tevx_linux64)
110 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
111 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
112 declarations.
113 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
114 (s390_store_vxrs_high): New functions.
115 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
116 NT_S390_VXRS_HIGH.
117 (s390_arch_setup): Add logic for selecting one of the new target
118 descriptions. Activate the new vector regsets if applicable.
119 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
120 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
121 and init_registers_s390x_tevx_linux64.
122
c966a859
PA
1232015-03-01 Pedro Alves <palves@redhat.com>
124
125 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
126 parameter.
127
4180215b
PA
1282015-02-27 Pedro Alves <palves@redhat.com>
129
130 * linux-x86-low.c (u_debugreg_offset): New function.
131 (x86_linux_dr_get, x86_linux_dr_set): Use it.
132
749bab01
PA
1332015-02-27 Pedro Alves <palves@redhat.com>
134
135 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
136 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
137 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
138 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
139 (ps_lsetfpregs, ps_getpid)
140 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
141 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
142 (ps_lsetxregs, ps_plog): Declare.
143
3c14e5a3
PA
1442015-02-27 Pedro Alves <palves@redhat.com>
145
146 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
147 IP_AGENT_EXPORT_FUNC.
148 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
149 IP_AGENT_EXPORT_FUNC.
150 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
151 (IP_AGENT_EXPORT): Delete.
152 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
153 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
154 (gdb_trampoline_buffer_error, collecting, gdb_collect)
155 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
156 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
157 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
158 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
159 (traceframe_read_count, traceframe_write_count)
160 (traceframes_created, trace_state_variables, get_raw_reg)
161 (get_trace_state_variable_value, set_trace_state_variable_value)
162 (ust_loaded, helper_thread_id, cmd_buf): Use
163 IPA_SYM_EXPORTED_NAME.
164 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
165 (tracepoints) Use IP_AGENT_EXPORT_VAR.
166 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
167 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
168 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
169 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
170 EXTERN_C_PUSH/EXTERN_C_POP.
171 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
172 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
173 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
174 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
175 (traceframe_write_count, traceframe_read_count)
176 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
177 (about_to_request_buffer_space, get_trace_state_variable_value)
178 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
179 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
180 EXTERN_C_PUSH/EXTERN_C_POP.
181 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
182 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
183 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
184 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
185 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
186 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
187 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
188 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
189 Define.
190 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
191 (IP_AGENT_EXPORT_VAR_DECL): Define.
192 (tracing): Declare.
193 (gdb_agent_get_raw_reg): Declare.
194
fe978cb0
PA
1952015-02-27 Tom Tromey <tromey@redhat.com>
196 Pedro Alves <palves@redhat.com>
197
198 Rename symbols whose names are reserved C++ keywords throughout.
199
3bc3d82a
PA
2002015-02-27 Pedro Alves <palves@redhat.com>
201
202 * Makefile.in (COMPILER): New, get it from autoconf.
203 (CXX): Get from autoconf instead.
204 (COMPILE.pre): Use COMPILER.
205 (CC-LD): Rename to ...
206 (CC_LD): ... this. Use COMPILER.
207 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
208 (CXX_FOR_TARGET): Default to g++ instead of gcc.
209 * acinclude.m4: Include build-with-cxx.m4.
210 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
211 Disable -Werror by default if building in C++ mode.
212 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
213 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
214 the C++ compiler. Save/restore CXXFLAGS too.
215 * configure: Regenerate.
216
07697489
PA
2172015-02-27 Pedro Alves <palves@redhat.com>
218
219 * acinclude.m4: Include libiberty.m4.
220 * configure.ac: Call libiberty_INIT.
221 * config.in, configure: Regenerate.
222
9beb7c4e
PA
2232015-02-26 Pedro Alves <palves@redhat.com>
224
225 * linux-low.c (linux_wait_1): When incrementing the PC past a
226 program breakpoint always use the_low_target.breakpoint_len as
227 increment, rather than the maximum between that and
228 the_low_target.decr_pc_after_break.
229
8090aef2
PA
2302015-02-23 Pedro Alves <palves@redhat.com>
231
232 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
233 thread was doing a step-over; always adjust the PC if
234 we stepped over a permanent breakpoint.
235 (linux_wait_1): If we stepped over breakpoint that was on top of a
236 permanent breakpoint, manually advance the PC past it.
237
bc9540e8
PA
2382015-02-23 Pedro Alves <palves@redhat.com>
239
240 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
241 modes.
242 (x86_fill_gregset, x86_store_gregset): Use it when handling
243 $orig_eax.
244
2db9a427
PA
2452015-02-20 Pedro Alves <palves@redhat.com>
246
247 * thread-db.c: Include "nat/linux-procfs.h".
248 (thread_db_init): Skip listing new threads if the kernel supports
249 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
250
afa8d396
PA
2512015-02-20 Pedro Alves <palves@redhat.com>
252
253 * linux-low.c (status_pending_p_callback): Use ptid_match.
254
c9587f88
AT
2552015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
256
257 PR breakpoints/16812
258 * linux-low.c (wstatus_maybe_breakpoint): Remove.
259 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
260 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
261
b05ec7a5
AT
2622015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
263
264 PR breakpoints/15956
265 * tracepoint.c (cmd_qtinit): Add check for current_thread.
266
d33501a5
MM
2672015-02-09 Markus Metzger <markus.t.metzger@intel.com>
268
269 * linux-low.c (linux_low_btrace_conf): Print size.
270 * server.c (handle_btrace_conf_general_set): New.
271 (hanle_general_set): Call handle_btrace_conf_general_set.
272 (handle_query): Report Qbtrace-conf:bts:size as supported.
273
f4abbc16
MM
2742015-02-09 Markus Metzger <markus.t.metzger@intel.com>
275
276 * linux-low.c (linux_low_enable_btrace): Update parameters.
277 (linux_low_btrace_conf): New.
278 (linux_target_ops)<to_btrace_conf>: Initialize.
279 * server.c (current_btrace_conf): New.
280 (handle_btrace_enable): Rename to ...
281 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
282 to target_enable_btrace. Update comment. Update users.
283 (handle_qxfer_btrace_conf): New.
284 (qxfer_packets): Add btrace-conf entry.
285 (handle_query): Report qXfer:btrace-conf:read as supported packet.
286 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
287 (target_ops)<read_btrace_conf>: New.
288 (target_enable_btrace): Update parameters.
289 (target_read_btrace_conf): New.
290
043c3577
MM
2912015-02-09 Markus Metzger <markus.t.metzger@intel.com>
292
293 * server.c (handle_btrace_general_set): Remove call to
294 target_supports_btrace.
295 (supported_btrace_packets): New.
296 (handle_query): Call supported_btrace_packets.
297 * target.h: include btrace-common.h.
298 (btrace_target_info): Removed.
299 (supports_btrace, target_supports_btrace): Update parameters.
300
734b0e4b
MM
3012015-02-09 Markus Metzger <markus.t.metzger@intel.com>
302
303 * Makefile.in (SFILES): Add common/btrace-common.c.
304 (OBS): Add common/btrace-common.o.
305 (btrace-common.o): Add build rules.
306 * linux-low: Include btrace-common.h.
307 (linux_low_read_btrace): Use struct btrace_data. Call
308 btrace_data_init and btrace_data_fini.
309
d6c146e9
PA
3102015-02-06 Pedro Alves <palves@redhat.com>
311
312 * thread-db.c (find_new_threads_callback): Add debug output.
313
20ba1ce6
PA
3142015-02-04 Pedro Alves <palves@redhat.com>
315
316 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
317 (resume_stopped_resumed_lwps): New function.
318 (linux_wait_for_event_filtered): Use it.
319
8cc73a39
SDJ
3202015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
321
322 * Makefile.in (SFILES): Add linux-personality.c.
323 (linux-personality.o): New rule.
324 * configure.srv (srv_linux_obj): Add linux-personality.o to the
325 list of objects to be built.
326 * linux-low.c: Include nat/linux-personality.h.
327 (linux_create_inferior): Remove code to disable address space
328 randomization (moved to ../nat/linux-personality.c). Create
329 cleanup to disable address space randomization.
330
fb23d554
SDJ
3312015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
332
333 * Makefile.in (posix-strerror.o): New rule.
334 (mingw-strerror.o): Likewise.
335 * configure: Regenerated.
336 * configure.ac: Source file ../common/common.host. Initialize new
337 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
338
cdf43629
YQ
3392015-01-14 Yao Qi <yao@codesourcery.com>
340
341 * Makefile.in (SFILES): Add nat/ppc-linux.c.
342 (ppc-linux.o): New rule.
343 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
344 * configure.ac: AC_CHECK_FUNCS(getauxval).
345 * config.in: Re-generated.
346 * configure: Re-generated.
347 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
348 ppc64_64bit_inferior_p
349
514c5338
YQ
3502015-01-14 Yao Qi <yao@codesourcery.com>
351
352 * linux-ppc-low.c: Include "nat/ppc-linux.h".
353 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
354 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
355 (PT_ORIG_R3, PT_TRAP): Likewise.
356 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
357 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
358 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
359
3368c1e5
JB
3602015-01-10 Joel Brobecker <brobecker@adacore.com>
361
362 * i387-fp.c (i387_cache_to_xsave): In look over
363 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
364 zmmh_low_space field by use of zmmh_high_space.
365
582511be
PA
3662015-01-09 Pedro Alves <palves@redhat.com>
367
368 * linux-low.c (step_over_bkpt): Move higher up in the file.
369 (handle_extended_wait): Don't store the stop_pc here.
370 (get_stop_pc): Adjust comments and rename to ...
371 (check_stopped_by_breakpoint): ... this. Record whether the LWP
372 stopped for a software breakpoint or hardware breakpoint.
373 (thread_still_has_status_pending_p): New function.
374 (status_pending_p_callback): Use
375 thread_still_has_status_pending_p. If the event is no longer
376 interesting, resume the LWP.
377 (handle_tracepoints): Add assert.
378 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
379 (wstatus_maybe_breakpoint): New function.
380 (cancel_breakpoint): Delete function.
381 (check_stopped_by_watchpoint): New function, factored out from
382 linux_low_filter_event.
383 (lp_status_maybe_breakpoint): Delete function.
384 (linux_low_filter_event): Remove filter_ptid argument.
385 Leave thread group exits pending here. Store the LWP's stop PC.
386 Always leave events pending.
387 (linux_wait_for_event_filtered): Pull all events out of the
388 kernel, and leave them all pending.
389 (count_events_callback, select_event_lwp_callback): Consider all
390 events.
391 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
392 (select_event_lwp): Only give preference to the stepping LWP in
393 all-stop mode. Adjust comments.
394 (ignore_event): New function.
395 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
396 references to cancel_breakpoints. Adjust to renames. Also give
397 equal priority to all LWPs that have had events in non-stop mode.
398 If reporting a software breakpoint event, unadjust the LWP's PC.
399 (linux_wait): If linux_wait_1 returned an ignored event, retry.
400 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
401 Adjust.
402 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
403 (resume_status_pending_p): Use thread_still_has_status_pending_p.
404 (linux_stopped_by_watchpoint): Adjust.
405 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
406 * linux-low.h (enum lwp_stop_reason): New.
407 (struct lwp_info) <stop_pc>: Adjust comment.
408 <stopped_by_watchpoint>: Delete field.
409 <stop_reason>: New field.
410 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
411 * mem-break.c (software_breakpoint_inserted_here)
412 (hardware_breakpoint_inserted_here): New function.
413 * mem-break.h (software_breakpoint_inserted_here)
414 (hardware_breakpoint_inserted_here): Declare.
415 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
416 (cancel_breakpoints): Delete.
417 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
418 (upload_fast_traceframes): Remove references to
419 cancel_breakpoints.
420
a33e3959
PA
4212015-01-09 Pedro Alves <palves@redhat.com>
422
423 * thread-db.c (find_new_threads_callback): Ignore thread if the
424 kernel thread ID is -1.
425
8784d563
PA
4262015-01-09 Pedro Alves <palves@redhat.com>
427
428 * linux-low.c (linux_attach_fail_reason_string): Move to
429 nat/linux-ptrace.c, and rename.
430 (linux_attach_lwp): Update comment.
431 (attach_proc_task_lwp_callback): New function.
432 (linux_attach): Adjust to rename and use
433 linux_proc_attach_tgid_threads.
434 (linux_attach_fail_reason_string): Delete declaration.
435
76f2b779
JB
4362015-01-01 Joel Brobecker <brobecker@adacore.com>
437
438 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
439 * server.c (gdbserver_version): Likewise.
440
fafcc06a
SDJ
4412014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
442
443 * remote-utils.c: Include ctype.h.
444 (input_interrupt): Explicitly handle the case when the char
445 received is the NUL byte. Improve the printing of non-ASCII
446 characters.
447
beed38b8
JB
4482014-12-16 Joel Brobecker <brobecker@adacore.com>
449
450 * linux-low.c (linux_low_filter_event): Update call to
451 linux_enable_event_reporting following the addition of
452 a new parameter to that function.
453
bf330350
CU
4542014-12-16 Catalin Udma <catalin.udma@freescale.com>
455
456 PR server/17457
457 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
458 (AARCH64_FPCR_REGNO): Likewise.
459 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
460 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
461 (aarch64_store_fpregset): Likewise.
462
5227d625
JB
4632014-12-15 Joel Brobecker <brobecker@adacore.com>
464
465 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
466 Remove FIXME comment about assumption about N.
467
f93b65a0
JB
4682014-12-13 Joel Brobecker <brobecker@adacore.com>
469
470 * configure.ac: If large-file support is disabled in GDBserver,
471 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
472 * configure: Regenerate.
473
e5a9158d
AA
4742014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
475
476 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
477 warning upon ENODATA from ptrace.
478 * linux-s390-low.c (s390_store_tdb): New.
479 (s390_regsets): Add regset for NT_S390_TDB.
480
feea5f36
AA
4812014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
482
483 * linux-low.c (regsets_store_inferior_registers): Skip regsets
484 without a fill_function.
485 * linux-s390-low.c (s390_fill_last_break): Remove.
486 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
487 (s390_arch_setup): Use regset's size instead of fill_function for
488 loop end condition.
489
098dbe61
AA
4902014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
491
492 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
493 the regset's store function when ptrace returned an error.
494 * regcache.c (get_thread_regcache): Invalidate register cache
495 before fetching inferior's registers.
496
28eef672
AA
4972014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
498
499 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
500 while-loop as for-loop.
501 (regsets_store_inferior_registers): Likewise.
502
bdca27a2
YQ
5032014-11-28 Yao Qi <yao@codesourcery.com>
504
505 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
506 * config.in, configure: Re-generate.
507 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
508 is defined.
509
9c232dda
YQ
5102014-11-21 Yao Qi <yao@codesourcery.com>
511
512 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
513 (AC_CHECK_HEADERS): Remove malloc.h.
514 * configure: Re-generated.
515 * config.in: Re-generated.
516 * server.h: Don't include alloca.h and malloc.h.
517 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
518 Don't include malloc.h.
519
43968415
JB
5202014-11-17 Joel Brobecker <brobecker@adacore.com>
521
522 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
523 corresponding ERRNO check in same block.
524
40e91bc7
PA
5252014-11-12 Pedro Alves <palves@redhat.com>
526
527 * server.c (cont_thread): Update comment.
528 (start_inferior, attach_inferior): No longer clear cont_thread.
529 (handle_v_cont): No longer set cont_thread.
530 (captured_main): Clear cont_thread each time a GDB connects.
531
c2c118cf
PA
5322014-11-12 Pedro Alves <palves@redhat.com>
533
534 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
535 thread, and don't resume all threads if the Hc thread has exited.
536
78708b7c
PA
5372014-11-12 Pedro Alves <palves@redhat.com>
538
539 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
540 the process group instead of to a specific LWP.
541
a2abc7de
PA
5422014-10-15 Pedro Alves <palves@redhat.com>
543
544 PR server/17487
545 * win32-arm-low.c (arm_set_thread_context): Remove current_event
546 parameter.
547 (arm_set_thread_context): Delete.
548 (the_low_target): Adjust.
549 * win32-i386-low.c (debug_registers_changed)
550 (debug_registers_used): Delete.
551 (update_debug_registers_callback): New function.
552 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
553 needing to update their debug registers.
554 (win32_get_current_dr): New function.
555 (x86_dr_low_get_addr, x86_dr_low_get_control)
556 (x86_dr_low_get_status): Fetch the debug register from the thread
557 record's context.
558 (i386_initial_stuff): Adjust.
559 (i386_get_thread_context): Remove current_event parameter. Don't
560 clear debug_registers_changed nor copy DR values to
561 debug_reg_state.
562 (i386_set_thread_context): Delete.
563 (i386_prepare_to_resume): New function.
564 (i386_thread_added): Mark the thread as needing to update irs
565 debug registers.
566 (the_low_target): Remove i386_set_thread_context and install
567 i386_prepare_to_resume.
568 * win32-low.c (win32_get_thread_context): Adjust.
569 (win32_set_thread_context): Use SetThreadContext
570 directly.
571 (win32_prepare_to_resume): New function.
572 (win32_require_context): New function, factored out from ...
573 (thread_rec): ... this.
574 (continue_one_thread): Call win32_prepare_to_resume on each thread
575 we're about to continue.
576 (win32_resume): Call win32_prepare_to_resume on the event thread.
577 * win32-low.h (struct win32_thread_info)
578 <debug_registers_changed>: New field.
579 (struct win32_target_ops): Change prototype of set_thread_context,
580 delete set_thread_context and add prepare_to_resume.
581 (win32_require_context): New declaration.
582
a442d071
GB
5832014-10-08 Gary Benson <gbenson@redhat.com>
584
585 * server.h: Do not include common-exceptions.h.
586
6f1947e8
GB
5872014-10-08 Gary Benson <gbenson@redhat.com>
588
589 * server.h: Do not include cleanups.h.
590
63b434a4
JH
5912014-09-30 James Hogan <james.hogan@imgtec.com>
592
593 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
594 mips64-dsp-linux.c.
595
c4d9ceb6
YQ
5962014-09-23 Yao Qi <yao@codesourcery.com>
597
598 * linux-low.c (lp_status_maybe_breakpoint): New function.
599 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
600 (count_events_callback): Likewise.
601 (select_event_lwp_callback): Likewise.
602 (cancel_breakpoints_callback): Likewise.
603
89a5711c
DB
6042014-09-19 Don Breazeal <donb@codesourcery.com>
605
606 * linux-low.c (handle_extended_wait): Call
607 linux_ptrace_get_extended_event.
608 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
609 linux_is_extended_waitstatus.
610
bffc0964
JB
6112014-09-16 Joel Brobecker <brobecker@adacore.com>
612
613 * Makefile.in (CPPFLAGS): Define.
614 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
615 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
616
0bfdf32f
GB
6172014-09-16 Gary Benson <gbenson@redhat.com>
618
619 * inferiors.h (current_inferior): Renamed as...
620 (current_thread): New variable. All uses updated.
621 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
622 (maybe_move_out_of_jump_pad): Likewise.
623 (cancel_breakpoint): Likewise.
624 (linux_low_filter_event): Likewise.
625 (wait_for_sigstop): Likewise.
626 (linux_resume_one_lwp): Likewise.
627 (need_step_over_p): Likewise.
628 (start_step_over): Likewise.
629 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
630 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
631 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
632 and save_inferior as saved_thread.
633 * regcache.c (get_thread_regcache): Renamed saved_inferior as
634 saved_thread.
635 (regcache_invalidate_thread): Likewise.
636 * remote-utils.c (prepare_resume_reply): Likewise.
637 * thread-db.c (thread_db_get_tls_address): Likewise.
638 (disable_thread_event_reporting): Likewise.
639 (remove_thread_event_breakpoints): Likewise.
640 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
641 as saved_thread.
642 * target.h (set_desired_inferior): Renamed as...
643 (set_desired_thread): New declaration. All uses updated.
644 * server.c (myresume): Updated comment to reference thread instead
645 of inferior.
646 (handle_serial_event): Likewise.
647 (handle_target_event): Likewise.
648
361c8ade
GB
6492014-09-12 Tom Tromey <tromey@redhat.com>
650 Gary Benson <gbenson@redhat.com>
651
652 * regcache.h: Include common-regcache.h.
653 (regcache_read_pc): Don't declare.
654 * regcache.c (get_thread_regcache_for_ptid): New function.
655
bd9269f7
GB
6562014-09-11 Tom Tromey <tromey@redhat.com>
657 Gary Benson <gbenson@redhat.com>
658
659 * symbol.c: New file.
660 * Makefile.in (SFILES): Add symbol.c.
661 (OBS): Add symbol.o.
662
f8c1d06b
GB
6632014-09-11 Gary Benson <gbenson@redhat.com>
664
665 * target.c (target_stop_ptid, target_continue_ptid): New
666 functions.
667
721ec300
GB
6682014-09-11 Tom Tromey <tromey@redhat.com>
669 Gary Benson <gbenson@redhat.com>
670
671 * target.h: Include target/target.h.
672 * target.c (target_read_memory, target_read_uint32)
673 (target_write_memory): New functions.
674
c5e92cca
GB
6752014-09-11 Gary Benson <gbenson@redhat.com>
676
677 * server.h (debug_hw_points): Don't declare.
678 * server.c (debug_hw_points): Don't define. Replace all uses
679 with show_debug_regs.
680 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
681 all uses with show_debug_regs.
682
2e4bb98a
EBM
6832014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
684
685 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
686 endianness into account.
687 (ppc_supply_ptrace_register): Likewise.
688
ac740bc7
JH
6892014-09-03 James Hogan <james.hogan@imgtec.com>
690
691 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
692 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
693
97ea6506
GB
6942014-09-03 Gary Benson <gbenson@redhat.com>
695
696 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
697 ALL_DEBUG_ADDRESS_REGISTERS.
698
df7e5265
GB
6992014-09-02 Gary Benson <gbenson@redhat.com>
700
701 * i386-low.h: Renamed as...
702 * x86-low.h: New file. All type, function and variable name
703 prefixes changed from "i386_" to "x86_". All references updated.
704 * i386-low.c: Renamed as...
705 * x86-low.c: New file. All type, function and variable name
706 prefixes changed from "i386_" to "x86_". All references updated.
707
ed859da7
GB
7082014-09-02 Gary Benson <gbenson@redhat.com>
709
710 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
711 (x86_linux_new_thread): Likewise.
712
860789c7
GB
7132014-08-29 Gary Benson <gbenson@redhat.com>
714
715 * server.h (setjmp.h): Do not include.
716 (toplevel): Do not declare.
717 (common-exceptions.h): Include.
718 (cleanups.h): Likewise.
719 * server.c (toplevel): Do not define.
720 (exit_code): New static global.
721 (detach_or_kill_for_exit_cleanup): New function.
722 (main): New function. Original main renamed to...
723 (captured_main): New function.
724 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
725
ff55e1b5
GB
7262014-08-29 Gary Benson <gbenson@redhat.com>
727
728 * Makefile.in (SFILES): Add common/common-exceptions.c.
729 (OBS): Add common-exceptions.o.
730 (common-exceptions.o): New rule.
731 * utils.c (prepare_to_throw_exception): New function.
732
e9bcb658
GB
7332014-08-29 Gary Benson <gbenson@redhat.com>
734
735 * config.in: Regenerate.
736 * configure: Likewise.
737
e3180625
GB
7382014-08-29 Gary Benson <gbenson@redhat.com>
739
740 * Makefile.in (SFILES): Add common/cleanups.c.
741 (OBS): cleanups.o.
742 (cleanups.o): New rule.
743
e3d6ba5d
GB
7442014-08-29 Gary Benson <gbenson@redhat.com>
745
746 * utils.c (internal_vwarning): New function.
747
7096e886
GB
7482014-08-28 Gary Benson <gbenson@redhat.com>
749
750 * utils.h (fatal): Remove declaration.
751 * utils.c (fatal): Remove function.
752
14ce3192
GB
7532014-08-28 Gary Benson <gbenson@redhat.com>
754
755 * tracepoint.c (gdb_agent_init): Replace fatal with
756 perror_with_name.
757 (initialize_tracepoint): Likewise.
758
50278d59
GB
7592014-08-28 Gary Benson <gbenson@redhat.com>
760
761 * remote-utils.c (remote_prepare): Replace fatal with error.
762
aa96c426
GB
7632014-08-28 Gary Benson <gbenson@redhat.com>
764
765 * linux-low.c (linux_async): Replace fatal with warning.
766 Tidy up and return.
767 (linux_start_non_stop): Return -1 if linux_async failed.
768
f7160e97
GB
7692014-08-28 Gary Benson <gbenson@redhat.com>
770
771 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
772 gdb_assert.
773 (i386_dr_low_get_addr): Remove vague comment.
774 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
775 gdb_assert.
776
38e08fca
GB
7772014-08-28 Gary Benson <gbenson@redhat.com>
778
779 * inferiors.c (get_thread_process): Replace check with gdb_assert.
780 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
781 internal_error.
782 (linux_resume_one_lwp): Likewise.
783 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
784 gdb_assert.
785 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
786 with internal_error.
787 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
788 (init_register_cache): Replace fatal with gdb_assert_not_reached.
789 (find_register_by_name): Replace fatal with internal_error.
790 (find_regno): Likewise.
791 * tdesc.c (init_target_desc): Replace check with gdb_assert.
792 * thread-db.c (thread_db_create_event): Likewise.
793 (thread_db_load_search): Likewise.
794 (try_thread_db_load_1): Likewise.
795 * tracepoint.c (get_jump_space_head): Replace fatal with
796 internal_error.
797 (claim_trampoline_space): Likewise.
798 (have_fast_tracepoint_trampoline_buffer): Likewise.
799 (cmd_qtstart): Likewise.
800 (stop_tracing): Likewise.
801 (fast_tracepoint_collecting): Likewise.
802 (target_malloc): Likewise.
803 (download_tracepoint): Likewise.
804 (download_trace_state_variables): Replace check with gdb_assert.
805 (upload_fast_traceframes): Replace fatal with internal_error.
806
34abf635
GB
8072014-08-19 Tom Tromey <tromey@redhat.com>
808 Gary Benson <gbenson@redhat.com>
809
810 * Makefile.in (SFILES): Add common/common-debug.c.
811 (OBS): Add common-debug.o.
812 (common-debug.o): New rule.
813 * debug.h (debug_printf): Don't declare.
814 * debug.c (debug_printf): Renamed and rewritten as...
815 (debug_vprintf): New function.
816
f6e94d78
GB
8172014-08-19 Gary Benson <gbenson@redhat.com>
818
819 * utils.h: Do not include print-utils.h.
820
9239eeab
GB
8212014-08-19 Tom Tromey <tromey@redhat.com>
822 Gary Benson <gbenson@redhat.com>
823
824 * server.h: Add static assertion.
825 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
826
ef87c8bb
GB
8272014-08-19 Tom Tromey <tromey@redhat.com>
828 Gary Benson <gbenson@redhat.com>
829
830 * Makefile.in (SFILES): Add common/errors.c.
831 (OBS): Add errors.o.
832 (IPA_OBS): Add errors-ipa.o.
833 (errors.o): New rule.
834 (errors-ipa.o): Likewise.
835 * utils.h (perror_with_name, error, warning): Don't declare.
836 * utils.c (warning): Renamed and rewritten as...
837 (vwarning): New function.
838 (error): Renamed and rewritten as...
839 (verror): New function.
840 (internal_error): Renamed and rewritten as...
841 (internal_verror): New function.
842
bb974a24
GB
8432014-08-07 Gary Benson <gbenson@redhat.com>
844
845 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
846 * configure: Regenerate.
847 * config.in: Likewise.
848 * server.h: Do not include errno.h.
849 * event-loop.c: Likewise.
850 * hostio-errno.c: Likewise.
851 * linux-low.c: Likewise.
852 * remote-utils.c: Likewise.
853 * spu-low.c: Likewise.
854 * utils.c: Likewise.
855 * gdbreplay.c: Unconditionally include errno.h.
856
6d3d12eb
GB
8572014-08-07 Gary Benson <gbenson@redhat.com>
858
859 * server.h: Do not include string.h.
860 * event-loop.c: Likewise.
861 * linux-low.c: Likewise.
862 * regcache.c: Likewise.
863 * remote-utils.c: Likewise.
864 * spu-low.c: Likewise.
865 * utils.c: Likewise.
866
dccbb609
GB
8672014-08-07 Gary Benson <gbenson@redhat.com>
868
869 * server.h: Do not include gdb_assert.h.
870
e76df0d0
GB
8712014-08-07 Gary Benson <gbenson@redhat.com>
872
873 * server.h: Do not include common-utils.h.
874
4cb9c816
GB
8752014-08-07 Gary Benson <gbenson@redhat.com>
876
877 * server.h: Do not include ptid.h.
878 * notif.h: Likewise.
879
3995eeee
GB
8802014-08-07 Gary Benson <gbenson@redhat.com>
881
882 * server.h: Do not include gdb_locale.h.
883
cb9f1a9b
GB
8842014-08-07 Gary Benson <gbenson@redhat.com>
885
886 * server.h: Do not include gdb/signals.h.
887 * win32-low.c: Likewise.
888
a5fceff8
GB
8892014-08-07 Gary Benson <gbenson@redhat.com>
890
891 * server.h: Do not include pathmax.h.
892
b9391142
GB
8932014-08-07 Gary Benson <gbenson@redhat.com>
894
895 * server.h: Do not include libiberty.h.
896 * linux-bfin-low.c: Likewise.
897
0e443c87
GB
8982014-08-07 Gary Benson <gbenson@redhat.com>
899
900 * server.h: Do not include ansidecl.h.
901
8ebb3f56
GB
9022014-08-07 Gary Benson <gbenson@redhat.com>
903
904 * linux-x86-low.c: Do not include stddef.h.
905 * lynx-ppc-low.c: Likewise.
906 * tracepoint.c: Likewise.
907
8980bdf6
GB
9082014-08-07 Gary Benson <gbenson@redhat.com>
909
910 * server.h: Do not include stdarg.h.
911 * nto-low.c: Likewise.
912
d7096f71
GB
9132014-08-07 Gary Benson <gbenson@redhat.com>
914
915 * server.h: Do not include stdlib.h.
916 * inferiors.c: Likewise.
917 * linux-low.c: Likewise.
918 * regcache.c: Likewise.
919 * spu-low.c: Likewise.
920 * tracepoint.c: Likewise.
921 * utils.c: Likewise.
922
d02f550d
GB
9232014-08-07 Gary Benson <gbenson@redhat.com>
924
925 * server.h: Do not include stdio.h.
926 * linux-low.c: Likewise.
927 * remote-utils.c: Likewise.
928 * spu-low.c: Likewise.
929 * utils.c: Likewise.
930 * wincecompat.c: Likewise.
931
87f6c4e3
GB
9322014-08-06 Gary Benson <gbenson@redhat.com>
933
934 * regcache.c (init_register_cache): Move conditionals inside if.
935
7089dca4
GB
9362014-08-06 Gary Benson <gbenson@redhat.com>
937
938 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
939
462f517e
GB
9402014-07-31 Gary Benson <gbenson@redhat.com>
941
942 * ax.h: Do not include server.h.
943 * gdbthread.h: Likewise.
944 * lynx-low.h: Likewise.
945 * notif.h: Likewise.
946
976411d6
GB
9472014-07-30 Gary Benson <gbenson@redhat.com>
948
949 * server.h: Include common-defs.h.
950 Do not include config.h or build-gnulib-gdbserver/config.h.
951
d41f6d8e
GB
9522014-07-30 Gary Benson <gbenson@redhat.com>
953
954 * hostio-errno.c: Move server.h to top of includes list.
955 * inferiors.c: Likewise.
956 * linux-x86-low.c: Likewise.
957 * notif.c: Include server.h.
958
314c6a35
TT
9592014-07-24 Tom Tromey <tromey@redhat.com>
960 Gary Benson <gbenson@redhat.com>
961
962 * server.h (CORE_ADDR): Now unsigned.
963
69ff6be5
PA
9642014-07-16 Pedro Alves <palves@redhat.com>
965
966 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
967
ce9e3fe7
PA
9682014-07-15 Pedro Alves <palves@redhat.com>
969
970 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
971 copy.
972
e76126e8
PA
9732014-07-11 Pedro Alves <palves@redhat.com>
974
975 * linux-low.c (kill_wait_lwp): New function, based on
976 kill_one_lwp_callback, but use my_waitpid directly.
977 (kill_one_lwp_callback, linux_kill): Use it.
978
8e9db26e
PA
9792014-06-23 Pedro Alves <palves@redhat.com>
980
981 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
982 before setting DR0..DR3.
983
698b3e08
GB
9842014-06-20 Gary Benson <gbenson@redhat.com>
985
986 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
987 * configure: Regenerated.
988 * config.in: Likewise.
989
125f8a3d
GB
9902014-06-20 Gary Benson <gbenson@redhat.com>
991
992 * Makefile.in (SFILES): Update locations for files moved
993 from common to nat.
994 (object file files): Reordered.
995
42995dbd
GB
9962014-06-20 Gary Benson <gbenson@redhat.com>
997
998 * i386-low.h (i386_dr_low_can_set_addr): Removed.
999 (i386_dr_low_set_addr): Likewise.
1000 (i386_dr_low_get_addr): Likewise.
1001 (i386_dr_low_can_set_control): Likewise.
1002 (i386_dr_low_set_control): Likewise.
1003 (i386_dr_low_get_control): Likewise.
1004 (i386_dr_low_get_status): Likewise.
1005 (i386_get_debug_register_length): Likewise.
1006 * linux-x86-low.c (i386_dr_low_set_addr):
1007 Changed signature. Made static.
1008 (i386_dr_low_get_addr): Likewise.
1009 (i386_dr_low_set_control): Likewise.
1010 (i386_dr_low_get_control): Likewise.
1011 (i386_dr_low_get_status): Likewise.
1012 (i386_dr_low): New global variable.
1013 * win32-i386-low.c (i386_dr_low_set_addr):
1014 Changed signature. Made static.
1015 (i386_dr_low_get_addr): Likewise.
1016 (i386_dr_low_set_control): Likewise.
1017 (i386_dr_low_get_control): Likewise.
1018 (i386_dr_low_get_status): Likewise.
1019 (i386_dr_low): New global variable.
1020
e1d2394b
MS
10212014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1022
1023 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1024 * Makefile.in (AR, AR_FLAGS): Define.
1025 * configure: Regenerate.
1026
3a8ee006
GB
10272014-06-19 Gary Benson <gbenson@redhat.com>
1028
1029 * Makefile.in (i386-dregs.o): New rule.
1030 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1031 * i386-low.c (target.h): Remove include.
1032 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1033 (DR_CONTROL_SHIFT): Likewise.
1034 (DR_CONTROL_SIZE): Likewise.
1035 (DR_RW_EXECUTE): Likewise.
1036 (DR_RW_WRITE): Likewise.
1037 (DR_RW_READ): Likewise.
1038 (DR_RW_IORW): Likewise.
1039 (DR_LEN_1): Likewise.
1040 (DR_LEN_2): Likewise.
1041 (DR_LEN_4): Likewise.
1042 (DR_LEN_8): Likewise.
1043 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1044 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1045 (DR_ENABLE_SIZE): Likewise.
1046 (DR_LOCAL_SLOWDOWN): Likewise.
1047 (DR_GLOBAL_SLOWDOWN): Likewise.
1048 (DR_CONTROL_RESERVED): Likewise.
1049 (I386_DR_CONTROL_MASK): Likewise.
1050 (I386_DR_VACANT): Likewise.
1051 (I386_DR_LOCAL_ENABLE): Likewise.
1052 (I386_DR_GLOBAL_ENABLE): Likewise.
1053 (I386_DR_DISABLE): Likewise.
1054 (I386_DR_SET_RW_LEN): Likewise.
1055 (I386_DR_GET_RW_LEN): Likewise.
1056 (I386_DR_WATCH_HIT): Likewise.
1057 (i386_wp_op_t): Likewise.
1058 (i386_show_dr): Likewise.
1059 (i386_length_and_rw_bits): Likewise.
1060 (i386_insert_aligned_watchpoint): Likewise.
1061 (i386_remove_aligned_watchpoint): Likewise.
1062 (i386_handle_nonaligned_watchpoint): Likewise.
1063 i386_update_inferior_debug_regs(): Likewise.
1064 (i386_dr_insert_watchpoint): Likewise.
1065 (i386_dr_remove_watchpoint): Likewise.
1066 (i386_dr_region_ok_for_watchpoint): Likewise.
1067 (i386_dr_stopped_data_address): Likewise.
1068 (i386_dr_stopped_by_watchpoint): Likewise.
1069
8f26655c
GB
10702014-06-19 Gary Benson <gbenson@redhat.com>
1071
1072 * i386-low.c (i386_dr_show): Renamed to
1073 i386_show_dr and made static. All uses updated.
1074 (i386_dr_length_and_rw_bits): Renamed to
1075 i386_length_and_rw_bits and made static.
1076 All uses updated.
1077 (i386_dr_insert_aligned_watchpoint): Renamed to
1078 i386_insert_aligned_watchpoint and made static.
1079 All uses updated.
1080 (i386_dr_remove_aligned_watchpoint): Renamed to
1081 i386_remove_aligned_watchpoint and made static.
1082 All uses updated.
1083 (i386_dr_update_inferior_debug_regs): Renamed to
1084 i386_update_inferior_debug_regs and made static.
1085 All uses updated.
1086
b9228891
GB
10872014-06-18 Gary Benson <gbenson@redhat.com>
1088
5171def3
GB
1089 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1090 (i386_dr_low_can_set_control): Likewise.
1091 (i386_get_debug_register_length): Likewise.
1092 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1093 (i386_dr_low_can_set_control): Likewise.
1094 (i386_get_debug_register_length): Likewise.
1095
10962014-06-17 Gary Benson <gbenson@redhat.com>
1097
b9228891
GB
1098 * i386-low.h (i386-dregs.h): New include.
1099 (DR_FIRSTADDR): Now in i386-dregs.h.
1100 (DR_LASTADDR): Likewise.
1101 (DR_NADDR): Likewise.
1102 (DR_STATUS): Likewise.
1103 (DR_CONTROL): Likewise.
1104 (i386_debug_reg_state): Likewise.
1105 (i386_dr_insert_watchpoint): Likewise.
1106 (i386_dr_remove_watchpoint): Likewise.
1107 (i386_dr_region_ok_for_watchpoint): Likewise.
1108 (i386_dr_stopped_data_address): Likewise.
1109 (i386_dr_stopped_by_watchpoint): Likewise.
1110 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1111
4be83cc2
GB
11122014-06-18 Gary Benson <gbenson@redhat.com>
1113
1114 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1115 i386_dr_insert_watchpoint.
1116 (i386_low_remove_watchpoint): Renamed to
1117 i386_dr_remove_watchpoint.
1118 (i386_low_region_ok_for_watchpoint): Renamed to
1119 i386_dr_region_ok_for_watchpoint.
1120 (i386_low_stopped_data_address): Renamed to
1121 i386_dr_stopped_data_address.
1122 (i386_low_stopped_by_watchpoint): Renamed to
1123 i386_dr_stopped_by_watchpoint.
1124 * i386-low.c (i386_show_dr): Renamed to
1125 i386_dr_show and made nonstatic. All uses updated.
1126 (i386_length_and_rw_bits): Renamed to
1127 i386_dr_length_and_rw_bits and made nonstatic.
1128 All uses updated.
1129 (i386_insert_aligned_watchpoint): Renamed to
1130 i386_dr_insert_aligned_watchpoint and made nonstatic.
1131 All uses updated.
1132 (i386_remove_aligned_watchpoint): Renamed to
1133 i386_dr_remove_aligned_watchpoint and made nonstatic.
1134 All uses updated.
1135 (i386_update_inferior_debug_regs): Renamed to
1136 i386_dr_update_inferior_debug_regs and made nonstatic.
1137 All uses updated.
1138 (i386_low_insert_watchpoint): Renamed to
1139 i386_dr_insert_watchpoint. All uses updated.
1140 (i386_low_remove_watchpoint): Renamed to
1141 i386_dr_remove_watchpoint. All uses updated.
1142 (i386_low_region_ok_for_watchpoint): Renamed to
1143 i386_dr_region_ok_for_watchpoint. All uses updated.
1144 (i386_low_stopped_data_address): Renamed to
1145 i386_dr_stopped_data_address. All uses updated.
1146 (i386_low_stopped_by_watchpoint): Renamed to
1147 i386_dr_stopped_by_watchpoint. All uses updated.
1148
131aa0d4
GB
11492014-06-18 Gary Benson <gbenson@redhat.com>
1150
1151 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1152 (i386_dr_low_can_set_control): Likewise.
1153 (i386_insert_aligned_watchpoint): New check.
1154
d9305f7f
GB
11552014-06-18 Gary Benson <gbenson@redhat.com>
1156
1157 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1158 Renamed to state.
1159
e927c9fc
GB
11602014-06-18 Gary Benson <gbenson@redhat.com>
1161
1162 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1163 instead of fatal and error.
1164 (i386_handle_nonaligned_watchpoint): Likewise.
1165
1b6d4134
GB
11662014-06-18 Gary Benson <gbenson@redhat.com>
1167
1168 * i386-low.c (i386_get_debug_register_length): New macro.
1169 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1170 (i386_show_dr): Use debug_printf instead of fprintf. Use
1171 phex to format values.
1172
6e62758f
GB
11732014-06-18 Gary Benson <gbenson@redhat.com>
1174
1175 * i386-low.h: Comment changes.
1176 * i386-low.c: Likewise.
1177
fc6e2f03
GB
11782014-06-18 Gary Benson <gbenson@redhat.com>
1179
1180 * i386-low.c: Whitespace changes.
1181
f9d1eeed
TT
11822014-06-12 Tom Tromey <tromey@redhat.com>
1183
1184 * utils.c (freeargv): Remove.
1185
0b04e523
TT
11862014-06-12 Tom Tromey <tromey@redhat.com>
1187
1188 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1189 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1190 (parse_debug_format_options): Likewise.
1191 (gdbserver_usage): Likewise.
1192 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1193 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1194 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1195 against libiberty.
1196 ($(LIBGNU)): Depend on libiberty.
1197 (all-lib): Recurse into all subdirs.
1198 (install-only): Invoke "install" target in subdirs.
1199 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1200 targets.
1201 * configure: Rebuild.
1202 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1203 for vasprintf, vsnprintf, or gettimeofday.
1204 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1205 srv_tgtobj.
1206
270c9937
JB
12072014-06-05 Joel Brobecker <brobecker@adacore.com>
1208
1209 * development.sh: Delete.
1210 * Makefile.in (config.status): Adjust dependency on development.sh.
1211 * configure.ac: Adjust development.sh source call.
1212 * configure: Regenerate.
1213
0a261ed8
PA
12142014-06-02 Pedro Alves <palves@redhat.com>
1215
1216 * ax.c (gdb_free_agent_expr): New function.
1217 * ax.h (gdb_free_agent_expr): New declaration.
1218 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1219 list.
1220 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1221 static.
1222 (clear_breakpoint_conditions_and_commands): New function.
1223 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1224 (clear_breakpoint_conditions_and_commands): New declaration.
1225
e9dae05e
RR
12262014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1227
1228 * linux-aarch64-low.c (asm/ptrace.h): Include.
1229
5876f503
JK
12302014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1231
1232 Fix TLS access for -static -pthread.
1233 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1234 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1235 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1236
802e8e6d
PA
12372014-05-20 Pedro Alves <palves@redhat.com>
1238
1239 * linux-aarch64-low.c (aarch64_insert_point)
1240 (aarch64_remove_point): No longer check whether the type is
1241 supported here. Adjust to new interface.
1242 (the_low_target): Install aarch64_supports_z_point_type as
1243 supports_z_point_type method.
1244 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1245 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1246 instead of a Z packet char. Adjust.
1247 (arm_supports_z_point_type): New function.
1248 (arm_insert_point, arm_remove_point): Adjust to new interface.
1249 (the_low_target): Install arm_supports_z_point_type.
1250 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1251 (cris_insert_point, cris_remove_point): Adjust to new interface.
1252 Don't check whether the type is supported here.
1253 (the_low_target): Install cris_supports_z_point_type.
1254 * linux-low.c (linux_supports_z_point_type): New function.
1255 (linux_insert_point, linux_remove_point): Adjust to new interface.
1256 * linux-low.h (struct linux_target_ops) <insert_point,
1257 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1258 raw_breakpoint pointer parameter.
1259 <supports_z_point_type>: New method.
1260 * linux-mips-low.c (mips_supports_z_point_type): New function.
1261 (mips_insert_point, mips_remove_point): Adjust to new interface.
1262 Use mips_supports_z_point_type.
1263 (the_low_target): Install mips_supports_z_point_type.
1264 * linux-ppc-low.c (the_low_target): Install NULL as
1265 supports_z_point_type method.
1266 * linux-s390-low.c (the_low_target): Install NULL as
1267 supports_z_point_type method.
1268 * linux-sparc-low.c (the_low_target): Install NULL as
1269 supports_z_point_type method.
1270 * linux-x86-low.c (x86_supports_z_point_type): New function.
1271 (x86_insert_point): Adjust to new insert_point interface. Use
1272 insert_memory_breakpoint. Adjust to new
1273 i386_low_insert_watchpoint interface.
1274 (x86_remove_point): Adjust to remove_point interface. Use
1275 remove_memory_breakpoint. Adjust to new
1276 i386_low_remove_watchpoint interface.
1277 (the_low_target): Install x86_supports_z_point_type.
1278 * lynx-low.c (lynx_target_ops): Install NULL as
1279 supports_z_point_type callback.
1280 * nto-low.c (nto_supports_z_point_type): New.
1281 (nto_insert_point, nto_remove_point): Adjust to new interface.
1282 (nto_target_ops): Install nto_supports_z_point_type.
1283 * mem-break.c: Adjust intro comment.
1284 (struct raw_breakpoint) <raw_type, size>: New fields.
1285 <inserted>: Update comment.
1286 <shlib_disabled>: Delete field.
1287 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1288 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1289 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1290 (raw_bkpt_type_to_target_hw_bp_type): New function.
1291 (find_enabled_raw_code_breakpoint_at): New function.
1292 (find_raw_breakpoint_at): New type and size parameters. Use them.
1293 (insert_memory_breakpoint): New function, based off
1294 set_raw_breakpoint_at.
1295 (remove_memory_breakpoint): New function.
1296 (set_raw_breakpoint_at): Reimplement.
1297 (set_breakpoint): New, based on set_breakpoint_at.
1298 (set_breakpoint_at): Reimplement.
1299 (delete_raw_breakpoint): Go through the_target->remove_point
1300 instead of assuming memory breakpoints.
1301 (find_gdb_breakpoint_at): Delete.
1302 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1303 (find_gdb_breakpoint): New function.
1304 (set_gdb_breakpoint_at): Delete.
1305 (z_type_supported): New function.
1306 (set_gdb_breakpoint_1): New function, loosely based off
1307 set_gdb_breakpoint_at.
1308 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1309 (delete_gdb_breakpoint_at): Delete.
1310 (delete_gdb_breakpoint_1): New function, loosely based off
1311 delete_gdb_breakpoint_at.
1312 (delete_gdb_breakpoint): New function.
1313 (clear_gdb_breakpoint_conditions): Rename to ...
1314 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1315 breakpoint.
1316 (add_condition_to_breakpoint): Make static.
1317 (add_breakpoint_condition): Take a struct breakpoint pointer
1318 instead of an address. Adjust.
1319 (gdb_condition_true_at_breakpoint): Rename to ...
1320 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1321 z_type parameter.
1322 (gdb_condition_true_at_breakpoint): Reimplement.
1323 (add_breakpoint_commands): Take a struct breakpoint pointer
1324 instead of an address. Adjust.
1325 (gdb_no_commands_at_breakpoint): Rename to ...
1326 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1327 parameter. Return true if no breakpoint was found. Change debug
1328 output.
1329 (gdb_no_commands_at_breakpoint): Reimplement.
1330 (run_breakpoint_commands): Rename to ...
1331 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1332 and change return type to boolean.
1333 (run_breakpoint_commands): New function.
1334 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1335 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1336 breakpoint. Go through the_target->remove_point instead of
1337 assuming memory breakpoint.
1338 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1339 software and hardware breakpoints.
1340 (reinsert_raw_breakpoint): Go through the_target->insert_point
1341 instead of assuming memory breakpoint.
1342 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1343 software and hardware breakpoints.
1344 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1345 Check both software and hardware breakpoints.
1346 (validate_inserted_breakpoint): Assert the breakpoint is a
1347 software breakpoint. Set the inserted flag to -1 instead of
1348 setting shlib_disabled.
1349 (delete_disabled_breakpoints): Adjust.
1350 (validate_breakpoints): Only validate software breakpoints.
1351 Adjust to inserted flag change.
1352 (check_mem_read, check_mem_write): Skip breakpoint types other
1353 than software breakpoints. Adjust to inserted flag change.
1354 * mem-break.h (enum raw_bkpt_type): New enum.
1355 (raw_breakpoint, struct process_info): Forward declare.
1356 (Z_packet_to_target_hw_bp_type): Delete declaration.
1357 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1358 (set_gdb_breakpoint, delete_gdb_breakpoint)
1359 (clear_breakpoint_conditions): New declarations.
1360 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1361 (breakpoint_inserted_here): Update comment.
1362 (add_breakpoint_condition, add_breakpoint_commands): Replace
1363 address parameter with a breakpoint pointer parameter.
1364 (gdb_breakpoint_here): Update comment.
1365 (delete_gdb_breakpoint_at): Delete.
1366 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1367 * server.c (process_point_options): Take a struct breakpoint
1368 pointer instead of an address. Adjust.
1369 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1370 delete_gdb_breakpoint.
1371 * spu-low.c (spu_target_ops): Install NULL as
1372 supports_z_point_type method.
1373 * target.h: Include mem-break.h.
1374 (struct target_ops) <prepare_to_access_memory>: Update comment.
1375 <supports_z_point_type>: New field.
1376 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1377 instead of a char. Also take a raw breakpoint pointer.
1378 * win32-arm-low.c (the_low_target): Install NULL as
1379 supports_z_point_type.
1380 * win32-i386-low.c (i386_supports_z_point_type): New function.
1381 (i386_insert_point, i386_remove_point): Adjust to new interface.
1382 (the_low_target): Install i386_supports_z_point_type.
1383 * win32-low.c (win32_supports_z_point_type): New function.
1384 (win32_insert_point, win32_remove_point): Adjust to new interface.
1385 (win32_target_ops): Install win32_supports_z_point_type.
1386 * win32-low.h (struct win32_target_ops):
1387 <supports_z_point_type>: New method.
1388 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1389 instead of a char. Also take a raw breakpoint pointer.
1390
932539e3
PA
13912014-05-20 Pedro Alves <palves@redhat.com>
1392
1393 * mem-break.h: Include break-common.h.
1394 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1395 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1396 (Z_packet_to_target_hw_bp_type): New declaration.
1397 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1398 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1399 (Z_PACKET_ACCESS_WP): Delete macros.
1400 (Z_packet_to_hw_type): Delete function.
1401 * i386-low.h: Don't include break-common.h here.
1402 (Z_packet_to_hw_type): Delete declaration.
1403 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1404 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1405 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1406 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1407 * linux-aarch64-low.c: Don't include break-common.h here.
1408 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1409 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1410 (Z_packet_to_target_hw_bp_type): Delete function.
1411 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1412 function.
1413 (mips_insert_point, mips_remove_point): Use
1414 Z_packet_to_target_hw_bp_type.
1415
4ff0d3d8
PA
14162014-05-20 Pedro Alves <palves@redhat.com>
1417
1418 * linux-aarch64-low.c: Include break-common.h.
1419 (enum target_point_type): Delete.
1420 (Z_packet_to_point_type): Rename to ...
1421 (Z_packet_to_target_hw_bp_type): ... this, and return a
1422 target_hw_bp_type instead.
1423 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1424 instead of an enum target_point_type.
1425 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1426 breakpoint type.
1427 (aarch64_dr_state_insert_one_point)
1428 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1429 (aarch64_handle_aligned_watchpoint)
1430 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1431 Take an enum target_hw_bp_type instead of an enum
1432 target_point_type.
1433 (aarch64_supports_z_point_type): New function.
1434 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1435 use Z_packet_to_target_hw_bp_type.
1436
786dc519
JB
14372014-05-20 Joel Brobecker <brobecker@adacore.com>
1438
1439 * configure.ac: Only use -Werror by default when DEVELOPMENT
1440 is true.
1441 * configure: Regenerate.
1442
9e0aa64f
JK
14432014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1444
1445 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1446 * linux-x86-low.c (X86_64_USER_REGS): New.
1447 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1448
2b577b92
YQ
14492014-04-28 Yao Qi <yao@codesourcery.com>
1450
1451 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1452 name.
1453
94611da2
PA
14542014-04-25 Pedro Alves <palves@redhat.com>
1455
1456 PR server/16255
1457 * linux-low.c (linux_attach_fail_reason_string): New function.
1458 (linux_attach_lwp): Delete.
1459 (linux_attach_lwp_1): Rename to ...
1460 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1461 argument. Remove "initial" parameter. Return int instead of
1462 void. Don't error or warn here.
1463 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1464 failure to attach to the tgid. Call warning when failing to
1465 attach to an lwp.
1466 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1467 argument. Remove "initial" parameter. Return int instead of
1468 void. Don't error or warn here.
1469 (linux_attach_fail_reason_string): New declaration.
1470 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1471 interface change. Use linux_attach_fail_reason_string.
1472
01f9f808
MS
14732014-04-24 Michael Sturm <michael.sturm@mintel.com>
1474 Walfred Tedeschi <walfred.tedeschi@intel.com>
1475
1476 * Makefile.in: Added rules to handle new files
1477 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1478 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1479 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1480 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1481 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1482 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1483 x32-avx512-linux.o.
1484 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1485 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1486 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1487 i386/x32-avx512.xml.
1488 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1489 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1490 i386/x32-avx512-linux.xml.
1491 * i387-fp.c (num_avx512_k_registers): New constant for number
1492 of K registers.
1493 (num_avx512_zmmh_low_registers): New constant for number of
1494 lower ZMM registers (0-15).
1495 (num_avx512_zmmh_high_registers): New constant for number of
1496 higher ZMM registers (16-31).
1497 (num_avx512_ymmh_registers): New contant for number of higher
1498 YMM registers (ymm16-31 added by avx521 on x86_64).
1499 (num_avx512_xmm_registers): New constant for number of higher
1500 XMM registers (xmm16-31 added by AVX512 on x86_64).
1501 (struct i387_xsave): Add space for AVX512 registers.
1502 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1503 Add code to handle AVX512 registers.
1504 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1505 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1506 prototypei from generated file.
1507 (tdesc_amd64_avx512_linux): Likewise.
1508 (init_registers_x32_avx512_linux): Likewise.
1509 (tdesc_x32_avx512_linux): Likewise.
1510 (init_registers_i386_avx512_linux): Likewise.
1511 (tdesc_i386_avx512_linux): Likewise.
1512 (x86_64_regmap): Add AVX512 registers.
1513 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1514 mask.
1515 (initialize_low_arch): Add code to initialize AVX512 registers.
1516
51aa91f9
PA
15172014-04-23 Pedro Alves <palves@redhat.com>
1518
1519 * mem-break.c (find_gdb_breakpoint_at): Make static.
1520 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1521
a4165e94
PA
15222014-04-23 Pedro Alves <palves@redhat.com>
1523
1524 * i386-low.c: Don't include break-common.h here.
1525 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1526 prototype to take target_hw_bp_type as argument instead of a Z
1527 packet char.
1528 * i386-low.h: Include break-common.h here.
1529 (Z_packet_to_hw_type): Declare.
1530 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1531 prototypes.
1532 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1533 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1534 (x86_remove_point): Convert the packet number to a
1535 target_hw_bp_type before calling i386_low_remove_watchpoint.
1536 * win32-i386-low.c (i386_insert_point): Convert the packet number
1537 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1538 (i386_remove_point): Convert the packet number to a
1539 target_hw_bp_type before calling i386_low_remove_watchpoint.
1540
b8acf843
PA
15412014-04-23 Pedro Alves <palves@redhat.com>
1542
1543 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1544
d708bcd1
PA
15452014-04-10 Pedro Alves <palves@redhat.com>
1546
1547 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1548 Check if the condition or command is NULL before checking if the
1549 breakpoint is known. On success, return true.
1550 * mem-break.h (add_breakpoint_condition): Document return.
1551 (add_breakpoint_commands): Add describing comment.
1552 * server.c (skip_to_semicolon): New function.
1553 (process_point_options): Use it.
1554
2eec7d5b
PA
15552014-04-09 Pedro Alves <palves@redhat.com>
1556
1557 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1558 to lwpid_of.
1559
fa96cb38
PA
15602014-02-27 Pedro Alves <palves@redhat.com>
1561
1562 PR 12702
1563 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1564 macros.
1565 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1566 output.
1567 (last_thread_of_process_p): Take a PID argument instead of a
1568 thread pointer.
1569 (linux_wait_for_lwp): Delete.
1570 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1571 functions.
1572 (linux_low_filter_event): New function, party factored out from
1573 linux_wait_for_event.
1574 (linux_wait_for_event): Rename to ...
1575 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1576 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1577 sigsuspend. Check for zombie leaders.
1578 (linux_wait_for_event): Reimplement as wrapper around
1579 linux_wait_for_event_filtered.
1580 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1581 a normal or signal exit is seen, it's the whole process exiting.
1582 (wait_for_sigstop): No longer a for_each_inferior callback.
1583 Rewrite on top of linux_wait_for_event_filtered.
1584 (stop_all_lwps): Call wait_for_sigstop directly.
1585 * server.c (resume, handle_target_event): Handle
1586 TARGET_WAITKIND_NO_RESUMED.
1587
d763de10
JB
15882014-02-26 Joel Brobecker <brobecker@adacore.com>
1589
1590 * win32-low.c (psapi_get_dll_name,
1591 * win32_CreateToolhelp32Snapshot): Delete.
1592 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1593 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1594 Delete.
1595 (handle_load_dll): Add function description.
1596 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1597
850a0f76
JB
15982014-02-26 Joel Brobecker <brobecker@adacore.com>
1599
1600 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1601 Add comment.
1602 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1603 base address when calling win32_add_one_solib.
1604 (handle_load_dll): Delete local variable load_addr.
1605 Remove 0x1000 offset applied to DLL base address when calling
1606 win32_add_one_solib.
1607 (handle_unload_dll): Add comment.
1608
f25b3fc3
JB
16092014-02-26 Joel Brobecker <brobecker@adacore.com>
1610
1611 * win32-low.c (win32_add_all_dlls): Renames
1612 win32_ensure_ntdll_loaded. Rewrite function documentation.
1613 Adjust implementation to always load all DLLs.
1614 Add 0x1000 offset to DLL base address when calling
1615 win32_add_one_solib.
1616 (child_initialization_done): New static global.
1617 (do_initial_child_stuff): Set child_initialization_done to
1618 zero during child initialization, and 1 after. Replace call
1619 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1620 Add comment.
1621 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1622 (handle_unload_dll): Add function documentation.
1623 (get_child_debug_event): Ignore load and unload DLL events
1624 during child initialization.
1625
d86d4aaf
DE
16262014-02-20 Doug Evans <dje@google.com>
1627
3bc32da3 1628 Remove global all_lwps.
d86d4aaf
DE
1629 * inferiors.h (ptid_of): Move here from linux-low.h.
1630 (pid_of, lwpid_of): Ditto.
1631 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1632 parameter is a struct thread_info * now.
1633 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1634 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1635 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1636 directly.
1637 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1638 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1639 * linux-arm-low.c (update_registers_callback): Update, "entry"
1640 parameter is a struct thread_info * now.
1641 Fetch lwpid from current_inferior directly.
1642 (arm_insert_point): Pass &all_threads to find_inferior instead of
1643 &all_lwps.
1644 (arm_remove_point): Ditto.
1645 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1646 (arm_prepare_to_resume): Fetch pid from thread.
1647 (arm_read_description): Fetch lwpid from current_inferior directly.
1648 * linux-low.c (all_lwps): Delete.
1649 (delete_lwp): Delete call to remove_inferior.
1650 (handle_extended_wait): Fetch lwpid from thread.
1651 (add_lwp): Don't set lwp->entry.id. Remove call to
1652 add_inferior_to_list.
1653 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1654 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1655 (kill_one_lwp_callback): Ditto.
1656 (linux_kill): Don't dereference NULL pointer.
1657 Fetch ptid,lwpid from thread.
1658 (get_detach_signal): Fetch ptid from thread.
1659 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1660 Simplify call to regcache_invalidate_thread.
1661 (delete_lwp_callback): Update, "entry" parameter is a
1662 struct thread_info * now. Fetch pid from thread.
1663 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1664 (status_pending_p_callback): Update, "entry" parameter is a
1665 struct thread_info * now. Fetch ptid from thread.
1666 (find_lwp_pid): Update, "entry" parameter is a
1667 struct thread_info * now.
1668 (linux_wait_for_lwp): Fetch pid from thread.
1669 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1670 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1671 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1672 (dequeue_one_deferred_signal): Ditto.
1673 (cancel_breakpoint): Fetch ptid from current_inferior.
1674 (linux_wait_for_event): Pass &all_threads to find_inferior,
1675 not &all_lwps. Fetch ptid, lwpid from thread.
1676 (count_events_callback): Update, "entry" parameter is a
1677 struct thread_info * now.
1678 (select_singlestep_lwp_callback): Ditto.
1679 (select_event_lwp_callback): Ditto.
1680 (cancel_breakpoints_callback): Ditto.
1681 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1682 not &all_lwps.
1683 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1684 (unsuspend_one_lwp): Update, "entry" parameter is a
1685 struct thread_info * now.
1686 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1687 not &all_lwps.
1688 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1689 Fetch lwpid from thread, not lwp.
1690 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1691 Pass &all_threads to find_inferior, not &all_lwps.
1692 (send_sigstop): Fetch lwpid from thread, not lwp.
1693 (send_sigstop_callback): Update, "entry" parameter is a
1694 struct thread_info * now.
1695 (suspend_and_send_sigstop_callback): Ditto.
1696 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1697 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1698 struct thread_info * now.
1699 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1700 from thread, lwp.
1701 (lwp_running): Update, "entry" parameter is a
1702 struct thread_info * now.
1703 (stop_all_lwps): Fetch ptid from thread.
1704 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1705 (linux_resume_one_lwp): Fetch lwpid from thread.
1706 (linux_set_resume_request): Update, "entry" parameter is a
1707 struct thread_info * now. Fetch pid, lwpid from thread.
1708 (resume_status_pending_p): Update, "entry" parameter is a
1709 struct thread_info * now.
1710 (need_step_over_p): Ditto. Fetch lwpid from thread.
1711 (start_step_over): Fetch lwpid from thread.
1712 (linux_resume_one_thread): Update, "entry" parameter is a
1713 struct thread_info * now. Fetch lwpid from thread.
1714 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1715 (proceed_one_lwp): Update, "entry" parameter is a
1716 struct thread_info * now. Fetch lwpid from thread.
1717 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1718 struct thread_info * now.
1719 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1720 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1721 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1722 directly.
1723 (regsets_store_inferior_registers): Ditto.
1724 (fetch_register, store_register): Ditto.
1725 (linux_read_memory, linux_write_memory): Ditto.
1726 (linux_request_interrupt): Ditto.
1727 (linux_read_auxv): Ditto.
1728 (linux_xfer_siginfo): Ditto.
1729 (linux_qxfer_spu): Ditto.
1730 (linux_qxfer_libraries_svr4): Ditto.
1731 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1732 moved to inferiors.h.
1733 (get_lwp): Delete.
1734 (get_thread_lwp): Update.
1735 (struct lwp_info): Delete member "entry". Simplify comment for
1736 member "thread".
1737 (all_lwps): Delete.
1738 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1739 current_inferior directly.
1740 (update_watch_registers_callback): Update, "entry" parameter is a
1741 struct thread_info * now. Fetch pid from thread.
1742 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1743 (mips_insert_point): Fetch lwpid from current_inferior.
1744 Pass &all_threads to find_inferior, not &all_lwps.
1745 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1746 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1747 directly.
1748 (mips_stopped_data_address): Ditto.
1749 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1750 directly.
1751 * linux-tile-low.c (tile_arch_setup): Ditto.
1752 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1753 (update_debug_registers_callback): Update, "entry" parameter is a
1754 struct thread_info * now. Fetch pid from thread.
1755 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1756 Pass &all_threads to find_inferior, not &all_lwps.
1757 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1758 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1759 Pass &all_threads to find_inferior, not &all_lwps.
1760 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1761 (i386_dr_low_get_status): Ditto.
1762 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1763 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1764 (x86_linux_read_description): Ditto.
1765 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1766
3b8361aa
DE
17672014-02-20 Doug Evans <dje@google.com>
1768
1769 * inferiors.c (get_first_inferior): Fix buglet.
1770
f7667f0d
DE
17712014-02-19 Doug Evans <dje@google.com>
1772
1773 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1774 * inferiors.c (add_thread): Change result type to struct thread_info *.
1775 All callers updated.
1776 (add_lwp): Call add_thread here instead of in callers.
1777 All callers updated.
1778 * linux-low.h (get_lwp_thread): Rewrite.
1779 (struct lwp_info): New member "thread".
1780
b3312d80
DE
17812014-02-19 Doug Evans <dje@google.com>
1782
1783 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1784 All callers updated.
1785
ecc6f45c
DE
17862014-02-19 Doug Evans <dje@google.com>
1787
1788 * inferiors.c (add_thread): Fix whitespace.
1789
649ebbca
DE
17902014-02-19 Doug Evans <dje@google.com>
1791
1792 * dll.c (clear_dlls): Replace accessing list implemention details
1793 with API function.
1794 * gdbthread.h (get_first_thread): Declare.
1795 * inferiors.c (for_each_inferior_with_data): New function.
1796 (get_first_thread): New function.
1797 (find_thread_ptid): Simplify.
1798 (get_first_inferior): New function.
1799 (clear_list): Delete.
1800 (one_inferior_p): New function.
1801 (clear_inferior_list): New function.
1802 (clear_inferiors): Update.
1803 * inferiors.h (for_each_inferior_with_data): Declare.
1804 (clear_inferior_list): Declare.
1805 (one_inferior_p): Declare.
1806 (get_first_inferior): Declare.
1807 * linux-low.c (linux_wait_for_event): Replace accessing list
1808 implemention details with API function.
1809 * server.c (target_running): Ditto.
1810 (accumulate_file_name_length): New function.
1811 (emit_dll_description): New function.
1812 (handle_qxfer_libraries): Replace accessing list implemention
1813 details with API function.
1814 (handle_qxfer_threads_worker): New function.
1815 (handle_qxfer_threads_proper): Replace accessing list implemention
1816 details with API function.
1817 (handle_query): Ditto.
1818 (visit_actioned_threads_callback_ftype): New typedef.
1819 (visit_actioned_threads_data): New struct.
1820 (visit_actioned_threads): Rewrite to be find_inferior callback.
1821 (resume): Call find_inferior.
1822 (handle_status): Replace accessing list implemention
1823 details with API function.
1824 (process_serial_event): Replace accessing list implemention details
1825 with API function.
1826 * target.c (set_desired_inferior): Replace accessing list implemention
1827 details with API function.
1828 * tracepoint.c (same_process_p): New function.
1829 (gdb_agent_about_to_close): Replace accessing list implemention
1830 details with API function.
1831 * win32-low.c (child_delete_thread): Replace accessing list
1832 implemention details with API function.
1833 (match_dll_by_basename): New function.
1834 (dll_is_loaded_by_basename): New function.
1835 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1836 details call to dll_is_loaded_by_basename.
1837
80894984
DE
18382014-02-19 Doug Evans <dje@google.com>
1839
1840 * dll.h (struct dll_info): Add comment.
1841 * gdbthread.h (struct thread_info): Add comment.
1842 (current_ptid): Simplify.
1843 * inferiors.c (add_process): Update.
1844 (remove_process): Update.
1845 * inferiors.h (struct process_info): Rename member "head" to "entry".
1846 * linux-low.c (delete_lwp): Update.
1847 (add_lwp): Update.
1848 (last_thread_of_process_p): Update.
1849 (kill_one_lwp_callback, linux_kill): Update.
1850 (status_pending_p_callback): Update.
1851 (wait_for_sigstop): Update. Simplify read of ptid.
1852 (start_step_over): Update.
1853 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1854 (get_lwp_thread): Update.
1855 (struct lwp_info): Rename member "head" to "entry".
1856 * regcache.h (inferior_list_entry): Delete.
1857 * server.c (kill_inferior_callback): Update.
1858 (detach_or_kill_inferior_callback): Update.
1859 (print_started_pid): Update.
1860 (print_attached_pid): Update.
1861 (process_serial_event): Simplify read of ptid.
1862 * thread-db.c (thread_db_create_event): Update.
1863 (thread_db_get_tls_address): Update.
1864 * win32-low.c (current_inferior_ptid): Simplify.
1865
46917d26
TT
18662014-02-19 Tom Tromey <tromey@redhat.com>
1867
1868 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1869 argument.
1870 (target_supports_btrace): Update.
1871
0759a81e
YQ
18722014-02-14 Yao Qi <yao@codesourcery.com>
1873
1874 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1875 (rsp-low-ipa.o): New target.
1876
a7191e8b
TT
18772014-02-12 Tom Tromey <tromey@redhat.com>
1878
1879 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1880 convert_ascii_to_int.
1881 * regcache.c (registers_to_string): Likewise.
1882 * remote-utils.c (decode_M_packet): Likewise.
1883 * server.c (process_serial_event): Likewise.
1884
ff0e980e
TT
18852014-02-12 Tom Tromey <tromey@redhat.com>
1886
1887 * server.c (handle_query, handle_v_run): Use hex2bin, not
1888 unhexify.
1889 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1890
e9371aff
TT
18912014-02-12 Tom Tromey <tromey@redhat.com>
1892
1893 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1894 convert_int_to_ascii.
1895 * regcache.c (registers_to_string, collect_register_as_string):
1896 Likewise.
1897 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1898 Likewise.
1899 * server.c (process_serial_event): Likewise.
1900 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1901 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1902
971dc0b8
TT
19032014-02-12 Tom Tromey <tromey@redhat.com>
1904
1905 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1906 bin2hex, not hexify.
1907 * tracepoint.c (cmd_qtstatus): Likewise.
1908
0a822afb
TT
19092014-02-12 Tom Tromey <tromey@redhat.com>
1910
1911 * remote-utils.c (monitor_output): Pass explicit length to
1912 hexify.
1913
9c3d6531
TT
19142014-02-12 Tom Tromey <tromey@redhat.com>
1915
1916 * tracepoint.c: Include rsp-low.h.
1917 * server.c: Include rsp-low.h.
1918 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1919 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1920 declare.
1921 * remote-utils.c: Include rsp-low.h.
1922 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1923 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1924 (convert_int_to_ascii, convert_ascii_to_int): Move to
1925 common/rsp-low.c.
1926 * regcache.c: Include rsp-low.h.
1927 * ax.c: Include rsp-low.h.
1928 * Makefile.in (SFILES): Add common/rsp-low.c.
1929 (OBS): Add rsp-low.o.
1930 (rsp-low.o): New target.
1931
01fd3ea5
TT
19322014-02-12 Tom Tromey <tromey@redhat.com>
1933
1934 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1935 Include print-utils.h.
1936 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1937 (plongest, thirty_two, phex_nz): Remove.
1938 * Makefile.in (SFILES): Add common/print-utils.c.
1939 (OBS): Add print-utils.o.
1940 (print-utils-ipa.o): New target.
1941 (print-utils.o): New target.
1942 (IPA_OBJS): Add print-utils-ipa.o.
1943
e99dc820
TT
19442014-02-06 Tom Tromey <tromey@redhat.com>
1945
1946 * Makefile.in (SFILES): Fix indentation.
1947
ee1e2d4f
DE
19482014-02-05 Doug Evans <dje@google.com>
1949
1950 * linux-low.c (linux_wait_for_event): Improve comment.
1951 (linux_wait_1): Keep current_inferior in sync with event_child.
1952
f5a02773
DE
19532014-01-22 Doug Evans <dje@google.com>
1954
1955 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1956
87ce2a04
DE
19572014-01-22 Doug Evans <dje@google.com>
1958
1959 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1960 * configure: Regenerate.
1961 * config.in: Regenerate.
1962 * Makefile.in (SFILES): Add debug.c.
1963 (OBS): Add debug.o.
1964 * debug.c: New file.
1965 * debug.h: New file.
1966 * linux-aarch64-low.c (*): Update all debugging printfs to use
1967 debug_printf instead of fprintf.
1968 * linux-arm-low.c (*): Ditto.
1969 * linux-cris-low.c (*): Ditto.
1970 * linux-crisv32-low.c (*): Ditto.
1971 * linux-m32r-low.c (*): Ditto.
1972 * linux-sparc-low.c (*): Ditto.
1973 * linux-x86.c (*): Ditto.
1974 * linux-low.c (*): Ditto.
1975 (linux_wait_1): Add calls to debug_enter, debug_exit.
1976 (linux_wait): Remove redundant debugging printf.
1977 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1978 (linux_resume, unstop_all_lwps): Ditto.
1979 * mem-break.c (*): Update all debugging printfs to use
1980 debug_printf instead of fprintf.
1981 * remote-utils.c (*): Ditto.
1982 * thread-db.c (*): Ditto.
1983 * server.c #include <ctype.h>, "gdb_vecs.h".
1984 (debug_threads): Moved to debug.c.
1985 (*): Update all debugging printfs to use debug_printf instead of
1986 fprintf.
1987 (start_inferior): Replace call to fflush with call to debug_flush.
1988 (monitor_show_help): Mention set debug-format.
1989 (parse_debug_format_options): New function.
1990 (handle_monitor_command): Handle "monitor set debug-format".
1991 (gdbserver_usage): Mention --debug-format.
1992 (main): Parse --debug-format.
1993 * server.h (debug_threads): Declaration moved to debug.h.
1994 #include "debug.h".
1995 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1996 trace_debug_1 that uses debug_printf.
1997 (tracepoint_look_up_symbols): Update all debugging printfs to use
1998 debug_printf instead of fprintf.
1999
e671835b
BS
20002014-01-20 Baruch Siach <baruch@tkos.co.il>
2001
2002 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2003 sys/ptrace.h.
2004
b5737fa9
PA
20052014-01-17 Pedro Alves <palves@redhat.com>
2006
ea38d2a9 2007 PR build/16445
c7faa97a
PA
2008 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2009 defined after including gdb_proc_service.h.
b5737fa9 2010
40ed484e
DE
20112014-01-16 Doug Evans <dje@google.com>
2012
2013 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2014 (match_dll): Use it.
2015
969c39fb
MM
20162014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2017
2018 * target.h (target_ops) <read_btrace>: Change parameters and
2019 return type to allow error reporting.
2020 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2021 trace reading errors on.
2022 * linux-low.c (linux_low_read_btrace): Pass trace reading
2023 errors on.
2024 (linux_low_disable_btrace): New.
2025
ab7f45ba
DE
20262014-01-15 Doug Evans <dje@google.com>
2027
2028 * inferiors.c (thread_id_to_gdb_id): Delete.
2029 * inferiors.h (thread_id_to_gdb_id): Delete.
2030
66af0f44
EZ
20312014-01-13 Eli Zaretskii <eliz@gnu.org>
2032
2033 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2034 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2035 versions.
2036
9939e131
PA
20372014-01-08 Pedro Alves <palves@redhat.com>
2038
2039 * server.c (handle_status): Don't discard previous queued stop
2040 replies or thread's pending status here.
2041 (main) <disconnection>: Do it here instead.
2042
b7ea362b
PA
20432014-01-08 Pedro Alves <palves@redhat.com>
2044
2045 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2046 * server.c (visit_actioned_threads, handle_pending_status): New
2047 function.
2048 (handle_v_cont): Factor out parts to ...
2049 (resume): ... this new function. If in all-stop, and a thread
2050 being resumed has a pending status, report it without actually
2051 resuming.
2052 (myresume): Adjust to use the new 'resume' function.
2053 (clear_pending_status_callback, set_pending_status_callback)
2054 (find_status_pending_thread_callback): New functions.
2055 (handle_status): Handle the case of multiple threads having
2056 interesting statuses to report. Report threads' real last signal
2057 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2058 with an interesting thread to report the status for, instead of
2059 always reporting the status of the first thread.
2060
28498c42
JB
20612014-01-01 Joel Brobecker <brobecker@adacore.com>
2062
2063 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2064 * gdbreplay.c (gdbreplay_version): Likewise.
2065
f45c82da
YZ
20662013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2067
2068 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2069 iov.iov_len with the real length in use.
2070
379a5e2d
JB
20712013-12-13 Joel Brobecker <brobecker@adacore.com>
2072
2073 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2074 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2075 for all targets that use win32-low.c.
2076 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2077 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2078
4210d83e
PA
20792013-12-13 Pedro Alves <palves@redhat.com>
2080
2081 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2082 if equal to TARGET_WAITKIND_LOADED.
2083 * win32-low.c (cached_status): New static global.
2084 (win32_wait): Add declaration.
2085 (do_initial_child_stuff): Flush all initial pending debug events
2086 up to the initial breakpoint.
2087 (win32_wait): If CACHED_STATUS was set, return that instead
2088 of doing a real wait. Remove the code resuming the execution
2089 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2090 during the initial phase. Also remove the code changing
2091 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2092 TARGET_WAITKIND_STOPPED.
2093
e7f0d979
YQ
20942013-12-11 Yao Qi <yao@codesourcery.com>
2095
2096 * notif.c (handle_notif_ack): Return 0 if no notification
2097 matches.
2098
ebcf782c
DE
20992013-11-20 Doug Evans <dje@google.com>
2100
2101 * linux-low.c (linux_set_resume_request): Fix comment.
2102
20ad9378
DE
21032013-11-20 Doug Evans <dje@google.com>
2104
2105 * linux-low.c (resume_status_pending_p): Tweak comment.
2106
a196ebeb
WT
21072013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2108
2109 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2110 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2111 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2112 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2113 (srv_amd64_regobj): Add amd64-mpx.o.
2114 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2115 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2116 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2117 * i387-fp.c (num_pl_bnd_register) Added constant.
2118 (num_pl_bnd_cfg_registers) Added constant.
2119 (struct i387_xsave) Added reserved area and MPX fields.
2120 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2121 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2122 function.
2123 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2124 (init_registers_amd64_mpx_linux): Declare new function.
2125 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2126 (x86_64_regmap): Add MPX registers.
2127 (x86_linux_read_description): Add MPX case.
2128 (initialize_low_arch): Initialize MPX targets.
2129
0080a2f6
TT
21302013-11-18 Tom Tromey <tromey@redhat.com>
2131
2132 * configure: Rebuild.
2133 * configure.ac: Don't check for stdlib.h.
2134 * gdbreplay.c: Unconditionally include stdlib.h.
2135
2978b111
TT
21362013-11-18 Tom Tromey <tromey@redhat.com>
2137
2138 * config.in: Rebuild.
2139 * configure: Rebuild.
2140 * configure.ac: Don't use AC_HEADER_DIRENT.
2141
a3d08894
TT
21422013-11-18 Tom Tromey <tromey@redhat.com>
2143
2144 * server.h: Don't check HAVE_STRING_H.
2145 * gdbreplay.c: Don't check HAVE_STRING_H.
2146 * configure: Rebuild.
2147
0a5dd17d
TT
21482013-11-18 Tom Tromey <tromey@redhat.com>
2149
2150 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2151 LIBGNU.
2152
1bd2f0ba
TT
21532013-11-08 Tom Tromey <tromey@redhat.com>
2154
2155 * configure, config.in: Rebuild.
2156 * configure.ac: Remove unused configury.
2157
3266f10b
TT
21582013-11-08 Tom Tromey <tromey@redhat.com>
2159
2160 * acinclude.m4: Include common.m4, codeset.m4.
2161 * configure, config.in: Rebuild.
2162 * configure.ac: Use GDB_AC_COMMON.
2163
6682d959
AA
21642013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2165
2166 * linux-s390-low.c (HWCAP_S390_TE): New define.
2167 (s390_arch_setup): Consider the TE field in the HWCAP for
2168 determining 'have_regset_tdb'.
2169
fd0a4d76
SDJ
21702013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2171
2172 PR gdb/16014
2173 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2174 call to sizeof.
2175
1a3d890b
PA
21762013-10-02 Pedro Alves <palves@redhat.com>
2177
2178 * server.c (process_serial_event): Don't output "GDBserver
2179 exiting" if GDB is connected through stdio.
2180 * target.c (mywait): Likewise, be silent if GDB is connected
2181 through stdio.
2182
97ad4581
JB
21832013-10-01 Joel Brobecker <brobecker@adacore.com>
2184
2185 * lynx-low.c (lynx_add_threads_after_attach): New function.
2186 (lynx_attach): Remove call to add_thread. Add call to
2187 lynx_add_threads_after_attach instead.
2188
5b4e221c
MF
21892013-09-28 Mike Frysinger <vapier@gentoo.org>
2190
2191 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2192 * config.in, configure: Regenerated.
2193
ee47b2f8
YQ
21942013-09-18 Yao Qi <yao@codesourcery.com>
2195
2196 PR server/15959
2197 * server.c (start_inferior): Clear 'resume_info'.
2198
d6707650 21992013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2200
d6707650
JW
2201 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2202 for each register.
2203
9243dd0e 22042013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2205
9243dd0e
JW
2206 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2207 linux-tile-low.o to srv_tgtobj.
2208
c623a6ef
WN
22092013-09-16 Will Newton <will.newton@linaro.org>
2210
2211 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2212 out regs.
2213
fb71d39e
PA
22142013-09-06 Pedro Alves <palves@redhat.com>
2215
2216 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2217 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2218 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2219 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2220 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2221 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2222
8e7e9910
PA
22232013-09-06 Pedro Alves <palves@redhat.com>
2224
2225 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2226 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2227
7c3a12ca
PA
22282013-09-06 Pedro Alves <palves@redhat.com>
2229
2230 * linux-amd64-ipa.c: Include tracepoint.h.
2231 * linux-i386-ipa.c: Include tracepoint.h.
2232
8eb3d7b6
RW
22332013-09-06 Ricard Wanderlof <ricardw@axis.com>
2234
2235 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2236 (ps_get_thread_area): New function.
2237
eddddb9d
RW
22382013-09-06 Ricard Wanderlof <ricardw@axis.com>
2239
2240 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2241 (initialize_low_arch): Call init_registers_crisv32 rather than
2242 init_register_crisv32.
2243
533b0600
PA
22442013-09-05 Pedro Alves <palves@redhat.com>
2245
2246 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2247 to ...
2248 * hostio.h: ... this new file.
2249 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2250 win32-low.c: Include hostio.h.
2251
0ce3d3b5
PA
22522013-09-05 Pedro Alves <palves@redhat.com>
2253
2254 * server.h (gdb_client_data, handler_func, callback_handler_func)
2255 (delete_file_handler, add_file_handler, append_callback_event)
2256 (delete_callback_event, start_event_loop, initialize_event_loop):
2257 Move to event-loop.h and include it.
2258 * event-loop.h: New file.
2259
799cdc37
PA
22602013-09-05 Pedro Alves <palves@redhat.com>
2261
2262 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2263 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2264 (loaded_dll, unloaded_dll): Move to ...
2265 * dll.h: ... this new file.
2266 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2267
6a6bbd9d
PA
22682013-09-05 Pedro Alves <palves@redhat.com>
2269
2270 * server.h (current_process, get_thread_process, all_processes)
2271 (add_inferior_to_list, for_each_inferior, current_inferior)
2272 (remove_inferior, add_process, remove_process, find_process_pid)
2273 (have_started_inferiors_p, have_attached_inferiors_p)
2274 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2275 (clear_inferiors, find_inferior, find_inferior_id)
2276 (inferior_target_data, set_inferior_target_data)
2277 (inferior_regcache_data, set_inferior_regcache_data): Move to
2278 inferiors.h, and include it.
2279 * inferiors.h: New file.
2280
f699aaba
PA
22812013-09-05 Pedro Alves <palves@redhat.com>
2282
2283 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2284 Move ...
2285 * ax.h: ... here.
2286
c144c7a0
PA
22872013-09-05 Pedro Alves <palves@redhat.com>
2288
2289 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2290 tracepoint.h.
2291 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2292 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2293 (handle_tracepoint_general_set, handle_tracepoint_query)
2294 (tracepoint_finished_step, tracepoint_was_hit)
2295 (release_while_stepping_state_list, current_traceframe)
2296 (in_readonly_region, traceframe_read_mem)
2297 (fetch_traceframe_registers, traceframe_read_sdata)
2298 (traceframe_read_info, struct fast_tpoint_collect_status)
2299 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2300 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2301 (supply_fast_tracepoint_registers)
2302 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2303 (ipa_tdesc, claim_trampoline_space)
2304 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2305 (agent_mem_read, agent_get_trace_state_variable_value)
2306 (agent_set_trace_state_variable_value, agent_tsv_read)
2307 (agent_mem_read_string, get_raw_reg_func_addr)
2308 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2309 * tracepoint.h: ... this new file.
2310
ff42e6ab
PA
23112013-09-05 Pedro Alves <palves@redhat.com>
2312
2313 * server.h (perror_with_name, error, fatal, warning, paddress)
2314 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2315 include it.
2316 * utils.h: New file.
2317
541af0f4
PA
23182013-09-05 Pedro Alves <palves@redhat.com>
2319
2320 * server.h (remote_debug, noack_mode, transport_is_reliable)
2321 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2322 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2323 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2324 (write_enn, initialize_async_io, enable_async_io)
2325 (disable_async_io, check_remote_input_interrupt_request)
2326 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2327 (dead_thread_notify, prepare_resume_reply)
2328 (decode_address_to_semicolon, decode_address, decode_m_packet)
2329 (decode_M_packet, decode_X_packet, decode_xfer_write)
2330 (decode_search_memory_packet, unhexify, hexify)
2331 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2332 (look_up_one_symbol, relocate_instruction)
2333 (monitor_output): Move to remote-utils.h, and include it.
2334 * remote-utils.h: New file.
2335
eebdf26b
PA
23362013-09-05 Pedro Alves <palves@redhat.com>
2337
2338 * server.h (_): Delete.
2339
3aafd2ff
PA
23402013-09-02 Pedro Alves <palves@redhat.com>
2341
2342 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2343 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2344 allocated.
2345 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2346
cee83bcb
PM
23472013-09-02 Pierre Muller <muller@sourceware.org>
2348
2349 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2350 or WriteProcessMemory complete successfully and handle
2351 ERROR_PARTIAL_COPY error.
2352
9a13b2fa
PA
23532013-09-02 Pedro Alves <palves@redhat.com>
2354
2355 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2356 error instead of EIO.
2357
602e3198
JK
23582013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2359
2360 PR server/15604
2361 * linux-low.c: Include filestuff.h.
2362 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2363 * lynx-low.c: Include filestuff.h.
2364 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2365 * server.c: Include filestuff.h.
2366 (main): Call notice_open_fds.
2367 * spu-low.c: Include filestuff.h.
2368 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2369
96d7229d
LM
23702013-08-22 Luis Machado <lgustavo@codesourcery.com>
2371
2372 * Makefile.in: Explain why ../target and ../nat are not
2373 listed as include file search paths.
2374 (linux-waitpid.o): New object file rule.
2375 * configure.srv (srv_native_linux_obj): New variable.
2376 Replace all occurrences of linux native object files with
2377 $srv_native_linux_obj.
2378 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2379 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2380 (linux_enable_event_reporting): Remove declaration.
2381 (my_waitpid): Moved to common/linux-waitpid.c.
2382 (linux_wait_for_event): Pass ptid when calling
2383 linux_enable_event_reporting.
2384 (linux_supports_tracefork_flag): Remove.
2385 (linux_enable_event_reporting): Likewise.
2386 (linux_tracefork_grandchild): Remove.
2387 (STACK_SIZE): Moved to common/linux-ptrace.c.
2388 (linux_tracefork_child): Remove.
2389 (linux_test_for_tracefork): Remove.
2390 (linux_look_up_symbols): Call linux_supports_traceclone.
2391 (initialize_low): Remove call to linux_test_for_tracefork.
2392 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2393 common/linux-ptrace.h.
2394 (PTRACE_TYPE_ARG4): Likewise.
2395 Include linux-ptrace.h.
2396
32940073
PA
23972013-08-21 Pedro Alves <palves@redhat.com>
2398
2399 * config.in: Renegerate.
2400
33b60d58 24012013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2402
33b60d58
LM
2403 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2404 (SFILES): Remove $(srcdir)/common/target-common.c and
2405 add $(srcdir)/target/waitstatus.c.
2406 (OBS): Remove target-common.o and add waitstatus.o.
2407 (server_h): Remove $(srcdir)/../common/target-common.h and
2408 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2409 and $(srcdir)/../target/waitstatus.h.
2410 (target-common.o): Remove.
2411 (waitstatus.o): New target object file.
2412 * target.h: Do not include target-common.h and
2413 include target/resume.h, target/wait.h and
2414 target/waitstatus.h.
2415
b8e1b30e
LM
24162013-08-13 Luis Machado <lgustavo@codesourcery.com>
2417
2418 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2419 to PTRACE_TYPE_ARG3.
2420 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2421 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2422 PTRACE_TYPE_ARG4.
2423 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2424 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2425
7a60ad40
YQ
24262013-07-27 Jie Zhang <jie@codesourcery.com>
2427 Daniel Jacobowitz <dan@codesourcery.com>
2428 Yao Qi <yao@codesourcery.com>
2429
2430 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2431 (mips-linux-watch.o): New rule.
2432 (mips_linux_watch_h): New variable.
2433 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2434 srv_tgtobj.
2435 * linux-mips-low.c: Include mips-linux-watch.h.
2436 (struct arch_process_info, struct arch_lwp_info): New.
2437 (update_watch_registers_callback): New function.
2438 (mips_linux_new_process, mips_linux_new_thread) New functions.
2439 (mips_linux_prepare_to_resume, mips_insert_point): New
2440 functions.
2441 (mips_remove_point, mips_stopped_by_watchpoint): New
2442 functions.
2443 (rsp_bp_type_to_target_hw_bp_type): New function.
2444 (mips_stopped_data_address): New function.
2445 (the_low_target): Add watchpoint support functions.
2446
de6f69ad
YQ
24472013-07-27 Yao Qi <yao@codesourcery.com>
2448
2449 * i386-low.c: Include break-common.h.
2450 (enum target_hw_bp_type): Remove.
2451
3360c0bf
LM
24522013-07-24 Luis Machado <lgustavo@codesourcery.com>
2453
2454 * Makefile.in (SFILES): /common/target-common.c.
2455 (OBS): Add target-common.o.
2456 (server_h): Add $(srcdir)/../common/target-common.h.
2457 (target-common.o): New target.
2458 * server.c (queue_stop_reply_callback): Free
2459 status string after use.
2460 * target.c (target_waitstatus_to_string): Remove.
2461 * target.h: Include target-common.h.
2462 (resume_kind): Likewise.
2463 (target_waitkind): Likewise.
2464 (target_waitstatus): Likewise.
2465 (TARGET_WNOHANG): Likewise.
2466
bd885420
YQ
24672013-07-04 Yao Qi <yao@codesourcery.com>
2468
2469 * Makefile.in (host_alias): Use @host_noncanonical@.
2470 (target_alias): Use @target_noncanonical@.
2471 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2472 ACX_NONCANONICAL_HOST.
2473 * configure: Regenerated.
2474
2475 Revert:
2476 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2477
2478 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2479 * configure: Rebuild.
2480 * Makefile.in (version_host, version_target): Get from configure.
2481 (version.c): Use $(version_host) and $(version_target).
2482
17ef446e
PA
24832013-07-03 Pedro Alves <palves@redhat.com>
2484
2485 * Makefile.in (config.status): Depend on development.sh.
2486 * acinclude.m4: Include libmcheck.m4.
2487 * configure: Regenerate.
2488
7a9a7487
MG
24892013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2490
2491 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2492 attribute inside the parentheses.
2493 (winapi_DebugSetProcessKillOnExit): Ditto.
2494 (winapi_DebugBreakProcess): Ditto.
2495 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 2496
49b64de6
MG
24972013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2498
2499 * notif.h (notif_event): Add a dummy member to avoid compiler
2500 errors.
2501
d5749ee7
PA
25022013-07-01 Pedro Alves <palves@redhat.com>
2503
2504 * hostio.c (HOSTIO_PATH_MAX): Define.
2505 (require_filename, handle_open, handle_unlink, handle_readlink):
2506 Use it.
2507
d8d2a3ee
PA
25082013-07-01 Pedro Alves <palves@redhat.com>
2509
2510 * server.h: Include "pathmax.h".
2511 * linux-low.c: Don't include sys/param.h.
2512 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2513 MAXPATHLEN.
2514 * win32-low.c: Don't include sys/param.h.
2515 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2516
bc7dea8d
PA
25172013-07-01 Pedro Alves <palves@redhat.com>
2518
2519 * event-loop.c: Don't check HAVE_UNISTD_H before including
2520 <unistd.h>.
2521 * gdbreplay.c: Likewise.
2522 * remote-utils.c: Likewise.
2523 * server.c: Likewise.
2524 * configure.ac: Don't check for unistd.h.
2525 * configure: Regenerate.
2526
d6c2da54
TT
25272013-06-28 Tom Tromey <tromey@redhat.com>
2528
2529 * Makefile.in (version.c): Use version.in, not
2530 common/version.in.
2531
257b6bec
MG
25322013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2533
2534 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2535 * configure: Rebuild.
2536 * Makefile.in (version_host, version_target): Get from configure.
2537 (version.c): Use $(version_host) and $(version_target).
2538
86ebe149
DK
25392013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2540
2541 Fix trace-status to output user name without trailing colon.
2542 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2543
f30aa5af
DK
25442013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2545
2546 Fix trace-status to output proper start-time and stop-time.
2547 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2548 output start time and stop time in hex as gdb expects.
2549
28a93511
YQ
25502013-06-26 Pedro Alves <pedro@codesourcery.com>
2551
2552 * tracepoint.c (build_traceframe_info_xml): Output trace state
2553 variables present in the trace buffer.
2554
01208463
TT
25552013-06-24 Tom Tromey <tromey@redhat.com>
2556
2557 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2558 create-version.sh.
2559 (version.o): Remove.
2560 * gdbreplay.c: Include version.h.
2561 (version, host_name): Don't declare.
2562 * server.h: Include version.h.
2563 (version, host_name): Don't declare.
2564
760256f9
PA
25652013-06-12 Pedro Alves <palves@redhat.com>
2566
2567 * linux-x86-low.c (linux_is_elf64): Delete global.
2568 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2569 with local linux_pid_exe_is_elf_64_file use.
2570
030031ee
PA
25712013-06-11 Pedro Alves <palves@redhat.com>
2572
2573 * linux-low.c (regset_disabled, disable_regset): New functions.
2574 (regsets_fetch_inferior_registers)
2575 (regsets_store_inferior_registers): Use them.
2576 (initialize_regsets_info); Don't allocate the disabled_regsets
2577 array here.
2578 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2579 comment.
2580
5da6eb0a
PA
25812013-06-11 Pedro Alves <palves@redhat.com>
2582
2583 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2584 xmalloc.
2585
7e5aaa09
PA
25862013-06-11 Pedro Alves <palves@redhat.com>
2587
2588 * linux-x86-low.c (initialize_low_arch): Call
2589 init_registers_x32_avx_linux.
2590
d878444c
JK
25912013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2592
2593 Fix compatibility with Android Bionic.
2594 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2595 it is not empty.
2596
3aee8918
PA
25972013-06-07 Pedro Alves <palves@redhat.com>
2598
5f2b57b5 2599 PR server/14823
3aee8918
PA
2600 * Makefile.in (OBS): Add tdesc.o.
2601 (IPA_OBJS): Add tdesc-ipa.o.
2602 (tdesc-ipa.o): New rule.
2603 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2604 interface.
2605 * linux-low.c (new_inferior): Delete.
2606 (disabled_regsets, num_regsets): Delete.
2607 (linux_add_process): Adjust to set the new per-process
2608 new_inferior flag.
2609 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2610 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2611 was a stop. When calling arch_setup, switch the current inferior
2612 to the thread that got an event.
2613 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2614 (regsets_fetch_inferior_registers)
2615 (regsets_store_inferior_registers): New regsets_info parameter.
2616 Adjust to use it.
2617 (linux_register_in_regsets): New regs_info parameter. Adjust to
2618 use it.
2619 (register_addr, fetch_register, store_register): New usrregs_info
2620 parameter. Adjust to use it.
2621 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2622 parameter regs_info. Adjust to use it.
2623 (linux_fetch_registers): Get the current inferior's regs_info, and
2624 adjust to use it.
2625 (linux_store_registers): Ditto.
2626 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2627 (initialize_low): Don't initialize the target_regsets here. Call
2628 initialize_low_arch.
2629 * linux-low.h (target_regsets): Delete declaration.
2630 (struct regsets_info): New.
2631 (struct usrregs_info): New.
2632 (struct regs_info): New.
2633 (struct process_info_private) <new_inferior>: New field.
2634 (struct linux_target_ops): Delete the num_regs, regmap, and
2635 regset_bitmap fields. New field regs_info.
2636 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2637 * i387-fp.c (num_xmm_registers): Delete.
2638 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2639 calls to new interface.
2640 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2641 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2642 Infer the number of xmm registers from the regcache's target
2643 description.
2644 * i387-fp.h (num_xmm_registers): Delete.
2645 * inferiors.c (add_thread): Don't install the thread's regcache
2646 here.
2647 * proc-service.c (gregset_info): Fetch the current inferior's
2648 regs_info. Adjust to use it.
2649 * regcache.c: Include tdesc.h.
2650 (register_bytes, reg_defs, num_registers)
2651 (gdbserver_expedite_regs): Delete.
2652 (get_thread_regcache): If the thread doesn't have a regcache yet,
2653 create one, instead of aborting gdbserver.
2654 (regcache_invalidate_one): Rename to ...
2655 (regcache_invalidate_thread): ... this.
2656 (regcache_invalidate_one): New.
2657 (regcache_invalidate): Only invalidate registers of the current
2658 process.
2659 (init_register_cache): Add target_desc parameter, and use it.
2660 (new_register_cache): Ditto. Assert the target description has a
2661 non zero registers_size.
2662 (regcache_cpy): Add assertions. Adjust.
2663 (realloc_register_cache, set_register_cache): Delete.
2664 (registers_to_string, registers_from_string): Adjust.
2665 (find_register_by_name, find_regno, find_register_by_number)
2666 (register_cache_size): Add target_desc parameter, and use it.
2667 (free_register_cache_thread, free_register_cache_thread_one)
2668 (regcache_release, register_cache_size): New.
2669 (register_size): Add target_desc parameter, and use it.
2670 (register_data, supply_register, supply_register_zeroed)
2671 (supply_regblock, supply_register_by_name, collect_register)
2672 (collect_register_as_string, collect_register_by_name): Adjust.
2673 * regcache.h (struct target_desc): Forward declare.
2674 (struct regcache) <tdesc>: New field.
2675 (init_register_cache, new_register_cache): Add target_desc
2676 parameter.
2677 (regcache_invalidate_thread): Declare.
2678 (regcache_invalidate_one): Delete declaration.
2679 (regcache_release): Declare.
2680 (find_register_by_number, register_cache_size, register_size)
2681 (find_regno): Add target_desc parameter.
2682 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2683 declarations.
2684 * remote-utils.c: Include tdesc.h.
2685 (outreg, prepare_resume_reply): Adjust.
2686 * server.c: Include tdesc.h.
2687 (gdbserver_xmltarget): Delete declaration.
2688 (get_features_xml, process_serial_event): Adjust.
2689 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2690 declare.
2691 (struct process_info) <tdesc>: New field.
2692 (ipa_tdesc): Declare.
2693 * tdesc.c: New file.
2694 * tdesc.h: New file.
2695 * tracepoint.c: Include tdesc.h.
2696 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2697 (get_context_regcache): Adjust to pass ipa_tdesc down.
2698 (do_action_at_tracepoint): Adjust to get the register cache size
2699 from the context regcache's description.
2700 (traceframe_walk_blocks): Adjust to get the register cache size
2701 from the current trace frame's description.
2702 (traceframe_get_pc): Adjust to get current trace frame's
2703 description and pass it down.
2704 (gdb_collect): Adjust to get the register cache size from the
2705 IPA's description.
2706 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2707 (gdbserver_xmltarget): Delete.
2708 (initialize_low_tracepoint): Set the ipa's target description.
2709 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2710 (initialize_low_tracepoint): Set the ipa's target description.
2711 * linux-x86-low.c: Include tdesc.h.
2712 [__x86_64__] (is_64bit_tdesc): New.
2713 (ps_get_thread_area, x86_get_thread_area): Use it.
2714 (i386_cannot_store_register): Rename to ...
2715 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2716 (i386_cannot_fetch_register): Rename to ...
2717 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2718 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2719 to new interface.
2720 (target_regsets): Rename to ...
2721 (x86_regsets): ... this.
2722 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2723 interface.
2724 (x86_siginfo_fixup): Use is_64bit_tdesc.
2725 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2726 (tdesc_x32_avx_linux, tdesc_x32_linux)
2727 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2728 Declare.
2729 (x86_linux_update_xmltarget): Delete.
2730 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2731 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2732 (AMD64_LINUX_USER64_CS): New.
2733 (x86_linux_read_description): New, based on
2734 x86_linux_update_xmltarget.
2735 (same_process_callback): New.
2736 (x86_arch_setup_process_callback): New.
2737 (x86_linux_update_xmltarget): New.
2738 (x86_regsets_info): New.
2739 (amd64_linux_regs_info): New.
2740 (i386_linux_usrregs_info): New.
2741 (i386_linux_regs_info): New.
2742 (x86_linux_regs_info): New.
2743 (x86_arch_setup): Reimplement.
2744 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2745 (x86_emit_ops): Ditto.
2746 (the_low_target): Adjust. Install x86_linux_regs_info,
2747 x86_cannot_fetch_register, and x86_cannot_store_register.
2748 (initialize_low_arch): New.
2749 * linux-ia64-low.c (tdesc_ia64): Declare.
2750 (ia64_fetch_register): Adjust.
2751 (ia64_usrregs_info, regs_info): New globals.
2752 (ia64_regs_info): New function.
2753 (the_low_target): Adjust.
2754 (initialize_low_arch): New function.
2755 * linux-sparc-low.c (tdesc_sparc64): Declare.
2756 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2757 Adjust.
2758 (sparc_arch_setup): New function.
2759 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2760 (the_low_target): Adjust.
2761 (initialize_low_arch): New function.
2762 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2763 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2764 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2765 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2766 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2767 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2768 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2769 (tdesc_powerpc_isa205_vsx64l): Declare.
2770 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2771 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2772 (ppc_set_pc, ppc_get_hwcap): Adjust.
2773 (ppc_usrregs_info): Forward declare.
2774 (!__powerpc64__) ppc_regmap_adjusted: New global.
2775 (ppc_arch_setup): Adjust to the current process'es target
2776 description.
2777 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2778 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2779 (ppc_store_evrregset): Adjust.
2780 (target_regsets): Rename to ...
2781 (ppc_regsets): ... this, and make static.
2782 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2783 (ppc_regs_info): New function.
2784 (the_low_target): Adjust.
2785 (initialize_low_arch): New function.
2786 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2787 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2788 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2789 (tdesc_s390x_linux64v2): Declare.
2790 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2791 (s390_fill_gregset, s390_store_last_break): Adjust.
2792 (target_regsets): Rename to ...
2793 (s390_regsets): ... this, and make static.
2794 (s390_get_pc, s390_set_pc): Adjust.
2795 (s390_get_hwcap): New target_desc parameter, and use it.
2796 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2797 (s390_arch_setup): Adjust to set the current process'es target
2798 description. Don't adjust the regmap.
2799 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2800 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2801 (regs_info_3264): New globals.
2802 (s390_regs_info): New function.
2803 (the_low_target): Adjust.
2804 (initialize_low_arch): New function.
2805 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2806 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2807 [__mips64] (init_registers_mips_linux)
2808 (init_registers_mips_dsp_linux): Delete defines.
2809 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2810 (have_dsp): New global.
2811 (mips_read_description): New, based on mips_arch_setup.
2812 (mips_arch_setup): Reimplement.
2813 (get_usrregs_info): New function.
2814 (mips_cannot_fetch_register, mips_cannot_store_register)
2815 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2816 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2817 (target_regsets): Rename to ...
2818 (mips_regsets): ... this, and make static.
2819 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2820 (dsp_regs_info, regs_info): New globals.
2821 (mips_regs_info): New function.
2822 (the_low_target): Adjust.
2823 (initialize_low_arch): New function.
2824 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2825 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2826 Declare.
2827 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2828 (arm_read_description): New, with bits factored from
2829 arm_arch_setup.
2830 (arm_arch_setup): Reimplement.
2831 (target_regsets): Rename to ...
2832 (arm_regsets): ... this, and make static.
2833 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2834 (arm_regs_info): New function.
2835 (the_low_target): Adjust.
2836 (initialize_low_arch): New function.
2837 * linux-m68k-low.c (tdesc_m68k): Declare.
2838 (target_regsets): Rename to ...
2839 (m68k_regsets): ... this, and make static.
2840 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2841 (m68k_regs_info): New function.
2842 (m68k_arch_setup): New function.
2843 (the_low_target): Adjust.
2844 (initialize_low_arch): New function.
2845 * linux-sh-low.c (tdesc_sharch): Declare.
2846 (target_regsets): Rename to ...
2847 (sh_regsets): ... this, and make static.
2848 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2849 (sh_regs_info, sh_arch_setup): New functions.
2850 (the_low_target): Adjust.
2851 (initialize_low_arch): New function.
2852 * linux-bfin-low.c (tdesc_bfin): Declare.
2853 (bfin_arch_setup): New function.
2854 (bfin_usrregs_info, regs_info): New globals.
2855 (bfin_regs_info): New function.
2856 (the_low_target): Adjust.
2857 (initialize_low_arch): New function.
2858 * linux-cris-low.c (tdesc_cris): Declare.
2859 (cris_arch_setup): New function.
2860 (cris_usrregs_info, regs_info): New globals.
2861 (cris_regs_info): New function.
2862 (the_low_target): Adjust.
2863 (initialize_low_arch): New function.
2864 * linux-cris-low.c (tdesc_crisv32): Declare.
2865 (cris_arch_setup): New function.
2866 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2867 (cris_regs_info): New function.
2868 (the_low_target): Adjust.
2869 (initialize_low_arch): New function.
2870 * linux-m32r-low.c (tdesc_m32r): Declare.
2871 (m32r_arch_setup): New function.
2872 (m32r_usrregs_info, regs_info): New globals.
2873 (m32r_regs_info): Adjust.
2874 (initialize_low_arch): New function.
2875 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2876 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2877 (tic6x_usrregs_info): Forward declare.
2878 (tic6x_read_description): New function, based on ...
2879 (tic6x_arch_setup): ... this. Reimplement.
2880 (target_regsets): Rename to ...
2881 (tic6x_regsets): ... this, and make static.
2882 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2883 (tic6x_regs_info): New function.
2884 (the_low_target): Adjust.
2885 (initialize_low_arch): New function.
2886 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2887 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2888 (target_regsets): Rename to ...
2889 (xtensa_regsets): ... this, and make static.
2890 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2891 globals.
2892 (xtensa_arch_setup, xtensa_regs_info): New functions.
2893 (the_low_target): Adjust.
2894 (initialize_low_arch): New function.
2895 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2896 (nios2_arch_setup): Set the current process'es tdesc.
2897 (target_regsets): Rename to ...
2898 (nios2_regsets): ... this.
2899 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2900 (nios2_regs_info): New function.
2901 (the_low_target): Adjust.
2902 (initialize_low_arch): New function.
a261b8f5
PA
2903 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2904 (aarch64_arch_setup): Set the current process'es tdesc.
2905 (target_regsets): Rename to ...
2906 (aarch64_regsets): ... this.
2907 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2908 (aarch64_regs_info): New function.
2909 (the_low_target): Adjust.
2910 (initialize_low_arch): New function.
3aee8918
PA
2911 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2912 globals.
2913 (target_regsets): Rename to ...
2914 (tile_regsets): ... this.
2915 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2916 (tile_regs_info): New function.
2917 (tile_arch_setup): Set the current process'es tdesc.
2918 (the_low_target): Adjust.
2919 (initialize_low_arch): New function.
2920 * spu-low.c (tdesc_spu): Declare.
2921 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2922 * win32-arm-low.c (tdesc_arm): Declare.
2923 (arm_arch_setup): New function.
2924 (the_low_target): Install arm_arch_setup instead of
2925 init_registers_arm.
2926 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2927 (init_windows_x86): Rename to ...
2928 (i386_arch_setup): ... this. Set `win32_tdesc'.
2929 (the_low_target): Adjust.
2930 * win32-low.c (win32_tdesc): New global.
2931 (child_add_thread): Don't create the thread cache here.
2932 (do_initial_child_stuff): Set the new process'es tdesc.
2933 * win32-low.h (struct target_desc): Forward declare.
2934 (win32_tdesc): Declare.
2935 * lynx-i386-low.c (tdesc_i386): Declare global.
2936 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2937 * lynx-low.c (lynx_tdesc): New global.
2938 (lynx_add_process): Set the new process'es tdesc.
2939 * lynx-low.h (struct target_desc): Forward declare.
2940 (lynx_tdesc): Declare global.
2941 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2942 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2943 * nto-low.c (nto_tdesc): New global.
2944 (do_attach): Set the new process'es tdesc.
2945 * nto-low.h (struct target_desc): Forward declare.
2946 (nto_tdesc): Declare.
2947 * nto-x86-low.c (tdesc_i386): Declare.
2948 (nto_x86_arch_setup): Set `nto_tdesc'.
2949
b1fbec62
GB
29502013-06-04 Gary Benson <gbenson@redhat.com>
2951
2952 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2953 to qSupported response when appropriate.
2954 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2955 with nonzero-length annex.
2956 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2957 arguments supplied in annex.
2958
d1ec4ce7
DE
29592013-05-31 Doug Evans <dje@google.com>
2960
ac44adcb 2961 PR server/15594
d1ec4ce7
DE
2962 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2963 64 bits in 64-cross-32 environment.
2964
9b25f2d3
PA
29652013-05-28 Pedro Alves <palves@redhat.com>
2966
2967 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2968 (aarch64-without-fpu.c): Delete rule.
2969 * configure.srv (aarch64*-*-linux*): Remove references to
2970 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2971 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2972 declaration.
2973
6740dc9c
PA
29742013-05-24 Pedro Alves <palves@redhat.com>
2975
2976 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2977 instead of strchr/decode_address. Error if the range isn't split
2978 with a ','. Don't assume there's be a ':' in the action.
2979
c2d6af84
PA
29802013-05-23 Yao Qi <yao@codesourcery.com>
2981 Pedro Alves <palves@redhat.com>
2982
2983 * linux-low.c (lwp_in_step_range): New function.
2984 (linux_wait_1): If the thread was range stepping and stopped
2985 outside the stepping range, report the stop to GDB. Otherwise,
2986 continue stepping. Add range stepping debug output.
2987 (linux_set_resume_request): Copy the step range from the resume
2988 request to the lwp.
2989 (linux_supports_range_stepping): New.
2990 (linux_target_ops) <supports_range_stepping>: Set to
2991 linux_supports_range_stepping.
2992 * linux-low.h (struct linux_target_ops)
2993 <supports_range_stepping>: New field.
2994 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2995 * linux-x86-low.c (x86_supports_range_stepping): New.
2996 (the_low_target) <supports_range_stepping>: Set to
2997 x86_supports_range_stepping.
2998 * server.c (handle_v_cont): Handle 'r' action.
2999 (handle_v_requests): Append ";r" if the target supports range
3000 stepping.
3001 * target.h (struct thread_resume) <step_range_start,
3002 step_range_end>: New fields.
3003 (struct target_ops) <supports_range_stepping>:
3004 New field.
3005 (target_supports_range_stepping): New macro.
3006
58794e1a
JB
30072013-05-17 Joel Brobecker <brobecker@adacore.com>
3008
3009 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3010 confusion in comment.
3011
d631c5a7
JB
30122013-05-17 Joel Brobecker <brobecker@adacore.com>
3013
3014 * lynx-low.c (struct process_info_private): New type.
3015 (lynx_add_process): New function.
3016 (lynx_create_inferior, lynx_attach): Replace calls to
3017 add_process by calls to lynx_add_process.
3018 (lynx_resume): If PTID is null, then try using
3019 current_process()->private->last_wait_event_ptid.
3020 Add comments.
3021 (lynx_clear_inferiors): Delete. The contents of that function
3022 has been inlined in lynx_mourn;
3023 (lynx_wait_1): Save the ptid in the process's private data.
3024 (lynx_mourn): Free the process' private data. Replace call
3025 to lynx_clear_inferiors by call to clear_inferiors.
3026
96f7a20f
YQ
30272013-05-17 Yao Qi <yao@codesourcery.com>
3028
3029 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3030 the right place.
3031
db0dfaa0
LM
30322013-05-16 Luis Machado <lgustavo@codesourcery.com>
3033
3034 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3035 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3036 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3037 PT_TEXT_END_ADDR guards. Update comments.
3038 (linux_target_op) <read_offsets>: Conditionally define to
3039 linux_read_offsets if the target is UCLIBC and if it defines
3040 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3041
68f5f838
SL
30422013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3043 Andrew Jenner <andrew@codesourcery.com>
3044
3045 * Makefile.in (SFILES): Add linux-nios2-low.c.
3046 (clean): Add action to delete nios2-linux.c.
3047 (nios2-linux.c): New rule.
3048 * configure.srv: Add nios2*-*-linux*.
3049 * linux-nios2-low.c: New.
3050
1ebff1fd
HAQ
30512013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3052
3053 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3054
f6150862
HZ
30552013-04-25 Hui Zhu <hui@codesourcery.com>
3056
3057 PR gdb/15186
f6150862
HZ
3058 * ax.c (ax_printf): Add fflush.
3059
614c279d
TT
30602013-04-22 Tom Tromey <tromey@redhat.com>
3061
3062 * Makefile.in (SFILES): Add filestuff.c.
3063 (OBS): Add filestuff.o.
3064 (filestuff.o): New target.
3065 * config.in, configure: Rebuild.
3066 * configure.ac: Check for fdwalk, pipe2.
3067
7d4e5717
PA
30682013-04-17 Pedro Alves <palves@redhat.com>
3069
3070 * configure.ac (USE_THREAD_DB): Delete variable.
3071 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3072 Don't AC_SUBST USE_THREAD_DB.
3073 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3074 * config.in, configure: Regenerate.
3075
d5c93e41
PA
30762013-04-16 Pedro Alves <palves@redhat.com>
3077
3078 * linux-low.h (struct lwp_info) <thread_known>: Move under
3079 the USE_THREAD_DB #ifdef.
3080
04f5fe89
PA
30812013-04-16 Pedro Alves <palves@redhat.com>
3082
3083 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3084 (linux-low.o): Delete rule.
3085 * linux-low.h: Always include "gdb_thread_db.h" instead of
3086 conditionally including thread_db.h.
3087 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3088 HAVE_THREAD_DB_H.
3089
480b27bf
JK
30902013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3091
3092 * Makefile.in (install-only): Fix make install regression.
3093
43662968
JK
30942013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3095
3096 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3097 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3098 installation.
3099 * gdbserver.1: Remove.
3100
3e74e146
PA
31012013-03-22 Pedro Alves <palves@redhat.com>
3102
3103 * linux-low.c (handle_extended_wait): Don't call
3104 linux_enable_event_reporting.
3105
a8347a2a
TT
31062013-03-15 Tony Theodore <tonyt@logyst.com>
3107
3108 PR build/9098:
3109 * Makefile.in (SHELL): Use @SHELL@.
3110
eeb56fa7
SDJ
31112013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3112
3113 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3114 compiler warning.
3115
4fa7e2ff
JB
31162013-03-13 Joel Brobecker <brobecker@adacore.com>
3117
3118 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3119 Remove extraneous NULL element.
3120
8ddb1965
YQ
31212013-03-13 Yao Qi <yao@codesourcery.com>
3122
3123 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3124 'V' block in trace frame.
3125
9accd112
MM
31262013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3127
3128 * target.h (struct target_ops): Add btrace ops.
3129 (target_supports_btrace): New macro.
3130 (target_enable_btrace): New macro.
3131 (target_disable_btrace): New macro.
3132 (target_read_btrace): New macro.
3133 * gdbthread.h (struct thread_info): Add btrace field.
3134 * server.c: Include btrace-common.h.
3135 (handle_btrace_general_set): New function.
3136 (handle_btrace_enable): New function.
3137 (handle_btrace_disable): New function.
3138 (handle_general_set): Call handle_btrace_general_set.
3139 (handle_qxfer_btrace): New function.
3140 (struct qxfer qxfer_packets[]): Add btrace entry.
3141 * inferiors.c (remove_thread): Disable btrace.
3142 * linux-low: Include linux-btrace.h.
3143 (linux_low_enable_btrace): New function.
3144 (linux_low_read_btrace): New function.
3145 (linux_target_ops): Add btrace ops.
3146 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3147 Add srv_linux_btrace=yes.
3148 (x86_64-*-linux*): Add linux-btrace.o.
3149 Add srv_linux_btrace=yes.
3150 * configure.ac: Define HAVE_LINUX_BTRACE.
3151 * config.in: Regenerated.
3152 * configure: Regenerated.
3153
5cc22e4c
MM
31542013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3155
3156 * server.c (handle_qxfer): Preserve error message if -3 is
3157 returned.
3158 (qxfer): Document the -3 return value.
3159
7c97f91e
MM
31602013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3161
3162 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3163 (linux_btrace_h): New variable.
3164 (linux-btrace.o): New rule.
3165
be9a119c 31662013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3167 Hafiz Abid Qadeer <abidh@codesourcery.com>
3168
3169 * tracepoint.c (trace_buffer_size): New global.
3170 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3171 (init_trace_buffer): Change to one-argument function. Allocate
3172 trace buffer memory.
3173 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3174 handle QTBuffer:size packet.
3175 (cmd_bigqtbuffer_size): New function.
3176 (initialize_tracepoint): Call init_trace_buffer with
3177 DEFAULT_TRACE_BUFFER_SIZE.
3178 * server.c (handle_query): Add QTBuffer:size in the
3179 supported packets.
3180
e64f7499
YQ
31812013-03-07 Yao Qi <yao@codesourcery.com>
3182
3183 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3184 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3185 of -1.
3186 (cmd_qtsp): Adjust condition. Do post increment.
3187 Set cur_action and cur_step_action back to 0.
3188
f0ae6fc3
PA
31892013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3190
3191 PR server/15236
3192 * linux-low.c (linux_write_memory): Return early success if LEN is
3193 zero.
3194
b5b0b0af
CV
31952013-03-05 Corinna Vinschen <vinschen@redhat.de>
3196
334ad4a8 3197 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3198
589bc927
TT
31992013-02-28 Tom Tromey <tromey@redhat.com>
3200
3201 * configure.ac: Invoke AC_SYS_LARGEFILE.
3202 * configure, config.in: Rebuild.
3203
dfe07582
CV
32042013-02-28 Corinna Vinschen <vinschen@redhat.com>
3205
3206 * win32-low.c: Throughout, fix format strings and casts of
3207 printf-like functions to avoid type related warnings on all
3208 platforms.
3209 (get_child_debug_event): Print dwDebugEventCode as hex since
3210 that's how it's usually documented.
3211
736cd585
YQ
32122013-02-28 Yao Qi <yao@codesourcery.com>
3213
3214 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3215 pulongest.
3216
e1f58301
JW
32172013-02-27 Jiong Wang <jiwang@tilera.com>
3218
3219 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3220 (reg-tilegx32.c): New rule.
3221 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3222 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3223 different register info initializer according to elf class.
3224 (init_registers_tilgx32): New function. The tilegx32 register info
3225 initializer.
3226 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3227 (tile_store_gregset): Likewise.
3228
d171ca78
YQ
32292013-02-27 Yao Qi <yao@codesourcery.com>
3230
3231 * server.c (process_point_options): Print debug message when
3232 debug_threads is true.
3233
282bbdf3
YQ
32342013-02-26 Yao Qi <yao@codesourcery.com>
3235
3236 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3237
aca22551
PA
32382013-02-19 Pedro Alves <palves@redhat.com>
3239 Kai Tietz <ktietz@redhat.com>
3240
3241 PR gdb/15161
3242
3243 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3244 instead of strtoul to extract address from packet.
3245 (process_serial_event) <'z'>: Likewise.
3246
4f3cee1c
YQ
32472013-02-18 Yao Qi <yao@codesourcery.com>
3248
3249 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3250
8e1d55a3
PA
32512013-02-14 Pedro Alves <palves@redhat.com>
3252
3253 Plug memory leak.
3254
3255 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3256 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3257
458820da
PA
32582013-02-14 Pedro Alves <palves@redhat.com>
3259
3260 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3261
baea0dae
PA
32622013-02-14 Pedro Alves <palves@redhat.com>
3263
3264 * tracepoint.c (save_string): Delete.
3265 (add_tracepoint_action): Use savestring instead of save_string.
3266
0b1afbb3
PA
32672013-02-12 Pedro Alves <palves@redhat.com>
3268
3269 * linux-xtensa-low.c: Ditto.
3270 * xtensa-xtregs.c: Ditto.
3271
8a4ac37e
PA
32722013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3273
3274 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3275 thread_db.
3276
148de6bb
MS
32772013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3278
3279 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3280 aarch64_num_wp_regs and aarch64_num_bp_regs to
3281 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3282
55fac6e0
MS
32832013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3284
3285 * linux-aarch64-low.c (ps_get_thread_area): Replace
3286 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3287
176eb98c
MS
32882013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3289 Marcus Shawcroft <marcus.shawcroft@arm.com>
3290 Nigel Stephens <nigel.stephens@arm.com>
3291 Yufeng Zhang <yufeng.zhang@arm.com>
3292
3293 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3294 (aarch64.c, aarch64-without-fpu.c): New targets.
3295 * configure.srv (aarch64*-*-linux*): New.
3296 * linux-aarch64-low.c: New file.
3297
56f7af9c
MS
32982013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3299
43aaf8b6 3300 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3301 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3302 (dequeue_one_deferred_signal, linux_resume_one_thread)
3303 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3304 (linux_tracefork_grandchild, linux_test_for_tracefork)
3305 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3306 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3307 where the argument is 0.
3308
60f662b0
YQ
33092013-01-25 Yao Qi <yao@codesourcery.com>
3310
3311 * event-loop.c: Include "queue.h".
3312 (gdb_event_p): New typedef.
3313 (struct gdb_event) <next_event>: Remove.
3314 (event_queue): Change to QUEUE(gdb_event_p).
3315 (async_queue_event): Remove.
3316 (gdb_event_xfree): New.
3317 (initialize_event_loop): New.
3318 (process_event): Use API from QUEUE.
3319 (wait_for_event): Likewise.
3320 * server.c (main): Call initialize_event_loop.
3321 * server.h (initialize_event_loop): Declare.
3322
5ae4861a
YQ
33232013-01-18 Yao Qi <yao@codesourcery.com>
3324
3325 * ax.h (struct eval_agent_expr_context): New.
3326 (gdb_eval_agent_expr): Update declaration.
3327 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3328 TFRAME. Add new argument CTX.
3329 * server.h (struct eval_agent_expr_context): Declare.
3330 (agent_mem_read, agent_tsv_read): Update declaration.
3331 (agent_mem_read_string): Likewise.
3332 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3333 (add_traceframe_block): Add new argument TPOINT.
3334 Increase TPOINT->traceframe_usage.
3335 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3336 eval_tracepoint_agent_expr.
3337 (condition_true_at_tracepoint): Likewise.
3338 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3339 (agent_mem_read_string, agent_tsv_read): Likewise.
3340
85e00e85
YQ
33412013-01-16 Yao Qi <yao@codesourcery.com>
3342
3343 * linux-low.c (linux_resume_one_lwp): Don't check
3344 'lwp->bp_reinsert != 0'.
3345
4039cf45
JB
33462013-01-07 Joel Brobecker <brobecker@adacore.com>
3347 Pedro Alves <palves@redhat.com>
3348
3349 * lynx-low.c (ptrace_request_to_str): Define a temporary
3350 macro and use it to simplify this function's implementation.
3351
9044dee2
JB
33522013-01-07 Joel Brobecker <brobecker@adacore.com>
3353
3354 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3355 sets errno.
3356
e6352c8f
JB
33572013-01-07 Joel Brobecker <brobecker@adacore.com>
3358
3359 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3360
50681a27
JB
33612013-01-07 Joel Brobecker <brobecker@adacore.com>
3362
3363 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3364
3f6e77ef
JB
33652013-01-07 Joel Brobecker <brobecker@adacore.com>
3366
3367 * lynx-low.c (lynx_resume): Use the resume_info parameter
3368 to determine the ptid for the lynx_ptrace call, unless
3369 it is equal to minus_one_ptid, in which case we use the
3370 ptid of the current_inferior.
3371 (lynx_wait_1): After having received a thread create/exit
3372 event, resume the inferior's execution using the signaling
3373 thread's ptid, rather than the old ptid.
3374
7fda33ae
JB
33752013-01-07 Joel Brobecker <brobecker@adacore.com>
3376
3377 * lynx-low.c (lynx_resume): Delete variable ret.
3378
b9786c74
JB
33792013-01-01 Joel Brobecker <brobecker@adacore.com>
3380
3381 * gdbreplay.c (gdbreplay_version): Update copyright year.
3382 * server.c (gdbserver_version): Likewise.
3383
8b93d60f
JB
33842012-12-17 Joel Brobecker <brobecker@adacore.com>
3385
3386 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3387 new thread.
3388
037335a7
JB
33892012-12-17 Joel Brobecker <brobecker@adacore.com>
3390
3391 * lynx-low.c (ptrace_request_to_str): Add handling for
3392 PTRACE_GETTRACESIG.
3393
52d4cbd8
JB
33942012-12-17 Joel Brobecker <brobecker@adacore.com>
3395
3396 * lynx-low.c (lynx_attach): Delete variable new_process.
3397
ab8f6ca9
JB
33982012-12-17 Joel Brobecker <brobecker@adacore.com>
3399
3400 * lynx-low.c (lynx_create_inferior): Delete variable
3401 new_process.
3402
78cbc024
JB
34032012-12-17 Joel Brobecker <brobecker@adacore.com>
3404
3405 * lynx-low.c (ptrace_request_to_str): Do not handle
3406 PTRACE_GETTHREADLIST if this macro does not exist.
3407
14a00470
YQ
34082012-12-15 Yao Qi <yao@codesourcery.com>
3409
3410 * Makefile.in (OBS): Add notif.o.
3411 * notif.c, notif.h: New.
3412 * server.c: Include "notif.h".
3413 (struct vstop_notif) <next>: Remove.
3414 <base>: New field.
3415 (queue_stop_reply): Update.
3416 (push_event, send_next_stop_reply): Remove.
3417 (discard_queued_stop_replies): Update.
3418 (notif_stop): New variable.
3419 (handle_v_stopped): Remove.
3420 (handle_v_requests): Don't call handle_v_stopped. Call
3421 handle_ack_notif instead.
3422 (queue_stop_reply_callback): Call notif_event_enque instead
3423 of queue_stop_reply.
3424 (handle_status): Don't call send_next_stop_reply, call
3425 notif_write_event instead.
3426 (kill_inferior_callback): Likewise.
3427 (detach_or_kill_inferior_callback): Likewise.
3428 (main): Call initialize_notif.
3429 (process_serial_event): Call QUEUE_is_empty.
3430 (handle_target_event): Call notif_push instead of push event.
3431 * server.h (push_event): Remove declaration.
3432
61c125b9
TT
34332012-12-10 Tom Tromey <tromey@redhat.com>
3434
3435 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3436 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3437 macros.
3438 (.c.o): Rewrite.
3439 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3440 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3441 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3442 (amd64-linux-ipa.o, ax.o): Rewrite.
3443 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3444 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3445 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3446 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3447 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3448 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3449 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3450 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3451 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3452 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3453 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3454 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3455 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3456 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3457 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3458 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3459 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3460 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3461 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3462 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3463 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3464 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3465 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3466 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3467 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3468 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3469 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3470 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3471 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3472 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3473 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3474 (reg-tilegx.o): Remove.
3475 (all_object_files): New macro.
3476 Include .deps files.
3477 * aclocal.m4, configure: Rebuild.
3478 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3479 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3480 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3481
e90e9ad9
TT
34822012-12-05 Tom Tromey <tromey@redhat.com>
3483
3484 PR gdb/14917:
3485 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3486
02d403bf 34872012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
3488
3489 * configure.ac: Check for linux/perf_event.h.
3490 * config.in: Regenerated.
3491 * configure: Regenerated.
3492
0270a750
PA
34932012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3494
3495 * hostio.c (handle_readlink): Decrease buffer size
3496 parameter passed to readlink by one byte.
3497
8c29b58e
YQ
34982012-11-26 Yao Qi <yao@codesourcery.com>
3499
3500 * configure.ac (build_warnings): Append '-Wempty-body'.
3501 * configure: Regenerated.
3502 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3503 body.
3504
8bdce1ff
PM
35052012-11-15 Pierre Muller <muller@sourceware.org>
3506
3507 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3508 * config.in: Regenerate.
3509 * configure: Regenerate.
3510 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3511 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3512 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3513 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3514 header.
3515 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3516 instead of <sys/wait.h> header.
3517 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3518
02d403bf 35192012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
3520
3521 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3522 (various make rules): Remove -DGDBSERVER
3523
fbd5db48
YQ
35242012-11-09 Yao Qi <yao@codesourcery.com>
3525
3526 * spu-low.c (current_ptid): Move it to ..
3527 * gdbthread.h: ... here. New.
3528 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3529 * server.c (myresume, process_serial_event): Likewise.
3530 * thread-db.c (thread_db_find_new_threads): Likewise.
3531 * tracepoint.c (run_inferior_command): Likewise.
3532
b3dc46ff
AB
35332012-10-01 Andrew Burgess <aburgess@broadcom.com>
3534
3535 * server.c (handle_search_memory_1): Include access length in
3536 warning message.
3537
07c04788
HPN
35382012-09-05 Michael Brandt <michael.brandt@axis.com>
3539
3540 * linux-crisv32-low.c: Fix compile errors.
3541
918d227b
YQ
35422012-09-04 Yao Qi <yao@codesourcery.com>
3543
3544 * tracepoint.c (cmd_qtsv): Adjust debug message.
3545 Don't check CUR_TPOINT.
3546
18c1b81a
YQ
35472012-08-28 Yao Qi <yao@codesourcery.com>
3548
3549 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3550 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3551 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3552 Remove declarations of xmalloc, xreallloc, xstrdup and
3553 freeargv.
3554 * Makefile.in (libiberty_h): New.
3555 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3556 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3557
dc82f37b
YQ
35582012-08-23 Yao Qi <yao@codesourcery.com>
3559
3560 * server.h: Remove declaration of 'xsnprintf'.
3561
406b1477
KS
35622012-08-22 Keith Seitz <keiths@redhat.com>
3563
3564 * server.h: Include build-gnulib-gbserver/config.h.
3565 * gdbreplay.c: Likewise.
3566
e6712ff1
DE
35672012-08-08 Doug Evans <dje@google.com>
3568
3569 * Makefile.in (SFILES): Add gdb_vecs.c.
3570 (OBS): Add gdb_vecs.o.
3571 (gdb_vecs_h, host_defs_h): New variables.
3572 (thread-db.o): Add $(gdb_vecs_h) dependency.
3573 (gdb_vecs.o): New rule.
3574 * thread-db.c: #include "gdb_vecs.h".
3575 (thread_db_load_search): Use a vector to iterate over path elements.
3576 Handle text appearing after "$pdir".
3577
3578 * configure.ac: Add check for strstr.
3579 * config.in: Regenerate.
3580 * configure: Regenerate.
3581
7c3270ae
UW
35822012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3583
3584 * hostio.c (handle_pread): If pread fails, fall back to attempting
3585 lseek/read.
3586 (handle_pwrite): Likewise for pwrite.
3587
b62e2b27
UW
35882012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3589
3590 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3591 between unsupported TYPE and unimplementable ADDR/LEN combination.
3592 (arm_insert_point): Act on new return value.
3593
78a99e91
PA
35942012-07-31 Pedro Alves <palves@redhat.com>
3595
3596 * server.c (process_point_options): Only skip tokens if we find
3597 one that is unrecognized. Don't treat 'X' specially while
3598 skipping unrecognized tokens.
3599
fcf303ab
UW
36002012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3601
3602 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3603 to 4-byte-align HW breakpoint addresses for Thumb.
3604
7255706c
YQ
36052012-07-27 Yao Qi <yao@codesourcery.com>
3606
3607 PR remote/14161.
3608
3609 * server.h: Declare gdb_agent_about_to_close.
3610 * target.c (kill_inferior): Include "agent.h".
3611 New. Send command 'kill'.
3612 * target.h (kill_inferior): Removed macro.
3613 * tracepoint.c (gdb_agent_about_to_close): New.
3614 (gdb_agent_helper_thread): Handle command 'close'.
3615 Wait endlessly until the inferior stops.
3616 Install gdb_agent_remove_socket to atexit hook.
3617 (agent_socket_name): New static variable.
3618 (gdb_agent_socket_init): Replace local variable 'name' with
3619 'agent_socket_name'.
3620 (gdb_agent_remove_socket): New.
3621
5a3f286f
YQ
36222012-07-27 Yao Qi <yao@codesourcery.com>
3623
3624 * server.c (process_point_options): Stop at 'X' when parsing.
3625
961bd387
ME
36262012-07-19 Michael Eager <eager@eagercon.com>
3627
a261b8f5 3628 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
3629 to hw_execute.
3630 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3631 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3632 hardware breakpoint.
3633
aa7c7447
JK
36342012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3635
3636 * gdbserver/linux-low.c (initialize_low): Call
3637 linux_ptrace_init_warnings.
3638
7f216e7c
DE
36392012-07-02 Doug Evans <dje@google.com>
3640
3641 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3642 pointer to int.
3643
d3ce09f5
SS
36442012-07-02 Stan Shebs <stan@codesourcery.com>
3645
3646 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3647 (ax.o): Add it to build rule.
3648 (ax-ipa.o): Ditto.
3649 (OBS): Add format.o.
3650 (IPA_OBS): Add format.o.
3651 * server.c (handle_query): Claim support for breakpoint commands.
3652 (process_point_options): Add command case.
3653 (process_serial_event): Leave running if there are printfs in
3654 effect.
3655 * mem-break.h (any_persistent_commands): Declare.
3656 (add_breakpoint_commands): Declare.
3657 (gdb_no_commands_at_breakpoint): Declare.
3658 (run_breakpoint_commands): Declare.
3659 * mem-break.c (struct point_command_list): New struct.
3660 (struct breakpoint): New field command_list.
3661 (any_persistent_commands): New function.
3662 (add_commands_to_breakpoint): New function.
3663 (add_breakpoint_commands): New function.
3664 (gdb_no_commands_at_breakpoint): New function.
3665 (run_breakpoint_commands): New function.
3666 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3667 locally.
3668 * ax.c: Include format.h.
3669 (ax_printf): New function.
3670 (gdb_eval_agent_expr): Add printf opcode.
3671
2f8f6aed
YQ
36722012-06-13 Yao Qi <yao@codesourcery.com>
3673
3674 * server.c (start_inferior): Remove duplicated writes to fields
3675 'last_resume_kind' and 'last_status' of 'current_inferior'.
3676
0c9070b3
YQ
36772012-06-12 Yao Qi <yao@codesourcery.com>
3678 Pedro Alves <palves@redhat.com>
3679
3680 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3681 comment.
3682 * server.c (handle_v_cont): Extend comment.
3683
c52daf70
YQ
36842012-06-11 Yao Qi <yao@codesourcery.com>
3685
3686 * linux-low.c (linux_attach): Add 'static'.
3687
d38bbb0a
YQ
36882012-06-06 Yao Qi <yao@codesourcery.com>
3689
3690 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3691
89dc0afd
JK
36922012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3693
3694 Fix gcc -flto compilation warning.
3695 * server.c (main): Make variable multi_mode and attach volatile.
3696
75f62ce7
TJB
36972012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3698
3699 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3700 if the platform doesn't know about it.
3701
65f479b6
PA
37022012-05-30 Jeff Kenton <jkenton@tilera.com>
3703
3704 * Makefile.in (SFILES): Add linux-tile-low.c.
3705 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3706 * configure.srv: Handle tilegx-*-linux*.
3707 * linux-tile-low.c: New file.
3708
0c5bf5a9
JK
37092012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3710
3711 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3712
a493e3e2
PA
37132012-05-24 Pedro Alves <palves@redhat.com>
3714
3715 PR gdb/7205
3716
43aaf8b6 3717 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 3718
2ea28649
PA
37192012-05-24 Pedro Alves <palves@redhat.com>
3720
3721 PR gdb/7205
3722
3723 Replace target_signal with gdb_signal throughout.
3724
8d409d16
MR
37252012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3726
3727 * linux-low.c (linux_store_registers): Avoid the copying sequence
3728 when no data has been retrieved by ptrace.
3729
23512c01
MGD
37302012-05-22 Will Deacon <will.deacon@arm.com>
3731
3732 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3733 Include asm/ptrace.h.
3734 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3735 already defined.
3736
4934b29e
MR
37372012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3738
3739 * linux-low.c (linux_store_registers): Don't re-retrieve data
3740 with ptrace that has already been obtained from /proc. Always
3741 copy any data retrieved with ptrace to the buffer supplied.
3742
bde24c0a
PA
37432012-05-11 Yao Qi <yao@codesourcery.com>
3744 Pedro Alves <palves@redhat.com>
3745
3746 * linux-low.c (enum stopping_threads_kind): New.
3747 (stopping_threads): Change type to `enum stopping_threads_kind'.
3748 (handle_extended_wait): If stopping and suspending threads, leave
3749 the new_lwp suspended too.
3750 (linux_wait_for_event): Adjust.
3751 (stop_all_lwps): Set `stopping_threads' to
3752 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3753 whether we're suspending threads or just stopping them. Assert no
3754 recursion happens.
3755
623b6bdf
YQ
37562012-04-29 Yao Qi <yao@codesourcery.com>
3757
3758 * server.h: Move some code to ...
3759 * gdbthread.h: ... here. New.
3760 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3761 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3762 (nto-low.o, win32-low.o): Likewise.
3763 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3764 * regcache.c, remote-utils.c, server.c: Likewise.
3765 * target.c, tracepoint.c, win32-low.c: Likewise.
3766
f15f9948
TJB
37672012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3768
3769 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3770 (PTRACE_ARG4_TYPE): Likewise.
3771 (PTRACE_XFER_TYPE): Likewise.
3772 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3773 ptrace to PTRACE_ARG3_TYPE.
3774 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3775 (PTRACE_ARG4_TYPE): Likewise.
3776 (PTRACE_XFER_TYPE): Likewise.
3777 (linux_detach_one_lwp): Cast fourth argument of
3778 ptrace to long then PTRACE_ARG4_TYPE.
3779 (regsets_fetch_inferior_registers): Cast third argument of
3780 ptrace to long then PTRACE_ARG3_TYPE.
3781 (regsets_store_inferior_registers): Likewise.
3782
38ea300a
PA
37832012-04-20 Pedro Alves <palves@redhat.com>
3784
3785 * configure: Regenerate.
3786
c971b7fa
PA
37872012-04-19 Pedro Alves <palves@redhat.com>
3788
43aaf8b6 3789 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 3790 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
3791 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3792 (all, install-only, uninstall, clean-info, all-lib, clean): No
3793 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3794 (maintainer-clean realclean distclean): Use subdir_do.
3795 (subdir_do): New.
3796 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 3797 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
3798 * acinclude.m4: Include acx_configure_dir.m4.
3799 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3800 calls. Call AC_PROG_RANLIB. Configure gnulib using
3801 ACX_CONFIGURE_DIR.
3802 (GNULIB): New.
3803 (GNULIB_STDINT_H): Adjust.
3804 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3805 * gdbreplay.c: Include build-gnulib/config.h.
3806 * server.h: Likewise.
3807 * aclocal.m4: Regenerate.
3808 * config.in: Regenerate.
3809 * configure: Regenerate.
c971b7fa 3810
809277f8
PA
38112012-04-19 Pedro Alves <palves@redhat.com>
3812
3813 * Makefile.in (LIBGNU, INCGNU): Adjust.
3814 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3815 (all, install-only, uninstall, clean-info, all-lib, clean)
3816 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3817 * configure.ac: Adjust AC_OUTPUT output.
3818 * aclocal.m4: Regenerate.
3819 * configure: Regenerate.
3820
fd9bb8b8
PA
38212012-04-19 Pedro Alves <palves@redhat.com>
3822
3823 * Makefile.in (generated_files): New.
3824 (server_h): Remove the explicit dependency on config.h, and depend
3825 on $generated_files.
3826
1c298c66
PA
38272012-04-19 Pedro Alves <palves@redhat.com>
3828
3829 * Makefile.in (INCGNU): Add -Ignulib.
3830
57c4b50b
PA
38312012-04-19 Pedro Alves <palves@redhat.com>
3832
3833 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3834 (INCGNU): ... this, and spell out -I here.
3835 (GNULIB_LIB): Rename to ...
3836 (LIBGNU): ... this.
3837 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3838
1030e047
PA
38392012-04-19 Pedro Alves <palves@redhat.com>
3840
3841 * config.in: Regenerate.
3842
447d4319
PA
38432012-04-19 Pedro Alves <palves@redhat.com>
3844
3845 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3846 * server.h (memmem): Remove declaration.
3847 * config.in: Regenerate.
3848 * configure: Regenerate.
3849
aad9eab9
YQ
38502012-04-19 Yao Qi <yao@codesourcery.com>
3851
3852 * Makefile.in (SFILES): Add common/vec.c.
3853 (OBS): Add vec.o.
3854 (vec.o): New rule.
3855
3e10640f
YQ
38562012-04-19 Yao Qi <yao@codesourcery.com>
3857
3858 * remote-utils.c (prepare_resume_reply): Replace with macro
3859 target_core_of_thread.
3860 * server.c (handle_qxfer_threads_proper): Likewise.
3861 * target.h (traget_core_of_thread): New macro.
3862
71622373
PA
38632012-04-18 Pedro Alves <palves@redhat.com>
3864
3865 * aclocal.m4: Regenerate.
3866 * configure: Regenerate.
3867
80d26939
YQ
38682012-04-16 Yao Qi <yao@codesourcery.com>
3869
3870 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3871 duplicated on address.
3872
42476b70
YQ
38732012-04-16 Yao Qi <yao@codesourcery.com>
3874
3875 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3876 (struct tracepoint_action_ops) <send>: New field.
3877 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3878 (agent_expr_send, x_tracepoint_action_send): New.
3879 (l_tracepoint_action_send): New.
3880 (cmd_qtdp): Download and install tracepoint
3881 according to `use_agent'.
3882 (run_inferior_command): Add one more parameter `len'.
3883 Update callers.
3884 (tracepoint_send_agent): New.
3885 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3886
7bc83639
YQ
38872012-04-16 Yao Qi <yao@codesourcery.com>
3888
3889 * tracepoint.c (download_tracepoints): Moved to ...
3890 (cmd_qtstart): ... here.
3891
5f18041e
YQ
38922012-04-14 Yao Qi <yao@codesourcery.com>
3893
3894 * tracepoint.c: Include inttypes.h.
3895 (struct collect_memory_action): Use sized types.
3896 (struct tracepoint): Likewise.
3897 (cmd_qtdp, stop_tracing): Update print specifiers.
3898 (cmd_qtp, response_tracepoint): Likewise.
3899 (collect_data_at_tracepoint): Likewise.
3900 (collect_data_at_step): Likewise.
3901
55a8c076
YQ
39022012-04-14 Yao Qi <yao@codesourcery.com>
3903
3904 Import gnulib module inttypes.
3905 * aclocal.m4, config.in, configure: Regenerated.
3906
dc750257
YQ
39072012-04-14 Yao Qi <yao@codesourcery.com>
3908
3909 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3910 Makefile and config.status at last.
3911
0ab5faf9
YQ
39122012-04-13 Yao Qi <yao@codesourcery.com>
3913
3914 * tracepoint.c: Include stdint.h unconditionally.
3915
18f5fd81
TJB
39162012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3917
3918 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3919 on BFD_HAVE_SYS_PROCFS_TYPE.
3920 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3921 * configure: Regenerate.
3922 * config.in: Likewise.
3923
4d47af5c
L
39242012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3925
3926 * Makefile.in (clean): Also remove x32.c x32-linux.c
3927 x32-avx.c x32-avx-linux.c.
3928 (x32.o): New target.
3929 (x32.c): Likewise.
3930 (x32-linux.o): Likewise.
3931 (x32-linux.c): Likewise.
3932 (x32-avx.o): Likewise.
3933 (x32-avx.c): Likewise.
3934 (x32-avx-linux.o): Likewise.
3935 (x32-avx-linux.c): Likewise.
3936
3937 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3938 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3939 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3940 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3941 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3942 i386/x32-avx-linux.xml.
3943
3944 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3945 (init_registers_x32_avx_linux): Likwise.
3946 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3947 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3948
ecedbe58
PA
39492012-04-13 Pedro Alves <palves@redhat.com>
3950
3951 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3952 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3953 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3954 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3955 the sub-make.
3956
c92b5177
L
39572012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3958
3959 * linux-x86-low.c (compat_x32_clock_t): New.
3960 (compat_x32_siginfo_t): Likewise.
3961 (compat_x32_siginfo_from_siginfo): Likewise.
3962 (siginfo_from_compat_x32_siginfo): Likewise.
3963 (linux_is_elf64): Likewise.
3964 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3965 and siginfo_from_compat_x32_siginfo for x32.
3966 (x86_arch_setup): Set linux_is_elf64.
3967
214d508e
L
39682012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3969
3970 PR gdb/13969
3971 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3972 e_machine field.
3973 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3974 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3975 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3976 compatible with process.
3977
c9a1864a
YQ
39782012-04-12 Yao Qi <yao@codesourcery.com>
3979
3980 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3981 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3982 (install-only, install-info, clean): Handle sub dir gnulib.
3983 (all-lib, am--refresh): New targets.
3984 (memmem.o): Remove target.
3985 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3986 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3987 (AC_REPLACE_FUNCS): Remove memmem.
3988 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3989 (AC_OUTPUT): Generate Makefile in gnulib/.
3990 * aclocal.m4, config.in, configure: Regenerated.
3991
367ba2c2
MR
39922012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3993
3994 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3995
9d236627
PA
39962012-04-05 Pedro Alves <palves@redhat.com>
3997
3998 -Werror=strict-aliasing
3999
4000 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4001 pointer.
4002
111217b3
PA
40032012-04-04 Pedro Alves <palves@redhat.com>
4004
4005 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4006 (sparc_store_gregset_from_stack, sparc_store_gregset)
4007 (sparc_breakpoint_at): Fix formatting.
4008
8365dcf5
TJB
40092012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4010
4011 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4012 are available.
4013 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4014 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4015 * config.in: Regenerate.
4016 * configure: Likewise.
4017
689cc2ae
PA
40182012-03-29 Pedro Alves <palves@redhat.com>
4019
4020 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4021 Correct ptrace arguments.
4022
c14dfd32
PA
40232012-03-28 Pedro Alves <palves@redhat.com>
4024
4025 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4026 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4027 (IA64_FR1_REGNUM): New defines.
4028 (ia64_fetch_register): New.
4029 (the_low_target): Install it.
4030 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4031 field.
4032 * linux-low.c (linux_fetch_registers): Try the
4033 the_low_target.fetch_register hook first.
4034
4035 * linux-arm-low.c (the_low_target): Adjust.
4036 * linux-bfin-low.c (the_low_target): Adjust.
4037 * linux-cris-low.c (the_low_target): Adjust.
4038 * linux-crisv32-low.c (the_low_target): Adjust.
4039 * linux-m32r-low.c (the_low_target): Adjust.
4040 * linux-m68k-low.c (the_low_target): Adjust.
4041 * linux-mips-low.c (the_low_target): Adjust.
4042 * linux-ppc-low.c (the_low_target): Adjust.
4043 * linux-s390-low.c (the_low_target): Adjust.
4044 * linux-sh-low.c (the_low_target): Adjust.
4045 * linux-sparc-low.c (the_low_target): Adjust.
4046 * linux-tic6x-low.c (the_low_target): Adjust.
4047 * linux-x86-low.c (the_low_target): Adjust.
4048 * linux-xtensa-low.c (the_low_target): Adjust.
4049
63c88e13
PA
40502012-03-26 Pedro Alves <palves@redhat.com>
4051
4052 * server.c (handle_qxfer_libraries): Don't bail early if
4053 the_target->qxfer_libraries_svr4 is not NULL.
4054
fb723180
PA
40552012-03-26 Pedro Alves <palves@redhat.com>
4056
4057 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4058
0afae3cf
PA
40592012-03-23 Pedro Alves <palves@redhat.com>
4060
4061 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4062 "library-list-svr4" element's start tag when the the DSO list is
4063 empty.
4064
485f1ee4
PA
40652012-03-23 Pedro Alves <palves@redhat.com>
4066
4067 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4068 a variable whose type size is the same as the inferior's pointer
4069 size.
4070
a5362b9a
TS
40712012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4072
4073 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4074 struct siginfo.
4075 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4076 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4077 * linux-low.h: Include <signal.h>.
4078 (struct siginfo): Remove forward declaration.
4079 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4080 struct siginfo.
4081
d226c142
MF
40822012-03-21 Mike Frysinger <vapier@gentoo.org>
4083
4084 * .gitignore: Ignore more files.
4085
122f36ef
PA
40862012-03-19 Pedro Alves <palves@redhat.com>
4087 Jan Kratochvil <jan.kratochvil@redhat.com>
4088
4089 * server.c (cont_thread, general_thread): Add describing comments.
4090 (start_inferior): Clear `cont_thread'.
4091 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4092 of a process.
4093
fc3e5175
YQ
40942012-03-15 Yao Qi <yao@codesourcery.com>
4095
4096 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4097 handling to ...
4098 (cmd_qtdp): ... here.
4099
8d0d92cd
YQ
41002012-03-15 Yao Qi <yao@codesourcery.com>
4101
4102 * tracepoint.c (struct tracepoint_action_ops): New.
4103 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4104 (m_tracepoint_action_download): New.
4105 (r_tracepoint_action_download): New.
4106 (x_tracepoint_action_download): New.
4107 (l_tracepoint_action_download): New.
4108 (add_tracepoint_action): Install `action->ops' according type.
4109 (download_tracepoint_1): Move code `download' function pointer
4110 of various tracepoint_action_ops.
4111
87b0bb13
JK
41122012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4113
4114 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4115 linux_ptrace_attach_warnings.
4116
5f572dec
JK
41172012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4118
4119 * Makefile.in (linux-ptrace.o): New.
4120 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4121 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4122 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4123 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4124 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4125 of these targets.
4126 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4127
f4647387
YQ
41282012-03-08 Yao Qi <yao@codesourcery.com>
4129 Pedro Alves <palves@redhat.com>
4130
4131 Fix PR server/13392.
4132 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4133 offset of JMP insn.
4134 * tracepoint.c (remove_tracepoint): New.
4135 (cmd_qtdp): Call remove_tracepoint when failed to install.
4136
9b224c5e
PA
41372012-03-07 Pedro Alves <palves@redhat.com>
4138
4139 * linux-low.c (get_detach_signal): New.
4140 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4141 Pass on pending signals to PTRACE_DETACH. Check the result of the
4142 ptrace call.
4143 * server.c (program_signals, program_signals_p): New.
4144 (handle_general_set): Handle QProgramSignals.
4145 * server.h (program_signals, program_signals_p): Declare.
4146
e237a7e2
JK
41472012-03-05 Pedro Alves <palves@redhat.com>
4148 Jan Kratochvil <jan.kratochvil@redhat.com>
4149
4150 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4151 New comment why.
4152
5808517f
YQ
41532012-03-03 Yao Qi <yao@codesourcery.com>
4154
4155 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4156 agent_look_up_symbols.
4157
58b4daa5
YQ
41582012-03-03 Yao Qi <yao@codesourcery.com>
4159
4160 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4161 (linux-x86-low.o): Likewise.
4162 * server.h: Remove in_process_agent_loaded.
4163 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4164 common/agent.c.
4165 Update callers.
4166
8ffcbaaf
YQ
41672012-03-03 Yao Qi <yao@codesourcery.com>
4168
4169 * tracepoint.c (gdb_agent_capability): New global.
4170 (in_process_agent_loaded_ust): Renamed to
4171 `in_process_agent_supports_ust'.
4172 Update callers.
4173 (in_process_agent_supports_ust): Call agent_capability_check.
4174 (clear_installed_tracepoints): Assert that agent supports
4175 agent.
4176
d1feda86
YQ
41772012-03-03 Yao Qi <yao@codesourcery.com>
4178
4179 * linux-low.c (linux_supports_agent): New.
4180 (linux_target_ops): Initialize field `supports_agent' with
4181 linux_supports_agent.
4182 * target.h (struct target_ops) <supports_agent>: New.
4183 (target_supports_agent): New macro.
4184 * server.c (handle_general_set): Handle packet 'QAgent'.
4185 (handle_query): Send `QAgent+'.
4186 * Makefile.in (server.o): Depends on agent.h.
4187
2fa291ac
YQ
41882012-03-03 Yao Qi <yao@codesourcery.com>
4189
4190 * Makefile.in (OBS): Add agent.o.
4191 Add new rule for agent.o.
4192 Track dependence of tracepoint.c on agent.h.
4193 * tracepoint.c (run_inferior_command_1):
4194 (run_inferior_command): Call agent_run_command.
4195 (gdb_ust_connect_sync_socket): Deleted. Move it to
4196 common/agent.c.
4197 (resume_thread, stop_thread): Likewise.
4198 (gdb_ust_socket_init): Renamed to ...
4199 (gdb_agent_socket_init): ... New.
4200 (gdb_ust_thread): Renamed to ...
4201 (gdb_agent_helper_thread): ... New.
4202 (gdb_ust_init): Move some code to ...
4203 (gdb_agent_init): ... here. New.
4204 [HAVE_UST]: Call gdb_ust_init.
4205 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4206 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4207 * config.in, configure: Regenerated.
4208
05044653
PA
42092012-03-02 Pedro Alves <palves@redhat.com>
4210
4211 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4212 * linux-low.c (struct simple_pid_list): New.
4213 (stopped_pids): New a struct simple_pid_list pointer.
4214 (add_to_pid_list, pull_pid_from_list): New.
4215 (handle_extended_wait): Don't assume the first signal new children
4216 report is SIGSTOP. Adjust call to pull_pid_from_list.
4217 (linux_wait_for_lwp): Adjust.
4218
8d00225b
YQ
42192012-03-02 Yao Qi <yao@codesourcery.com>
4220
4221 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4222 debug log.
4223
19560ba5
YQ
42242012-03-02 Yao Qi <yao@codesourcery.com>
4225
4226 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4227 `stop_pc' and `tpoint'. Update caller.
4228
1faeff08
MR
42292012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4230
4231 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4232 * linux-low.c (use_linux_regsets): New macro.
4233 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4234 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4235 (linux_register_in_regsets): New function.
4236 (usr_fetch_inferior_registers): Skip registers covered by
4237 regsets.
4238 (usr_store_inferior_registers): Likewise.
4239 (usr_fetch_inferior_registers): New macro.
4240 (usr_store_inferior_registers): Likewise.
4241 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4242 (linux_store_registers): Likewise.
4243 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4244 prototype.
4245 (init_registers_mips64_dsp_linux): Likewise.
4246 (init_registers_mips_linux): New macro.
4247 (init_registers_mips_dsp_linux): Likewise.
4248 (mips_dsp_num_regs): Likewise.
4249 (DSP_BASE, DSP_CONTROL): New fallback macros.
4250 (mips_base_regs): New macro.
4251 (mips_regmap): Use it. Fix the size.
4252 (mips_dsp_regmap): New variable.
4253 (mips_dsp_regset_bitmap): Likewise.
4254 (mips_arch_setup): New function.
4255 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4256 than mips_regmap.
4257 (mips_cannot_store_register): Likewise.
4258 (the_low_target): Update .arch_setup, .num_regs and .regmap
4259 initializers. Add .regset_bitmap initializer.
4260 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4261 initializer.
4262 * linux-bfin-low.c (the_low_target): Likewise.
4263 * linux-cris-low.c (the_low_target): Likewise.
4264 * linux-crisv32-low.c (the_low_target): Likewise.
4265 * linux-ia64-low.c (the_low_target): Likewise.
4266 * linux-m32r-low.c (the_low_target): Likewise.
4267 * linux-m68k-low.c (the_low_target): Likewise.
4268 * linux-ppc-low.c (the_low_target): Likewise.
4269 * linux-s390-low.c (the_low_target): Likewise.
4270 * linux-sh-low.c (the_low_target): Likewise.
4271 * linux-sparc-low.c (the_low_target): Likewise.
4272 * linux-tic6x-low.c (the_low_target): Likewise.
4273 * linux-x86-low.c (the_low_target): Likewise.
4274 * linux-xtensa-low.c (the_low_target): Likewise.
4275 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4276 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4277 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4278 srv_xmlfiles.
4279 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4280 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4281
c03e6ccc
YQ
42822012-02-29 Yao Qi <yao@codesourcery.com>
4283 Pedro Alves <palves@redhat.com>
4284
4285 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4286 `step_over_finished' is true.
4287
644cebc9
PA
42882012-02-27 Pedro Alves <palves@redhat.com>
4289
4290 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4291 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4292
c14d7ab2
PA
42932012-02-27 Pedro Alves <palves@redhat.com>
4294
4295 PR server/9684
4296 * linux-low.c (pid_is_stopped): New.
4297 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4298
412c89dd
LM
42992012-02-25 Luis Machado <lgustavo@codesourcery.com>
4300
4301 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4302 of conditions.
4303
b745defe
MR
43042012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4305
4306 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4307
9f3a5c85
LM
43082012-02-24 Luis Machado <lgustavo@codesourcery>
4309
4310 * server.c (handle_query): Advertise support for target-side
4311 breakpoint condition evaluation.
4312 (process_point_options): New function.
4313 (process_serial_event): When inserting a breakpoint, check for
4314 a target-side condition that should be evaluated.
4315
4316 * mem-break.c: Include regcache.h and ax.h.
4317 (point_cond_list_t): New data structure.
4318 (breakpoint) <cond_list>: New field.
4319 (find_gdb_breakpoint_at): Make non-static.
4320 (delete_gdb_breakpoint_at): Clear any target-side
4321 conditions.
4322 (clear_gdb_breakpoint_conditions): New function.
4323 (add_condition_to_breakpoint): Likewise.
4324 (add_breakpoint_condition): Likewise.
4325 (gdb_condition_true_at_breakpoint): Likewise.
4326 (gdb_breakpoint_here): Return result directly instead
4327 of going through a local variable.
4328
4329 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4330 (clear_gdb_breakpoint_conditions): Likewise.
4331 (add_breakpoint_condition): Likewise.
4332 (gdb_condition_true_at_breakpoint): Likewise.
4333
4334 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4335 (need_step_over_p): Take target-side breakpoint condition into
4336 consideration.
4337
5e1dc496
LM
43382012-02-24 Luis Machado <lgustavo@codesourcery>
4339
4340 * server.h: Include tracepoint.h.
4341 (agent_mem_read, agent_get_trace_state_variable_value,
4342 agent_set_trace_state_variable_value,
4343 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4344 get_set_tsv_func_addr): New prototypes.
4345
4346 * ax.h: New include file.
4347 * ax.c: New source file.
4348
4349 * tracepoint.c: Include ax.h.
4350 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4351 agent_expr, eval_result_type): Move to ax.h.
4352 (parse_agent_expr): Rename to ...
4353 (gdb_parse_agent_expr): ... this, make it non-static and move
4354 to ax.h.
4355 (unparse_agent_expr) Rename to ...
4356 (gdb_unparse_agent_expr): ... this, make it non-static and move
4357 to ax.h.
4358 (eval_agent_expr): Rename to ...
4359 (eval_tracepoint_agent_expr): ... this.
4360 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4361 forward declarations.
4362 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4363 (agent_get_trace_state_variable_value): New function.
4364 (agent_set_trace_state_variable_value): New function.
4365 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4366 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4367 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4368 (condition_true_at_tracepoint): Likewise.
4369 (parse_agent_expr): Rename to ...
4370 (gdb_parse_agent_expr): ... this and move to ax.c.
4371 (unparse_agent_expr): Rename to ...
4372 (gdb_unparse_agent_expr): ... this and move to ax.c.
4373 (gdb_agent_op_name): Move to ax.c.
4374 (eval_agent_expr): Rename to ...
4375 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4376 and move to ax.c.
4377 (eval_tracepoint_agent_expr): New function.
4378 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4379 non-static.
5e1dc496
LM
4380 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4381 ax.c.
4382 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4383 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4384 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4385 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4386 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4387 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4388 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4389 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4390 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4391 (compile_bytecodes): Remove forward declaration.
4392 (is_goto_target): Move to ax.c.
4393 (compile_bytecodes): Move to ax.c and call
4394 agent_get_trace_state_variable_value (...) and
4395 agent_set_trace_state_variable_value (...).
4396
4397 * Makefile.in: Update ax.c and IPA dependencies.
4398
277e4e52
PA
43992012-02-24 Pedro Alves <palves@redhat.com>
4400
4401 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4402 (cmd_bigqtbuffer_circular): ... this. Only handle
4403 'QTBuffer:circular:'.
4404 (handle_tracepoint_general_set): Adjust.
4405
bf4c19f7
YQ
44062012-02-16 Yao Qi <yao@codesourcery.com>
4407
4408 * inferiors.c: Move code to ...
4409 * dll.c: .... here. New.
4410 * server.h: Declare clear_dlls.
4411 * Makefile.in (SFILES): Add dll.c.
4412 (OBS): Add dll.o
4413 (dll.o): New rule.
4414
d73f2619
YQ
44152012-02-11 Yao Qi <yao@codesourcery.com>
4416
4417 * server.c: (handle_monitor_command): Add a new parameter
4418 `own_buf'.
4419 (handle_query): Update caller.
4420
f8255c2a
JB
44212012-02-09 Joel Brobecker <brobecker@adacore.com>
4422
4423 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4424 * configure, config.in: Regenerate.
4425 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4426 is not defined.
4427
da84f473
PA
44282012-02-02 Pedro Alves <palves@redhat.com>
4429
4430 Try SIGKILL first, then PTRACE_KILL.
4431 * linux-low.c (linux_kill_one_lwp): New.
4432 (linux_kill_one_lwp): Rename to ...
4433 (kill_one_lwp_callback): ... this. Use the new
4434 linux_kill_one_lwp.
4435
e886a173
PA
44362012-02-02 Pedro Alves <palves@redhat.com>
4437
4438 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4439 inferior.
4440
be07f1a2
PA
44412012-01-27 Pedro Alves <palves@redhat.com>
4442
4443 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4444 (elf_64_file_p): Make static.
4445 (linux_pid_exe_is_elf_64_file): New.
4446 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4447 Delete declarations.
4448 (linux_pid_exe_is_elf_64_file): Declare.
4449 * linux-x86-low.c (x86_arch_setup): Use
4450 linux_pid_exe_is_elf_64_file.
4451
d8301ad1
JK
44522012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4453
4454 * linux-low.c (linux_wait_for_event_1): Rename to ...
4455 (linux_wait_for_event): ... here and merge it with former
4456 linux_wait_for_event - new variable wait_ptid, use it.
4457 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4458
01b17894
PA
44592012-01-23 Pedro Alves <palves@redhat.com>
4460
4461 * server.c (main): Avoid yet another case of infinite loop while
4462 detaching/killing after a longjmp.
4463
e825046f
JK
44642012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4465
4466 Code cleanup.
4467 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4468
b9e7b9c3
UW
44692012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4470
4471 * hostio.c (handle_readlink): New function.
4472 (handle_vFile): Call it to handle "vFile:readlink" packets.
4473
901f9912
UW
44742012-01-20 Pedro Alves <palves@redhat.com>
4475 Ulrich Weigand <ulrich.weigand@linaro.org>
4476
4477 * server.c (handle_v_requests): Only support vAttach and vRun to
4478 start multiple processes when in extended protocol mode.
4479
fc1ab1a0
PA
44802012-01-17 Pedro Alves <palves@redhat.com>
4481
4482 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4483 memalign plus mprotect to allocate the scratch buffer.
4484
7d5d4e98
PA
44852012-01-13 Pedro Alves <palves@redhat.com>
4486
4487 * server.c (attach_inferior): Clear `cont_thread'.
4488
f128d5e9
PA
44892012-01-13 Pedro Alves <palves@redhat.com>
4490
4491 * server.c (main): Avoid infinite loop while detaching/killing
4492 after a longjmp.
4493
06db92f0
DE
44942012-01-09 Doug Evans <dje@google.com>
4495
4496 * server.c (start_inferior): Set last_ptid in --wrapper case.
4497
32d92999
YQ
44982012-01-06 Yao Qi <yao@codesourcery.com>
4499
4500 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4501 defined.
4502 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4503
5e0a92a9
YQ
45042012-01-04 Yao Qi <yao@codesourcery.com>
4505
4506 * tracepoint.c (cmd_qtdp): Print debug message
4507 for static tracepoint.
4508
ae639e8c
YQ
45092012-01-04 Yao Qi <yao@codesourcery.com>
4510
4511 * tracepoint.c (trace_vdebug): Differentiate debug message
4512 between gdbserver and IPA.
4513
f72429c5
YQ
45142012-01-03 Yao Qi <yao@codesourcery.com>
4515
4516 * tracepoint.c (tracepoint_was_hit): Don't collect for
4517 static tracepoint.
4518
12c3e59c
JB
45192012-01-02 Joel Brobecker <brobecker@adacore.com>
4520
4521 * terminal.h: Reformat copyright header.
4522
67827812
JB
45232012-01-02 Joel Brobecker <brobecker@adacore.com>
4524
4525 * server.c (gdbserver_version): Update copyright year.
4526 * gdbreplay.c (gdbreplay_version): Likewise.
4527
3e52c33d
JK
45282011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4529
4530 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4531
4532 Revert:
4533 2011-12-18 Hui Zhu <teawater@gmail.com>
4534 * linux-low.c (linux_create_inferior): Save return value to ret.
4535
66f1260e
HZ
45362011-12-18 Hui Zhu <teawater@gmail.com>
4537
4538 * linux-low.c (linux_create_inferior): Save return value to ret.
4539
e77616d7
DE
45402011-12-16 Doug Evans <dje@google.com>
4541
e7b06c57
DE
4542 * linux-low.c (linux_create_inferior): If stdio connection,
4543 redirect stdin from /dev/null, stdout to stderr.
4544 * remote-utils.c (remote_is_stdio): New static global.
4545 (remote_connection_is_stdio): New function.
4546 (remote_prepare): Handle stdio connection.
4547 (remote_open): Ditto.
4548 (remote_close): Don't close stdin for stdio connections.
4549 (read_prim,write_prim): New functions. Replace all calls to
4550 read/write to these.
4551 * server.c (main): Watch for "-" argument. Move call to
4552 remote_prepare before start_inferior.
4553 * server.h (STDIO_CONNECTION_NAME): New macro.
4554 (remote_connection_is_stdio): Declare.
4555
e77616d7
DE
4556 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4557 in debugging output.
4558
82067193
YQ
45592011-12-15 Yao Qi <yao@codesourcery.com>
4560
4561 * tracepoint.c: Include sys/syscall.h.
4562 (gdb_ust_thread): Remove preprocessor conditional.
4563
82bfbe7e
PA
45642011-12-14 Pedro Alves <pedro@codesourcery.com>
4565
4566 * linux-low.c (linux_detach_one_lwp): Call
4567 the_low_target.prepare_to_resume before detaching.
4568
712c6575
YQ
45692011-12-14 Yao Qi <yao@codesourcery.com>
4570
4571 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4572 of write.
4573
d54d1edf
YQ
45742011-12-14 Yao Qi <yao@codesourcery.com>
4575
4576 * i386-low.c (i386_low_stopped_data_address): Initialize local
4577 variable `control'.
4578
6210a125
PA
45792011-12-13 Pedro Alves <pedro@codesourcery.com>
4580
4581 PR remote/13492
4582
4583 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4584 DR_CONTROL unless necessary. Extend comments.
4585 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4586 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4587
2ece8244
YQ
45882011-12-13 Yao Qi <yao@codesourcery.com>
4589
4590 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4591 macros.
4592 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4593
784867a5
JK
45942011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4595
4596 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4597 Print new debug message for such case.
4598
6bf36717
JK
45992011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4600
4601 Fix overlapping memcpy.
4602 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4603 the read_inferior_memory transfer.
4604 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4605 write_inferior_memory transfer.
4606 (set_fast_tracepoint_jump): New variable buf. Use it for the
4607 read_inferior_memory and write_inferior_memory transfers.
4608 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4609 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4610 Use it for the write_inferior_memory transfer.
4611 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4612 buffers.
4613
50275556
MR
46142011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4615
4616 * linux-low.c (fetch_register, store_register): Make code
4617 consistent, fix formatting.
4618
7325beb4
MR
46192011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4620
4621 * linux-low.c (usr_store_inferior_registers): Factor out code
4622 to handle individual registers into...
4623 (store_register): ... this new function.
4624
c642a434
UW
46252011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4626
4627 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4628 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4629 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4630 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4631 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4632 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4633 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4634 (srv_xmlfiles): Add new XML files.
4635
4636 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4637 and <sys/uio.h>.
4638 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4639 (init_registers_s390_linux32v1): Add prototype.
4640 (init_registers_s390_linux32v2): Likewise.
4641 (init_registers_s390_linux64v1): Likewise.
4642 (init_registers_s390_linux64v2): Likewise.
4643 (init_registers_s390x_linux64v1): Likewise.
4644 (init_registers_s390x_linux64v2): Likewise.
4645 (s390_num_regs): Increment to 52.
4646 (s390_regmap): Add orig_r2 register.
4647 (s390_num_regs_3264): Increment to 68.
4648 (s390_regmap_3264): Add orig_r2 register.
4649 (s390_collect_ptrace_register): Handle orig_r2 register.
4650 (s390_supply_ptrace_register): Likewise.
4651 (s390_fill_last_break): New function.
4652 (s390_store_last_break): Likewise.
4653 (s390_fill_system_call): New function.
4654 (s390_store_system_call): Likewise.
4655 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4656 register sets.
4657 (s390_check_regset): New function.
4658 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4659 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4660 Update target_regsets for available register sets.
4661
2268b414
JK
46622011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4663 Jan Kratochvil <jan.kratochvil@redhat.com>
4664
4665 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4666 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4667 New.
4668 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4669 * linux-low.h (struct process_info_private): New member r_debug.
4670 * server.c (handle_qxfer_libraries): Call
4671 the_target->qxfer_libraries_svr4.
4672 (handle_qxfer_libraries_svr4): New function.
4673 (qxfer_packets): New entry "libraries-svr4".
4674 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4675 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4676 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4677 PACKET_qXfer_libraries_svr4.
4678
d6db1fab
UW
46792011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4680
4681 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4682 PSW address/mask between 8-byte and 16-byte formats.
4683 (s390_supply_ptrace_register): Likewise.
4684 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4685 basic addressing mode bit.
4686
242f5f1c
SS
46872011-11-24 Stan Shebs <stan@codesourcery.com>
4688
4689 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4690
f196051f
SS
46912011-11-17 Stan Shebs <stan@codesourcery.com>
4692
4693 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4694 (tracing_start_time): New global.
4695 (tracing_stop_time): New global.
4696 (tracing_user_name): New global.
4697 (tracing_notes): New global.
4698 (tracing_stop_note): New global.
4699 (cmd_qtstart): Set traceframe_usage, start_time.
4700 (stop_tracing): Set stop_time.
4701 (cmd_qtstatus): Report additional status.
4702 (cmd_qtp): New function.
4703 (handle_tracepoint_query): Call it.
4704 (cmd_qtnotes): New function.
4705 (handle_tracepoint_general_set): Call it.
4706 (get_timestamp): Rename from tsv_get_timestamp.
4707
405f8e94
SS
47082011-11-14 Stan Shebs <stan@codesourcery.com>
4709 Kwok Cheung Yeung <kcy@codesourcery.com>
4710
4711 * linux-x86-low.c (small_jump_insn): New.
4712 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4713 trampoline and error message, build a trampoline and issue a small
4714 jump instruction to it.
4715 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4716 trampoline and error message.
4717 (x86_get_min_fast_tracepoint_insn_len): New.
4718 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4719 * linux-low.h (struct linux_target_ops): Add arguments to
4720 install_fast_tracepoint_jump_pad operation, add new operation.
4721 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4722 arguments.
4723 (linux_get_min_fast_tracepoint_insn_len): New function.
4724 (linux_target_op): Add new operation.
4725 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4726 (gdb_trampoline_buffer_end): Ditto.
4727 (gdb_trampoline_buffer_error): Ditto.
4728 (struct ipa_sym_addresses): Add fields for new IPA variables.
4729 (symbol_list): Add entries for new IPA variables.
4730 (struct tracepoint): Add fields to hold the address range of the
4731 trampoline used by the tracepoint.
4732 (trampoline_buffer_head): New static variable.
4733 (trampoline_buffer_tail): Ditto.
4734 (claim_trampoline_space): New function.
4735 (have_fast_tracepoint_trampoline_buffer): New function.
4736 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4737 structure.
4738 (install_fast_tracepoint): Ditto, also add error buffer argument.
4739 (cmd_qtminftpilen): New function.
4740 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4741 (fast_tracepoint_from_trampoline_address): New function.
4742 (fast_tracepoint_collecting): Handle trampoline as part of jump
4743 pad space.
4744 (set_trampoline_buffer_space): New function.
4745 (initialize_tracepoint): Initialize new IPA variables.
4746 * target.h (struct target_ops): Add arguments to
4747 install_fast_tracepoint_jump_pad operation, add new
4748 get_min_fast_tracepoint_insn_len operation.
4749 (target_get_min_fast_tracepoint_insn_len): New.
4750 (install_fast_tracepoint_jump_pad): Add arguments.
4751 * server.h (IPA_BUFSIZ): Define.
4752 * linux-i386-ipa.c: Include extra header files.
4753 (initialize_fast_tracepoint_trampoline_buffer): New function.
4754 (initialize_low_tracepoint): Call it.
4755 * server.h (set_trampoline_buffer_space): Declare.
4756 (claim_trampoline_space): Ditto.
4757 (have_fast_tracepoint_trampoline_buffer): Ditto.
4758
1e4d1764
YQ
47592011-11-14 Yao Qi <yao@codesourcery.com>
4760
4761 * server.c (handle_query): Handle InstallInTrace for qSupported.
4762 * tracepoint.c (add_tracepoint): Sort list.
4763 (install_tracepoint, download_tracepoint): New.
4764 (cmd_qtdp): Call them to install and download tracepoints.
4765 (sort_tracepoints): Removed.
4766 (cmd_qtstart): Update.
4767
5c73ff4e
YQ
47682011-11-14 Yao Qi <yao@codesourcery.com>
4769
4770 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4771 * mem-break.h: Declare.
4772 * tracepoint.c (cmd_qtstart): Move some code to ...
4773 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4774 New.
4775 (download_tracepoints): Move some code to ...
4776 (download_tracepoint_1): ... here. New.
4777
86a30030
YQ
47782011-11-08 Yao Qi <yao@codesourcery.com>
4779
4780 * remote-utils.c (relocate_instruction): A comment fix.
4781
8d26e50c
JB
47822011-11-07 Joel Brobecker <brobecker@adacore.com>
4783
4784 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4785 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4786 dr_status_mirror and dr_control_mirror from debug_reg_state.
4787 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4788 (i386_initial_stuff): Remove use of deleted globals.
4789 (i386_get_thread_context, i386_set_thread_context,
4790 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4791 from debug_reg_state.
4792
a59306a3
YQ
47932011-11-05 Yao Qi <yao@codesourcery.com>
4794
4795 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4796 address as TPOINT's.
4797
3065dfb6
SS
47982011-11-02 Stan Shebs <stan@codesourcery.com>
4799
4800 * tracepoint.c (agent_mem_read_string): New function.
4801 (eval_agent_expr): Call it for tracenz.
4802 * server.c (handle_query): Report support for tracenz.
4803
fd0d8c7c
YQ
48042011-11-02 Yao Qi <yao@codesourcery.com>
4805
4806 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4807
609086b1
YQ
48082011-11-02 Yao Qi <yao@codesourcery.com>
4809
4810 * target.h: Fix a typo in comment.
4811
b9fd1791
PA
48122011-10-31 Pedro Alves <pedro@codesourcery.com>
4813
4814 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4815 clobber the breakpoints' shadows with fast tracepoint jumps.
4816 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4817 * target.c (write_inferior_memory): Also pass MYADDR down to
4818 check_mem_write.
4819
03583c20
UW
48202011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4821
4822 * configure.ac: Check support for personality routine.
4823 * configure: Regenerate.
4824 * config.in: Likewise.
4825 * linux-low.c: Include <sys/personality.h>.
4826 Define ADDR_NO_RANDOMIZE if necessary.
4827 (linux_create_inferior): Disable address space randomization when
4828 forking inferior, if requested.
4829 (linux_supports_disable_randomization): New function.
4830 (linux_target_ops): Install it.
4831 * server.h (disable_randomization): Declare.
4832 * server.c (disable_randomization): New global variable.
4833 (handle_general_set): Handle QDisableRandomization.
4834 (handle_query): Likewise for qSupported.
4835 (main): Support --disable-randomization and --no-disable-randomization
4836 command line arguments.
4837 * target.h (struct target_ops): Add supports_disable_randomization.
4838 (target_supports_disable_randomization): New macro.
4839
723b724b
MF
48402011-09-29 Mike Frysinger <vapier@gentoo.org>
4841
4842 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4843 ifdef check.
4844 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4845 [!PT_GETDSBT] (target_loadmap): New definition.
4846 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4847 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4848 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4849 and PT_GETDSBT to LINUX_LOADMAP.
4850 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4851 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4852
55329a5c 48532011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
4854
4855 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4856 (arm_linux_hwbp_cap): New static variable.
4857 (arm_linux_get_hwbp_cap): Replace by ...
4858 (arm_linux_init_hwbp_cap): ... this new function.
4859 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4860 (arm_linux_get_hw_watchpoint_count): Likewise.
4861 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4862 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4863 (arm_prepare_to_resume): Use perror_with_name instead of error.
4864
55329a5c 48652011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
4866
4867 * linux-arm-low.c: Include <signal.h>.
4868 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4869 (struct arm_linux_hwbp_cap): New data type.
4870 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4871 (struct arm_linux_hw_breakpoint): New data type.
4872 (MAX_BPTS, MAX_WPTS): Define.
4873 (struct arch_process_info, struct arch_lwp_info): New data types.
4874 (arm_linux_get_hwbp_cap): New function.
4875 (arm_linux_get_hw_breakpoint_count): Likewise.
4876 (arm_linux_get_hw_watchpoint_count): Likewise.
4877 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4878 (arm_hwbp_control_initialize): Likewise.
4879 (arm_hwbp_control_is_enabled): Likewise.
4880 (arm_hwbp_control_is_initialized): Likewise.
4881 (arm_hwbp_control_disable): Likewise.
4882 (arm_linux_hw_breakpoint_equal): Likewise.
4883 (arm_linux_hw_point_initialize): Likewise.
4884 (struct update_registers_data): New data structure.
4885 (update_registers_callback: New function.
4886 (arm_insert_point): Likewise.
4887 (arm_remove_point): Likewise.
4888 (arm_stopped_by_watchpoint): Likewise.
4889 (arm_stopped_data_address): Likewise.
4890 (arm_new_process): Likewise.
4891 (arm_new_thread): Likewise.
4892 (arm_prepare_to_resume): Likewise.
4893 (the_low_target): Register arm_insert_point, arm_remove_point,
4894 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4895 arm_new_thread, and arm_prepare_to_resume.
4896
6b9801d4
SS
48972011-09-15 Stan Shebs <stan@codesourcery.com>
4898
4899 * server.h (struct emit_ops): Add compare-goto fields.
4900 * tracepoint.c (gdb_agent_op_sizes): New table.
4901 (emit_eq_goto): New function.
4902 (emit_ne_goto): New function.
4903 (emit_lt_goto): New function.
4904 (emit_le_goto): New function.
4905 (emit_gt_goto): New function.
4906 (emit_ge_goto): New function.
4907 (is_goto_target): New function.
4908 (compile_bytecodes): Recognize special cases of compare-goto
4909 combinations and call specialized emitters for them.
4910 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4911 (amd64_emit_ne_goto): New function.
4912 (amd64_emit_lt_goto): New function.
4913 (amd64_emit_le_goto): New function.
4914 (amd64_emit_gt_goto): New function.
4915 (amd64_emit_ge_goto): New function.
4916 (amd64_emit_ops): Add the new functions.
4917 (i386_emit_eq_goto): New function.
4918 (i386_emit_ne_goto): New function.
4919 (i386_emit_lt_goto): New function.
4920 (i386_emit_le_goto): New function.
4921 (i386_emit_gt_goto): New function.
4922 (i386_emit_ge_goto): New function.
4923 (i386_emit_ops): Add the new functions.
4924
bf15cbda
SS
49252011-09-08 Stan Shebs <stan@codesourcery.com>
4926
4927 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4928 (i386_emit_epilogue): Restore %ebx.
4929
943ca1dd
JZ
49302011-08-31 Jie Zhang <jzhang918@gmail.com>
4931
4932 * server.c (step_thread): Remove definition.
4933 (process_serial_event): Don't handle Hs.
4934 * server.h (step_thread): Remove declaration.
4935 * target.c (set_desired_inferior): Remove use of step_thread.
4936
e3deef73
LM
49372011-08-24 Luis Machado <lgustavo@codesourcery.com>
4938
4939 * linux-low.c: Include linux-procfs.h.
4940 (linux_attach_lwp_1): Update comments.
4941 (linux_attach): Scan for existing threads when attaching to a
4942 process that is the tgid.
4943 * Makefile.in: Update dependencies.
4944
13da1c97
LM
49452011-08-24 Luis Machado <lgustavo@codesourcery.com>
4946
4947 * configure.srv: Add linux-procfs.o dependencies.
4948
881127c9
YQ
49492011-08-14 Yao Qi <yao@codesourcery.com>
4950
4951 * target.h (struct target_ops): Fix indent.
4952 * win32-low.c (win32_target_ops): Fix comment.
4953
58dbd541
YQ
49542011-08-14 Andrew Jenner <andrew@codesourcery.com>
4955 Yao Qi <yao@codesourcery.com>
4956
4957 * Makefile.in (clean): Remove tic6x-*.c files.
4958 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4959 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4960 (tic6x-c64xp-linux.c): Likewise.
4961 * configure.srv: Add support for tic6x-*-uclinux.
4962 * linux-tic6x-low.c: New.
4963 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4964
78d85199
YQ
49652011-08-14 Andrew Stubbs <ams@codesourcery.com>
4966 Yao Qi <yao@codesourcery.com>
4967
4968 * target.h (struct target_ops): Add read_loadmap.
4969 * linux-low.c (struct target_loadseg): New type.
4970 (struct target_loadmap): New type.
4971 (linux_read_loadmap): New function.
4972 (linux_target_ops): Add linux_read_loadmap.
4973 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
4974 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4975 to NULL.
78d85199 4976
a959a88d
EZ
49772011-08-05 Eli Zaretskii <eliz@gnu.org>
4978
4979 * win32-low.c: Include <stdint.h>.
4980
1ced966e
PA
49812011-07-22 Pedro Alves <pedro@codesourcery.com>
4982
4983 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4984 to the inferior here.
4985 (i386_remove_aligned_watchpoint): Ditto.
4986 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4987 fit part of the watchpoint in the debug registers.
4988 (i386_update_inferior_debug_regs): New.
4989 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4990 registers, and only update the inferior on success.
4991 (i386_low_remove_watchpoint): Ditto.
4992
d26e3629
KY
49932011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4994
4995 * linux-low.c (compare_ints, unique, list_threads, show_process,
4996 linux_core_of_thread): Delete.
4997 (linux_target_ops): Change linux_core_of_thread to
4998 linux_common_core_of_thread.
4999 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5000 * utils.c (malloc_failure): Change type of argument.
5001 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5002 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5003 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5004 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5005 (IPA_OBJS): Add common-utils-ipa.o.
5006 (ptid_h, linux_osdata_h): New macros.
5007 (server_h): Add common/common-utils.h, common/xml-utils.h,
5008 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5009 common/ptid.h.
5010 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5011 ptid.o, buffer.o): New rules.
5012 (linux-low.o): Add common/linux-osdata.h as a dependency.
5013 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5014 * configure.ac: Add AC_HEADER_DIRENT check.
5015 * config.in: Regenerate.
5016 * configure: Regenerate.
5017 * remote-utils.c (xml_escape_text): Delete.
5018 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5019 buffer_xml_printf): Move to common/buffer.c.
5020 * server.c (main): Remove call to initialize_inferiors.
5021 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5022 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5023 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5024 internal_error, gdb_assert, gdb_assert_fail): Delete.
5025 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5026 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5027 common/buffer.h.
5028 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5029 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5030 initialize_inferiors): Delete.
5031
2275a1a7
PA
50322011-07-20 Pedro Alves <pedro@codesourcery.com>
5033
5034 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5035 symbol error.
5036
0a5b1e09
PA
50372011-05-31 Pedro Alves <pedro@codesourcery.com>
5038
5039 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5040 assertion.
5041 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5042
6938fd34
YQ
50432011-05-26 Yao Qi <yao@codesourcery.com>
5044
5045 * Makefile.in (thread-db.o): Track dependence to
5046 common/gdb_thread_db.h.
5047 * thread-db.c: include gdb_thread_db.h from right place.
5048
b481f9e0
TT
50492011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5050
5051 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5052 __FILE__ and __LINE__ to internal_error.
5053
98a5dd13
DE
50542011-05-13 Doug Evans <dje@google.com>
5055
5056 * thread-db.c (try_thread_db_load_from_sdir): New function.
5057 (try_thread_db_load_from_dir): New function.
5058 (thread_db_load_search): Handle $sdir, ignore $pdir.
5059 Remove trying of system directories if search of
5060 libthread-db-search-path fails, that is now done via $sdir.
5061
d248b706
KY
50622011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5063
5064 * server.c (handle_query): Add EnableDisableTracepoints to the list
5065 of supported features.
43aaf8b6 5066 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5067 tracepoints.
43aaf8b6
PA
5068 (cmd_qtenable_disable): New.
5069 (cmd_qtstart): Install tracepoints even if disabled.
5070 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5071 receiving a QTEnable or QTDisable packet.
5072 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5073 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5074 tracepoints.
5075 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5076
84e578fb
DE
50772011-05-10 Doug Evans <dje@google.com>
5078
5079 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5080
71f55dd8
DE
50812011-05-04 Doug Evans <dje@google.com>
5082
5083 * linux-low.c (linux_join): Skip process lookup.
5084 * spu-low.c (spu_join): Ditto.
5085 * server.c (join_inferiors_callback): Delete.
5086 (process_serial_event): For 'D' packet (detach) call join_inferior
5087 directly.
5088
4d393d60
JM
50892011-05-04 Joseph Myers <joseph@codesourcery.com>
5090
5091 * README: Don't mention xscale*-*-linux*.
5092 * configure.srv (xscale*-*-linux*): Don't handle target.
5093
b00ad6ff
NF
50942011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5095
5096 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5097 casting pointers.
5098 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5099 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5100 (i386_emit_void_call_2): Likewise.
5101
af96c192
YQ
51022011-04-26 Yao Qi <yao@codesourcery.com>
5103
43aaf8b6
PA
5104 * linux-low.c: Move common macros to linux-ptrace.h.
5105 Include linux-ptrace.h.
af96c192
YQ
5106 * Makefile.in (linux_ptrace_h): New.
5107 (linux-low.o): Depends on linux-ptrace.h.
5108
03f2bd59
JK
51092011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5110
5111 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5112 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5113 (remote_prepare): New function with most of the TCP code from ...
5114 (remote_open): ... here. Detect PORT here unconditionally. Move also
5115 setting transport_is_reliable.
5116 * server.c (run_once): New variable.
5117 (gdbserver_usage): Document it.
5118 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5119 the first run if RUN_ONCE.
5120 * server.h (run_once, remote_prepare): New declarations.
5121
7a9dd1b2
TT
51222011-04-19 Tom Tromey <tromey@redhat.com>
5123
5124 * win32-low.c (handle_load_dll): Remove duplicate "the".
5125
81239425
PM
51262011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5127
5128 Remove support for old Cygwin 1.5 versions.
5129 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5130 function to avoid warning.
5131 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5132 warning.
5133
9e0627f1
PM
51342011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5135
5136 * gdbserver/server.h (Macro _): Define it if not available.
5137
588eebee
MS
51382011-03-14 Michael Snyder <msnyder@vmware.com>
5139
348af9f7 5140 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5141
43f70d4c
JB
51422011-03-10 Joel Brobecker <brobecker@adacore.com>
5143
5144 * Makefile.in (maintainer-clean realclean distclean): Remove
5145 "make ... subdir_do" command.
5146
348af9f7
MS
51472011-03-10 Michael Snyder <msnyder@vmware.com>
5148
5149 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5150
5151 * server.c (handle_v_run): Free alloced buffer on early return.
5152
e637a4f5
YQ
51532011-03-09 Yao Qi <yao@codesourcery.com>
5154
5155 Revert:
5156 2011-03-04 Yao Qi <yao@codesourcery.com>
5157
5158 * Makefile.in: Remove GNU make feature --directory.
5159
5160 2011-03-05 Yao Qi <yao@codesourcery.com>
5161
5162 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5163 (subdir_do): New make target. Copied from gdb/Makefile.
5164 (maintainer-clean, realclean, distclean, clean): Call corresponding
5165 make targets in common/Makefile.
5166
5167 2011-02-11 Yao Qi <yao@codesourcery.com>
5168
5169 * configure.ac: Call AC_PROG_RANLIB.
5170 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5171 * configure: Regenerate.
5172
e6edda56
JK
51732011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5174
5175 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5176
e5141119
JB
51772011-03-06 Yao Qi <yao@codesourcery.com>
5178
5179 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5180
64794aa4
JB
51812011-03-05 Yao Qi <yao@codesourcery.com>
5182
5183 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5184 (subdir_do): New make target. Copied from gdb/Makefile.
5185 (maintainer-clean, realclean, distclean, clean): Call corresponding
5186 make targets in common/Makefile.
5187
7a762829
YQ
51882011-03-04 Yao Qi <yao@codesourcery.com>
5189
5190 * Makefile.in: Remove GNU make feature --directory.
5191
348af9f7
MS
51922011-03-04 Michael Snyder <msnyder@vmware.com>
5193
5194 * server.c (queue_stop_reply): Call xmalloc not malloc.
5195
51962011-03-02 Michael Snyder <msnyder@vmware.com>
5197
5198 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5199
9f72fee2
MS
52002011-02-28 Michael Snyder <msnyder@vmware.com>
5201
588eebee
MS
5202 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5203 (cmd_qtframe): Ditto.
5204 (cmd_qtbuffer): Ditto.
5205 (cmd_bigqtbuffer): Ditto.
5206
9f72fee2
MS
5207 * utils.c (decimal2str): Initialize 'width' to nine, then
5208 don't mess with it.
5209
8040bd49
UW
52102011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5211
5212 * hostio.c (require_data): Free *data, not data.
5213
7e52cbd0
JK
52142011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5215
5216 * hostio.c (require_data): Use free, not xfree.
5217
9130f83e
MS
52182011-02-27 Michael Snyder <msnyder@vmware.com>
5219
4b812f4e
MS
5220 * server.c (handle_query): Discard unused value.
5221
9130f83e
MS
5222 * hostio.c (require_data): Free malloc memory before returning
5223 error.
5224
69d37113
MS
52252011-02-26 Michael Snyder <msnyder@vmware.com>
5226
5227 * linux-low.c (list_threads): Call closedir for dirent.
5228
35f5825a
MS
52292011-02-27 Michael Snyder <msnyder@vmware.com>
5230
2a589cef
MS
5231 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5232 a case statement falls through.
5233
0adea5f7
MS
5234 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5235
35f5825a
MS
5236 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5237 in comparison.
5238
238f1c74
MS
52392011-02-26 Michael Snyder <msnyder@vmware.com>
5240
5241 * utils.c (decimal2str): Eliminate dead code and dead param.
5242 (pulongest): Drop dead param from call to decimal2str.
5243 (plongest): Ditto.
5244
633ff500
JB
52452011-02-24 Joel Brobecker <brobecker@adacore.com>
5246
5247 Revert the following patch (not approved yet):
5248 2011-02-21 Hui Zhu <teawater@gmail.com>
5249 * tracepoint.c (tp_printf): New function.
5250 (eval_agent_expr): Handle gdb_agent_op_printf.
5251
f9c6ff72
HZ
52522011-02-21 Hui Zhu <teawater@gmail.com>
5253
5254 * tracepoint.c (tp_printf): New function.
5255 (eval_agent_expr): Handle gdb_agent_op_printf.
5256
94d5e490
TT
52572011-02-18 Tom Tromey <tromey@redhat.com>
5258
5259 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5260 (tracepoint.o): Likewise.
5261 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5262 (gdb_agent_op_names): Likewise.
5263
c7f96d2b
TT
52642011-02-18 Tom Tromey <tromey@redhat.com>
5265
5266 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5267 gdb_agent_op_rot>: New constants.
5268 (gdb_agent_op_names): Add pick and roll.
5269 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5270 cases.
5271
0feedb2c
JK
52722011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5273
5274 * aclocal.m4: Regenerated with aclocal-1.11.1.
5275
b3b9301e
PA
52762011-02-14 Pedro Alves <pedro@codesourcery.com>
5277
5278 * server.c (handle_qxfer_traceframe_info): New.
5279 (qxfer_packets): Register "traceframe-info".
5280 (handle_query): Report support for qXfer:traceframe-info:read+.
5281 * tracepoint.c (match_blocktype): New.
5282 (traceframe_find_block_type): Rename to ...
5283 (traceframe_walk_blocks): ... this. Add callback filter argument,
5284 and use it.
5285 (traceframe_find_block_type): New, reimplemented on top of
5286 traceframe_walk_blocks.
5287 (build_traceframe_info_xml): New.
5288 (traceframe_read_info): New.
5289 * server.h (traceframe_read_info): Declare.
5290
4f3e6fb7
YQ
52912011-02-11 Yao Qi <yao@codesourcery.com>
5292
5293 * configure.ac: Call AC_PROG_RANLIB.
5294 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5295 * configure: Regenerate.
5296
764880b7
PA
52972011-02-07 Pedro Alves <pedro@codesourcery.com>
5298
5299 * server.c (gdb_read_memory): Change return semantics to allow
5300 partial transfers.
5301 (handle_search_memory_1): Adjust.
5302 (process_serial_event) <'m' packet>: Handle partial transfers.
5303 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5304
1c79eb8a
PA
53052011-01-28 Pedro Alves <pedro@codesourcery.com>
5306
5307 * regcache.c (init_register_cache): Initialize
5308 regcache->register_status.
5309 (free_register_cache): Release regcache->register_status.
5310 (regcache_cpy): Copy register_status.
5311 (registers_to_string): Print 'x's for unavailable registers.
5312 (supply_register): Mark the register's status valid or
5313 unavailable, depending on whether a buffer was passed in or not.
5314 (supply_register_zeroed): New.
5315 (supply_regblock): Mark the registers' status valid or
5316 unavailable, depending on whether a buffer was passed in or not.
5317 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5318 (struct regcache): New `register_status' field.
5319 (supply_register_zeroed): Declare.
5320 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5321 supply_register_zeroed, rather than passing a NULL buffer to
5322 supply_register.
5323 * tracepoint.c (fetch_traceframe_registers): Update comment.
5324
85724a0e
PA
53252011-01-28 Pedro Alves <pedro@codesourcery.com>
5326
5327 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5328 buffer explicit.
5329
d08aafef
PA
53302011-01-25 Pedro Alves <pedro@codesourcery.com>
5331
5332 * server.h (decode_xfer_write): Change prototype.
5333 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5334 and don't extract the annex here.
5335 * server.c (decode_xfer_read): Remove `annex' parameter,
5336 and don't extract the annex here.
5337 (decode_xfer): New.
5338 (struct qxfer): New.
5339 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5340 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5341 (handle_qxfer_statictrace): New functions, abstracted out from
5342 handle_query, and made to use the struct qxfer interface.
5343 (handle_threads_qxfer_proper): Rename to ...
5344 (handle_qxfer_threads_proper): ... this.
5345 (handle_threads_qxfer): Rename to ...
5346 (handle_qxfer_threads): ... this. Adjust.
5347 (qxfer_packets): New array.
5348 (handle_qxfer): New function.
5349 (handle_query): Use handle_qxfer.
5350
493e2a69
MS
53512011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5352
5353 * gdbreplay.c: Shorten lines of >= 80 columns.
5354 * linux-low.c: Ditto.
5355 * linux-ppc-low.c: Ditto.
5356 * linux-s390-low.c: Ditto.
5357 * linux-sparc-low.c: Ditto.
5358 * linux-x86-low.c: Ditto.
5359 * linux-xtensa-low.c: Ditto.
5360 * mem-break.c: Ditto.
5361 * nto-low.c: Ditto.
5362 * regcache.h: Ditto.
5363 * remote-utils.c: Ditto.
5364 * server.c: Ditto.
5365 * server.h: Ditto.
5366 * thread-db.c: Ditto.
5367 * tracepoint.c: Ditto.
5368 * utils.c: Ditto.
5369 * win32-low.h: Ditto.
5370
44944448
JB
53712011-01-05 Joel Brobecker <brobecker@adacore.com>
5372
5373 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5374 update.
5375
71ce852c
JB
53762011-01-01 Joel Brobecker <brobecker@adacore.com>
5377
5378 * server.c (gdbserver_version): Update copyright year in version
5379 output.
5380 * gdbreplay.c (gdbreplay_version): Ditto.
5381
eb826dc6
MF
53822010-12-29 Jie Zhang <jie.zhang@analog.com>
5383
5384 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5385 * linux-bfin-low.c: New file.
5386 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5387 PT_DATA_ADDR for BFIN targets.
5388 * Makefile.in (SFILES): Add linux-bfin-low.c.
5389 (clean): Remove reg-bfin.c.
5390 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5391 * README: Mention supported Blackfin targets.
5392
39ab222a
MF
53932010-12-23 Mike Frysinger <vapier@gentoo.org>
5394
5395 * .gitignore: New file.
5396
a1f2ce7d
MF
53972010-11-16 Mike Frysinger <vapier@gentoo.org>
5398
5399 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5400
f474844c
JZ
54012010-10-22 Jie Zhang <jie@codesourcery.com>
5402
5403 * Makefile.in: Add FLAGS_TO_PASS variable.
5404 (install): Remove dependency of install-only and recursively
5405 invoke make for install-only.
5406
f1048712
DE
54072010-10-04 Doug Evans <dje@google.com>
5408
5409 * Makefile.in (uninstall): Use $(DESTDIR).
5410
b53a1623
PA
54112010-09-24 Pedro Alves <pedro@codesourcery.com>
5412
e6ee044d
PA
5413 PR gdb/11842
5414
b53a1623
PA
5415 * linux-x86-low.c (compat_siginfo_from_siginfo)
5416 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5417 si_code is < 0. Check for si_code == SI_TIMER before checking for
5418 si_code < 0.
5419
fa1bd1e4
JB
54202010-09-13 Joel Brobecker <brobecker@adacore.com>
5421
5422 * lynx-i386-low.c: New file.
5423 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5424
47fac8f8
JB
54252010-09-13 Joel Brobecker <brobecker@adacore.com>
5426
5427 * lynx-low.c (ptrace_request_to_str): Remove handling for
5428 request values that have been removed in LynxOS 5.x.
5429
1adfc54d
JB
54302010-09-13 Joel Brobecker <brobecker@adacore.com>
5431
5432 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5433 <ptrace.h>
5434
c2a66c29
NS
54352010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5436
5437 * configure.ac: Add --enable-inprocess-agent option.
5438 * configure: Rebuilt.
5439
32fcada3
YQ
54402010-09-06 Yao Qi <yao@codesourcery.com>
5441
5442 * linux-low.c (linux_kill): Remove unused variable.
5443 (linux_stabilize_threads): Likewise.
5444 * server.c (start_inferior): Likewise.
5445 (queue_stop_reply_callback): Likewise.
5446 * tracepoint.c (do_action_at_tracepoint): Likewise.
5447
0cccb683
YQ
54482010-09-06 Yao Qi <yao@codesourcery.com>
5449
5450 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5451 on return.
5452
423ec54c
JK
54532010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5454
5455 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5456
12ac6819
PA
54572010-09-06 Pedro Alves <pedro@codesourcery.com>
5458
5459 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5460 "$(IPA_DEPFILES)".
5461
8ed54b31
JB
54622010-09-01 Joel Brobecker <brobecker@adacore.com>
5463
5464 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5465 gdbserver/lynx-ppc-low.c: New files.
5466 * Makefile.in (lynx_low_h): New variable.
5467 (lynx-low.o, lynx-ppc-low.o): New rules.
5468 * configure.ac: On LynxOS, link with -lnetinet.
5469 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5470 * configure: regenerate.
5471
bb0116a4
JB
54722010-09-01 Joel Brobecker <brobecker@adacore.com>
5473
5474 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5475 * configure.ac: Add check for vasprintf and vsnprintf.
5476 * configure, config.in: Regenerate.
5477 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5478
a778ab81 54792010-09-01 Joel Brobecker <brobecker@adacore.com>
5480
5481 * gdbreplay.c: Move include of alloca.h up, next to include of
5482 malloc.h.
5483 * server.h: Add include of malloc.h.
5484 * mem-break.c: Remove include of malloc.h.
5485 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5486
8b034a19 54872010-09-01 Joel Brobecker <brobecker@adacore.com>
5488
5489 * Makefile.in (memmem.o): Build with -Wno-error.
5490
54912010-09-01 Joel Brobecker <brobecker@adacore.com>
5492
5493 * utils.c (xsnprintf): Make non-static.
5494 * server.h: Add xsnprintf declaration.
5495 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5496 replace calls to snprintf by calls to xsnprintf throughout.
5497
54982010-09-01 Joel Brobecker <brobecker@adacore.com>
5499
5500 * configure.ac: Add configure check for alloca.
5501 * configure, config.in: Regenerate.
5502 * server.h: Include alloca.h if it exists.
5503 * gdbreplay.c: Include alloca.h if it exists.
5504
1a981360
PA
55052010-08-28 Pedro Alves <pedro@codesourcery.com>
5506
5507 * linux-low.c (__SIGRTMIN): Define if not already defined.
5508 (linux_create_inferior): Check for __ANDROID__ rather than
5509 __SIGRTMIN.
5510 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5511 are already deferred.
5512 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5513 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5514 stopped and already has a pending signal to report.
5515 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5516 a pending signal to report or is moving out of a jump pad.
5517 (linux_init_signals): Check for __ANDROID__ rather than
5518 __SIGRTMIN.
5519
b4d51a55
PA
55202010-08-28 Pedro Alves <pedro@codesourcery.com>
5521
5522 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5523 debug_threads check. Avoid a linear search when not doing debug
5524 output.
5525
ec48365d
PA
55262010-08-27 Pedro Alves <pedro@codesourcery.com>
5527
5528 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5529 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5530 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5531 (process_event): Change local fd's type to gdb_fildes_t.
5532 (create_file_handler): Adjust prototype.
5533 (delete_file_handler): Adjust prototype.
5534 (handle_file_event): Adjust prototype. Use pfildes.
5535 (create_file_event): Adjsut prototype.
5536 * remote-utils.c (remote_desc, listen_desc): Change type to
5537 gdb_fildes_t.
5538 * server.h: New gdb_fildes_t typedef.
5539 [USE_WIN32API]: Include winsock2.h.
5540 (delete_file_handler, add_file_handler): Adjust prototypes.
5541 (pfildes): Declare.
5542 * utils.c (pfildes): New.
5543
854d88f0
PA
55442010-08-27 Pedro Alves <pedro@codesourcery.com>
5545
5546 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5547 * configure: Regenerate.
5548
0146f85b
PA
55492010-08-27 Pedro Alves <pedro@codesourcery.com>
5550
5551 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5552 (linux_done_accessing_memory): ... this.
5553 (linux_target_ops): Adjust.
5554 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5555 * nto-low.c (nto_target_ops): Adjust comment.
5556 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5557 * spu-low.c (spu_target_ops): Adjust comment.
5558 * target.h (target_ops): Rename unprepare_to_access_memory field
5559 to done_accessing_memory.
5560 (unprepare_to_access_memory): Rename to ...
5561 (done_accessing_memory): ... this.
5562
90d74c30
PA
55632010-08-26 Pedro Alves <pedro@codesourcery.com>
5564
5565 * linux-low.c (linux_prepare_to_access_memory): New.
5566 (linux_unprepare_to_access_memory): New.
5567 (linux_target_ops): Install them.
5568 * server.c (read_memory): Rename to ...
5569 (gdb_read_memory): ... this. Use
5570 prepare_to_access_memory/prepare_to_access_memory.
5571 (write_memory): Rename to ...
5572 (gdb_write_memory): ... this. Use
5573 prepare_to_access_memory/prepare_to_access_memory.
5574 (handle_search_memory_1): Adjust.
5575 (process_serial_event): Adjust.
5576 * target.h (struct target_ops): New fields
5577 prepare_to_access_memory and unprepare_to_access_memory.
5578 (prepare_to_access_memory, unprepare_to_access_memory): New.
5579 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5580 prepare_to_access_memory/prepare_to_access_memory.
5581 * nto-low.c (nto_target_ops): Adjust.
5582 * spu-low.c (spu_target_ops): Adjust.
5583 * win32-low.c (win32_target_ops): Adjust.
5584
fd467969
PA
55852010-08-26 Pedro Alves <pedro@codesourcery.com>
5586
5587 * Makefile.in (WARN_CFLAGS): Get it from configure.
5588 (WERROR_CFLAGS): New.
5589 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5590 * configure.ac: Introduce --enable-werror, which adds -Werror to
5591 the compiler command line. Enabled by default. Disable with
5592 --disable-werror. Add -Wdeclaration-after-statement
5593 Wpointer-arith and -Wformat-nonliteral to warning flags.
5594 * configure: Regenerate.
5595
331e2f5f
PA
55962010-08-26 Pedro Alves <pedro@codesourcery.com>
5597
5598 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5599
e581f2b4
PA
56002010-08-26 Pedro Alves <pedro@codesourcery.com>
5601
5602 * gdbreplay.c (remote_error): New.
5603 (gdbchar): New.
5604 (expect): Use gdbchar. Check for error reading from GDB.
5605 Clarify sync error output.
5606 (play): Check for errors writing to GDB.
5607 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5608 * remote-utils.c (getpkt): Check for errors writing to the remote
5609 descriptor.
5610
3c11dd79
PA
56112010-08-25 Pedro Alves <pedro@codesourcery.com>
5612
5613 * linux-low.c (linux_wait_1): Move non-debugging code out of
5614 `debug_threads' control.
5615
d20a8ad9
PA
56162010-08-25 Pedro Alves <pedro@codesourcery.com>
5617
5618 * linux-low.c (linux_wait_1): Don't set last_status here.
5619 * server.c (push_event, queue_stop_reply_callback): Assert we're
5620 not pushing a TARGET_WAITKIND_IGNORE event.
5621 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5622 (myresume, handle_target_event): Set the thread's last_resume_kind
5623 and last_status from the target returned status.
5624
964e4306
PA
56252010-08-25 Pedro Alves <pedro@codesourcery.com>
5626
5627 PR threads/10729
5628
5629 * linux-x86-low.c (update_debug_registers_callback): New.
5630 (i386_dr_low_set_addr): Use it.
5631 (i386_dr_low_get_addr): New.
5632 (i386_dr_low_set_control): Use update_debug_registers_callback.
5633 (i386_dr_low_get_control): New.
5634 (i386_dr_low_get_status): Adjust.
5635 * linux-low.c (linux_stop_lwp): New.
5636 * linux-low.h (linux_stop_lwp): Declare.
5637
5638 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5639 argument instead of a i386_debug_reg_state.
5640 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5641 a i386_debug_reg_state.
5642 (i386_insert_aligned_watchpoint): Adjust.
5643 (i386_remove_aligned_watchpoint): Adjust.
5644 (i386_low_stopped_data_address): Read the debug registers from the
5645 inferior instead of from the mirrors.
5646 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5647 (i386_dr_low_get_addr): Declare.
5648 (i386_dr_low_get_control): Declare.
5649 (i386_dr_low_get_status): Change prototype.
5650
5651 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5652 (i386_dr_low_get_addr): New.
5653 (i386_dr_low_get_control): New.
5654 (i386_dr_low_get_status): Adjust prototype. Return
5655 dr_status_mirror.
5656 (i386_initial_stuff): Clear dr_status_mirror and
5657 dr_control_mirror.
5658 (i386_get_thread_context): Adjust.
5659 (i386_set_thread_context): Adjust.
5660 (i386_thread_added): Adjust.
5661
5f21a75b
PA
56622010-08-24 Pedro Alves <pedro@codesourcery.com>
5663
5664 * linux-low.h (linux_thread_area): Delete declaration.
5665
3e4c1235
TS
56662010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5667
5668 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5669 after its termination.
5670
1971b033
PA
56712010-08-09 Pedro Alves <pedro@codesourcery.com>
5672
5673 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5674 (gdb_wants_all_stopped): Delete.
5675 (linux_wait_1): Don't call them.
5676 * server.c (handle_v_cont): Tag all threads as want-stopped.
5677 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5678 stopped as "client-wants-stopped".
5679
310444ac
PA
56802010-07-31 Pedro Alves <pedro@codesourcery.com>
5681
5682 * Makefile.in (signals_h): New.
5683 (server_h): Depend on it.
5684 (server.o): Don't depend on $(signals_def).
5685 (signals.o): Depend on $(signals_def).
5686
a19cae16
JK
56872010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5688
5689 * Makefile.in (signals_def): New.
5690 (server_h): Append include/gdb/signals.h and signals_def.
5691 (server.o): Append signals_def.
5692
30d50328
JK
56932010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5694
5695 * server.c (handle_target_event): Use target_signal_to_host for
5696 resume_info.sig initialization.
5697 * target.h (struct thread_resume) <sig>: New comment.
5698
5c3216e2
OS
56992010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5700
c6f46ca0
OS
5701 * server.c (handle_query): strcpy() the returned string from paddress()
5702 instead of sprintf().
5c3216e2
OS
5703 * utils.c (paddress): Return phex_nz().
5704
6bd31874
JB
57052010-07-07 Joel Brobecker <brobecker@adacore.com>
5706
5707 * server.c (handle_v_cont): Call mourn_inferior if process
5708 just exited.
5709 (myresume): Likewise.
5710
0fb4aa4b
PA
57112010-07-01 Pedro Alves <pedro@codesourcery.com>
5712
5713 Static tracepoints, and integration with UST.
5714
5715 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5716 * mem-break.c (uninsert_all_breakpoints)
5717 (reinsert_all_breakpoints): New.
5718 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5719 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5720 (gdb_agent_ust_loaded, helper_thread_id)
5721 (gdb_agent_helper_thread_id): New macros.
5722 (struct ipa_sym_addresses): Add addr_ust_loaded,
5723 addr_helper_thread_id, addr_cmd_buf.
5724 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5725 (in_process_agent_loaded_ust): New.
5726 (write_e_ust_not_loaded): New.
5727 (maybe_write_ipa_ust_not_loaded): New.
5728 (struct collect_static_trace_data_action): New.
5729 (enum tracepoint_type) <static_tracepoint>: New.
5730 (struct tracepoint) <handle>: Mention static tracepoints.
5731 (struct static_tracepoint_ctx): New.
5732 (CMD_BUF_SIZE): New.
5733 (add_tracepoint_action): Handle static tracepoint actions.
5734 (unprobe_marker_at): New.
5735 (clear_installed_tracepoints): Handle static tracepoints.
5736 (cmd_qtdp): Handle static tracepoints.
5737 (probe_marker_at): New.
5738 (cmd_qtstart): Handle static tracepoints.
5739 (response_tracepoint): Handle static tracepoints.
5740 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5741 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5742 (get_context_regcache): Handle static tracepoints.
5743 (do_action_at_tracepoint): Handle static tracepoint actions.
5744 (traceframe_find_block_type): Handle static trace data blocks.
5745 (traceframe_read_sdata): New.
5746 (download_tracepoints): Download static tracepoint actions.
5747 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5748 (GDB_PROBE_NAME): New.
5749 (ust_ops): New.
5750 (GET_UST_SYM): New.
5751 (USTF): New.
5752 (dlsym_ust): New.
5753 (ust_marker_to_static_tracepoint): New.
5754 (gdb_probe): New.
5755 (collect_ust_data_at_tracepoint): New.
5756 (gdb_ust_probe): New.
5757 (UNIX_PATH_MAX, SOCK_DIR): New.
5758 (gdb_ust_connect_sync_socket): New.
5759 (resume_thread, stop_thread): New.
5760 (run_inferior_command): New.
5761 (init_named_socket): New.
5762 (gdb_ust_socket_init): New.
5763 (cstr_to_hexstr): New.
5764 (next_st): New.
5765 (first_marker, next_marker): New.
5766 (response_ust_marker): New.
5767 (cmd_qtfstm, cmd_qtsstm): New.
5768 (unprobe_marker_at, probe_marker_at): New.
5769 (cmd_qtstmat, gdb_ust_thread): New.
5770 (gdb_ust_init): New.
5771 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5772 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5773 (ST_REGENTRY): New.
5774 (x86_64_st_collect_regmap): New.
5775 (X86_64_NUM_ST_COLLECT_GREGS): New.
5776 (AMD64_RIP_REGNUM): New.
5777 (supply_static_tracepoint_registers): New.
5778 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5779 (ST_REGENTRY): New.
5780 (i386_st_collect_regmap): New.
5781 (i386_NUM_ST_COLLECT_GREGS): New.
5782 (supply_static_tracepoint_registers): New.
5783 * server.c (handle_query): Handle qXfer:statictrace:read.
5784 <qSupported>: Report support for StaticTracepoints, and
5785 qXfer:statictrace:read features.
5786 * server.h (traceframe_read_sdata)
5787 (supply_static_tracepoint_registers): Declare.
5788 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5789 (unpack_varlen_hex): Include in IPA build.
5790 * Makefile.in (ustlibs, ustinc): New.
5791 (IPA_OBJS): Add remote-utils-ipa.o.
5792 ($(IPA_LIB)): Link -ldl and -lpthread.
5793 (UST_CFLAGS): New.
5794 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5795 * config.in, configure: Regenerate.
5796
9e4344e5
PA
57972010-06-20 Ian Lance Taylor <iant@google.com>
5798 Pedro Alves <pedro@codesourcery.com>
5799
5800 * linux-x86-low.c (always_true): Delete.
5801 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5802 trying to fool the compiler with always_true.
5803
c6beb2cb
PA
58042010-06-20 Pedro Alves <pedro@codesourcery.com>
5805
5806 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5807 conditions in gdbserver.
5808
d2ed6730
UW
58092010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5810
5811 * spu-low.c (spu_read_memory): Wrap around local store limit.
5812 (spu_write_memory): Likewise.
5813
4e29fb54
PA
58142010-06-15 Pedro Alves <pedro@codesourcery.com>
5815
5816 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5817 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5818 LONGEST uses.
5819 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5820 uses.
5821 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5822 uses with LONGEST uses.
5823
6a271cae
PA
58242010-06-14 Stan Shebs <stan@codesourcery.com>
5825 Pedro Alves <pedro@codesourcery.com>
5826
5827 Bytecode compiler.
5828
5829 * linux-x86-low.c: Include limits.h.
5830 (add_insns): New.
5831 (always_true): New.
5832 (EMIT_ASM): New.
5833 (EMIT_ASM32): New.
5834 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5835 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5836 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5837 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5838 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5839 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5840 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5841 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5842 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5843 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5844 (amd64_emit_void_call_2): New.
5845 (amd64_emit_ops): New.
5846 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5847 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5848 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5849 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5850 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5851 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5852 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5853 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5854 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5855 (i386_emit_stack_adjust, i386_emit_int_call_1)
5856 (i386_emit_void_call_2): New.
5857 (i386_emit_ops): New.
5858 (x86_emit_ops): New.
5859 (the_low_target): Install x86_emit_ops.
5860 * server.h (struct emit_ops): New.
5861 (get_raw_reg_func_addr): Declare.
5862 (current_insn_ptr, emit_error): Declare.
5863 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5864 (set_trace_state_variable_value): New defines.
5865 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5866 addr_get_trace_state_variable_value and
5867 addr_set_trace_state_variable_value.
5868 (symbol_list): New fields for get_raw_reg,
5869 get_trace_state_variable_value and set_trace_state_variable_value.
5870 (condfn): New typedef.
5871 (struct tracepoint): New field `compiled_cond'.
5872 (do_action_at_tracepoint): Clear compiled_cond.
5873 (get_trace_state_variable_value, set_trace_state_variable_value):
5874 Export in the IPA.
5875 (condition_true_at_tracepoint): If there's a compiled condition,
5876 run that.
5877 (current_insn_ptr, emit_error): New globals.
5878 (struct bytecode_address): New.
5879 (get_raw_reg_func_addr): New.
5880 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5881 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5882 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5883 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5884 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5885 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5886 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5887 (compile_tracepoint_condition, compile_bytecodes): New.
5888 * target.h (emit_ops): Forward declare.
5889 (struct target_ops): New field emit_ops.
5890 (target_emit_ops): New.
5891 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5892 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5893 * linux-low.c (linux_emit_ops): New.
5894 (linux_target_ops): Install it.
5895 * linux-low.h (struct linux_target_ops): New field emit_ops.
5896
92b72907
UW
58972010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5898
5899 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5900 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5901
fa593d66
PA
59022010-06-01 Pedro Alves <pedro@codesourcery.com>
5903 Stan Shebs <stan@codesourcery.com>
5904
5905 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5906 (all): Depend on $(extra_libraries).
5907 (install-only): Install the IPA.
5908 (IPA_OBJS, IPA_LIB): New.
5909 (clean): Remove the IPA lib.
5910 (IPAGENT_CFLAGS): New.
5911 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5912 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5913 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5914 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5915 * configure.ac: Check for atomic builtins support in the compiler.
5916 (IPA_DEPFILES, extra_libraries): Define.
5917 * configure.srv (ipa_obj): Add description.
5918 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5919 (i[34567]86-*-linux*): Set ipa_obj.
5920 (x86_64-*-linux*): Set ipa_obj.
5921 * linux-low.c (stabilizing_threads): New.
5922 (supports_fast_tracepoints): New.
5923 (linux_detach): Stabilize threads before detaching.
5924 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5925 the lwp is either not stabilizing, or is moving out of a jump pad.
5926 (linux_fast_tracepoint_collecting): New.
5927 (maybe_move_out_of_jump_pad): New.
5928 (enqueue_one_deferred_signal): New.
5929 (dequeue_one_deferred_signal): New.
5930 (linux_wait_for_event_1): If moving out of a jump pad, defer
5931 pending signals to later.
5932 (linux_stabilize_threads): New.
5933 (linux_wait_1): Check if threads need moving out of jump pads, and
5934 do it if so.
5935 (stuck_in_jump_pad_callback): New.
5936 (move_out_of_jump_pad_callback): New.
5937 (lwp_running): New.
5938 (linux_resume_one_lwp): Handle moving out of jump pads.
5939 (linux_set_resume_request): Dequeue deferred signals.
5940 (need_step_over_p): Also step over fast tracepoint jumps.
5941 (start_step_over): Also uninsert fast tracepoint jumps.
5942 (finish_step_over): Also reinsert fast tracepoint jumps.
5943 (linux_install_fast_tracepoint_jump): New.
5944 (linux_target_ops): Install linux_stabilize_threads and
5945 linux_install_fast_tracepoint_jump_pad.
5946 * linux-low.h (linux_target_ops) <get_thread_area,
5947 install_fast_tracepoint_jump_pad>: New fields.
5948 (struct lwp_info) <collecting_fast_tracepoint,
5949 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5950 (linux_get_thread_area): Declare.
5951 * linux-x86-low.c (jump_insn): New.
5952 (x86_get_thread_area): New.
5953 (append_insns): New.
5954 (push_opcode): New.
5955 (amd64_install_fast_tracepoint_jump_pad): New.
5956 (i386_install_fast_tracepoint_jump_pad): New.
5957 (x86_install_fast_tracepoint_jump_pad): New.
5958 (the_low_target): Install x86_get_thread_area and
5959 x86_install_fast_tracepoint_jump_pad.
5960 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5961 (struct fast_tracepoint_jump): New.
5962 (fast_tracepoint_jump_insn): New.
5963 (fast_tracepoint_jump_shadow): New.
5964 (find_fast_tracepoint_jump_at): New.
5965 (fast_tracepoint_jump_here): New.
5966 (delete_fast_tracepoint_jump): New.
5967 (set_fast_tracepoint_jump): New.
5968 (uninsert_fast_tracepoint_jumps_at): New.
5969 (reinsert_fast_tracepoint_jumps_at): New.
5970 (set_breakpoint_at): Use write_inferior_memory.
5971 (uninsert_raw_breakpoint): Use write_inferior_memory.
5972 (check_mem_read): Mask out fast tracepoint jumps.
5973 (check_mem_write): Mask out fast tracepoint jumps.
5974 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5975 (set_fast_tracepoint_jump): Declare.
5976 (delete_fast_tracepoint_jump)
5977 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5978 (reinsert_fast_tracepoint_jumps_at): Declare.
5979 * regcache.c: Don't compile many functions when building the
5980 in-process agent library.
5981 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5982 the register buffer in the heap.
5983 (free_register_cache): If the register buffer isn't owned by the
5984 regcache, don't free it.
5985 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5986 pre-existing register caches.
5987 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5988 type.
5989 (convert_ascii_to_int): : Constify `from' parameter type.
5990 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5991 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5992 the needed buffer in-place.
5993 (relocate_instruction): New.
5994 * server.c (handle_query) <qSymbols>: If the target supports
5995 tracepoints, give it a chance of looking up symbols. Report
5996 support for fast tracepoints.
5997 (handle_status): Stabilize threads.
5998 (process_serial_event): Adjust.
5999 * server.h (struct fast_tracepoint_jump): Forward declare.
6000 (struct process_info) <fast_tracepoint_jumps>: New field.
6001 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6002 (decode_X_packet, decode_M_packet): Adjust.
6003 (relocate_instruction): Declare.
6004 (in_process_agent_loaded): Declare.
6005 (tracepoint_look_up_symbols): Declare.
6006 (struct fast_tpoint_collect_status): Declare.
6007 (fast_tracepoint_collecting): Declare.
6008 (force_unlock_trace_buffer): Declare.
6009 (handle_tracepoint_bkpts): Declare.
6010 (initialize_low_tracepoint)
6011 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6012 * target.h (struct target_ops) <stabilize_threads,
6013 install_fast_tracepoint_jump_pad>: New fields.
6014 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6015 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6016 [HAVE_STDINT_H]: Include stdint.h.
6017 (trace_debug_1): Rename to ...
6018 (trace_vdebug): ... this.
6019 (trace_debug): Rename to ...
6020 (trace_debug_1): ... this. Add `level' parameter.
6021 (trace_debug): New.
6022 (ATTR_USED, ATTR_NOINLINE): New.
6023 (IP_AGENT_EXPORT): New.
6024 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6025 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6026 (about_to_request_buffer_space, trace_buffer_is_full)
6027 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6028 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6029 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6030 (traceframe_write_count, traceframes_created)
6031 (trace_state_variables)
6032 New renaming defines.
6033 (struct ipa_sym_addresses): New.
6034 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6035 (symbol_list): New.
6036 (ipa_sym_addrs): New.
6037 (all_tracepoint_symbols_looked_up): New.
6038 (in_process_agent_loaded): New.
6039 (write_e_ipa_not_loaded): New.
6040 (maybe_write_ipa_not_loaded): New.
6041 (tracepoint_look_up_symbols): New.
6042 (debug_threads) [IN_PROCESS_AGENT]: New.
6043 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6044 (UNKNOWN_SIDE_EFFECTS): New.
6045 (stop_tracing): New.
6046 (flush_trace_buffer): New.
6047 (stop_tracing_bkpt): New.
6048 (flush_trace_buffer_bkpt): New.
6049 (read_inferior_integer): New.
6050 (read_inferior_uinteger): New.
6051 (read_inferior_data_pointer): New.
6052 (write_inferior_data_pointer): New.
6053 (write_inferior_integer): New.
6054 (write_inferior_uinteger): New.
6055 (struct collect_static_trace_data_action): Delete.
6056 (enum tracepoint_type): New.
6057 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6058 <actions_str, step_actions, step_actions_str>: Only include in
6059 GDBserver.
fa593d66
PA
6060 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6061 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6062 (tracepoints): Use IP_AGENT_EXPORT.
6063 (last_tracepoint): Don't include in the IPA.
6064 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6065 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6066 (alloced_trace_state_variables): New.
6067 (trace_state_variables): Use IP_AGENT_EXPORT.
6068 (traceframe_t): Delete unused variable.
6069 (circular_trace_buffer): Don't include in the IPA.
6070 (trace_buffer_start): Delete.
6071 (struct trace_buffer_control): New.
6072 (trace_buffer_free): Delete.
6073 (struct ipa_trace_buffer_control): New.
6074 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6075 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6076 New.
6077 (trace_buffer_ctrl): New.
6078 (TRACE_BUFFER_CTRL_CURR): New.
6079 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6080 Reimplement as macros.
6081 (trace_buffer_wrap): Delete.
6082 (traceframe_write_count, traceframe_read_count)
6083 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6084 (struct tracepoint_hit_ctx) <type>: New field.
6085 (struct fast_tracepoint_ctx): New.
6086 (memory_barrier): New.
6087 (cmpxchg): New.
6088 (record_tracepoint_error): Update atomically in the IPA.
6089 (clear_inferior_trace_buffer): New.
6090 (about_to_request_buffer_space): New.
6091 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6092 updating the same buffer.
6093 (add_tracepoint): Default the tracepoint's type to trap
6094 tracepoint, and orig_size to -1.
6095 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6096 internal variables.
6097 (create_trace_state_variable): New parameter `gdb'. Handle it.
6098 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6099 (cmd_qtdp): Handle fast tracepoints.
6100 (cmd_qtdv): Adjust.
6101 (max_jump_pad_size): New.
6102 (gdb_jump_pad_head): New.
6103 (get_jump_space_head): New.
6104 (claim_jump_space): New.
6105 (sort_tracepoints): New.
6106 (MAX_JUMP_SIZE): New.
6107 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6108 IPA.
6109 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6110 support. Upload fast traceframes, and delete internal IPA
6111 breakpoints.
6112 (stop_tracing_handler): New.
6113 (flush_trace_buffer_handler): New.
6114 (cmd_qtstop): Upload fast tracepoints.
6115 (response_tracepoint): Handle fast tracepoints.
6116 (tracepoint_finished_step): Upload fast traceframes. Set the
6117 tracepoint hit context's tracepoint type.
6118 (handle_tracepoint_bkpts): New.
6119 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6120 type. Add comment about fast tracepoints.
6121 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6122 non-existing action_str field.
6123 (get_context_regcache): Handle fast tracepoints.
6124 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6125 to the regcache.
6126 (fast_tracepoint_from_jump_pad_address): New.
6127 (fast_tracepoint_from_ipa_tpoint_address): New.
6128 (collecting_t): New.
6129 (force_unlock_trace_buffer): New.
6130 (fast_tracepoint_collecting): New.
6131 (collecting): New.
6132 (gdb_collect): New.
6133 (write_inferior_data_ptr): New.
6134 (target_tp_heap): New.
6135 (target_malloc): New.
6136 (download_agent_expr): New.
6137 (UALIGN): New.
6138 (download_tracepoints): New.
6139 (download_trace_state_variables): New.
6140 (upload_fast_traceframes): New.
6141 (IPA_FIRST_TRACEFRAME): New.
6142 (IPA_NEXT_TRACEFRAME_1): New.
6143 (IPA_NEXT_TRACEFRAME): New.
6144 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6145 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6146 (gdb_jump_pad_buffer_end): New.
6147 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6148 (initialize_tracepoint): Adjust.
6149 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6150 buffer. Initialize the low module.
6151 * utils.c (PREFIX, TOOLNAME): New.
6152 (malloc_failure): Use PREFIX.
6153 (error): In the IPA, an error causes an exit.
6154 (fatal, warning): Use PREFIX.
6155 (internal_error): Use TOOLNAME.
6156 (NUMCELLS): Increase to 10.
6157 * configure, config.in: Regenerate.
6158
d149dd1d
PA
61592010-06-01 Pedro Alves <pedro@codesourcery.com>
6160
6161 * server.c (handle_query) <qSupported>: Do two passes over the
6162 qSupported string to avoid nesting strtok.
6163
f6528abd
JK
61642010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6165
6166 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6167 (CDEPS): New.
6168 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6169 -Wl,--dynamic-list.
6170 * configure: Regenerate.
6171 * proc-service.list: New.
6172
ca2a87a0
JK
61732010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6174
6175 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6176 New comment.
6177
363a6e9f
OS
61782010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6179
6180 * gdbreplay.c (remote_open): Check error return from socket() call by
6181 its equality to -1 not by it being negative.
6182 * remote-utils.c (remote_open): Likewise.
6183
d23b6cb1
PA
61842010-05-23 Pedro Alves <pedro@codesourcery.com>
6185
6186 * config.h: Regenerate.
6187
28d3cf85
MK
61882010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6189
6190 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6191 doesn't provide PTRACE_GET_THREAD_AREA.
6192
fea36a59
MK
61932010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6194
6195 * linux-m68k-low.c: Include <asm/ptrace.h>
6196 (ps_get_thread_area): Implement.
6197
24b066ba
DE
61982010-05-03 Doug Evans <dje@google.com>
6199
6200 * event-loop.c (struct callback_event): New struct.
6201 (callback_list): New global.
6202 (append_callback_event, delete_callback_event): New functions.
6203 (process_callback): New function.
6204 (start_event_loop): Call it.
6205 * remote-utils.c (NOT_SCHEDULED): Define.
6206 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6207 moved out of readchar.
6208 (readchar): Rewrite. Call reschedule before returning.
6209 (reset_readchar): New function.
6210 (remote_close): Call it.
6211 (process_remaining, reschedule): New functions.
6212 * server.h (callback_handler_func): New typedef.
6213 (append_callback_event, delete_callback_event): Declare.
6214
9836d6ea
PA
62152010-05-03 Pedro Alves <pedro@codesourcery.com>
6216
6217 * proc-service.c (ps_pglobal_lookup): Use
6218 thread_db_look_up_one_symbol.
6219 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6220 parameter. Use it instead of all_symbols_looked_up.
6221 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6222 field.
6223 (all_symbols_looked_up): Don't declare.
6224 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6225 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6226 field.
6227 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6228 Set all_symbols_looked_up here.
6229 (thread_db_look_up_one_symbol): New.
6230 (thread_db_get_tls_address): Adjust.
6231 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6232 thread_db object on the heap, and tentatively set it in the
6233 process structure.
6234 (thread_db_init): Don't set all_symbols_looked_up here.
6235 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6236
7984d532
PA
62372010-05-03 Pedro Alves <pedro@codesourcery.com>
6238
6239 * linux-low.c (linux_kill, linux_detach): Adjust.
6240 (status_pending_p_callback): Remove redundant statement. Check
6241 for !TARGET_WAITIKIND_IGNORE, instead of
6242 TARGET_WAITKIND_STOPPED.
6243 (handle_tracepoints): Make sure LWP is locked. Adjust.
6244 (linux_wait_for_event_1): Adjust.
6245 (linux_cancel_breakpoints): New.
6246 (unsuspend_one_lwp): New.
6247 (unsuspend_all_lwps): New.
6248 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6249 (send_sigstop_callback): Change return type to int, add new
6250 `except' parameter and handle it.
6251 (suspend_and_send_sigstop_callback): New.
6252 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6253 pass them down. If SUSPEND, also increment the lwp's suspend
6254 count.
6255 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6256 (need_step_over_p): Don't consider suspended LWPs.
6257 (start_step_over): Adjust.
6258 (proceed_one_lwp): Change return type to int, add new `except'
6259 parameter and handle it.
6260 (unsuspend_and_proceed_one_lwp): New.
6261 (proceed_all_lwps): Use find_inferior instead of
6262 for_each_inferior.
6263 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6264 also decrement the suspend count of LWPs. Pass `except' down,
6265 instead of hacking its suspend count.
6266 (linux_pause_all): Add `freeze' parameter. Adjust.
6267 (linux_unpause_all): New.
6268 (linux_target_ops): Install linux_unpause_all.
6269 * server.c (handle_status): Adjust.
6270 * target.h (struct target_ops): New fields `unpause_all' and
6271 `cancel_breakpoints'. Add new parameter to `pause_all'.
6272 (pause_all): Add new `freeze' parameter.
6273 (unpause_all): New.
6274 (cancel_breakpoints): New.
6275 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6276 cancel breakpoints.
6277 (cmd_qtstart): Pause threads.
6278 (stop_tracing): Pause threads, and cancel breakpoints.
6279 * win32-low.c (win32_target_ops): Adjust.
6280
e471f25b
PA
62812010-05-03 Pedro Alves <pedro@codesourcery.com>
6282
6283 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6284 the inferior right away from here...
6285 (linux_wait_1): ... to here, and adjust to check the thread's
6286 last_resume_kind instead of the lwp's step or stop_expected flags.
6287
1915ef4f
PA
62882010-05-02 Pedro Alves <pedro@codesourcery.com>
6289
6290 * README: Use consistent `GDB' and `GDBserver' spellings.
6291
f9e39928
PA
62922010-05-02 Pedro Alves <pedro@codesourcery.com>
6293
6294 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6295 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6296 (linux_detach_one_lwp): Assume the lwp is stopped.
6297 (any_thread_of): Delete.
6298 (linux_detach): Stop all lwps here. Don't blindly delete all
6299 breakpoints.
6300 (delete_lwp_callback): New.
6301 (linux_mourn): Delete all lwps of the process that is gone.
6302 (linux_wait_1): Don't delete the last lwp of the process here.
6303 * mem-break.h (mark_breakpoints_out): Declare.
6304 * mem-break.c (mark_breakpoints_out): New.
6305 (free_all_breakpoints): Use it.
6306 * server.c (handle_target_event): If the process is gone, mark
6307 breakpoints out.
6308 * thread-db.c (struct thread_db) <create_bp>: New field.
6309 (thread_db_enable_reporting): Fix prototype. Store a thread event
6310 breakpoint reference in the thread_db struct.
6311 (thread_db_load_search): Clear the thread_db object.
6312 (try_thread_db_load_1): Ditto.
6313 (switch_to_process): New.
6314 (disable_thread_event_reporting): Use it.
6315 (remove_thread_event_breakpoints): New.
6316 (thread_db_detach, thread_db_mourn): Use it.
6317
1e7fc18c
PA
63182010-05-01 Pedro Alves <pedro@codesourcery.com>
6319
6320 * linux-low.c (linux_enable_event_reporting): New.
6321 (linux_wait_for_event_1, handle_extended_wait): Use it.
6322
02fc4de7
PA
63232010-04-30 Pedro Alves <pedro@codesourcery.com>
6324
6325 * linux-low.c (linux_kill_one_lwp, linux_kill)
6326 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6327 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6328 SIGSTOP even if the LWP is stopped.
6329 (send_sigstop_callback): New.
6330 (stop_all_lwps): Use send_sigstop_callback instead.
6331 (linux_resume_one_thread): Adjust.
6332 (proceed_one_lwp): Still proceed an LWP that the client has
6333 requested to stop, if we haven't reported it as stopped yet. Make
6334 sure that LWPs the client want stopped, have a pending SIGSTOP.
6335
bc3b5632
DE
63362010-04-26 Doug Evans <dje@google.com>
6337
ae1ada35
DE
6338 * server.c (handle_general_set): Make static.
6339
bc3b5632
DE
6340 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6341 Print received char after testing for error/eof instead of before.
6342 (input_interrupt): Tweak comment.
6343
65730243
DE
63442010-04-23 Doug Evans <dje@google.com>
6345
6346 * server.c (start_inferior): Print inferior argv if --debug.
6347
a8ae7dc0
AR
63482010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6349
6350 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6351 * nto-x86-low.c: Include server.h
6352
1c07cc19
PM
63532010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6354
6355 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6356 be consistent with other sources of this directory.
6357 (init_registers_amd64): Correct name of source file of this function
6358 in the comment.
6359
e0a61e09
PM
63602010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6361
6362 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6363 64-bit executables.
6364
54709339
PM
63652010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6366
6367 * win32-i386-low.c: Add 64-bit support.
6368 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6369 (init_registers_amd64): Declare.
6370 (mappings): Add 64-bit version of array.
6371 (init_windows_x86): New function.
6372 (the_low_target): Change init_arch field to init_windows_x86.
6373
e8f0053d
PM
63742010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6375
6376 * win32-low.c: Adapt to support also 64-bit architecture.
6377 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6378 (get_image_name): Use SIZE_T type for local variable `done'.
6379 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6380 (toolhelp_get_dll_name): Idem.
6381 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6382 Use uintptr_t typecast to avoid warning.
6383 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6384 (handle_exception): Use phex_nz to avoid warning.
6385 (win32_wait): Remove unused local variable `process'.
6386
c481e77e
PM
63872010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6388
6389 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6390 `amd64-avx.o'.
6391
12ea4b69
PM
63922010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6393
6394 * configure.ac: Use `ws2_32' library for srv_mingw.
6395 * configure: Regenerate.
6396 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6397 * remote-utils.c: Likewise.
6398
f6d1620c
L
63992010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6400
6401 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6402 if __x86_64__ is defined.
6403
8e642873
PM
64042010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6405
6406 * configure: Regenerate.
6407
711e434b
PM
64082010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6409
6410 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6411 * target.h (target_ops): New get_tib_address field.
6412 * win32-low.h (win32_thread_info): Add thread_local_base field.
6413 * win32-low.c (child_add_thread): Add tlb argument.
6414 Set thread_local_base field to TLB.
6415 (get_child_debug_event): Adapt to child_add_thread change.
6416 (win32_get_tib_address): New function.
6417 (win32_target_ops): Set get_tib_address field to
6418 win32_get_tib_address.
6419 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6420
505106cd
PA
64212010-04-12 Pedro Alves <pedro@codesourcery.com>
6422
505106cd
PA
6423 * linux-low.c (linux_mourn): Also remove the process.
6424 * server.c (handle_target_event): Don't remove the process here.
6425 * nto-low.c (nto_mourn): New.
6426 (nto_target_ops): Install it.
6427 * spu-low.c (spu_mourn): New.
6428 (spu_target_ops): Install it.
6429 * win32-low.c (win32_mourn): New.
6430 (win32_target_ops): Install it.
6431
e8470a06
PA
64322010-04-12 Pedro Alves <pedro@codesourcery.com>
6433
6434 * server.h (buffer_xml_printf): Remove redundant `;'.
6435
45ba0d02
PA
64362010-04-12 Pedro Alves <pedro@codesourcery.com>
6437
6438 * regcache.c (set_register_cache): Invalidate regcaches before
6439 changing the register cache layout.
6440 (regcache_invalidate_one): Allow a NULL regcache.
6441 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6442 regcaches before changing the register cache layout or the target
6443 regsets.
6444
59e04013
L
64452010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6446
6447 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6448 variable warning on Linux/x86-64.
6449
8336d594
PA
64502010-04-11 Pedro Alves <pedro@codesourcery.com>
6451
6452 GDBserver disconnected tracing support.
6453
6454 * linux-low.c (linux_remove_process): Delete.
6455 (add_lwp): Don't set last_resume_kind here.
6456 (linux_kill): Use `mourn'.
6457 (linux_detach): Use `thread_db_detach', and `mourn'.
6458 (linux_mourn): New.
6459 (linux_attach_lwp_1): Adjust comment.
6460 (linux_attach): last_resume_kind moved the thread_info; adjust.
6461 (status_pending_p_callback): Adjust.
6462 (linux_wait_for_event_1): Adjust.
6463 (count_events_callback, select_singlestep_lwp_callback)
6464 (select_event_lwp_callback, cancel_breakpoints_callback)
6465 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6466 (proceed_one_lwp): Adjust.
6467 (linux_async): Add debug output.
6468 (linux_thread_stopped): New.
6469 (linux_pause_all): New.
6470 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6471 linux_pause_all.
6472 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6473 (thread_db_free): Delete declaration.
6474 (thread_db_detach, thread_db_mourn): Declare.
6475 * thread-db.c (thread_db_init): Use thread_db_mourn.
6476 (thread_db_free): Delete, split in two.
6477 (disable_thread_event_reporting): New.
6478 (thread_db_detach): New.
6479 (thread_db_mourn): New.
6480
6481 * server.h (struct thread_info) <last_resume_kind>: New field.
6482 <attached>: Add comment.
6483 <gdb_detached>: New field.
6484 (handler_func): Change return type to int.
6485 (handle_serial_event, handle_target_event): Ditto.
6486 (gdb_connected): Declare.
6487 (tracing): Delete.
6488 (disconnected_tracing): Declare.
6489 (stop_tracing): Declare.
6490
6491 * server.c (handle_query) <qSupported>: Report support for
6492 disconnected tracing.
6493 (queue_stop_reply_callback): Account for running threads.
6494 (gdb_wants_thread_stopped): New.
6495 (gdb_wants_all_threads_stopped): New.
6496 (gdb_reattached_process): New.
6497 (handle_status): Clear the `gdb_detached' flag of all processes.
6498 In all-stop, stop all threads.
6499 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6500 (process_serial_event): If the remote connection breaks, or if an
6501 exit was forced with "monitor exit", force an event loop exit.
6502 Handle disconnected tracing on detach.
6503 (handle_serial_event): Adjust.
6504 (handle_target_event): If GDB isn't connected, forward events back
6505 to the inferior, unless the last process exited, in which case,
6506 exit gdbserver. Adjust interface.
6507
6508 * remote-utils.c (remote_open): Don't block in accept. Instead
6509 register an event loop source on the listen socket file
6510 descriptor. Refactor bits into ...
6511 (listen_desc): ... this new global.
6512 (gdb_connected): ... this new function.
6513 (enable_async_notification): ... this new function.
6514 (handle_accept_event): ... this new function.
6515 (remote_close): Clear remote_desc.
6516
6517 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6518
6519 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6520 New fields.
6521 (mourn_inferior): Define.
6522 (target_process_qsupported): Avoid the dangling else problem.
6523 (thread_stopped): Define.
6524 (pause_all): Define.
6525 (target_waitstatus_to_string): Declare.
6526 * target.c (target_waitstatus_to_string): New.
6527
6528 * tracepoint.c (tracing): Make extern.
6529 (disconnected_tracing): New.
6530 (stop_tracing): Make extern. Handle tracing stops due to GDB
6531 disconnecting.
6532 (cmd_qtdisconnected): New.
6533 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6534 (handle_tracepoint_general_set): Handle QTDisconnected.
6535
6536 * event-loop.c (event_handler_func): Change return type to int.
6537 (process_event): Bail out if the event handler wants the event
6538 loop to stop.
6539 (handle_file_event): Ditto.
6540 (start_event_loop): Bail out if the event handler wants the event
6541 loop to stop.
6542
6543 * nto-low.c (nto_target_ops): Adjust.
6544 * spu-low.c (spu_wait): Don't remove the process here.
6545 (spu_target_ops): Adjust.
6546 * win32-low.c (win32_wait): Don't remove the process here.
6547 (win32_target_ops): Adjust.
6548
5d267c4c
PA
65492010-04-11 Pedro Alves <pedro@codesourcery.com>
6550
6551 * regcache.c (realloc_register_cache): Invalidate inferior's
6552 regcache before recreating it.
6553
623ccd72
PA
65542010-04-09 Pedro Alves <pedro@codesourcery.com>
6555
6556 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6557
219f2f23
PA
65582010-04-09 Stan Shebs <stan@codesourcery.com>
6559 Pedro Alves <pedro@codesourcery.com>
6560
6561 * server.h (LONGEST): New.
6562 (struct thread_info) <while_stepping>: New field.
6563 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6564 Declare.
6565 (initialize_tracepoint, handle_tracepoint_general_set)
6566 (handle_tracepoint_query, tracepoint_finished_step)
6567 (tracepoint_was_hit, release_while_stepping_state_list):
6568 (current_traceframe): Declare.
6569 * server.c (handle_general_set): Handle tracepoint packets.
6570 (read_memory): New.
6571 (write_memory): New.
6572 (handle_search_memory_1): Use read_memory.
6573 (handle_query): Report support for conditional tracepoints, trace
6574 state variables, and tracepoint sources. Handle tracepoint
6575 queries.
6576 (main): Initialize the tracepoints module.
6577 (process_serial_event): Handle traceframe reads/writes.
6578
6579 * linux-low.c (handle_tracepoints): New.
6580 (linux_wait_1): Call it.
6581 (linux_resume_one_lwp): Handle while-stepping.
6582 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6583 (linux_target_ops): Install them.
6584 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6585 New field.
6586 * linux-x86-low.c (x86_supports_tracepoints): New.
6587 (the_low_target). Install it.
6588
6589 * mem-break.h (delete_breakpoint): Declare.
6590 * mem-break.c (delete_breakpoint): Make external.
6591
6592 * target.h (struct target_ops): Add `supports_tracepoints',
6593 `read_pc', and `write_pc' fields.
6594 (target_supports_tracepoints): Define.
6595 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6596 (phex_nz): New.
6597
6598 * regcache.h (struct regcache) <registers_owned>: New field.
6599 (init_register_cache, regcache_cpy): Declare.
6600 (regcache_read_pc, regcache_write_pc): Declare.
6601 (register_cache_size): Declare.
6602 (supply_regblock): Declare.
6603 * regcache.c (init_register_cache): New.
6604 (new_register_cache): Use it.
6605 (regcache_cpy): New.
6606 (register_cache_size): New.
6607 (supply_regblock): New.
6608 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 6609
219f2f23
PA
6610 * tracepoint.c: New.
6611
6612 * Makefile.in (OBS): Add tracepoint.o.
6613 (tracepoint.o): New rule.
6614
3a13a53b
L
66152010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6616
6617 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6618 (i386-mmx.o): New.
6619 (i386-mmx.c): Likewise.
6620 (i386-mmx-linux.o): Likewise.
6621 (i386-mmx-linux.c): Likewise.
6622
6623 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6624 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6625 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6626 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6627
6628 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6629 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6630 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6631
1570b33e
L
66322010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6633
6634 * Makefile.in (clean): Updated.
6635 (i386-avx.o): New.
6636 (i386-avx.c): Likewise.
6637 (i386-avx-linux.o): Likewise.
6638 (i386-avx-linux.c): Likewise.
6639 (amd64-avx.o): Likewise.
6640 (amd64-avx.c): Likewise.
6641 (amd64-avx-linux.o): Likewise.
6642 (amd64-avx-linux.c): Likewise.
6643
6644 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6645 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6646 (srv_amd64_regobj): Add amd64-avx.o.
6647 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6648 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6649 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6650 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6651 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6652 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6653 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6654
6655 * i387-fp.c: Include "i386-xstate.h".
6656 (i387_xsave): New.
6657 (i387_cache_to_xsave): Likewise.
6658 (i387_xsave_to_cache): Likewise.
6659 (x86_xcr0): Likewise.
6660
6661 * i387-fp.h (i387_cache_to_xsave): Likewise.
6662 (i387_xsave_to_cache): Likewise.
6663 (x86_xcr0): Likewise.
6664
6665 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6666 * linux-crisv32-low.c (target_regsets): Likewise.
6667 * linux-m68k-low.c (target_regsets): Likewise.
6668 * linux-mips-low.c (target_regsets): Likewise.
6669 * linux-ppc-low.c (target_regsets): Likewise.
6670 * linux-s390-low.c (target_regsets): Likewise.
6671 * linux-sh-low.c (target_regsets): Likewise.
6672 * linux-sparc-low.c (target_regsets): Likewise.
6673 * linux-xtensa-low.c (target_regsets): Likewise.
6674
6675 * linux-low.c: Include <sys/uio.h>.
6676 (regsets_fetch_inferior_registers): Support nt_type.
6677 (regsets_store_inferior_registers): Likewise.
6678 (linux_process_qsupported): New.
6679 (linux_target_ops): Add linux_process_qsupported.
6680
6681 * linux-low.h (regset_info): Add nt_type.
6682 (linux_target_ops): Add process_qsupported.
6683
6684 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6685 and <sys/uio.h>.
6686 (init_registers_i386_avx_linux): New.
6687 (init_registers_amd64_avx_linux): Likewise.
6688 (xmltarget_i386_linux_no_xml): Likewise.
6689 (xmltarget_amd64_linux_no_xml): Likewise.
6690 (PTRACE_GETREGSET): Likewise.
6691 (PTRACE_SETREGSET): Likewise.
6692 (x86_fill_xstateregset): Likewise.
6693 (x86_store_xstateregset): Likewise.
6694 (use_xml): Likewise.
6695 (x86_linux_update_xmltarget): Likewise.
6696 (x86_linux_process_qsupported): Likewise.
6697 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6698 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6699 init_registers_i386_linux here. Call
6700 x86_linux_update_xmltarget.
6701 (the_low_target): Add x86_linux_process_qsupported.
6702
6703 * server.c (handle_query): Call target_process_qsupported.
6704
6705 * target.h (target_ops): Add process_qsupported.
6706 (target_process_qsupported): New.
6707
fc7238bb
PA
67082010-04-03 Pedro Alves <pedro@codesourcery.com>
6709
6710 * inferiors.c (add_thread): Set last_status kind to
6711 TARGET_WAITKIND_IGNORE.
6712 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6713 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6714 (linux_wait_1): Move `thread' local definition to block that uses
6715 it. Don't NULL initialize `event_child'.
6716 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6717 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6718 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6719
bdabb078
PA
67202010-04-01 Pedro Alves <pedro@codesourcery.com>
6721
6722 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6723 an extended waitstatus, or by a watchpoint.
6724 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6725 thread was stepping or has been stopped by a watchpoint.
6726
d3bbe7a0
PA
67272010-04-01 Pedro Alves <pedro@codesourcery.com>
6728
6729 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6730 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6731 of another, then delete the previous, and validate all
6732 breakpoints.
6733 (validate_inserted_breakpoint): New.
6734 (delete_disabled_breakpoints): New.
6735 (validate_breakpoints): New.
6736 (check_mem_read): Validate breakpoints before trusting their
6737 shadow. Delete disabled breakpoints.
6738 (check_mem_write): Validate breakpoints before trusting they
6739 should be inserted. Delete disabled breakpoints.
6740 * mem-break.h (validate_breakpoints):
6741 * server.c (handle_query): Validate breakpoints when we see a
6742 qSymbol query.
6743
8b07ae33
PA
67442010-04-01 Pedro Alves <pedro@codesourcery.com>
6745
6746 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6747 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6748 if we could tell there's a GDB breakpoint at stop_pc.
6749 (need_step_over_p): Don't do a step over if we find a GDB
6750 breakpoint at the resume PC.
6751
6752 * mem-break.c (struct raw_breakpoint): New.
6753 (enum bkpt_type): New type `gdb_breakpoint'.
6754 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6755 fields. New field `raw'.
6756 (find_raw_breakpoint_at): New.
6757 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6758 breakpoint instead.
6759 (set_breakpoint_at): Adjust.
6760 (delete_raw_breakpoint): New.
6761 (release_breakpoint): New.
6762 (delete_breakpoint): Rename to...
6763 (delete_breakpoint_1): ... this. Add proc parameter. Use
6764 release_breakpoint. Return ENOENT.
6765 (delete_breakpoint): Reimplement.
6766 (find_breakpoint_at): Delete.
6767 (find_gdb_breakpoint_at): New.
6768 (delete_breakpoint_at): Delete.
6769 (set_gdb_breakpoint_at): New.
6770 (delete_gdb_breakpoint_at): New.
6771 (gdb_breakpoint_here): New.
6772 (set_reinsert_breakpoint): Use release_breakpoint.
6773 (uninsert_breakpoint): Rename to ...
6774 (uninsert_raw_breakpoint): ... this.
6775 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6776 (reinsert_raw_breakpoint): Change parameter type to
6777 raw_breakpoint.
6778 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6779 instead.
6780 (check_breakpoints): Adjust. Use release_breakpoint.
6781 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6782 (breakpoint_inserted_here): Ditto.
6783 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6784 Don't trust the breakpoint's shadow if it is not inserted.
6785 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6786 (delete_all_breakpoints): Adjust.
6787 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6788 use delete_breakpoint_1.
6789
6790 * mem-break.h (breakpoints_supported): Delete declaration.
6791 (set_gdb_breakpoint_at): Declare.
6792 (gdb_breakpoint_here): Declare.
6793 (delete_breakpoint_at): Delete.
6794 (delete_gdb_breakpoint_at): Declare.
6795
6796 * server.h (struct raw_breakpoint): Forward declare.
6797 (struct process_info): New field `raw_breakpoints'.
6798
6799 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6800 breakpoints.
6801
6bf5e0ba
PA
68022010-03-24 Pedro Alves <pedro@codesourcery.com>
6803
6804 * linux-low.c (status_pending_p_callback): Fix comment.
6805 (linux_wait_for_event_1): Move most of the internal breakpoint
6806 handling from here...
6807 (linux_wait_1): ... to here.
6808 (count_events_callback): New.
6809 (select_singlestep_lwp_callback): New.
6810 (select_event_lwp_callback): New.
6811 (cancel_breakpoints_callback): New.
6812 (select_event_lwp): New.
6813 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6814 priority to all LWPs that have had events that should be reported
6815 to the client. Cancel breakpoints when about to reporting the
6816 event to the client, not while stopping lwps. No longer cancel
6817 finished single-steps here.
6818 (cancel_finished_single_step): Delete.
6819 (cancel_finished_single_steps): Delete.
6820
414a389f
PA
68212010-03-24 Pedro Alves <pedro@codesourcery.com>
6822
6823 * mem-break.c (enum bkpt_type): New.
6824 (struct breakpoint): New field `type'.
6825 (set_breakpoint_at): Change return type to struct breakpoint
6826 pointer. Set type to `other_breakpoint' by default.
6827 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6828 in the breakpoint list.
6829 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6830 (reinsert_breakpoint): Rename to ...
6831 (reinsert_raw_breakpoint): ... this.
6832 (reinsert_breakpoints_at): Adjust.
6833 * mem-break.h (struct breakpoint): Declare.
6834 (set_breakpoint_at): Change return type to struct breakpoint
6835 pointer.
6836
2280c721
PA
68372010-03-24 Pedro Alves <pedro@codesourcery.com>
6838
6839 * server.c (handle_query): Assign, not compare.
6840
d50171e4
PA
68412010-03-24 Pedro Alves <pedro@codesourcery.com>
6842
6843 Teach linux gdbserver to step-over-breakpoints.
6844
6845 * linux-low.c (can_hardware_single_step): New.
6846 (supports_breakpoints): New.
6847 (handle_extended_wait): If stopping threads, read the stop pc of
6848 the new cloned LWP.
6849 (get_pc): New.
6850 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6851 low target doesn't support retrieving the PC.
6852 (add_lwp): Set last_resume_kind to resume_continue.
6853 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6854 (linux_attach): Don't clear stop_expected. Set the lwp's
6855 last_resume_kind to resume_stop.
6856 (linux_detach_one_lwp): Don't check for removed breakpoints.
6857 (check_removed_breakpoint): Delete.
6858 (status_pending_p): Rename to ...
6859 (status_pending_p_callback): ... this. Don't check for removed
6860 breakpoints. Don't consider threads that are stopped from GDB's
6861 perspective.
6862 (linux_wait_for_lwp): Always read the stop_pc here.
6863 (cancel_breakpoint): New.
6864 (step_over_bkpt): New global.
6865 (linux_wait_for_event_1): Implement stepping over breakpoints.
6866 (gdb_wants_lwp_stopped): New.
6867 (gdb_wants_all_stopped): New.
6868 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6869 single-step traps here. Store the thread's last reported target
6870 wait status.
6871 (send_sigstop): Don't clear stop_expected. Always set it,
6872 instead.
6873 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6874 (cancel_finished_single_step): New.
6875 (cancel_finished_single_steps): New.
6876 (wait_for_sigstop): Don't cancel finished single-step traps here.
6877 (linux_resume_one_lwp): Don't check for removed breakpoints.
6878 Don't set `step' on non-hardware step archs.
6879 (linux_set_resume_request): Ignore resume_stop requests if already
6880 stopping or stopped. Set the lwp's last_resume_kind.
6881 (resume_status_pending_p): Don't check for removed breakpoints.
6882 (need_step_over_p): New.
6883 (start_step_over): New.
6884 (finish_step_over): New.
6885 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6886 requests. Clear the thread's last reported target waitstatus.
6887 Don't use the `suspended' flag. Don't consider pending breakpoints.
6888 (linux_resume): Start a step-over if necessary.
6889 (proceed_one_lwp): New.
6890 (proceed_all_lwps): New.
6891 (unstop_all_lwps): New.
6892 * linux-low.h (struct lwp_info): Rewrite comment for the
6893 `suspended' flag. Add the `stop_pc' field. Delete the
6894 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6895 Add `'last_resume_kind' and `need_step_over' fields.
6896 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6897 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6898 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6899 (set_raw_breakpoint_at): New.
6900 (set_breakpoint_at): Rewrite to use it.
6901 (reinsert_breakpoint_handler): Delete.
6902 (set_reinsert_breakpoint): New.
6903 (reinsert_breakpoint_by_bp): Delete.
6904 (delete_reinsert_breakpoints): New.
6905 (uninsert_breakpoint): Rewrite.
6906 (uninsert_breakpoints_at): New.
6907 (reinsert_breakpoint): Rewrite.
6908 (reinsert_breakpoints_at): New.
6909 (check_breakpoints): Rewrite.
6910 (breakpoint_here): New.
6911 (breakpoint_inserted_here): New.
6912 (check_mem_read): Adjust.
6913 * mem-break.h (breakpoints_supported, breakpoint_here)
6914 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6915 (reinsert_breakpoint_by_bp): Delete declaration.
6916 (delete_reinsert_breakpoints): Declare.
6917 (reinsert_breakpoint): Delete declaration.
6918 (reinsert_breakpoints_at): Declare.
6919 (uninsert_breakpoint): Delete declaration.
6920 (uninsert_breakpoints_at): Declare.
6921 (check_breakpoints): Adjust prototype.
6922 * server.h: Adjust include order.
6923 (struct thread_info): Declare here. Add a `last_status' field.
6924
30ba68cb
MS
69252010-03-23 Michael Snyder <msnyder@vmware.com>
6926
6927 * server.c (crc32): New function.
6928 (handle_query): Add handling for 'qCRC:' request.
6929
b9a881c2
PA
69302010-03-23 Pedro Alves <pedro@codesourcery.com>
6931
6932 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6933 lwp had been stopped by a watchpoint.
6934
e92d13d5
PA
69352010-03-16 Pedro Alves <pedro@codesourcery.com>
6936
6937 * server.h (internal_error): Declare.
6938 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6939 * utils.c (internal_error): New function.
6940
64daa791
AS
69412010-03-15 Andreas Schwab <schwab@redhat.com>
6942
6943 * configure.srv: Fix typo setting srv_regobj.
6944
f52cd8cd
PA
69452010-03-15 Pedro Alves <pedro@codesourcery.com>
6946
6947 * linux-low.c (fetch_register): Avoid passing a non string literal
6948 format to `error'.
6949 (usr_store_inferior_registers): Ditto.
6950
93ae6fdc
PA
69512010-03-14 Pedro Alves <pedro@codesourcery.com>
6952
6953 * linux-low.c (linux_write_memory): Bail out early if peeking
6954 memory failed.
6955
c3adc08c
PA
69562010-03-14 Pedro Alves <pedro@codesourcery.com>
6957
6958 * linux-low.h (struct lwp_info): New fields
6959 `stopped_by_watchpoint' and `stopped_data_address'.
6960 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6961 here, and cache them in the lwp object.
6962 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6963 directly.
6964 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6965 field.
6966 (linux_stopped_by_watchpoint): Rewrite.
6967 (linux_stopped_data_address): Rewrite.
6968
bce522a2
PA
69692010-03-06 Simo Melenius <simo.melenius@iki.fi>
6970
6971 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6972 switching the current inferior, not before.
6973
90884b2b
L
69742010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6975
6976 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6977 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6978 i386-linux.c and amd64-linux.c.
6979 (reg-i386.o): Removed.
6980 (reg-i386.c): Likewise.
6981 (reg-i386-linux.o): Likewise.
6982 (reg-i386-linux.c): Likewise.
6983 (reg-x86-64.o): Likewise.
6984 (reg-x86-64.c): Likewise.
6985 (reg-x86-64-linux.o): Likewise.
6986 (reg-x86-64-linux.c): Likewise.
6987 (i386.o): New.
6988 (i386.c): Likewise.
6989 (i386-linux.o): Likewise.
6990 (i386-linux.c): Likewise.
6991 (amd64.o): Likewise.
6992 (amd64.c): Likewise.
6993 (amd64-linux.o): Likewise.
6994 (amd64-linux.c): Likewise.
6995
6996 * configure.srv (srv_i386_regobj): New.
6997 (srv_i386_linux_regobj): Likewise.
6998 (srv_amd64_regobj): Likewise.
6999 (srv_amd64_linux_regobj): Likewise.
7000 (srv_i386_32bit_xmlfiles): Likewise.
7001 (srv_i386_64bit_xmlfiles): Likewise.
7002 (srv_i386_xmlfiles): Likewise.
7003 (srv_amd64_xmlfiles): Likewise.
7004 (srv_i386_linux_xmlfiles): Likewise.
7005 (srv_amd64_linux_xmlfiles): Likewise.
7006 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7007 srv_xmlfiles to $srv_i386_xmlfiles.
7008 (i[34567]86-*-mingw32ce*): Likewise.
7009 (i[34567]86-*-mingw*): Likewise.
7010 (i[34567]86-*-nto*): Likewise.
7011 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7012 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7013 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7014 (x86_64-*-linux*): Likewise.
7015
7016 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7017 (init_registers_amd64_linux): New.
7018 (x86_arch_setup): Replace init_registers_x86_64_linux with
7019 init_registers_amd64_linux.
7020
193f13e6
MK
70212010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7022
7023 * configure.ac: Check for libdl. If it is not available link against
7024 static libthread_db.
7025 * configure: Regenerate.
7026
85d721b8
PA
70272010-02-22 Pedro Alves <pedro@codesourcery.com>
7028
7029 PR9605
7030
7031 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7032 handing a read watchpoint.
7033 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7034
6076632b
DE
70352010-02-12 Doug Evans <dje@google.com>
7036
7037 * linux-low.c (linux_supports_tracefork_flag): Document.
7038 (linux_look_up_symbols): Add comment.
7039
3327ccf7
L
70402010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7041
7042 * regcache.c (supply_register): Clear regcache if buf is NULL.
7043
0718675c 70442010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7045 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7046
7047 * inferiors.c (find_inferior): Add function documentation.
7048 (unloaded_dll): Handle the case where the unloaded dll has not
7049 been previously registered in the dll list.
7050
177321bd
DJ
70512010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7052
7053 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7054 (thumb2_breakpoint): New.
7055 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7056
2b009048
DJ
70572010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7058
7059 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7060 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7061 breakpoints.
7062
3be029c7
PA
70632010-01-21 Pedro Alves <pedro@codesourcery.com>
7064
7065 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7066
18f5de3b
JK
70672010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7068
7069 * linux-s390-low.c (s390_collect_ptrace_register)
7070 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7071
3743bb4f
DE
70722010-01-21 Doug Evans <dje@google.com>
7073
14ce3065
DE
7074 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7075 (PTRACE_ARG4_TYPE): New macro.
7076 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7077 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7078 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7079 (usr_store_inferior_registers): Ditto.
7080 (linux_read_memory, linux_write_memory): Ditto.
7081 (linux_test_for_tracefork): Ditto.
7082
3743bb4f
DE
7083 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7084 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7085
8b315be5
PA
70862010-01-21 Pedro Alves <pedro@codesourcery.com>
7087
7088 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7089 target.
7090
85492558
PA
70912010-01-21 Pedro Alves <pedro@codesourcery.com>
7092
7093 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7094 prototype to take a regcache. Adjust.
7095
442ea881
PA
70962010-01-20 Pedro Alves <pedro@codesourcery.com>
7097
7098 * regcache.h (struct thread_info): Forward declare.
7099 (struct regcache): New.
7100 (new_register_cache): Adjust prototype.
7101 (get_thread_regcache): Declare.
7102 (free_register_cache): Adjust prototype.
7103 (registers_to_string, registers_from_string): Ditto.
7104 (supply_register, supply_register_by_name, collect_register)
7105 (collect_register_as_string, collect_register_by_name): Ditto.
7106 * regcache.c (struct inferior_regcache_data): Delete.
7107 (get_regcache): Rename to ...
7108 (get_thread_regcache): ... this. Adjust. Switch inferior before
7109 fetching registers.
7110 (regcache_invalidate_one): Adjust.
7111 (regcache_invalidate): Fix prototype.
7112 (new_register_cache): Return the new register cache.
7113 (free_register_cache): Change prototype.
7114 (realloc_register_cache): Adjust.
7115 (registers_to_string): Change prototype to take a regcache. Adjust.
7116 (registers_from_string): Ditto.
7117 (register_data): Ditto.
7118 (supply_register): Ditto.
7119 (supply_register_by_name): Ditto.
7120 (collect_register): Ditto.
7121 (collect_register_as_string): Ditto.
7122 (collect_register_by_name): Ditto.
7123 * server.c (process_serial_event): Adjust.
7124 * linux-low.h (regset_fill_func, regset_store_func): Change
7125 prototype.
7126 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7127 Change prototype.
7128 * linux-low.c (get_stop_pc): Adjust.
7129 (check_removed_breakpoint): Adjust.
7130 (linux_wait_for_event): Adjust.
7131 (linux_resume_one_lwp): Adjust.
7132 (fetch_register): Add regcache parameter. Adjust.
7133 (usr_store_inferior_registers): Ditto.
7134 (regsets_fetch_inferior_registers): Ditto.
7135 (regsets_store_inferior_registers): Ditto.
7136 (linux_fetch_registers, linux_store_registers): Ditto.
7137 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7138 regcache. Adjust.
43aaf8b6
PA
7139 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7140 Ditto.
442ea881
PA
7141 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7142 prototype to take a regcache.
7143 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7144 * remote-utils.c (convert_ascii_to_int, outreg)
7145 (prepare_resume_reply): Change prototype to take a regcache.
7146 Adjust.
7147 * target.h (struct target_ops) <fetch_registers, store_registers>:
7148 Change prototype to take a regcache.
7149 (fetch_inferior_registers, store_inferior_registers): Change
7150 prototype to take a regcache. Adjust.
7151 * proc-service.c (ps_lgetregs): Adjust.
7152 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7153 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7154 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7155 take a regcache. Adjust.
7156 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7157 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7158 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7159 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7160 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7161 (cris_cannot_fetch_register):
7162 (cris_breakpoint_at): Change prototype to take a regcache.
7163 Adjust.
7164 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7165 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7166 to take a regcache. Adjust.
7167 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7168 Adjust.
7169 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7170 take a regcache. Adjust.
7171 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7172 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7173 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7174 * linux-mips-low.c (mips_get_pc):
7175 (mips_set_pc): Change prototype to take a regcache. Adjust.
7176 (mips_reinsert_addr): Adjust.
7177 (mips_collect_register): Change prototype to take a regcache.
7178 Adjust.
7179 (mips_supply_register):
7180 (mips_collect_register_32bit, mips_supply_register_32bit)
7181 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7182 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7183 * linux-ppc-low.c (ppc_supply_ptrace_register)
7184 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7185 (parse_spufs_run): Adjust.
7186 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7187 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7188 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7189 take a regcache. Adjust.
7190 * linux-s390-low.c (s390_collect_ptrace_register)
7191 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7192 (s390_set_pc): Change prototype to take a regcache. Adjust.
7193 (s390_arch_setup): Adjust.
7194 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7195 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7196 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7197 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7198 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7199 regcache. Adjust.
7200 (sparc_breakpoint_at): Adjust.
7201 * linux-xtensa-low.c (xtensa_fill_gregset):
7202 (xtensa_store_gregset):
7203 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7204 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7205 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7206 prototype to take a regcache. Adjust.
7207 * win32-arm-low.c (arm_fetch_inferior_register)
7208 (arm_store_inferior_register): Change prototype to take a
7209 regcache. Adjust.
7210 * win32-i386-low.c (i386_fetch_inferior_register)
7211 (i386_store_inferior_register): Change prototype to take a
7212 regcache. Adjust.
7213 * win32-low.c (child_fetch_inferior_registers)
7214 (child_store_inferior_registers): Change prototype to take a
7215 regcache. Adjust.
7216 (win32_wait): Adjust.
7217 (win32_fetch_inferior_registers): Change prototype to take a
7218 regcache. Adjust.
7219 (win32_store_inferior_registers): Adjust.
7220 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7221 store_inferior_register>: Change prototype to take a regcache.
7222
60c3d7b0
DE
72232010-01-20 Doug Evans <dje@google.com>
7224
7225 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7226 #ifdef.
7227 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7228 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7229
dc146f7c
VP
72302010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7231
7232 * linux-low.c (linux_core_of_thread): New.
7233 (compare_ints, show_process, list_threads): New.
7234 (linux_qxfer_osdata): Report threads and cores.
7235 (linux_target_op): Register linux_core_of_thread.
7236 * remote-utils.c (prepare_resume_reply): Report the core.
7237 (buffer_xml_printf): Support %d specifier.
7238 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7239 New.
7240 (handle_query): Handle qXfer:threads. Announce availability
7241 thereof.
7242 * target.h (struct target_ops): New field core_of_thread.
7243
7803799a
UW
72442010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7245
7246 * Makefile.in (clean): Remove new generated files.
7247 (reg-s390.o, reg-s390.c): Remove rules.
7248 (reg-s390x.o, reg-s390x.c): Likewise.
7249 (s390-linux32.o, s390-linux32.c): Add rules.
7250 (s390-linux64.o, s390-linux64.c): Likewise.
7251 (s390x-linux64.o, s390x-linux64.c): Likewise.
7252 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7253 * linux-s390-low.c: Include <elf.h>.
7254 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7255 (init_registers_s390): Remove prototype.
7256 (init_registers_s390x): Likewise.
7257 (init_registers_s390_linux32): Add prototype.
7258 (init_registers_s390_linux64): Likewise.
7259 (init_registers_s390x_linux64): Likewise.
7260 (s390_num_regs_3264): New define.
7261 (s390_regmap_3264): New global variable.
7262 (s390_cannot_fetch_register): Remove obsolete check.
7263 (s390_cannot_store_register): Likewise.
7264 (s390_collect_ptrace_register): Handle upper/lower register halves.
7265 (s390_supply_ptrace_register): Likewise.
7266 (s390_fill_gregset): Update to register number changes.
7267 (s390_get_hwcap): New routine.
7268 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7269 Install appropriate regmap and register set.
7270
6e7ffa39
JB
72712010-01-01 Joel Brobecker <brobecker@adacore.com>
7272
7273 * server.c (gdbserver_version): Update copyright year to 2010.
7274 * gdbreplay.c (gdbreplay_version): Likewise.
7275
957f3f49
DE
72762009-12-28 Doug Evans <dje@google.com>
7277
7278 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7279 elf/external.h. Include <elf.h> instead but only if necessary.
7280
ca5c370d
PA
72812009-12-28 Pedro Alves <pedro@codesourcery.com>
7282
7283 * linux-low.c (linux_remove_process): Remove `detaching'
7284 parameter. Don't release/detach from thread_db here.
7285 (linux_kill): Release/detach from thread_db here, ...
7286 (linux_detach): ... and here, before actually detaching.
7287 (linux_wait_1): ... and here, when a process exits.
7288 * thread-db.c (any_thread_of): New.
7289 (thread_db_free): Switch the current inferior to a thread of the
7290 passed in process.
7291
4ee62156
DE
72922009-12-21 Doug Evans <dje@google.com>
7293
d90e6a88
DE
7294 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7295
c5f62d5f
DE
7296 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7297 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7298 warning ifndef __NR_tkill. Move setting of errno there too.
7299 Delete unnecessary resetting of errno after syscall.
7300 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7301
10e86dd7
DE
7302 * configure.ac: Check for dladdr.
7303 * config.in: Regenerate.
7304 * configure: Regenerate.
7305 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7306 (try_thread_db_load): Update.
7307
4ee62156
DE
7308 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7309
00f515da
DE
73102009-12-18 Doug Evans <dje@google.com>
7311
e9464885
DE
7312 * event-loop.c: Include unistd.h if it exists.
7313
07d4f67e
DE
7314 * linux-low.c (my_waitpid): Move definition away from being in
7315 between linux_tracefork_child/linux_test_for_tracefork.
7316
00f515da
DE
7317 * gdb_proc_service.h (psaddr_t): Fix type.
7318 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7319 signature to match glibc.
7320
1de1badb
DE
73212009-12-16 Doug Evans <dje@google.com>
7322
7323 * linux-low.c (linux_read_memory): Fix argument to read.
7324
aeeb81d1
PA
73252009-11-26 Pedro Alves <pedro@codesourcery.com>
7326
7327 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7328 events, don't leave current_inferior pointing at null.
7329
10357975
PA
73302009-11-26 Pedro Alves <pedro@codesourcery.com>
7331
7332 * win32-low.c (LOG): Delete.
7333 (OUTMSG): Output to stderr.
7334 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7335 on compile time LOG macro.
7336 (win32_wait): Fix debug output.
7337
cf6e3471
PA
73382009-11-26 Pedro Alves <pedro@codesourcery.com>
7339
7340 * win32-low.c (win32_add_one_solib): If the dll name is
7341 "ntdll.dll", prepend the system directory to the dll path.
7342
0c85e18e
MK
73432009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7344
7345 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7346
9ac544ce 73472009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7348 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7349
7350 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7351 * configure.ac: Check for __mcoldfire__ and set
7352 gdb_cv_m68k_is_coldfire.
7353 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7354 reg-cf.o and reg-m68k.o.
7355 * configure: Regenerated.
7356
fd7dd3e6
PA
73572009-11-16 Pedro Alves <pedro@codesourcery.com>
7358
7359 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7360 Pass it to thread_db_free.
7361 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7362 proper `detaching' argument to linux_remove_process.
7363 * linux-low.h (thread_db_free): Add `detaching' parameter.
7364 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7365 to thread_db_free.
7366 (thread_db_free): Add `detaching' parameter. Only
7367 call td_ta_clear_event if detaching from process.
7368
75aa492e
MK
73692009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7370
7371 * thread-db.c (thread_db_free): Fix typo.
7372
21e1bee4
PP
73732009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7374
7375 PR gdb/10838
7376 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7377
8838b45e
NS
73782009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7379
7380 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7381 with an i686 compiler.
7382 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7383 needed.
7384 * configure: Rebuilt.
7385
8a35fb51
SL
73862009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7387
7388 PR gdb/10783
7389
7390 * server.c (handle_search_memory_1): Correct read_addr initialization
7391 in loop for searching subsequent chunks.
7392
96f15937
PP
73932009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7394
7395 * configure.ac: New --with-libthread-db option.
7396 * thread-db.c: Allow direct dependence on libthread_db.
7397 (thread_db_free): Adjust.
7398 * config.in: Regenerate.
7399 * configure: Likewise.
889bf7c5 7400
5f7d1694
PP
74012009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7402
7403 PR gdb/10757
7404 * thread-db.c (attach_thread): New function.
7405 (maybe_attach_thread): Return success/failure.
7406 (find_new_threads_callback): Adjust.
889bf7c5
PA
7407 (thread_db_find_new_threads): Loop until no new threads.
7408
88e3b899
PA
74092009-10-13 Pedro Alves <pedro@codesourcery.com>
7410
7411 * proc-service.c (ps_lgetregs): Formatting.
7412
cdbfd419
PP
74132009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7414
7415 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7416 * configure.ac: Adjust.
7417 * linux-low.h (struct process_info_private): Move members to struct
7418 thread_db.
7419 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7420 * linux-low.c (linux_remove_process): Adjust.
7421 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7422 * server.c (handle_query): Move code ...
7423 (handle_monitor_command): ... here. New function.
7424 * target.h (struct target_ops): New member.
7425 * thread-db.c (struct thread_db): New.
7426 (libthread_db_search_path): New variable.
7427 (thread_db_create_event, thread_db_enable_reporting)
7428 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7429 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7430 (try_thread_db_load_1, dladdr_to_soname): New functions.
7431 (try_thread_db_load, thread_db_load_search): New functions.
7432 (thread_db_init): Search for libthread_db.
7433 (thread_db_free): New function.
7434 (thread_db_handle_monitor_command): Likewise.
7435 * config.in: Regenerate.
7436 * configure: Regenerate.
889bf7c5 7437
4168d2d6
UW
74382009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7439
7440 * spu-low.c (spu_kill): Wait for inferior to terminate.
7441 Call clear_inferiors.
7442 (spu_detach): Call clear_inferiors.
7443
81ecdfbb
RW
74442009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7445
7446 * aclocal.m4: Regenerate.
7447 * config.in: Likewise.
7448 * configure: Likewise.
7449
0b9ff2c0
UW
74502009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7451
7452 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7453 (parse_spufs_run): New function.
7454 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7455 (ppc_breakpoint_at): Handle SPU breakpoints.
7456
efcbbd14
UW
74572009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7458
7459 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7460 (SPUFS_MAGIC): Define.
7461 (spu_enumerate_spu_ids): New function.
7462 (linux_qxfer_spu): New function.
7463 (linux_target_ops): Install linux_qxfer_spu.
7464
f4d9bade
UW
74652009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7466
7467 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7468 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7469 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7470 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7471 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7472 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7473 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7474 (init_registers_powerpc_cell32l): Add prototype.
7475 (init_registers_powerpc_cell64l): Likewise.
7476 (ppc_arch_setup): Detect Cell/B.E. architecture.
7477
96e946ca
RW
74782009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7479
7480 * Makefile.in (datarootdir): New variable.
7481
58d6951d
DJ
74822009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7483
7484 * linux-low.c (linux_write_memory): Update debugging output.
7485 * Makefile.in (clean): Add new descriptions.
7486 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7487 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7488 * configure.srv: Add new files for arm*-*-linux*.
7489 * linux-arm-low.c: Add new declarations.
7490 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7491 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7492 (HWCAP_VFPv3D16): New.
7493 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7494 instead of __IWMMXT__.
7495 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7496 (arm_arch_setup): New.
7497 (target_regsets): Remove #ifdef. Add VFP regset.
7498 (the_low_target): Use arm_arch_setup.
7499
12b42a12
DJ
75002009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7501
7502 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7503 the main thread again.
7504
ac8c974e
AR
75052009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7506
7507 Adding Neutrino gdbserver.
7508 * configure: Regenerated.
7509 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7510 * configure.srv (i[34567]86-*-nto*): New target.
7511 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7512 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7513 (nto_comctrl) [__QNX__]: New function.
7514 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7515
4424e0c3 75162009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
7517
7518 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7519 srv_tgtobj.
7520
912cf4ba
PA
75212009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7522 Pedro Alves <pedro@codesourcery.com>
7523
7524 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7525 don't support CONTEXT_EXTENDED_REGISTERS.
7526 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7527 (the_low_target): Install them.
7528 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7529 failing with ERROR_PIPE_NOT_CONNECTED.
7530
aa5ca48f
DE
75312009-06-30 Doug Evans <dje@google.com>
7532 Pierre Muller <muller@ics.u-strasbg.fr>
7533
7534 Add h/w watchpoint support to x86-linux, win32-i386.
7535 * Makefile.in (SFILES): Add i386-low.c
7536 (i386_low_h): Define.
7537 (i386-low.o): Add dependencies.
7538 (linux-x86-low.o): Add i386-low.h dependency.
7539 (win32-i386-low.o): Ditto.
7540 * i386-low.c: New file.
7541 * i386-low.h: New file.
7542 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7543 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7544 * linux-low.c (linux_add_process): Initialize arch_private.
7545 (linux_remove_process): Free arch_private.
7546 (add_lwp): Initialize arch_private.
7547 (delete_lwp): Free arch_private.
7548 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7549 provided.
7550 * linux-low.h (process_info_private): New member arch_private.
7551 (lwp_info): New member arch_private.
7552 (linux_target_ops): New members new_process, new_thread,
7553 prepare_to_resume.
7554 (ptid_of): New macro.
7555 * linux-x86-low.c: Include stddef.h, i386-low.h.
7556 (arch_process_info): New struct.
7557 (arch_lwp_info): New struct.
7558 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7559 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7560 (i386_dr_low_get_status): New function.
7561 (x86_insert_point, x86_remove_point): New functions.
7562 (x86_stopped_by_watchpoint): New function.
7563 (x86_stopped_data_address): New function.
7564 (x86_linux_new_process, x86_linux_new_thread): New functions.
7565 (x86_linux_prepare_to_resume): New function.
7566 (the_low_target): Add entries for insert_point, remove_point,
7567 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7568 prepare_to_resume.
7569 * server.c (debug_hw_points): New global.
7570 (monitor_show_help): Document set debug-hw-points.
7571 (handle_query): Process "set debug-hw-points".
7572 * server.h (debug_hw_points): Declare.
7573 (paddress): Declare.
7574 * utils.c (NUMCELLS, CELLSIZE): New macros.
7575 (get_sell, xsnprintf, paddress): New functions.
7576 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7577 remove_point, stopped_by_watchpoint, stopped_data_address.
7578 * win32-i386-low.c: Include i386-low.h.
7579 (debug_reg_state): Replaces dr.
7580 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7581 (i386_dr_low_get_status): New function.
7582 (i386_insert_point, i386_remove_point): New functions.
7583 (i386_stopped_by_watchpoint): New function.
7584 (i386_stopped_data_address): New function.
7585 (i386_initial_stuff): Update.
7586 (get_thread_context,set_thread_context,i386_thread_added): Update.
7587 (the_low_target): Add entries for insert_point,
7588 remove_point, stopped_by_watchpoint, stopped_data_address.
7589 * win32-low.c (win32_insert_watchpoint): New function.
7590 (win32_remove_watchpoint): New function.
7591 (win32_stopped_by_watchpoint): New function.
7592 (win32_stopped_data_address): New function.
7593 (win32_target_ops): Add entries for insert_watchpoint,
7594 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7595 * win32-low.h (win32_target_ops): New members insert_point,
7596 remove_point, stopped_by_watchpoint, stopped_data_address.
7597
d993e290
PA
75982009-06-25 Pedro Alves <pedro@codesourcery.com>
7599
7600 * server.c (process_serial_event): Re-return unsupported, not
7601 error, if the type isn't recognized. Re-allow supporting only
7602 insert or remove packets. Also call require_running for
7603 breakpoints. Add missing break statement to default case. Tidy.
7604 * target.h (struct target_ops): Rename insert_watchpoint to
7605 insert_point, and remove_watchpoint to remove_point.
7606
7607 * linux-low.h (struct linux_target_ops): Likewise.
7608 * linux-low.c (linux_insert_watchpoint): Rename to ...
7609 (linux_insert_point): ... this. Adjust.
7610 (linux_remove_watchpoint): Rename to ...
7611 (linux_remove_point): ... this. Adjust.
7612 (linux_target_ops): Adjust.
7613 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7614 (cris_insert_point): ... this.
7615 (cris_remove_watchpoint): Rename to ...
7616 (cris_remove_point): ... this.
7617 (the_low_target): Adjust.
7618
0f54c268
PM
76192009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7620
7621 * server.c (handle_v_kill): Pass signal_pid to
7622 kill_inferior if multi_process is zero.
7623
c6314022
AR
76242009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7625
7626 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7627 * target.h (target_ops): Comment for *_watchpoint to make it clear
7628 the functions can get types '0' and '1'.
7629
4463ce24
AR
76302009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7631
7632 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7633 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7634 * regcache.c (get_regcache): Likewise.
7635 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7636 * win32-low.c (child_fetch_inferior_registers): Remove check for
7637 regno 0.
7638
cf8fd78b
PA
76392009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7640 Pedro Alves <pedro@codesourcery.com>
7641
7642 * target.h (struct target_ops) <supports_multi_process>: New
7643 callback.
7644 (target_supports_multi_process): New.
7645 * server.c (handle_query): Even if GDB reports support, only
7646 enable multi-process if the target also supports it. Report
7647 multi-process support only if the target backend supports it.
7648 * linux-low.c (linux_supports_multi_process): New function.
7649 (linux_target_ops): Install it as target_supports_multi_process
7650 callback.
7651
47c0c975
DE
76522009-05-24 Doug Evans <dje@google.com>
7653
e09875d4
DE
7654 Global renaming of find_thread_pid to find_thread_ptid.
7655 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7656 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7657 All callers updated.
7658
e27d73f6
DE
7659 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7660 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7661 directly.
7662
47c0c975
DE
7663 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7664 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7665 (linux_resume_one_lwp): Ditto.
7666
2acc282a
DE
76672009-05-23 Doug Evans <dje@google.com>
7668
7669 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7670 from struct inferior_list_entry * to struct lwp_info *.
7671 All callers updated.
7672
9f1036c1
DE
76732009-05-13 Doug Evans <dje@google.com>
7674
7675 * linux-x86-low.c: Don't include assert.h.
7676 (x86_siginfo_fixup): Use fatal, not assert.
7677 (x86_arch_setup): Fix comment.
7678
d0722149
DE
76792009-05-12 Doug Evans <dje@google.com>
7680
7681 Biarch support for i386/amd64 gdbserver.
7682 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7683 Add linux-x86-low.c.
7684 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7685 (linux-x86-low.o): Add.
7686 * linux-x86-64-low.c: Delete.
7687 * linux-i386-low.c: Delete.
7688 * linux-x86-low.c: New file.
7689 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7690 linux-x86-low.o.
7691 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7692 linux-x86-low.o.
7693 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7694 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7695 (linux_child_pid_to_exec_file): New function.
7696 (elf_64_header_p, elf_64_file_p): New functions.
7697 (siginfo_fixup): New function.
7698 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7699 give target a chance to convert layout.
7700 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7701 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7702
fdeb2a12
DE
77032009-05-07 Doug Evans <dje@google.com>
7704
7705 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7706 (regsets_store_inferior_registers): Ditto.
7707
a6dbe5df
PA
77082009-05-06 Pedro Alves <pedro@codesourcery.com>
7709
7710 PR server/10048
7711
7712 * linux-low.c (must_set_ptrace_flags): Delete.
7713 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7714 of the global.
7715 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7716 `lwp->must_set_ptrace_flags' instead.
ba42693b 7717 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
7718 (linux_wait_1): ... not here.
7719
5091eb23
DE
77202009-04-30 Doug Evans <dje@google.com>
7721
9f767825
DE
7722 * inferiors.c (started_inferior_callback): New function.
7723 (attached_inferior_callback): New function.
7724 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7725 * server.c (print_started_pid, print_attached_pid): New functions.
7726 (detach_or_kill_for_exit): New function.
7727 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7728 * server.h (have_started_inferiors_p): Declare.
7729 (have_attached_inferiors_p): Declare.
7730
5091eb23
DE
7731 * inferiors.c (remove_process): Fix memory leak, free process.
7732 * linux-low.c (linux_remove_process): New function.
7733 (linux_kill): Call it instead of remove_process.
7734 (linux_detach, linux_wait_1): Ditto.
7735
155c8968
PA
77362009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7737
7738 * configure.srv: Add x86 Windows CE target.
7739
7fe519cb
UW
77402009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7741
7742 * inferiors.c (get_thread_process): Make global.
7743 * server.h (get_thread_process): Add prototype.
7744 * thread-db.c (find_one_thread): Use get_thread_process
7745 instead of current_process.
7746 (thread_db_get_tls_address): Do not crash if called when
7747 thread layer is not yet initialized.
7748
5472f405
UW
77492009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7750
7751 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7752 * spu-low.c (current_tid): Rename to ...
7753 (current_ptid): ... this.
7754 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7755 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7756 ptid_get_lwp (current_ptid) instead of current_tid.
7757 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7758 instead of current_tid. Use find_process_pid to verify pid
7759 argument is valid. Pass proper argument to remove_process.
7760 (spu_thread_alive): Compare current_ptid instead of current_tid.
7761 (spu_resume): Likewise.
7762
55ac2b99
PA
77632009-04-02 Pedro Alves <pedro@codesourcery.com>
7764
7765 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7766 variable.
7767
95954743
PA
77682009-04-01 Pedro Alves <pedro@codesourcery.com>
7769
7770 Implement the multiprocess extensions, and add linux multiprocess
7771 support.
7772
7773 * server.h (ULONGEST): Declare.
7774 (struct ptid, ptid_t): New.
7775 (minus_one_ptid, null_ptid): Declare.
7776 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7777 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7778 (struct inferior_list_entry): Change `id' type from unsigned from
7779 to ptid_t.
7780 (struct sym_cache, struct breakpoint, struct
7781 process_info_private): Forward declare.
7782 (struct process_info): Declare.
7783 (current_process): Declare.
7784 (all_processes): Declare.
7785 (initialize_inferiors): Declare.
7786 (add_thread): Adjust to use ptid_t.
7787 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7788 (add_process, remove_process, find_thread_pid): Declare.
7789 (find_inferior_id): Adjust to use ptid_t.
7790 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7791 (multi_process): Declare.
7792 (push_event): Adjust to use ptid_t.
7793 (read_ptid, write_ptid): Declare.
7794 (prepare_resume_reply): Adjust to use ptid_t.
7795 (clear_symbol_cache): Declare.
7796 * inferiors.c (all_processes): New.
7797 (null_ptid, minus_one_ptid): New.
7798 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7799 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7800 (add_thread): Change unsigned long to ptid. Remove gdb_id
7801 parameter. Adjust.
7802 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7803 (gdb_id_to_thread): Rename to ...
7804 (find_thread_pid): ... this. Change unsigned long to ptid.
7805 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7806 (loaded_dll, pull_pid_from_list): Adjust.
7807 (add_process, remove_process, find_process_pid)
7808 (get_thread_process, current_process, initialize_inferiors): New.
7809 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7810 (struct target_waitstatus) <related_pid>: Ditto.
7811 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7812 return type to int.
7813 (struct target_ops) <join>: Add `pid' argument.
7814 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7815 (struct target_ops) <wait>: Add `ptid' field. Change return type
7816 to ptid.
7817 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7818 (mywait): Add `ptid' argument. Change return type to ptid_t.
7819 (target_pid_to_str): Declare.
7820 * target.c (set_desired_inferior): Adjust to use ptids.
7821 (mywait): Add new `ptid' argument. Adjust.
7822 (target_pid_to_str): New.
7823 * mem-break.h (free_all_breakpoints): Declare.
7824 * mem-break.c (breakpoints): Delelete.
7825 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7826 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7827 to use per-process breakpoint list.
7828 (free_all_breakpoints): New.
7829 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7830 (symbol_cache, all_symbols_looked_up): Delete.
7831 (hexchars): New.
7832 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7833 read_ptid): New.
7834 (prepare_resume_reply): Change ptid argument's type from unsigned
7835 long to ptid_t. Adjust. Implement W;process and X;process.
7836 (free_sym_cache, clear_symbol_cache): New.
7837 (look_up_one_symbol): Adjust to per-process symbol cache. *
7838 * server.c (cont_thread, general_thread, step_thread): Change type
7839 to ptid_t.
7840 (attached): Delete.
7841 (multi_process): New.
7842 (last_ptid): Change type to ptid_t.
7843 (struct vstop_notif) <ptid>: Change type to ptid_t.
7844 (queue_stop_reply, push_event): Change `ptid' argument's type to
7845 ptid_t.
7846 (discard_queued_stop_replies): Add `pid' argument.
7847 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7848 changes. Don't reference the `attached' global.
7849 (attach_inferior): Adjust to mywait interface changes.
7850 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7851 features. Handle and report "multiprocess+". Handle
7852 "qAttached:PID".
7853 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7854 changes.
7855 (handle_v_kill): New.
7856 (handle_v_stopped): Adjust to use target_pid_to_str.
7857 (handle_v_requests): Allow multiple attaches and runs when
7858 multiprocess extensions are in effect. Handle "vKill".
7859 (myresume): Adjust to use ptids.
7860 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7861 (handle_status): Adjust to discard_queued_stop_replies interface
7862 change.
7863 (first_thread_of, kill_inferior_callback)
7864 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7865 (main): Call initialize_inferiors. Adjust to use ptids, killing
7866 and detaching from all inferiors. Handle multiprocess packet
7867 variants.
7868 * linux-low.h: Include gdb_proc_service.h.
7869 (struct process_info_private): New.
7870 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7871 <lwpid_of>: Use ptid_get_lwp.
7872 (get_lwp_thread): Adjust.
7873 (struct lwp_info): Add `dead' member.
7874 (find_lwp_pid): Declare.
7875 * linux-low.c (thread_db_active): Delete.
7876 (new_inferior): Adjust comment.
7877 (inferior_pid): Delete.
7878 (linux_add_process): New.
7879 (handle_extended_wait): Adjust.
7880 (add_lwp): Change unsigned long to ptid.
7881 (linux_create_inferior): Add process to processes table. Adjust
7882 to use ptids. Don't set new_inferior here.
7883 (linux_attach_lwp): Rename to ...
7884 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7885 it. Adjust to use ptids.
7886 (linux_attach_lwp): New.
7887 (linux_attach): Add process to processes table. Don't set
7888 new_inferior here.
7889 (struct counter): New.
7890 (second_thread_of_pid_p, last_thread_of_process_p): New.
7891 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7892 multiple processes.
7893 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7894 processes. Remove process from process table.
7895 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7896 to multiple processes.
7897 (any_thread_of): New.
7898 (linux_detach): Add `pid' argument, and handle it. Remove process
7899 from processes table.
7900 (linux_join): Add `pid' argument. Handle it.
7901 (linux_thread_alive): Change unsighed long argument to ptid_t.
7902 Consider dead lwps as not being alive.
7903 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7904 threads we're not interested in.
7905 (same_lwp, find_lwp_pid): New.
7906 (linux_wait_for_lwp): Change `pid' argument's type from int to
7907 ptid_t. Adjust.
7908 (linux_wait_for_event): Rename to ...
7909 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7910 from int to ptid_t. Adjust.
7911 (linux_wait_for_event): New.
7912 (linux_wait_1): Add `ptid' argument. Change return type to
7913 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7914 that exit from the process table.
7915 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7916 Adjust.
7917 (mark_lwp_dead): New.
7918 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7919 stopping all threads, mark its main lwp as dead.
7920 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7921 ptids.
7922 (fetch_register, usr_store_inferior_registers)
7923 (regsets_fetch_inferior_registers)
7924 (regsets_store_inferior_registers, linux_read_memory)
7925 (linux_write_memory): Inline `inferior_pid'.
7926 (linux_look_up_symbols): Adjust to use per-process
7927 `thread_db_active'.
7928 (linux_request_interrupt): Adjust to use ptids.
7929 (linux_read_auxv): Inline `inferior_pid'.
7930 (initialize_low): Don't reference thread_db_active.
7931 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7932 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7933 (ps_getpid): Return the pid of the current inferior.
7934 * thread-db.c (proc_handle, thread_agent): Delete.
7935 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7936 per-process data.
7937 (find_one_thread): Change argument type to ptid_t. Adjust to
7938 per-process data.
7939 (maybe_attach_thread): Adjust to per-process data and ptids.
7940 (thread_db_find_new_threads): Ditto.
7941 (thread_db_init): Ditto.
7942 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7943 processes table. Adjust to use ptids.
7944 (spu_kill, spu_detach): Adjust interface. Remove process from
7945 processes table.
7946 (spu_join, spu_thread_alive): Adjust interface.
7947 (spu_wait): Adjust interface. Remove process from processes
7948 table. Adjust to use ptids.
7949 * win32-low.c (current_inferior_tid): Delete.
7950 (current_inferior_ptid): New.
7951 (debug_event_ptid): New.
7952 (thread_rec): Take a ptid. Adjust.
7953 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7954 (child_delete_thread): Ditto.
7955 (do_initial_child_stuff): Add `attached' argument. Add process to
7956 processes table.
7957 (child_fetch_inferior_registers, child_store_inferior_registers):
7958 Adjust.
7959 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7960 (win32_attach): Pass 1 to do_initial_child_stuff.
7961 (win32_kill): Adjust interface. Remove process from processes
7962 table.
7963 (win32_detach): Ditto.
7964 (win32_join): Adjust interface.
7965 (win32_thread_alive): Take a ptid.
7966 (win32_resume): Adjust to use ptids.
7967 (get_child_debug_event): Ditto.
7968 (win32_wait): Adjust interface. Remove exiting process from
7969 processes table.
7970
bd99dc85
PA
79712009-04-01 Pedro Alves <pedro@codesourcery.com>
7972
7973 Non-stop mode support.
7974
7975 * server.h (non_stop): Declare.
7976 (gdb_client_data, handler_func): Declare.
7977 (delete_file_handler, add_file_handler, start_event_loop):
7978 Declare.
7979 (handle_serial_event, handle_target_event, push_event)
7980 (putpkt_notif): Declare.
7981 * target.h (enum resume_kind): New.
7982 (struct thread_resume): Replace `step' field by `kind' field.
7983 (TARGET_WNOHANG): Define.
7984 (struct target_ops) <wait>: Add `options' argument.
7985 <supports_non_stop, async, start_non_stop>: New fields.
7986 (target_supports_non_stop, target_async): New.
7987 (start_non_stop): Declare.
7988 (mywait): Add `options' argument.
7989 * target.c (mywait): Add `options' argument. Print child exit
7990 notifications here.
7991 (start_non_stop): New.
7992 * server.c (non_stop, own_buf, mem_buf): New globals.
7993 (struct vstop_notif): New.
7994 (notif_queue): New global.
7995 (queue_stop_reply, push_event, discard_queued_stop_replies)
7996 (send_next_stop_reply): New.
7997 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7998 interface changes.
7999 (attach_inferior): In non-stop mode, don't wait for the target
8000 here.
8001 (handle_general_set): Handle QNonStop.
8002 (handle_query): When handling qC, return the current general
8003 thread, instead of the first thread of the list.
8004 (handle_query): If the backend supports non-stop mode, include
8005 QNonStop+ in the qSupported query response.
8006 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8007 and non-stop mode.
8008 (handle_v_attach, handle_v_run): Handle non-stop mode.
8009 (handle_v_stopped): New.
8010 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8011 (myresume): Adjust to use resume_kind. Handle non-stop.
8012 (queue_stop_reply_callback): New.
8013 (handle_status): Handle non-stop mode.
8014 (main): Clear non_stop flag on reconnection. Use the event-loop.
8015 Refactor serial protocol handling from here ...
8016 (process_serial_event): ... to this new function. When GDB
8017 selects any thread, select one here. In non-stop mode, wait until
8018 GDB acks all pending events before exiting.
8019 (handle_serial_event, handle_target_event): New.
8020 * remote-utils.c (remote_open): Install remote_desc in the event
8021 loop.
8022 (remote_close): Remove remote_desc from the event loop.
8023 (putpkt_binary): Rename to...
8024 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8025 (putpkt_binary): New as wrapper around putpkt_binary_1.
8026 (putpkt_notif): New.
8027 (prepare_resume_reply): In non-stop mode, don't change the
8028 general_thread.
8029 * event-loop.c: New.
8030 * Makefile.in (OBJ): Add event-loop.o.
8031 (event-loop.o): New rule.
8032
8033 * linux-low.h (pid_of): Moved here.
8034 (lwpid_of): New.
8035 (get_lwp_thread): Use lwpid_of.
8036 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8037 * linux-low.c (pid_of): Delete.
8038 (inferior_pid): Use lwpid_of.
8039 (linux_event_pipe): New.
8040 (target_is_async_p): New.
8041 (delete_lwp): New.
8042 (handle_extended_wait): Use lwpid_of.
8043 (add_lwp): Don't set lwpid field.
8044 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8045 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8046 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8047 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8048 first. Adjust to linux_wait_for_event interface changes. Use
8049 lwpid_of.
8050 (linux_detach): Don't delete the main lwp here.
8051 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8052 (status_pending_p): Don't consider explicitly suspended lwps.
8053 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8054 pointer. Add OPTIONS argument. Change return type to int. Use
8055 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8056 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8057 pointer. Add status pointer argument. Return a pid instead of a
8058 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8059 changes. In non-stop mode, don't switch to a random thread.
8060 (linux_wait): Rename to...
8061 (linux_wait_1): ... this. Add target_options argument, and handle
8062 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8063 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8064 clean exit and signal exit code. Don't stop all threads in
8065 non-stop mode. In all-stop mode, only stop all threads when
8066 reporting a stop to GDB. Handle explicit thread stop requests.
8067 (async_file_flush, async_file_mark): New.
8068 (linux_wait): New.
8069 (send_sigstop): Use lwpid_of.
8070 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8071 interface changes. In non-stop mode, don't switch to a random
8072 thread.
8073 (linux_resume_one_lwp): Use lwpid_of.
8074 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8075 (linux_resume_one_thread): ... this. Handle resume_stop. In
8076 non-stop mode, don't look for pending flag in all threads.
8077 (resume_status_pending_p): Don't consider explicitly suspended
8078 threads.
8079 (my_waitpid): Reimplement. Emulate __WALL.
8080 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8081 Use lwpid_of.
8082 (sigchld_handler, linux_supports_non_stop, linux_async)
8083 (linux_start_non_stop): New.
8084 (linux_target_ops): Register linux_supports_non_stop, linux_async
8085 and linux_start_non_stop.
8086 (initialize_low): Install SIGCHLD handler.
8087 * thread-db.c (thread_db_create_event, find_one_thread)
8088 (thread_db_get_tls_address): Use lwpid_of.
8089 * win32-low.c (win32_detach): Adjust to use resume_kind.
8090 (win32_wait): Add `options' argument.
8091 * spu-low.c (spu_resume): Adjust to use resume_kind.
8092 (spu_wait): Add `options' argument.
8093
5b1c542e
PA
80942009-04-01 Pedro Alves <pedro@codesourcery.com>
8095
8096 Decouple target code from remote protocol.
8097
8098 * target.h (enum target_waitkind): New.
8099 (struct target_waitstatus): New.
8100 (struct target_ops) <wait>: Return an unsigned long. Take a
8101 target_waitstatus pointer instead of a char pointer.
8102 (mywait): Likewise.
8103 * target.c (mywait): Change prototype to return an unsigned long.
8104 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8105 * server.h (thread_from_wait, old_thread_from_wait): Delete
8106 declarations.
8107 (prepare_resume_reply): Change prototype to take a
8108 target_waitstatus.
8109 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8110 (last_status, last_ptid): New.
8111 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8112 pid instead of a signal.
8113 (attach_inferior): Remove "status" and "signal" parameters.
8114 Adjust.
8115 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8116 not as an address.
8117 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8118 (handle_v_requests, myresume): Remove "status" and "signal"
8119 parameters. Adjust.
8120 (handle_status): New.
8121 (main): Delete local `status'. Adjust.
8122 * remote-utils.c: Include target.h.
8123 (prepare_resume_reply): Change prototype to take a
8124 target_waitstatus. Adjust.
8125
8126 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8127 interface.
8128 * spu-low.c (spu_wait): Adjust.
8129 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8130 Delete.
8131 (win32_wait): Adjust.
8132
2bd7c093
PA
81332009-04-01 Pedro Alves <pedro@codesourcery.com>
8134
8135 * target.h (struct thread_resume): Delete leave_stopped member.
8136 (struct target_ops): Add a `n' argument to the `resume' callback.
8137 * server.c (start_inferior): Adjust.
8138 (handle_v_cont, myresume): Adjust.
8139 * linux-low.c (check_removed_breakpoint): Adjust to resume
8140 interface change, and to removed leave_stopped field.
8141 (resume_ptr): Delete.
8142 (struct thread_resume_array): New.
8143 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8144 resume interface change.
8145 (linux_continue_one_thread, linux_queue_one_thread)
8146 (resume_status_pending_p): Check if the resume field is NULL
8147 instead of checking the leave_stopped member.
8148 (linux_resume): Adjust to the target resume interface change.
8149 * spu-low.c (spu_resume): Adjust to the target resume interface
8150 change.
8151 * win32-low.c (win32_detach, win32_resume): Ditto.
8152
c35fafde
PA
81532009-04-01 Pedro Alves <pedro@codesourcery.com>
8154
8155 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8156 flag.
8157 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8158 pending.
8159 (linux_continue_one_thread): Only preserve the stepping flag if
8160 there's a pending breakpoint.
8161
0a59d50b
PA
81622009-03-31 Pedro Alves <pedro@codesourcery.com>
8163
8164 * server.c (main): After the inferior having exited, call
8165 remote_close before exiting gdbserver.
8166
f04c6d38
TJB
81672009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8168
8169 Fix size of FPSCR in Power 7 processors.
8170 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8171 (PPC_FEATURE_HAS_DFP): New #define.
8172 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8173 size of the FPSCR.
8174
78e5cee6
PA
81752009-03-23 Pedro Alves <pedro@codesourcery.com>
8176
8177 * server.c (handle_query) Whitespace and formatting.
8178
1b3f6016
PA
81792009-03-22 Pedro Alves <pedro@codesourcery.com>
8180
8181 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8182 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8183 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8184 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8185 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8186 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8187 Makefile.in, configure.ac: Fix whitespace throughout.
8188 * configure: Regenerate.
8189
a07b2135
PA
81902009-03-22 Pedro Alves <pedro@codesourcery.com>
8191
8192 * inferiors.c (find_inferior): Make it safe for the callback
8193 function to delete the currently iterated inferior.
8194
67cc2626
PA
81952009-03-22 Pedro Alves <pedro@codesourcery.com>
8196
8197 * Makefile.in (linuw_low_h): Move higher.
8198 (thread-db.o): Depend on $(linux_low_h).
8199
54a0b537
PA
82002009-03-17 Pedro Alves <pedro@codesourcery.com>
8201
8202 Rename "process" to "lwp" throughout.
8203
8204 * linux-low.c (all_processes): Rename to...
8205 (all_lwps): ... this.
8206 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8207 (add_process): Rename to ...
8208 (add_lwp): ... this. Adjust.
8209 (linux_create_inferior): Adjust.
8210 (linux_attach_lwp): Adjust.
8211 (linux_attach): Adjust.
8212 (linux_kill_one_process): Rename to ...
8213 (linux_kill_one_lwp): ... this. Adjust.
8214 (linux_kill): Adjust.
8215 (linux_detach_one_process): Rename to ...
8216 (linux_detach_one_lwp): ... this. Adjust.
8217 (linux_detach): Adjust.
8218 (check_removed_breakpoint): Adjust.
8219 (status_pending_p): Adjust.
8220 (linux_wait_for_process): Rename to ...
8221 (linux_wait_for_lwp): ... this. Adjust.
8222 (linux_wait_for_event): Adjust.
8223 (send_sigstop): Adjust.
8224 (wait_for_sigstop): Adjust.
8225 (stop_all_processes): Rename to ...
8226 (stop_all_lwps): ... this.
8227 (linux_resume_one_process): Rename to ...
8228 (linux_resume_one_lwp): ... this. Adjust.
8229 (linux_set_resume_request, linux_continue_one_thread)
8230 (linux_queue_one_thread, resume_status_pending_p)
8231 (usr_store_inferior_registers, regsets_store_inferior_registers)
8232 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8233 Adjust.
8234 * linux-low.h (get_process): Rename to ...
8235 (get_lwp): ... this. Adjust.
8236 (get_thread_process): Rename to ...
8237 (get_thread_lwp): ... this. Adjust.
8238 (get_process_thread): Rename to ...
8239 (get_lwp_thread): ... this. Adjust.
8240 (struct process_info): Rename to ...
8241 (struct lwp_info): ... this.
8242 (all_processes): Rename to ...
8243 (all_lwps): ... this.
8244 * proc-service.c (ps_lgetregs): Adjust.
8245 * thread-db.c (thread_db_create_event, find_one_thread)
8246 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8247
0b16c5cf
PA
82482009-03-14 Pedro Alves <pedro@codesourcery.com>
8249
8250 * server.c (handle_query): Handle "qAttached".
8251
32de4b9d
NS
82522009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8253
8254 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8255 GPLv3, update license URL.
8256
2aecd87f
DE
82572009-03-01 Doug Evans <dje@google.com>
8258
93efd302 8259 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8260 (server_h): Add gdb_signals.h.
8261 (signals.o): Update.
8262 * server.h (target_signal_from_host,target_signal_to_host_p)
8263 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8264
86b1f9c5
PM
82652009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8266
8267 * remote-utils.c (getpkt): Also generate remote-debug
8268 information if noack_mode is set.
8269
4aa995e1
PA
82702009-02-06 Pedro Alves <pedro@codesourcery.com>
8271
8272 * server.c (handle_query): Report qXfer:siginfo:read and
8273 qXfer:siginfo:write as supported and handle them.
8274 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8275 * linux-low.c (linux_xfer_siginfo): New.
8276 (linux_target_ops): Set it.
8277
62709adf
PA
82782009-01-26 Pedro Alves <pedro@codesourcery.com>
8279
8280 * server.c (gdbserver_usage): Mention --remote-debug.
8281 (main): Accept '--remote-debug' switch.
8282
aef93bd7
DE
82832009-01-18 Doug Evans <dje@google.com>
8284
8285 * regcache.c (new_register_cache): No need to check result of xcalloc.
8286 * server.c (handle_search_memory): Back out calls to xmalloc,
8287 result is checked and error is returned to user upon failure.
8288 (handle_query): Ditto. Add more checks for result of malloc.
8289 (handle_v_cont): Check result of malloc, report error back to
8290 user upon failure.
8291 (handle_v_run): Ditto. Call freeargv.
8292 * server.h (freeargv): Declare.
8293 * utils.c (freeargv): New fn.
8294
54363045
DE
82952009-01-15 Doug Evans <dje@google.com>
8296
f626972c
DE
8297 * gdbreplay.c (perror_with_name): Make arg const char *.
8298 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8299 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8300 * utils.c (perror_with_name): Make arg const char *.
54363045 8301
18aae699
PA
83022009-01-14 Pedro Alves <pedro@codesourcery.com>
8303
8304 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8305 when handling a EXIT_PROCESS_DEBUG_EVENT.
8306
ff703abe
JB
83072009-01-06 Joel Brobecker <brobecker@adacore.com>
8308
8309 * gdbreplay.c (gdbreplay_version): Update copyright year.
8310 * server.c (gdbserver_version): Likewise.
8311
f21cc1a2 83122009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8313
8314 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8315 (handle_extended_wait): Improve comment.
0e21c1ec 8316
bca929d3
DE
83172008-12-13 Doug Evans <dje@google.com>
8318
8319 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8320 * server.h (ATTR_MALLOC): New macro.
8321 (xmalloc,xcalloc,xstrdup): Declare.
8322 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8323 * inferiors.c: Ditto.
8324 * linux-low.c: Ditto.
8325 * mem-break.c: Ditto.
8326 * regcache.c: Ditto.
8327 * remote-utils.c: Ditto.
8328 * server.c: Ditto.
8329 * target.c: Ditto.
8330 * win32-low.c: Ditto.
8331
97438e3f
DE
83322008-12-12 Doug Evans <dje@google.com>
8333
896c7fbb
DE
8334 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8335 in debugging printf.
8336
97438e3f
DE
8337 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8338
e3b886f8
DE
83392008-12-09 Doug Evans <dje@google.com>
8340
8341 * linux-low.h (struct process_info): Delete member tid, unused.
8342 * thread-db.c (find_one_thread): Update.
8343 (maybe_attach_thread): Update.
8344
07e059b5
VP
83452008-12-02 Pedro Alves <pedro@codesourcery.com>
8346
889bf7c5
PA
8347 * target.h (struct target_ops): Add qxfer_osdata member.
8348 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8349 and dirent.h.
8350 (linux_qxfer_osdata): New functions.
8351 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8352 callback.
8353 * server.c (handle_query): Handle "qXfer:osdata:read:".
8354 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8355 (buffer_xml_printf): New functions.
8356 * server.h (struct buffer): New.
8357 (buffer_grow_str, buffer_grow_str0): New macros.
8358 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8359 (buffer_xml_printf): Declare.
07e059b5 8360
4cab47ab
DE
83612008-11-24 Doug Evans <dje@google.com>
8362
8363 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8364
f142445f
DJ
83652008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8366
8367 * server.c (handle_v_run): Always use the supplied argument list.
8368
d0107bb6 83692008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8370
d0107bb6
BW
8371 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8372 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8373
2c4ad781
TJB
83742008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8375
8376 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8377 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8378 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8379 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8380 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8381 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8382 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8383 XML target descriptions.
8384 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8385 when inferior is running on an ISA 2.05 or later processor. Add
8386 special case to return offset for full 64-bit slot of FPSCR when
8387 in 32-bits.
8388
dfb64f85
DJ
83892008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8390
8391 * Makefile.in (SFILES, clean): Added sparc64 files.
8392 (reg-sparc64.o, reg-sparc64.c): New.
8393 * configure.srv (sparc*-*-linux*): New configuration.
8394 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8395 syscall arguments for SPARC.
8396 (regsets_store_inferior_registers): Likewise.
8397 * linux-sparc-low.c: New file.
8398
66b6e1dd
DE
83992008-10-21 Doug Evans <dje@google.com>
8400
8401 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8402 (READLINE_DIR,READLINE_DEP): Delete.
8403 (INTERNAL_CFLAGS): Update.
8404 (LINTFLAGS): Update.
8405
9b710a42
PA
84062008-10-10 Pedro Alves <pedro@codesourcery.com>
8407
8408 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8409 whole argv from the last run, not just argv[0].
8410
5822d809
PA
84112008-09-08 Pedro Alves <pedro@codesourcery.com>
8412
8413 * regcache.c (new_register_cache): Return NULL if the register
8414 cache size isn't known yet.
8415 (free_register_cache): Avoid dereferencing a NULL regcache.
8416
74aac56f
DJ
84172008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8418
8419 * configure.srv: Merge MIPS and MIPS64.
8420
400b20f5
MR
84212008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8422
8423 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8424
677c5bb1
LM
84252008-08-18 Luis Machado <luisgpm@br.ibm.com>
8426
8427 * Makefile.in: Add required vsx dependencies.
8428
8429 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8430 Declare init_registers_powerpc_vsx32l.
8431 Declare init_registers_powerpc_vsx64l.
8432 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8433 (ppc_arch_setup): Check for VSX in hwcap.
8434 (ppc_fill_vsxregset): New function.
8435 (ppc_store_vsxregset): New function.
8436 Add new VSX entry in regset_info target_regsets.
8437
8438 * configure.srv: Add new VSX dependencies.
8439
a6f3e723
SL
84402008-08-12 Pedro Alves <pedro@codesourcery.com>
8441
8442 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8443 (remote_open): Set or clear transport_is_reliable.
8444 (putpkt_binary): Don't expect acks in noack mode.
8445 (getpkt): Don't send ack/nac in noack mode.
8446 * server.c (handle_general_set): Handle QStartNoAckMode.
8447 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8448 qSupported.
8449 (main): Reset noack_mode on every connection.
8450 * server.h (noack_mode): Declare.
8451
a417dc56
RW
84522008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8453
8454 * Makefile.in (GDBREPLAY_OBS): New variable.
8455 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8456
3221518c
UW
84572008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8458 Daniel Jacobowitz <dan@codesourcery.com>
8459
8460 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8461 (usr_store_inferior_registers): Likewise.
8462 (regsets_store_inferior_registers): Likewise.
8463
ec56be1b
PA
84642008-07-31 Rolf Jansen <rj@surtec.com>
8465 Pedro Alves <pedro@codesourcery.com>
8466
8467 * configure.ac: Check for memmem declaration.
8468 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8469 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8470 (disable_packet_qfThreadInfo): Unconditionally compile.
8471 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8472 * configure, config.in: Regenerate.
8473
2fe5e3ff
DE
84742008-07-28 Doug Kwan <dougkwan@google.com>
8475
8476 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8477 (linux_write_memory): Remove declaration of errno.
8478
836acd6d
UW
84792008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8480
8481 * linux-low.c (handle_extended_wait): Do not use "status"
8482 variable uninitialized.
8483
aeba519e
PA
84842008-07-07 Pedro Alves <pedro@codesourcery.com>
8485
8486 * server.c (handle_v_attach): Inhibit reporting dll changes.
8487
db42f210
PA
84882008-06-27 Pedro Alves <pedro@codesourcery.com>
8489
8490 * remote-utils.c (prepare_resume_reply): If requested, don't
8491 output "thread:TID" in the T stop reply.
8492
8493 * server.c (disable_packet_vCont, disable_packet_Tthread)
8494 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8495 (handle_query): If requested, disable support for qC, qfThreadInfo
8496 and qsThreadInfo.
8497 (handle_v_requests): If requested, disable support for vCont.
8498 (gdbserver_show_disableable): New.
8499 (main): Handle --disable-packet and --disable-packet=LIST.
8500
8501 * server.h (disable_packet_vCont, disable_packet_Tthread)
8502 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8503
8e4c5421
CD
85042008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8505
8506 * server.c (gdbserver_usage): Mention --version.
8507
6e23a804
DJ
85082008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8509
8510 * Makefile.in (gdbreplay.o): New rule.
8511
90aa6a40
JM
85122008-06-06 Joseph Myers <joseph@codesourcery.com>
8513
8514 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8515 message, not gdbserver.
8516
c16158bc 85172008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
8518 Nathan Sidwell <nathan@codesourcery.com>
8519 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
8520
8521 * acinclude.m4: Include ../../config/acx.m4.
8522 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8523 * configure, config.in: Regenerate.
8524 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8525 * server.c (gdbserver_version): Print PKGVERSION.
8526 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8527 (main): Adjust gdbserver_usage calls.
8528 * gdbreplay.c (version, host_name): Add declarations.
8529 (gdbreplay_version, gdbreplay_usage): New.
8530 (main): Accept --version and --help options.
8531
aeb75bf5
DJ
85322008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8533
8534 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8535 (arm_breakpoint_at): Handle Thumb.
8536 (the_low_target): Add comment.
8537
76b233dd
UW
85382008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8539
8540 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8541
08388c79
DE
85422008-05-09 Doug Evans <dje@google.com>
8543
a3c83fae
DE
8544 * server.h (decode_search_memory_packet): Declare.
8545 * remote-utils.c (decode_search_memory_packet): New fn.
8546 * server.c (handle_search_memory_1): New fn.
08388c79
DE
8547 (handle_search_memory): New fn.
8548 (handle_query): Process qSearch:memory packets.
8549
bb9c3d36
UW
85502008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8551
8552 * regcache.c (registers_length): Remove.
8553 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8554 full register packet.
8555 * regcache.h (registers_length): Remove prototype.
8556 * server.h (PBUFSIZ): Define to 16384.
8557
7284e1be
UW
85582008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8559
8560 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8561 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8562 powerpc-64l.o, and powerpc-altivec64l.o.
8563 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8564 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8565 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8566 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8567 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8568 to srv_xmlfiles.
8569
8570 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8571 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8572 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8573 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8574 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8575 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8576 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8577 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8578 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8579 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8580 (clean): Update.
8581
8582 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8583 (init_registers_powerpc_32l): ... this new prototype.
8584 (init_registers_powerpc_32): Remove, replace by ...
8585 (init_registers_powerpc_altivec32l): ... this new prototype.
8586 (init_registers_powerpc_e500): Remove, replace by ...
8587 (init_registers_powerpc_e500l): ... this new prototype.
8588 (init_registers_ppc64): Remove, replace by ...
8589 (init_registers_powerpc_64l): ... this new prototype.
8590 (init_registers_powerpc_64): Remove, replace by ...
8591 (init_registers_powerpc_altivec64l): ... this new prototype.
8592 (ppc_num_regs): Set to 73.
8593 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8594 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8595 (ppc_cannot_store_register): Handle orig_r3 and trap.
8596 (ppc_arch_setup): Update init_registers_... calls.
8597 (ppc_fill_gregset): Handle orig_r3 and trap.
8598
8599 * inferiors.c (clear_inferiors): Reset current_inferior.
8600
fdc59709
PB
86012008-04-23 Paolo Bonzini <bonzini@gnu.org>
8602
889bf7c5
PA
8603 * acinclude.m4: Add override.m4.
8604 * configure: Regenerate.
fdc59709 8605
c9b2f845
UW
86062008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8607
8608 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8609 initial call to init_register_ppc64.
8610
550512b8
UW
86112008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8612
43aaf8b6
PA
8613 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8614 single powerpc*-*-linux* case.
550512b8
UW
8615 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8616
b6430ec3
UW
86172008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8618
8619 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 8620 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
8621 from reg_xmlfiles.
8622 * linux-ppc-low.c: Include <elf.h>.
8623 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8624 (ppc_hwcap): New global variable.
8625 (ppc_regmap): Remove __SPE__ #ifdef sections.
8626 (ppc_regmap_e500): New global variable.
8627 (ppc_cannot_store_register): Update __SPE__ special case.
8628 (ppc_get_hwcap): New function.
8629 (ppc_arch_setup): Use it to determine whether inferior supports
8630 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8631 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8632 Do not access registers if target does not support AltiVec.
8633 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8634 Do not access registers if target does not support SPE.
8635 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8636
52fa2412
UW
86372008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8638
8639 * linux-low.c (disabled_regsets, num_regsets): New.
8640 (use_regsets_p): Delete.
8641 (linux_wait_for_process): Clear disabled_regsets.
8642 (regsets_fetch_inferior_registers): Check and set it.
8643 (regsets_store_inferior_registers): Likewise.
8644 (linux_fetch_registers, linux_store_registers): Do not use
8645 use_regsets_p.
8646 (initialize_low): Allocate disabled_regsets.
8647
e28b3332
DJ
86482008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8649
8650 * Makefile.in (LIBOBJS): New.
8651 (OBS): Use LIBOBJS.
8652 (memmem.o): New rule.
8653 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8654 * configure: Regenerated.
8655
4536995d
UW
86562008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8657
8658 * server.c (handle_query): Never return "unsupported" for
8659 qXfer:features:read queries.
8660
221c031f
UW
86612008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8662
8663 * server.c (get_features_xml): Fix inverted condition.
8664 (handle_query): Always support qXfer:feature:read.
8665
ccd213ac
DJ
86662008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8667
8668 * server.c (wrapper_argv): New.
8669 (start_inferior): Handle wrapper_argv. If set, expect an extra
8670 trap.
8671 (gdbserver_usage): Document --wrapper.
8672 (main): Parse --wrapper.
8673
6fe305f7
UW
86742008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8675
8676 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8677 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8678 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8679 (ppc_set_pc): Likewise.
8680 (ppc_arch_setup): New function.
8681 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8682 of collect_register.
889bf7c5 8683 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 8684
5b0a002e
UW
86852008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8686
8687 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8688 instead of linux-ppc64-low.o.
8689 * linux-ppc64-low.c: Remove file.
8690 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8691 (linux-ppc64-low.o): Remove rule.
8692
8693 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8694 (init_registers_powerpc_64): Likewise.
8695 (ppc_regmap): Conditionally define depending on __powerpc64__.
8696 (ppc_cannot_store_register): Do not special-case "fpscr" when
8697 compiled on __powerpc64__.
8698 (ppc_collect_ptrace_register): New function.
8699 (ppc_supply_ptrace_register): New function.
8700 (ppc_breakpoint): Change type to "unsigned int".
8701 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8702 (the_low_target): Conditionally provide initializers for the
889bf7c5 8703 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
8704 collect_ptrace_register and supply_ptrace_register members.
8705
9b4b61c8
UW
87062008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8707
8708 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8709 * server.c (gdbserver_xmltarget): Define.
8710 (get_features_xml): Use it to replace "target.xml" and arch_string.
8711
8712 * configure.srv: Remove srv_xmltarget. Add XML files that were
8713 mentioned there to srv_xmlfiles instead. Remove conditional tests
8714 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8715 srv_xmlfiles and srv_regobj to include all possible choices.
8716 * configure.ac (srv_xmltarget): Remove.
8717 (srv_xmlfiles): Do not add "target.xml".
8718 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8719 checks for supplementary target information.
8720 * configure: Regenerate.
8721 * Makefile.in (XML_TARGET): Remove.
8722 (target.xml): Remove rule.
8723 (clean): Do not clean up target.xml.
8724 (.PRECIOUS): Do not mention target.xml.
8725
8726 * target.h (struct target_ops): Remove arch_string member.
8727 * linux-low.c (linux_arch_string): Remove.
8728 (linux_target_ops): Remove arch_string initializer.
8729 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8730 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8731 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8732 * spu-low.c (spu_arch_string): Remove.
8733 (spu_target_ops): Remove arch_string initializer.
8734 * win32-low.c (win32_arch_string): Remove.
8735 (win32_target_ops): Remove arch_string initializer.
8736 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8737 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8738 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8739
ee1a7ae4
UW
87402008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8741
8742 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8743 by collect_ptrace_register and supply_ptrace_register hooks.
8744 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8745 instead of checking for the_low_target.left_pad_xfer.
8746 (usr_store_inferior_registers): Use collect_ptrace_register callback
8747 instead of checking for the_low_target.left_pad_xfer.
8748
8749 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8750 (s390_supply_ptrace_register): Likewise.
8751 (s390_fill_gregset): Call s390_collect_ptrace_register.
8752 (the_low_target): Update.
8753
8754 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8755 (ppc_supply_ptrace_register): Likewise.
8756 (the_low_target): Update.
8757
8758 * linux-i386-low.c (the_low_target): Update.
8759 * linux-x86-64-low.c (the_low_target): Update.
8760
d61ddec4
UW
87612008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8762
8763 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8764 reg-s390.o and reg-s390x.o.
8765
8766 * linux-low.c (new_inferior): New global variable.
8767 (linux_create_inferior, linux_attach): Set it.
8768 (linux_wait_for_process): Call the_low_target.arch_setup after the
8769 target has stopped for the first time.
8770 (initialize_low): Do not call the_low_target.arch_setup.
8771
8772 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8773 (s390_set_pc): Likewise.
8774 (s390_arch_setup): New function.
8775 (the_low_target): Use s390_arch_setup as arch_setup routine.
8776
8777 * regcache.c (realloc_register_cache): New function.
8778 (set_register_cache): Call it for each existing regcache.
8779
d05b4ac3
UW
87802008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8781
8782 * server.h (init_registers): Remove prototype.
8783
8784 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8785 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8786 instead of init_registers ().
8787 * linux-arm-low.c (init_registers_arm): Add prototype.
8788 (init_registers_arm_with_iwmmxt): Likewise.
8789 (the_low_target): Add initializer for arch_setup field.
8790 * linux-cris-low.c (init_registers_cris): Add prototype.
8791 (the_low_target): Add initializer for arch_setup field.
8792 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8793 (the_low_target): Add initializer for arch_setup field.
8794 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8795 (the_low_target): Add initializer for arch_setup field.
8796 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8797 (the_low_target): Add initializer for arch_setup field.
8798 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8799 (the_low_target): Add initializer for arch_setup field.
8800 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8801 (the_low_target): Add initializer for arch_setup field.
8802 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8803 (init_registers_mips64_linux): Likewise.
8804 (the_low_target): Add initializer for arch_setup field.
8805 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8806 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8807 (the_low_target): Add initializer for arch_setup field.
8808 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8809 (init_registers_powerpc_64): Likewise.
8810 (the_low_target): Add initializer for arch_setup field.
8811 * linux-s390-low.c (init_registers_s390): Add prototype.
8812 (init_registers_s390x): Likewise.
8813 (the_low_target): Add initializer for arch_setup field.
8814 * linux-sh-low.c (init_registers_sh): Add prototype.
8815 (the_low_target): Add initializer for arch_setup field.
8816 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8817 (the_low_target): Add initializer for arch_setup field.
8818 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8819 (the_low_target): Add initializer for arch_setup field.
8820
8821 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8822 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8823 instead of init_registers ().
8824 * win32-arm-low.c (init_registers_arm): Add prototype.
8825 (the_low_target): Add initializer for arch_setup field.
8826 * win32-i386-low.c (init_registers_i386): Add prototype.
8827 (the_low_target): Add initializer for arch_setup field.
8828
8829 * spu-low.c (init_registers_spu): Add prototype.
8830 (initialize_low): Call initialie_registers_spu () instead of
8831 initialize_registers ().
8832
fd96d250
PA
88332008-02-19 Pedro Alves <pedro@codesourcery.com>
8834
8835 * server.c (handle_v_requests): When handling the vRun and vAttach
8836 packets, if already debugging a process, don't kill it. Return an
8837 error instead.
8838
d41b6bb4
DJ
88392008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8840
8841 * server.c (handle_query): Correct length check.
8842
5ac588cf
PA
88432008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8844
8845 * win32-low.c (do_initial_child_stuff): Add process handle
8846 parameter. Set current_process_handle and current_process_id from the
8847 parameters. Clear globals.
8848 (win32_create_inferior): Don't set current_process_handle and
8849 current_process_id here. Instead pass them on the call to
8850 do_initial_child_stuff.
8851 (win32_attach): Likewise.
8852 (win32_clear_inferiors): New.
8853 (win32_kill): Don't close the current process handle or the
8854 current thread handle here. Instead call win32_clear_inferiors.
8855 (win32_detach): Don't open a new handle to the process. Call
8856 win32_clear_inferiors.
8857 (win32_join): Don't rely on current_process_handle; open a new
8858 handle using the process id.
8859 (win32_wait): Call win32_clear_inferiors when the inferior process
8860 has exited.
8861
ecd7ecbc
DJ
88622008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8863
8864 * server.c (monitor_show_help): Add "exit".
8865
1525d545
MG
88662008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8867
ecd7ecbc 8868 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
8869 (clean): Add reg-xtensa.c.
8870 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
8871 * configure.srv (xtensa*-*-linux*) New target.
8872 * linux-xtensa-low.c: New.
8873 * xtensa-xtregs.c: New.
1525d545 8874
59a016f0
PA
88752008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8876
8877 * hostio.c: Don't include errno.h.
8878 (errno_to_fileio_errno): Move to hostio-errno.
8879 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8880 error number outputting to the target->hostio_last_error callback.
8881 (hostio_packet_error): Use FILEIO_EINVAL directly.
8882 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8883 calls to hostio_error.
8884 * hostio-errno.c: New.
8885 * server.h (hostio_last_error_from_errno): Declare.
8886 * target.h (target_ops): Add hostio_last_error member.
8887 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8888 as hostio_last_error handler.
889bf7c5 8889 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
8890 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8891 (wince_hostio_last_error): New functions.
8892 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8893 as hostio_last_error handler.
8894 (win32_target_ops) [!_WIN32_WCE]: Register
8895 hostio_last_error_from_errno as hostio_last_error handler.
8896 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8897 (hostio-errno.o): New rule.
8898 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8899 * configure.srv (srv_hostio_err_objs): New variable. Default to
8900 hostio-errno.o.
8901 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8902 * configure: Regenerate.
8903
2d717e4f
DJ
89042008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8905
8906 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8907 (linux_kill, linux_detach): Clean up the process list.
8908 * remote-utils.c (remote_open): Improve port number parsing.
8909 (putpkt_binary, input_interrupt): Only send interrupts if the target
8910 is running.
8911 * server.c (extended_protocol): Make static.
8912 (attached): Define earlier.
8913 (exit_requested, response_needed, program_argv): New variables.
8914 (target_running): New.
8915 (start_inferior): Clear attached here.
8916 (attach_inferior): Set attached here.
8917 (require_running): Define.
8918 (handle_query): Use require_running and target_running. Implement
8919 "monitor exit".
8920 (handle_v_attach, handle_v_run): New.
8921 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8922 (gdbserver_usage): Update.
8923 (main): Redo argument parsing. Handle --debug and --multi. Handle
8924 --attach along with other options or after the port. Save
8925 program_argv. Support no initial program. Resynchronize
8926 communication with GDB after an error. Handle "monitor exit".
8927 Use require_running and target_running. Always allow the extended
8928 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8929 restart in extended mode.
8930 * README: Refer to the GDB manual. Update --attach usage.
8931
7407e2de
AS
89322007-12-20 Andreas Schwab <schwab@suse.de>
8933
8934 * linux-low.c (STACK_SIZE): Define.
8935 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8936 (linux_test_for_tracefork): Likewise.
8937
b65d95c5
DJ
89382007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8939
8940 * linux-low.c (linux_wait_for_event): Update messages. Do not
8941 reinsert auto-delete breakpoints.
8942 * mem-break.c (struct breakpoint): Change return type of handler to
8943 int.
8944 (set_breakpoint_at): Update handler type.
8945 (reinsert_breakpoint_handler): Return 1 instead of calling
8946 delete_breakpoint.
8947 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8948 setting a new one.
8949 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8950 * mem-break.h (set_breakpoint_at): Update handler type.
8951 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8952 * win32-low.c (auto_delete_breakpoint): New.
8953 (get_child_debug_event): Use it.
8954
4e799345
DJ
89552007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8956
8957 * configure.ac: Check for pread and pwrite.
8958 * hostio.c (handle_pread): Fall back to lseek and read.
8959 (handle_pwrite): Fall back to lseek and write.
8960 * config.in, configure: Regenerated.
8961
27524b67
DJ
89622007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8963
8964 * server.c (myresume): Add own_buf argument.
8965 (main): Update calls.
8966
a20d5e98
DJ
89672007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8968
8969 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8970 * remote-utils.c (remote_open): Do not call disable_async_io.
8971 (block_async_io): Delete.
8972 (unblock_async_io): Make static.
8973 (initialize_async_io): New.
8974 * server.c (handle_v_cont): Handle async I/O here.
8975 (myresume): Likewise. Move other common resume tasks here...
8976 (main): ... from here. Call initialize_async_io. Disable async
8977 I/O before the main loop.
8978 * server.h (initialize_async_io): Declare.
8979 (block_async_io, unblock_async_io): Delete prototypes.
8980 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8981
b79d787e
DJ
89822007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8983
8984 * remote-utils.c (readchar): Allow binary data in received messages.
8985
d97903b2
PA
89862007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8987
8988 * win32-low.c (attaching): New global.
8989 (win32_create_inferior): Clear the `attaching' global.
8990 (win32_attach): Set the `attaching' global.
8991 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8992 attaching. Only set a breakpoint at the entry point if not
8993 attaching.
8994
311de423
PA
89952007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8996
8997 * server.c (main): Don't report dll events on the initial
8998 connection on attaches.
8999
6c2d16d2
PA
90002007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9001
9002 * server.c (main): Relax numerical bases supported for the pid of
9003 the --attach command line argument.
9004
5ca906e6
PA
90052007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9006
9007 * win32-low.c (win32_attach): Call OpenProcess before
9008 DebugActiveProcess, not after. Add last error output to error
9009 call.
9010
9c6c8194
PA
90112007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9012
9013 * win32-low.c (win32_get_thread_context)
9014 (win32_set_thread_context): New functions.
9015 (thread_rec): Use win32_get_thread_context.
9016 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9017 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9018 field.
9019
4d5d1aaa
PA
90202007-12-03 Leo Zayas
9021 Pedro Alves <pedro_alves@portugalmail.pt>
9022
9023 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9024 global variables.
9025 (child_add_thread): Minor cleanup.
9026 (child_continue): Resume artificially suspended threads before
9027 calling ContinueDebugEvent.
9028 (suspend_one_thread): New.
9029 (fake_breakpoint_event): New.
9030 (get_child_debug_event): Change return type to int. Check here if
9031 gdb sent an interrupt request. If a soft interrupt was requested,
9032 fake a breakpoint event. Return 0 if there is no event to handle,
9033 and 1 otherwise.
9034 (win32_wait): Don't check here if gdb sent an interrupt request.
9035 Ensure there is a valid event to handle.
9036 (win32_request_interrupt): Add soft interruption method as last
9037 resort.
9038
c436e841
PA
90392007-12-03 Leo Zayas
9040 Pedro Alves <pedro_alves@portugalmail.pt>
9041
9042 * win32-low.h (win32_thread_info): Add descriptions to the
9043 structure members. Replace `suspend_count' counter by a
9044 `suspended' flag.
9045 * win32-low.c (thread_rec): Update condition of when to get the
9046 context from the inferior. Rely on ContextFlags being set if it
9047 has already been retrieved. Only suspend the inferior thread if
9048 we haven't already. Warn if that fails.
9049 (continue_one_thread): s/suspend_count/suspended/. Only call
9050 ResumeThread once. Warn if that fails.
9051
e7b5fa67
PA
90522007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9053
9054 * win32-low.c (win32_wait): Don't read from the inferior when it
9055 has already exited.
9056
a385171d
PA
90572007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9058
9059 * Makefile.in (win32_low_h): New variable.
9060 (win32-low.o): Add dependency on $(win32_low_h).
9061 (win32-arm-low.o, win32-i386-low.o): New rules.
9062
f80c84b3
DJ
90632007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9064
9065 * hostio.c: Correct copyright year.
9066
a6b151f1
DJ
90672007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9068
9069 * Makefile.in (OBS): Add hostio.o.
9070 (hostio.o): New rule.
9071 * server.h (handle_vFile): Declare.
9072 * hostio.c: New file.
9073 * server.c (handle_v_requests): Take packet_len and new_packet_len
9074 for binary packets. Call handle_vFile.
9075 (main): Update call to handle_v_requests.
9076
f9387fc3
DJ
90772007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9078
9079 * linux-low.c: Include <sched.h>.
9080
51c2684e
DJ
90812007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9082
9083 * linux-low.c (linux_tracefork_grandchild): New.
9084 (linux_tracefork_child): Use clone.
9085 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9086
75f83163
JB
90872007-10-31 Joel Brobecker <brobecker@adacore.com>
9088
9089 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9090
da5898ce
DJ
90912007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9092
9093 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9094
24a09b5f
DJ
90952007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9096
9097 * inferiors.c (change_inferior_id): Delete.
9098 (add_pid_to_list, pull_pid_from_list): New.
9099 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9100 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9101 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9102 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9103 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9104 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9105 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9106 (using_threads): Always set to 1.
9107 (handle_extended_wait): New.
9108 (add_process): Do not set TID.
9109 (linux_create_inferior): Set must_set_ptrace_flags.
9110 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9111 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9112 (linux_thread_alive): Rename TID argument to LWPID.
9113 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9114 (linux_wait_for_event): Do not use TID or check using_threads. Update
9115 call to dead_thread_notify. Call handle_extended_wait.
9116 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9117 (send_sigstop): Delete sigstop_sent.
9118 (wait_for_sigstop): Avoid TID.
9119 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9120 (linux_test_for_tracefork): New.
9121 (linux_lookup_signals): Use thread_db_active and
9122 linux_supports_tracefork_flag.
9123 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9124 * linux-low.h (get_process_thread): Avoid TID.
9125 (struct process_ifo): Move thread_known and tid to the end. Remove
9126 sigstop_sent.
9127 (linux_attach_lwp, thread_db_init): Update prototypes.
9128 * server.h (change_inferior_id): Delete prototype.
9129 (add_pid_to_list, pull_pid_from_list): New prototypes.
9130 * thread-db.c (thread_db_use_events): New.
9131 (find_first_thread): Rename to...
9132 (find_one_thread): ...this. Update callers and messages. Do not
9133 call fatal. Check thread_db_use_events. Do not call
9134 change_inferior_id or new_thread_notify.
9135 (maybe_attach_thread): Update. Do not call new_thread_notify.
9136 (thread_db_init): Set thread_db_use_events. Check use_events.
9137 * utils.c (fatal, warning): Correct message prefix.
9138
30ed0a8f
DJ
91392007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9140
9141 * Makefile.in (clean): Remove new files.
9142 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9143 (powerpc-64.o, powerpc-64.c): New rules.
9144 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9145 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9146 with SPE.
9147 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9148 SPE targets.
9149 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9150 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9151 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9152 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9153 (target_regsets): Add AltiVec and SPE register sets.
9154 * configure.ac: Check for AltiVec and SPE.
9155 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9156 (ppc_fill_vrregset, ppc_store_vrregset): New.
9157 (target_regsets): Add AltiVec register set.
9158 * configure: Regenerated.
9159
fd462a61
DJ
91602007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9161
9162 * linux-low.c (O_LARGEFILE): Define.
9163 (linux_read_memory): Use /proc/PID/mem.
9164 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9165 * configure, config.in: Regenerated.
9166
69f223ed
DJ
91672007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9168
9169 * linux-low.c (linux_wait_for_event): Do not pass signals while
9170 single-stepping.
9171
aec18585
PA
91722007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9173
9174 * win32-low.c (create_process): New.
9175 (win32_create_inferior): Use create_process instead of
9176 CreateProcess. If create_process failed retry appending an ".exe"
9177 suffix. Store the GetLastError result immediatelly after
9178 create_process calls and use it on the call to error.
9179
34d86ddd
PA
91802007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9181
9182 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9183
5a0e3bd0
JB
91842007-08-23 Joel Brobecker <brobecker@adacore.com>
9185
9186 * configure.ac: Switch license to GPLv3.
9187
f88c79e6
MS
91882007-08-01 Michael Snyder <msnyder@access-company.com>
9189
9190 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9191
6b3d9b83
PA
91922007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9193
9194 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9195 typedef.
9196 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9197 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9198 CloseToolhelp32Snapshot.
9199 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9200 CloseToolhelp32Snapshot.
9201
c588c53c
MS
92022007-07-27 Michael Snyder <michael.snyder@access-company.com>
9203
9204 * server.c (main): Check for inferior exit before main loop.
9205
aa0403d9
PA
92062007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9207
9208 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9209 instead of on tmp_desc.
9210
255e7678
DJ
92112007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9212 Daniel Jacobowitz <dan@codesourcery.com>
9213
9214 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9215 (add_thread): Minor cleanups.
9216 (clear_inferiors): Move lower in the file. Clear the DLL
9217 list.
9218 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9219 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9220 (xml_escape_text): New.
9221 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9222 for qSupported.
9223 (handle_v_cont): Report errors.
9224 (gdbserver_version): Update.
9225 (main): Correct size of own_buf. Do not report initial DLL events.
9226 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9227 (unloaded_dll, xml_escape_text): New.
9228 * win32-low.c (enum target_waitkind): Update comments.
9229 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9230 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9231 (win32_EnumProcessModules, win32_GetModuleInformation)
9232 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9233 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9234 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9235 (win32_Module32First, win32_Module32Next, load_toolhelp)
9236 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9237 (get_child_debug_event): Handle DLL events.
9238 (win32_wait): Likewise.
9239
0d37add9
DJ
92402007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9241
9242 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9243 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9244
45e2715e
PA
92452007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9246
9247 * win32-low.c (handle_output_debug_string): Ignore event if not
9248 waiting.
9249
c5674cf1
PA
92502007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9251
9252 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9253
2bbe3cc1
DJ
92542007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9255
9256 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9257
ae13219e
DJ
92582007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9259
9260 * inferiors.c (change_inferior_id): Add comment.
9261 * linux-low.c (check_removed_breakpoint): Add an early
9262 prototype. Improve debug output.
9263 (linux_attach): Doc update.
9264 (linux_detach_one_process, linux_detach): Clean up before releasing
9265 each process.
9266 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9267 * linux-low.h (struct process_info): Doc improvement.
9268 * mem-break.c (delete_all_breakpoints): New.
9269 * mem-break.h (delete_all_breakpoints): New prototype.
9270 * thread-db.c (find_first_thread): New.
9271 (thread_db_create_event): Call it instead of
9272 thread_db_find_new_threads. Clean up unused variables.
9273 (maybe_attach_thread): Remove first thread handling.
9274 (thread_db_find_new_threads): Use find_first_thread.
9275 (thread_db_get_tls_address): Likewise.
9276
4105de34
DJ
92772007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9278
9279 * thread-db.c (thread_db_find_new_threads): Add prototype.
9280 (thread_db_create_event): Check for the main thread before adding
9281 a new thread.
9282 (maybe_attach_thread): Only enable event reporting if TID == 0.
9283 (thread_db_get_tls_address): Check for new threads.
9284
2b876972
DJ
92852007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9286
9287 * linux-low.c (linux_create_inferior): Try execv before execvp.
9288 * spu-low.c (spu_create_inferior): Likewise.
9289
7a245884
DJ
92902007-06-13 Mike Frysinger <vapier@gentoo.org>
9291
9292 * linux-low.c (linux_create_inferior): Change execv to execvp.
9293 * spu-low.c (spu_create_inferior): Likewies.
9294
117ce543
DJ
92952007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9296
9297 * Makefile.in (clean): Clean new files instead of deleted ones.
9298 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9299 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9300 rules.
9301 * configure.srv: Specify XML files and new regformats for MIPS and
9302 MIPS64 GNU/Linux.
9303 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9304 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9305 an entry for the restart register.
9306 (mips_cannot_fetch_register, mips_cannot_store_register)
9307 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9308 register names to match the XML descriptions.
9309 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9310 restart register instead of $0.
9311
0e7f50da
UW
93122007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9313 Markus Deuling <deuling@de.ibm.com>
9314
9315 * remote-utils.c (decode_xfer_write): New function.
9316 * server.h (decode_xfer_write): Add prototype.
9317 * server.c (handle_query): Add PACKET_LEN argument. Support
9318 qXfer:spu:read and qXfer:spu:write packets.
9319 (main): Pass packet_len to handle_query.
9320 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9321 * target.h (target_ops): Add qxfer_spu.
9322
374c1d38
UW
93232007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9324
9325 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9326 accessing non-seekable spufs files.
9327
bb63802a
UW
93282007-05-16 Markus Deuling <deuling@de.ibm.com>
9329
889bf7c5 9330 * server.c (handle_query): Add reply for qC packet.
bb63802a 9331
7390519e
PA
93322007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9333 Leo Zayas <lerele@champenstudios@com>
9334
9335 * server.h (check_remote_input_interrupt_request): New function.
9336 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9337 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9338 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9339 (check_remote_input_interrupt_request): New function.
9340 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9341 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9342 winapi_GenerateConsoleCtrlEvent): New typedefs.
9343 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9344 to 250 ms.
9345 (win32_wait): Check for remote interrupt request
9346 with check_remote_input_interrupt_request.
9347 (win32_request_interrupt): New function.
9348 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9349
34b34921
PA
93502007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9351
9352 * win32-low.c (debug_registers_changed,
9353 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9354 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9355 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9356 (thread_rec): Get context using the low target.
9357 (child_add_thread): Call thread_added on the low target,
9358 which does the same thing.
9359 (regptr): Delete.
9360 (do_initial_child_stuff): Remove debug registers references.
9361 Set context using the low target. Resume threads after
9362 setting the contexts.
9363 (child_continue): Remove dead variable. Remove debug
9364 registers references.
9365 (child_fetch_inferior_registers): Go through the low target.
9366 (do_child_store_inferior_registers): Remove.
9367 (child_store_inferior_registers): Go through the low target.
9368 (win32_resume): Remove debug registers references.
9369 Set context using the low target.
9370 (handle_exception): Change return type to void. Don't record
9371 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9372 first chance exception.
889bf7c5 9373 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9374 goto loop. Always return after waiting for debug event.
9375 (win32_wait): Convert to switch statement. Handle spurious
9376 events.
9377
9378 * win32-i386-low.c (debug_registers_changed,
9379 debug_registers_used): New.
9380 (initial_stuff): Rename to ...
9381 (i386_initial_stuff): ... this. Clear debug registers
9382 state variables.
9383 (store_debug_registers): Delete.
9384 (i386_get_thread_context): New.
9385 (load_debug_registers): Delete.
9386 (i386_set_thread_context): New.
9387 (i386_thread_added): New.
9388 (single_step): Rename to ...
9389 (i386_single_step): ... this.
9390 (do_fetch_inferior_registers): Rename to ...
9391 (i386_fetch_inferior_register): ... this.
9392 (i386_store_inferior_register): New.
9393 (the_low_target): Adapt to new interface.
9394
9395 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9396 (arm_get_thread_context): New.
9397 (arm_set_thread_context): New.
9398 (regptr): New.
9399 (do_fetch_inferior_registers): Rename to ...
9400 (arm_fetch_inferior_register): ... this.
9401 (arm_store_inferior_register): New.
9402 (arm_wince_breakpoint): Reimplement as unsigned long.
9403 (arm_wince_breakpoint_len): Define.
9404 (the_low_target): Adapt to new interface.
9405
9406 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9407 load_debug_registers. Add get_thread_context, set_thread_context,
9408 thread_added and store_inferior_register. Rename
9409 fetch_inferior_registers to fetch_inferior_register.
9410 (regptr): Remove declaration.
9411
dd6953e1
PA
94122007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9413
9414 * linux-low.c (linux_detach): Change return type to int. Return 0.
9415 * spu-low.c (spu_detach): Likewise.
9416
444d6139
PA
94172007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9418
9419 * target.h (target_ops): Change return type of detach to int.
9420 Add join.
9421 (join_inferior): New.
9422 * server.c (main): Don't skip detach support on mingw32.
9423 If the inferior doesn't support detaching return error.
9424 Call join_inferior instead of using waitpid.
9425 * linux-low.c (linux_join): New.
9426 (linux_target_op): Add linux_join.
9427 * spu-low.c (spu_join): New.
9428 (spu_target_ops): Add spu_join.
9429 * win32-low.c (win32_detach): Adapt to new interface.
9430 Reopen current_process_handle before detaching. Issue a child
9431 resume before detaching.
9432 (win32_join): New.
9433 (win32_target_op): Add win32_join.
9434
1d5315fe
PA
94352007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9436
9437 * win32-low.c (win32-attach): Fix return value.
9438 * target.h (target_ops): Describe ATTACH return values.
9439
bf914831
PA
94402007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9441
9442 * win32-low.c (GETPROCADDRESS): Define.
9443 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9444 (winapi_DebugSetProcessKillOnExit): Likewise.
9445 (win32_create_inferior): Force usage of ansi CreateProcessA.
9446 (win32_attach): Use GETPROCADDRESS.
9447 (win32_detach): Likewise.
9448
f72f3e60
PA
94492007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9450
9451 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9452
ed50f18f
PA
94532007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9454
9455 * win32-low.c: Commit leftover changes from 2007-03-29.
9456
0c2ead7e
DJ
94572007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9458
9459 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9460 fields short instead of int. Add explicit padding.
9461 (i387_cache_to_fsave): Remove unnecessary casts.
9462 (i387_fsave_to_cache): Doc fix.
9463 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9464
73725ff3
DJ
94652007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9466
9467 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9468 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9469
d99f33d8
PA
94702007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9471
9472 * configure.srv (arm*-*-mingw32ce*): Move near the other
9473 arm targets.
9474
68070c10
PA
94752007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9476
2482afc6 9477 * configure.ac: Add errno checking.
68070c10
PA
9478 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9479 sys/file.h and malloc.h.
9480 (AC_CHECK_DECLS): Add perror.
9481 (srv_mingwce): Handle.
2482afc6 9482 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
9483 win32-i386-low.o to srv_tgtobj.
9484 (i[34567]86-*-mingw*): Likewise.
9485 (arm*-*-mingw32ce*): Add case.
9486 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9487 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9488 [__MINGW32CE__] (strerror): New function.
9489 [__MINGW32CE__] (errno): Define to GetLastError.
9490 [__MINGW32CE__] (COUNTOF): New macro.
9491 (remote_open): Remove extra close call.
9492 * mem-break.c (delete_breakpoint_at): New function.
9493 * mem-break.h (delete_breakpoint_at): Declare.
9494 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9495 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9496 [USE_WIN32API] (read, write): Add char* casts.
9497 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9498 * server.h: Include wincecompat.h on Windows CE.
9499 [HAVE_ERRNO_H]: Check.
9500 (perror): Declare if not declared.
9501 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9502 (perror_with_name): Remove errno declaration.
9503 * wincecompat.h: New.
9504 * wincecompat.c: New.
9505 * win32-low.h: New.
9506 * win32-arm-low.c: New.
9507 * win32-i386-low.c: New.
9508 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9509 (OUTMSG2): Make it safe.
9510 (_T): New macro.
9511 (COUNTOF): New macro.
9512 (NUM_REGS): Get it from the low target.
9513 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9514 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9515 (thread_rec): Let low target handle debug registers.
9516 (child_add_thread): Likewise.
9517 (child_init_thread_list): Likewise.
9518 (continue_one_thread): Likewise.
9519 (regptr): New.
9520 (do_child_fetch_inferior_registers): Move to ...
9521 * win32-i386-low.c: ... here, and rename to ...
9522 (do_fetch_inferior_registers): ... this.
889bf7c5 9523 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
9524 Go through the low target.
9525 (do_child_store_inferior_registers): Use regptr.
9526 (strwinerror): New function.
9527 (win32_create_inferior): Handle Windows CE.
9528 Use strwinerror instead of strerror on Windows error
9529 codes. Add program to the error output.
9530 Don't close the main thread handle on Windows CE.
9531 (win32_attach): Use coredll.dll on Windows CE.
9532 (win32_kill): Close current process and current
9533 thread handles.
9534 (win32_detach): Use coredll.dll on Windows CE.
9535 (win32_resume): Let low target handle debug registers, and
9536 step request.
9537 (handle_exception): Add/Remove initial breakpoint. Avoid
9538 non-existant WSTOPSIG on Windows CE.
9539 (win32_read_inferior_memory): Cast to remove warning.
9540 (win32_arch_string): Go through the low target.
9541 (initialize_low): Call set_breakpoint_data with the low
9542 target's breakpoint.
9543 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9544 FOP_REGNUM, mappings): Move to ...
9545 * win32-i386-low.c: ... here.
9546 * win32-low.c (win32_thread_info): Move to ...
9547 * win32-low.h: ... here.
9548 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9549 win32-arm-low.c and wincecompat.c.
9550 (all:): Add $EXEEXT.
9551 (install-only:): Likewise.
9552 (gdbserver:): Likewise.
9553 (gdbreplay:): Likewise.
9554 * config.in: Regenerate.
9555 * configure: Regenerate.
9556
41093d81
PA
95572007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9558
9559 * win32-low.c: Rename typedef thread_info to
9560 win32_thread_info throughout.
9561
544afa54
PA
95622007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9563
9564 * win32-i386-low.c: Rename to ...
9565 * win32-low.c: ... this.
9566 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9567 * Makefile.in: Likewise.
9568
bce7165d
PA
95692007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9570
9571 * remote-utils.c (monitor_output): Constify msg parameter.
9572 * server.h (monitor_output): Likewise.
9573 * win32-i386-low.c (handle_output_debug_string): New.
9574 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9575 handle_output_debug_string.
9576 (get_child_debug_event): Likewise.
9577
506c7aa0
DJ
95782007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9579
9580 * server.c (main): Correct strtoul check.
9581
42c81e2a
DJ
95822007-03-27 Jon Ringle <jon@ringle.org>
9583
9584 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9585
9453113a
DJ
95862007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9587
9588 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9589
64a69107
DJ
95902007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9591
9592 * terminal.h: Check HAVE_SGTTY_H.
9593
95942007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
9595
9596 * remote-utils.c (remote_open): Print out the assigned port number.
9597
c74d0ad8
DJ
95982007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9599
9600 * remote-utils.c (monitor_output): New function.
9601 * server.c (debug_threads): Define here.
9602 (monitor_show_help): New function.
9603 (handle_query): Handle qRcmd.
9604 (main): Do not handle 'd' packet.
9605 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9606 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9607 of debug_threads.
9608
de7c3b4a
PA
96092007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9610
9611 * Makefile.in (EXEEXT): New.
9612 (clean): Use $(EXEEXT).
9613
ef57601b
PA
96142007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9615
9616 * target.h (target_ops): Rename send_signal to request_interrupt,
9617 and remove enum target_signal parameter.
9618 * linux-low.c (linux_request_interrupt): Rename from
9619 linux_send_signal, and always send SIGINT.
9620 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9621 and always send SIGINT.
9622 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9623 of send_signal.
9624 (input_interrupt): Likewise.
9625
820f2bda
PA
96262007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9627
9628 * server.c (get_features_xml): Check if target implemented
9629 arch_string.
9630 * win32-i386-low.c (win32_arch_string): New.
9631 (win32_target_ops): Add win32_arch_string as arch_string member.
9632
ab39bf24
UW
96332007-02-22 Markus Deuling <deuling@de.ibm.com>
9634
9635 * spu-low.c (spu_arch_string): New.
9636 (spu_target_ops): Add spu_arch_string.
9637
61ff6e04
DJ
96382007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9639
9640 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9641 * configure.ac: Do not check for terminal.h.
9642 * configure, config.in: Regenerated.
9643
fb1e4ffc
DJ
96442007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9645
9646 * Makefile.in (OBS): Add $(XML_BUILTIN).
9647 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9648 (clean): Update.
9649 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9650 (arm-with-iwmmxt.c): New.
9651 * config.in, configure: Regenerate.
9652 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9653 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9654 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9655 (arm*-*-linux*): Add iWMMXt and regset support.
9656 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9657 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9658 (arm_store_wmmxregset, target_regsets): New.
9659 * server.c (get_features_xml): Take annex argument. Check builtin
9660 XML documents.
9661 (handle_query): Handle multiple annexes.
9662
0f48aa01
DJ
96632007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9664
9665 * remote-utils.c [USE_WIN32API] (read, write): Define.
9666 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9667 write.
9668
23181151
DJ
96692007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9670
9671 * linux-i386-low.c (the_low_target): Set arch_string.
9672 * linux-x86-64-low.c (the_low_target): Likewise.
9673 * linux-low.c (linux_arch_string): New.
9674 (linux_target_ops): Add it.
9675 * linux-low.h (struct linux_target_ops): Add arch_string.
9676 * server.c (write_qxfer_response): Use const void * for DATA.
9677 (get_features_xml): New.
9678 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9679 * target.h (struct target_ops): Add arch_string method.
9680
9d606399
DJ
96812007-01-03 Denis Pilat <denis.pilat@st.com>
9682 Daniel Jacobowitz <dan@codesourcery.com>
9683
9684 * linux-low.c (linux_kill): Handle being called with no threads.
9685 * win32-i386-low.c (win32_kill): Likewise.
9686 (get_child_debug_event): Clear current_process_handle.
9687
96882006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
9689 Daniel Jacobowitz <dan@codesourcery.com>
9690
9691 * remote-utils.c (remote_open): Check the type of specified
9692 serial port devices before opening them.
9693 * server.c (main): Kill the inferior if an error occurs during
9694 the first remote_open.
9695
a5e13d24
DJ
96962006-12-05 Markus Deuling <deuling@de.ibm.com>
9697
9698 * README: Update supported targets.
9699
186947f7
DJ
97002006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9701
9702 * Makefile.in (clean): Remove reg-mips64.c.
9703 (reg-mips64.c, reg-mips64.o): New rules.
9704 * configure.srv: Handle mips64. Include regset support for mips.
9705 * linux-mips-low.c (union mips_register): New.
9706 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9707 (mips_breakpoint, mips_breakpoint_at): Use int.
9708 (mips_collect_register, mips_supply_register)
9709 (mips_collect_register_32bit, mips_supply_register_32bit)
9710 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9711 (mips_store_fpregset, target_regsets): New.
9712 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9713
a13e2c95
UW
97142006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9715
9716 * configure.srv: Add target "spu*-*-*".
9717 * Makefile.in (clean): Remove reg-spu.c.
9718 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9719 * spu-low.c: New file.
9720
cb7283db
DJ
97212006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9722
9723 * configure.ac: Correct td_thr_tls_get_addr test.
9724 * configure: Regenerated.
9725
89be2091
DJ
97262006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9727
9728 * linux-low.c (linux_wait_for_event): Reformat. Use the
9729 pass_signals array.
9730 * remote-utils.c (decode_address_to_semicolon): New.
9731 * server.c (pass_signals, handle_general_set): New.
9732 (handle_query): Mention QPassSignals for qSupported.
9733 (main): Call handle_general_set.
9734 * server.h (pass_signals, decode_address_to_semicolon): New.
9735
000ef4f0
DJ
97362006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9737
9738 * server.c (handle_query): Correct error handling for read_auxv.
9739
b7149293
UW
97402005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9741
9742 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9743 and srv_linux_thread_db to yes.
9744 * linux-s390-low.c (s390_fill_gregset): New function.
9745 (target_regsets): Define data structure.
9746
dae5f5cf
DJ
97472006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9748
9749 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9750 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9751 * config.in, configure: Regenerated.
9752 * inferiors.c (gdb_id_to_thread): New function.
9753 (gdb_id_to_thread_id): Use it.
9754 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9755 * linux-low.h (struct process_info): Add th member.
9756 (thread_db_get_tls_address): New prototype.
9757 * remote-utils.c (decode_address): Make non-static.
9758 * server.c (handle_query): Handle qGetTLSAddr.
9759 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9760 * target.h (struct target_ops): Add get_tls_address.
9761 * thread-db.c (maybe_attach_thread): Save the thread handle.
9762 (thread_db_get_tls_address): New.
9763
32ca6d61
DJ
97642006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9765
9766 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9767 (linux_resume_one_process): Take a siginfo_t *. Update all
9768 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9769 (struct pending_signals): Add a siginfo_t.
9770 (linux_wait_for_process): Always set last_status.
9771 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9772 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9773 * linux-low.h (struct process_info): Add last_status.
9774
5ffff7c1
DJ
97752006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9776
9777 * remote-utils.c (try_rle): New function.
9778 (putpkt_binary): Use it.
9779
8695c747
DJ
97802006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9781
9782 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9783 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9784 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9785 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9786 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9787 point registers.
9788
290fadea
RS
97892006-08-08 Richard Sandiford <richard@codesourcery.com>
9790
9791 * server.c (terminal_fd): New variable.
9792 (old_foreground_pgrp): Likewise.
9793 (restore_old_foreground_pgrp): New function.
9794 (start_inferior): Record the terminal file descriptor in terminal_fd
9795 and its original foreground group in old_foreground_pgrp. Register
9796 restore_old_foreground_pgrp with atexit().
9797
9f2e1e63
DJ
97982006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9799
9800 * server.c (handle_query): Correct qPart to qXfer.
9801
b80864fb
DJ
98022006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9803
9804 * configure.ac: Check for more headers which are missing on
9805 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9806 * configure.srv: Add Cygwin and mingw32.
9807 * remote-utils.c: Don't include headers unconditionally which
9808 are missing on mingw32. Include <winsock.h> for mingw32.
9809 (remote_open): Adjust for mingw32 support. Flush
9810 standard error after writing to it.
9811 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9812 (unblock_async_io, enable_async_io, disable_async_io)
9813 (readchar, getpkt): Update for Winsock support.
9814 (prepare_resume_reply): Expect a protocol signal number.
9815 * server.c: Disable <sys/wait.h> on mingw32.
9816 (start_inferior): Adjust for mingw32 support. Flush
9817 standard error after writing to it.
9818 (attach_inferior): Likewise. Use protocol signal
9819 numbers.
9820 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9821 and names.
9822 * win32-i386-low.c: New file.
9823 * Makefile.in (XM_CLIBS): Set.
9824 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9825 (win32-i386-low.o): New dependency rule.
9826 * linux-low.c (linux_wait): Use target signal numbers.
9827 * target.h (struct target_ops): Doc fix.
9828 * server.h (target_signal_to_name): New prototype.
9829 * gdbreplay.c: Don't include headers unconditionally which
9830 are missing on mingw32. Include <winsock.h> for mingw32.
9831 (remote_close, remote_open): Adjust for Winsock support.
9832 * configure, config.in: Regenerated.
9833
0876f84a
DJ
98342006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9835
9836 * server.c (decode_xfer_read, write_qxfer_response): New.
9837 (handle_query): Take a packet length argument. Handle
9838 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9839 the qSupported response.
9840 (main): Update call to handle_query.
9841
01f9e8fa
DJ
98422006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9843
9844 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9845 (putpkt_binary): Renamed from putpkt and adjusted for binary
9846 data.
9847 (putpkt): New wrapper for putpkt_binary.
9848 (readchar): Don't mask off the high bit.
9849 (decode_X_packet): New function.
9850 * server.c (main): Call putpkt_binary if a handler sets the packet
9851 length. Save the length of the incoming packet. Handle 'X'.
9852 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9853
be2a5f71
DJ
98542006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9855
9856 * server.c (handle_query): Handle qSupported.
9857
ea025f5f
DJ
98582006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9859
9860 * remote-utils.c (all_symbols_looked_up): New variable.
9861 (look_up_one_symbol): Check it.
9862 * server.h (look_up_one_symbol): New declaration.
9863 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9864
9308fc88
DJ
98652006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9866
9867 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 9868 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
9869 (PTRACE_GET_THREAD_AREA): Define.
9870 (ps_get_thread_area): New function.
9871
52fb6437
NS
98722006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9873
9874 * configure.srv (m68k*-*-uclinux*): New target.
9875 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9876 (linux_resume_one_process): Remove extraneous cast.
9877 (linux_read_offsets): New.
9878 (linux_target_op): Add linux_read_offsets on mmuless systems.
9879 * server.c (handle_query): Add qOffsets logic.
9880 * target.h (struct target_ops): Add read_offsets.
9881
21b0f40c
DJ
98822006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9883
9884 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9885 (PTRACE_GET_THREAD_AREA): Define.
9886 (ps_get_thread_area): New function.
9887 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9888 (linux-x86-64-low.o): Update.
9889
0050a760
DJ
98902006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9891
9892 * configure.ac: Remove checks for prfpregset_t.
9893 * gdb_proc_service.h: New file.
9894 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9895 new "gdb_proc_service.h".
9896 * proc-service.c: Likewise.
9897 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9898 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9899 * Makefile.in (gdb_proc_service_h): Updated.
9900 * configure, config.in: Regenerated.
9901
b92a518e
DJ
99022006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9903
9904 * remote-utils.c (prepare_resume_reply): Move declaration
9905 of gdb_id_from_wait to the top of the block.
9906
545587ee
DJ
99072006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9908
9909 * linux-low.c (regsets_store_inferior_registers): Read the regset
9910 from the target before filling it.
9911
9db87ebd
DJ
99122006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9913
9914 * server.c (attach_inferior): Return SIGTRAP for a successful
9915 attach.
9916
dd24457d
DJ
99172006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9918
9919 * Makefile.in (OBS): Add version.o.
9920 (STAGESTUFF): Delete.
9921 (version.o): Add dependencies.
9922 (version.c): Replace rule.
9923 (clean): Remove version.c.
9924 * server.c (gdbserver_version): New.
9925 (gdbserver_usage): Use printf.
9926 (main): Handle --version and --help.
9927 * server.h (version, host_name): Add declarations.
9928
6f0f660e
EZ
99292005-12-23 Eli Zaretskii <eliz@gnu.org>
9930
889bf7c5
PA
9931 * linux-arm-low.c:
9932 * linux-arm-low.c:
9933 * inferiors.c:
9934 * i387-fp.h:
9935 * i387-fp.c:
9936 * gdbreplay.c:
9937 * regcache.c:
9938 * proc-service.c:
9939 * mem-break.h:
9940 * mem-break.c:
9941 * linux-x86-64-low.c:
9942 * linux-sh-low.c:
9943 * linux-s390-low.c:
9944 * linux-ppc64-low.c:
9945 * linux-ppc-low.c:
9946 * linux-mips-low.c:
9947 * linux-m68k-low.c:
9948 * linux-m32r-low.c:
9949 * linux-low.h:
9950 * linux-low.c:
9951 * linux-ia64-low.c:
9952 * linux-i386-low.c:
9953 * linux-crisv32-low.c:
9954 * thread-db.c:
9955 * terminal.h:
9956 * target.h:
9957 * target.c:
9958 * server.h:
9959 * server.c:
9960 * remote-utils.c:
9961 * regcache.h:
9962 * utils.c:
9963 * Makefile.in:
9964 * configure.ac:
6f0f660e
EZ
9965 * gdbserver.1: Add (C) after Copyright. Update the FSF
9966 address.
9967
9d1fb177
DJ
99682005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9969
9970 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9971 (arm_breakpoint_at): Recognize both breakpoints.
9972 (the_low_target): Use the correct breakpoint instruction.
9973
011a70c2
DJ
99742005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9975
9976 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9977 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9978 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9979 (the_low_target): Update.
9980
7fb85e41
AS
99812005-10-25 Andreas Schwab <schwab@suse.de>
9982
9983 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9984
9985 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9986 (ia64_num_regs): Reduce to 462.
9987
3db0444b
DJ
99882005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9989
9990 * acinclude.m4: Correct quoting.
9991 * aclocal.m4: Regenerated.
9992
9993 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9994 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9995 (thread_db_init): Call thread_db_err_str.
9996 * configure.ac: Check for TD_VERSION.
9997 * config.in, configure: Regenerated.
9998
bee0189a
DJ
99992005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10000
10001 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10002
e9d25b98
DJ
100032005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10004
10005 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10006 is not available. Define HAVE_PTRACE_GETREGS if it is.
10007 * config.in, configure: Regenerated.
10008 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10009 * linux-i386-low.c, linux-m68k-low.c: Update to use
10010 HAVE_PTRACE_GETREGS.
10011 * linux-low.c (regsets_fetch_inferior_registers)
10012 (regsets_store_inferior_registers): Only return 0 if we processed
10013 GENERAL_REGS.
10014 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10015 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10016
a06660f7
DJ
100172005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10018
10019 * inferiors.c (struct thread_info): Add gdb_id.
10020 (add_thread): Add gdb_id argument.
10021 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10022 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10023 calls to add_thread.
10024 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10025 * server.c (handle_query): Use thread_to_gdb_id.
10026 (handle_v_cont, main): Use gdb_id_to_thread_id.
10027 * server.h (add_thread): Update prototype.
10028 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10029 prototypes.
10030
5a1f5858
DJ
100312005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10032
10033 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10034 left-padded registers.
10035 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10036 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10037
e122f1f5
SE
100382005-07-01 Steve Ellcey <sje@cup.hp.com>
10039
10040 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10041 * configure: Regenerate.
10042 * config.in: Regenerate.
10043 * server.h (NEED_DECLARATION_STRERROR):
10044 Replace with !HAVE_DECL_STRERROR.
10045
d592fa2f
DJ
100462005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10047
10048 * linux-low.c (linux_wait, linux_send_signal): Don't test
10049 an unsigned long variable for > 0 if it could be MAX_ULONG.
10050 * server.c (myresume): Likewise.
10051 * target.c (set_desired_inferior): Likewise.
10052
ccbd4912
MK
100532005-06-13 Mark Kettenis <kettenis@gnu.org>
10054
10055 * configure.ac: Simplify and improve check for socklen_t.
10056 * configure, config.in: Regenerate.
10057
f450004a
DJ
100582005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10059
10060 * acconfig.h: Remove.
10061 * configure.ac: Add a test for socklen_t. Use three-argument
10062 AC_DEFINE throughout.
10063 * config.in: Regenerated using autoheader 2.59.
10064 * configure: Regenerated.
10065
10066 * gdbreplay.c (socklen_t): Provide a default.
10067 (remote_open): Use socklen_t.
10068 * remote-utils.c (socklen_t): Provide a default.
10069 (remote_open): Use socklen_t.
10070 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10071 unsigned char.
10072
10073 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10074 char for buffers.
10075 * linux-low.c (linux_read_memory, linux_write_memory)
10076 (linux_read_auxv): Likewise.
10077 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10078 (check_mem_write): Likewise.
10079 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10080 Likewise.
10081 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10082 (registers_from_string, register_data): Likewise.
10083 * server.c (handle_query, main): Likewise.
10084 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10085 (decode_M_packet): Likewise.
10086 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10087 * target.h (struct target_ops): Update read_memory, write_memory,
10088 and read_auxv.
10089 (read_inferior_memory, write_inferior_memory): Update.
10090 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10091 to unsigned char *.
10092 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10093 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10094 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10095 linux-s390-low.c, linux-sh-low.c: Update for changes in
10096 read_inferior_memory and the_low_target->breakpoint.
10097
eee84df1
DJ
100982005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10099
10100 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10101 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10102 * configure.srv: Add powerpc64-*-linux*.
10103 * linux-ppc64-low.c: New file.
10104
45b134e5
OF
101052005-05-23 Orjan Friberg <orjanf@axis.com>
10106
10107 * linux-cris-low.c: New file with support for CRIS.
10108 * linux-crisv32-low.c: Ditto for CRISv32.
10109 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10110 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10111 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10112 reg-crisv32.o, and reg-crisv32.c to make rules.
10113 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10114 recognized targets.
10115
48d93c75
UW
101162005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10117
10118 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10119 of sizeof (PTRACE_XFER_TYPE).
10120 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10121
e013ee27
OF
101222005-05-12 Orjan Friberg <orjanf@axis.com>
10123
889bf7c5 10124 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10125 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10126 pointers for hardware watchpoint support.
10127 * linux-low.h (struct linux_target_ops): Ditto.
10128 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10129 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10130 to linux_target_ops.
10131 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10132 reply packet.
10133 * server.c (main): Recognize 'Z' and 'z' packets.
10134
b0ded00b
UW
101352005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10136
10137 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10138 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10139 (the_low_target): Add new members.
10140
8643e2ad
DJ
101412005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10142
10143 * proc-service.c (ps_lgetregs): Search all_processes instead of
10144 all_threads.
10145
fc620387
DJ
101462005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10147
10148 * server.c (start_inferior): Change return type to int.
10149 (attach_inferior): Change sigptr to int *.
10150 (handle_v_cont, handle_v_requests): Change signal to int *.
10151 (main): Change signal to int.
10152
101532005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10154
10155 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10156 * configure.srv: Add m32r*-*-linux*.
10157 * linux-m32r-low.c: New file.
10158
e0e76420
DJ
101592005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10160
10161 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10162
a1928bad
DJ
101632005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10164
10165 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10166 Take unsigned long arguments for PIDs.
10167 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10168 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10169 (wait_for_sigstop, linux_resume_one_process)
10170 (regsets_fetch_inferior_registers, linux_send_signal)
10171 (linux_read_auxv): Likewise. Update the types of variables holding
10172 PIDs. Update format string specifiers.
10173 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10174 * remote-utils.c (prepare_resume_reply): Likewise.
10175 * server.c (cont_thread, general_thread, step_thread)
10176 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10177 unsigned long.
10178 (handle_query): Update format specifiers.
10179 (handle_v_cont, main): Use strtoul for thread IDs.
10180 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10181 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10182 (general_thread, step_thread, thread_from_wait)
10183 (old_thread_from_wait): Update.
10184 * target.h (struct thread_resume): Use unsigned long for THREAD.
10185 (struct target_ops): Use unsigned long for arguments to attach and
10186 thread_alive.
10187
dcdb98d2
DJ
101882005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10189
10190 * acinclude.m4: Include bfd/bfd.m4 directly.
10191 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10192 <agriffis@toolchain.org>.
10193 * aclocal.m4, configure: Regenerated.
10194
bec39cab
AC
101952005-01-07 Andrew Cagney <cagney@gnu.org>
10196
10197 * configure.ac: Rename configure.in, require autoconf 2.59.
10198 * configure: Re-generate.
10199
434c4c77
DJ
102002004-12-08 Daniel Jacobowitz <dan@debian.org>
10201
10202 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10203 LIBS when finished.
10204 * aclocal.m4: Regenerated.
10205 * configure: Regenerated.
10206
db1d3e1b
AS
102072004-11-21 Andreas Schwab <schwab@suse.de>
10208
10209 * linux-m68k-low.c (m68k_num_gregs): Define.
10210 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10211 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10212 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10213 (m68k_breakpoint_at): New. Add to the_low_target.
10214
10215 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10216 srv_linux_thread_db to yes.
10217
43360365
JB
102182004-10-20 Joel Brobecker <brobecker@gnat.com>
10219
10220 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10221 (ARCH_SET_FS): Likewise.
10222 (ARCH_GET_FS): Likewise.
10223 (ARCH_GET_GS): Likewise.
10224
fd500816
DJ
102252004-10-16 Daniel Jacobowitz <dan@debian.org>
10226
10227 * linux-i386-low.c (ps_get_thread_area): New.
10228 * linux-x86-64-low.c (ps_get_thread_area): New.
10229 * linux-low.c: Include <sys/syscall.h>.
10230 (linux_kill_one_process): Don't kill the first thread here.
10231 (linux_kill): Kill the first thread here.
10232 (kill_lwp): New function.
10233 (send_sigstop, linux_send_signal): Use it.
10234 * proc-service.c: Clean up #ifdefs.
10235 (fpregset_info): Delete.
10236 (ps_lgetregs): Update and enable implementation.
10237 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10238 implementations.
10239 * remote-utils.c (struct sym_cache, symbol_cache): New.
10240 (input_interrupt): Print a clearer message.
10241 (async_io_enabled): New variable.
10242 (enable_async_io, disable_async_io): Use it. Update comments.
10243 (look_up_one_symbol): Use the symbol cache.
10244 * thread-db.c (thread_db_look_up_symbols): New function.
10245 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10246
f6de3c42
DJ
102472004-10-16 Daniel Jacobowitz <dan@debian.org>
10248
10249 * configure.in: Test for -rdynamic.
10250 * configure: Regenerated.
10251 * Makefile (INTERNAL_LDFLAGS): New.
10252 (gdbserver, gdbreplay): Use it.
10253
2c0fc042
AC
102542004-09-02 Andrew Cagney <cagney@gnu.org>
10255
10256 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10257
075b3282
DJ
102582004-03-23 Daniel Jacobowitz <drow@mvista.com>
10259
10260 * linux-low.c (linux_wait): Clear all_processes list also.
10261
fa6a77dc
DJ
102622004-03-12 Daniel Jacobowitz <drow@mvista.com>
10263
10264 * linux-low.c: Include <errno.h>. Remove extern declaration of
10265 errno.
10266
6d782a97
DJ
102672004-03-12 Daniel Jacobowitz <drow@mvista.com>
10268
10269 * gdbreplay.c, server.h, utils.c: Update copyright years.
10270
3a7fb99b
DJ
102712004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10272
10273 * server.c (main): Print child status or termination signal from
10274 variable 'signal', not 'sig'.
10275
c3e735a6
DJ
102762004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10277
10278 * linux-low.c (linux_read_memory): Change return type to
10279 int. Check for and return error from ptrace().
10280 * target.c (read_inferior_memory): Change return type to int. Pass
10281 back return status from the_target->read_memory().
10282 * target.h (struct target_ops): Adapt *read_memory() prototype.
10283 Update comment.
10284 (read_inferior_memory): Adapt prototype.
10285 * server.c (main): Return an error packet if
10286 read_inferior_memory() returns an error.
10287
a59d1c82
DJ
102882004-03-04 Daniel Jacobowitz <drow@mvista.com>
10289
10290 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10291 Unify with other clean targets.
10292
dc3f8883
DJ
102932004-02-29 Daniel Jacobowitz <drow@mvista.com>
10294
10295 * server.c (handle_v_cont): Call set_desired_inferior.
10296
89a208da
DJ
102972004-02-29 Daniel Jacobowitz <drow@mvista.com>
10298
10299 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10300
62ea82f5
DJ
103012004-02-29 Daniel Jacobowitz <drow@mvista.com>
10302
10303 * linux-low.c (linux_wait): Unblock async I/O.
10304 (linux_resume): Block and enable async I/O.
10305 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10306 * server.h (block_async_io, unblock_async_io): Add prototypes.
10307
6910d122
DJ
103082004-02-29 Daniel Jacobowitz <drow@mvista.com>
10309
10310 * remote-utils.c (remote_open): Print a status notice after
10311 opening a TCP port.
10312 * server.c (attach_inferior): Print a status notice after
10313 attaching.
10314
103152004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10316
10317 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10318
c89dc5d4
DJ
103192004-02-26 Daniel Jacobowitz <drow@mvista.com>
10320
10321 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10322 error packet.
10323 * server.c, target.h: Update copyright years.
10324
4b8dad4a
RM
103252004-02-25 Roland McGrath <roland@redhat.com>
10326
10327 * target.h (struct target_ops): New member `read_auxv'.
10328 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10329 * linux-low.c (linux_read_auxv): New function.
10330 (linux_target_ops): Initialize `read_auxv' member to that.
10331
d7446758
JB
103322004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10333
10334 Committed by Jim Blandy <jimb@redhat.com>.
10335
10336 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10337 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10338 instead of GPR_SIZE to distiguish s390 and s390x targets.
10339
5544ad89
DJ
103402004-01-31 Daniel Jacobowitz <drow@mvista.com>
10341
10342 * linux-low.c: Update copyright year.
10343 (check_removed_breakpoint): Clear pending_is_breakpoint.
10344 (linux_set_resume_request, linux_queue_one_thread)
10345 (resume_status_pending_p): New functions.
10346 (linux_continue_one_thread): Use process->resume.
10347 (linux_resume): Only resume threads if there are no pending events.
10348 * linux-low.h (struct process_info): Add resume request
10349 pointer.
10350
2a68b70e
DJ
103512004-01-30 Daniel Jacobowitz <drow@mvista.com>
10352
10353 * regcache.c (new_register_cache): Clear the allocated register
10354 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10355
64386c31
DJ
103562003-10-13 Daniel Jacobowitz <drow@mvista.com>
10357
10358 * linux-low.c (linux_resume): Take a struct thread_resume *
10359 argument.
10360 (linux_wait): Update call.
10361 (resume_ptr): New static variable.
10362 (linux_continue_one_thread): Renamed from
10363 linux_continue_one_process. Use resume_ptr.
10364 (linux_resume): Use linux_continue_one_thread.
10365 * server.c (handle_v_cont, handle_v_requests): New functions.
10366 (myresume): New function.
10367 (main): Handle 'v' case.
10368 * target.h (struct thread_resume): New type.
10369 (struct target_ops): Change argument of "resume" to struct
10370 thread_resume *.
10371 (myresume): Delete macro.
10372
c938e9b0
L
103732003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10374
10375 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10376 (uninstall): Support DESTDIR.
10377
7f313d07
BC
10378Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10379
10380 * configure.srv: Add xscale*linux copy of arm*linux entry.
10381
3b2fc2ea
DJ
103822003-07-24 Daniel Jacobowitz <drow@mvista.com>
10383
10384 * linux-arm-low.c (arm_reinsert_addr): New function.
10385 (the_low_target): Add arm_reinsert_addr.
10386
1c0a559e
MK
103872003-07-08 Mark Kettenis <kettenis@gnu.org>
10388
10389 * mem-break.c: Remove whitespace at end of file.
10390
43d5792c
DJ
103912003-06-28 Daniel Jacobowitz <drow@mvista.com>
10392
10393 * configure.in: Check whether we need to prototype strerror.
10394 * server.h: Optionally prototype strerror.
10395 * gdbreplay.c (perror_with_name): Use strerror.
10396 * linux-low.c (linux_attach_lwp): Use strerror.
10397 * utils.c (perror_with_name): Use strerror.
10398 * config.in, configure: Regenerated.
10399
c8a86edf
DJ
104002003-06-28 Daniel Jacobowitz <drow@mvista.com>
10401
10402 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10403 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10404
73d37363
DJ
104052003-06-20 Daniel Jacobowitz <drow@mvista.com>
10406
10407 * Makefile.in (SFILES): Update.
10408 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10409 low-sun3.c: Remove files.
10410
6ad8ae5c
DJ
104112003-06-17 Daniel Jacobowitz <drow@mvista.com>
10412
10413 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10414 (linux_detach_one_process, linux_detach): New functions.
10415 (linux_target_ops): Add linux_detach.
10416 * server.c (main): Handle 'D' packet.
10417 * target.h (struct target_ops): Add "detach" member.
10418 (detach_inferior): Define.
10419
1581182a
MK
104202003-06-13 Mark Kettenis <kettenis@gnu.org>
10421
10422 From Kelley Cook <kelleycook@wideopenwest.com>:
10423 * configure.srv: Accept i[34567]86 variants.
10424
e5379b03
DJ
104252003-06-05 Daniel Jacobowitz <drow@mvista.com>
10426
10427 * linux-low.c (linux_wait_for_event): Correct comment typos.
10428 (linux_resume_one_process): Call check_removed_breakpoint.
10429 (linux_send_signal): New function.
10430 (linux_target_ops): Add linux_send_signal.
10431 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10432 of kill.
10433 * target.h (struct target_ops): Add send_signal.
10434
2ff29de4
JB
104352003-05-29 Jim Blandy <jimb@redhat.com>
10436
10437 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10438 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10439 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10440 away part of the register's value.
10441
254787d4
DJ
104422003-03-26 Daniel Jacobowitz <drow@mvista.com>
10443
10444 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10445 (linux_wait_for_event, linux_init_signals): Likewise.
10446
94e10508
DJ
104472003-03-17 Daniel Jacobowitz <drow@mvista.com>
10448
10449 * configure.in: Check for stdlib.h.
10450 * configure: Regenerated.
10451 * config.in: Regenerated.
10452
4c0711e0
DJ
104532003-01-04 Andreas Schwab <schwab@suse.de>
10454
10455 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10456
ef66e766
AC
104572003-01-02 Andrew Cagney <ac131313@redhat.com>
10458
10459 * Makefile.in: Remove obsolete code.
10460
a1358604
DJ
104612002-11-20 Daniel Jacobowitz <drow@mvista.com>
10462
10463 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10464 defined(PT_FPR0_HI).
10465
23ce3b1c
DJ
104662002-11-17 Stuart Hughes <seh@zee2.com>
10467
10468 * linux-arm-low.c (arm_num_regs): Increase.
10469 (arm_regmap): Include status register.
10470
104712002-11-17 Daniel Jacobowitz <drow@mvista.com>
10472
10473 * linux-low.c (register_addr): Remove incorrect -1 check.
10474
a9fa9f7d
DJ
104752002-08-29 Daniel Jacobowitz <drow@mvista.com>
10476
10477 * linux-low.c (linux_create_inferior): Call setpgid. Return
10478 the new PID.
10479 (unstopped_p, linux_signal_pid): Remove.
10480 (linux_target_ops): Remove linux_signal_pid.
10481 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10482 global instead of target method.
10483 * target.h (struct target_ops): Remove signal_pid. Update comment
10484 for create_inferior.
10485 * server.c (signal_pid): New variable.
10486 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 10487 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
10488 (attach_inferior): Set signal_pid.
10489
17574093
DJ
104902002-08-23 Daniel Jacobowitz <drow@mvista.com>
10491
10492 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10493
104942002-08-20 Jim Blandy <jimb@redhat.com>
10495
10496 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10497 default for this.
10498
104992002-08-01 Andrew Cagney <cagney@redhat.com>
10500
10501 * Makefile.in: Make chill references obsolete.
10502
105032002-07-24 Kevin Buettner <kevinb@redhat.com>
10504
10505 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10506 * configure: Regenerate.
10507 * config.in: Regenerate.
10508
105092002-07-09 David O'Brien <obrien@FreeBSD.org>
10510
10511 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10512 (perror_with_name, remote_close, remote_open, expect, play): Static.
10513
105142002-07-04 Michal Ludvig <mludvig@suse.cz>
10515
4b8dad4a 10516 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
10517 byte offsets instead of an array of indexes.
10518 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10519
105202002-06-13 Daniel Jacobowitz <drow@mvista.com>
10521
10522 * regcache.c: Add comment.
10523
105242002-06-11 Daniel Jacobowitz <drow@mvista.com>
10525
10526 * thread-db.c: New file.
10527 * proc-service.c: New file.
10528 * acinclude.m4: New file.
10529 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10530 proc-service.o, and thread-db.o.
10531 (linux-low.o): Add USE_THREAD_DB.
10532 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10533 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10534 * aclocal.m4: Regenerated.
10535 * config.in: Regenerated.
10536 * configure: Regenerated.
10537 * configure.in: Check for proc_service.h, sys/procfs.h,
10538 thread_db.h, and linux/elf.h headrs.
10539 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10540 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10541 Check for -lthread_db and thread support.
10542 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10543 PowerPC, and SuperH.
10544 * i387-fp.c: Constify arguments.
10545 * i387-fp.h: Likewise.
10546 * inferiors.c: (struct thread_info): Renamed from
10547 `struct inferior_info'. Remove PID member. Use generic inferior
10548 list header. All uses updated.
10549 (inferiors, signal_pid): Removed.
10550 (all_threads): New variable.
10551 (get_thread): Define.
10552 (add_inferior_to_list): New function.
10553 (for_each_inferior): New function.
10554 (change_inferior_id): New function.
10555 (add_inferior): Removed.
10556 (remove_inferior): New function.
10557 (add_thread): New function.
10558 (free_one_thread): New function.
10559 (remove_thread): New function.
10560 (clear_inferiors): Use for_each_inferior and free_one_thread.
10561 (find_inferior): New function.
10562 (find_inferior_id): New function.
10563 (inferior_target_data): Update argument type.
10564 (set_inferior_target_data): Likewise.
10565 (inferior_regcache_data): Likewise.
10566 (set_inferior_regcache_data): Likewise.
10567 * linux-low.c (linux_bp_reinsert): Remove.
10568 (all_processes, stopping_threads, using_thrads)
10569 (struct pending_signals, debug_threads, pid_of): New.
10570 (inferior_pid): Replace with macro.
10571 (struct inferior_linux_data): Remove.
10572 (get_stop_pc, add_process): New functions.
10573 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10574 Use add_process and add_thread.
10575 (linux_attach_lwp): New function, based on old linux_attach. Use
10576 add_process and add_thread. Set stop_expected for new threads.
10577 (linux_attach): New function.
10578 (linux_kill_one_process): New function.
10579 (linux_kill): Kill all LWPs.
10580 (linux_thread_alive): Use find_inferior_id.
10581 (check_removed_breakpoints, status_pending_p): New functions.
10582 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10583 Update. Use WNOHANG. Wait for cloned processes also. Update process
10584 struct for the found process.
10585 (linux_wait_for_event): New function.
10586 (linux_wait): Use it. Support LWPs.
10587 (send_sigstop, wait_for_sigstop, stop_all_processes)
10588 (linux_resume_one_process, linux_continue_one_process): New functions.
10589 (linux_resume): Support LWPs.
10590 (REGISTER_RAW_SIZE): Remove.
10591 (fetch_register): Use register_size instead. Call supply_register.
10592 (usr_store_inferior_registers): Likewise. Call collect_register.
10593 Fix recursive case.
10594 (regsets_fetch_inferior_registers): Improve error message.
10595 (regsets_store_inferior_registers): Add debugging.
10596 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10597 (unstopped_p, linux_signal_pid): New functions.
10598 (linux_target_ops): Add linux_signal_pid.
10599 (linux_init_signals): New function.
10600 (initialize_low): Call it. Initialize using_threads.
10601 * regcache.c (inferior_regcache_data): Add valid
10602 flag.
10603 (get_regcache): Fetch registers lazily. Add fetch argument
10604 and update all callers.
10605 (regcache_invalidate_one, regcache_invalidate): New
10606 functions.
10607 (new_register_cache): Renamed from create_register_cache.
10608 Return the new regcache.
10609 (free_register_cache): Change argument to a void *.
10610 (registers_to_string, registers_from_string): Call get_regcache
10611 with fetch flag set.
10612 (register_data): Make static. Pass fetch flag to get_regcache.
10613 (supply_register): Call get_regcache with fetch flag clear.
10614 (collect_register): Call get_regcache with fetch flag set.
10615 (collect_register_as_string): New function.
10616 * regcache.h: Update.
10617 * remote-utils.c (putpkt): Flush after debug output and use
10618 stderr.
10619 Handle input interrupts while waiting for an ACK.
10620 (input_interrupt): Use signal_pid method.
10621 (getpkt): Flush after debug output and use stderr.
10622 (outreg): Use collect_register_as_string.
10623 (new_thread_notify, dead_thread_notify): New functions.
10624 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10625 and general_thread.
10626 (look_up_one_symbol): Flush after debug output.
10627 * server.c (step_thread, server_waiting): New variables.
10628 (start_inferior): Don't use signal_pid. Update call to mywait.
10629 (attach_inferior): Update call to mywait.
10630 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10631 (main): Don't fetch/store registers explicitly. Use
10632 set_desired_inferior. Support proposed ``Hs'' packet. Update
10633 calls to mywait.
10634 * server.h: Update.
10635 (struct inferior_list, struct_inferior_list_entry): New.
10636 * target.c (set_desired_inferior): New.
10637 (write_inferior_memory): Constify.
10638 (mywait): New function.
10639 * target.h: Update.
10640 (struct target_ops): New signal_pid method.
10641 (mywait): Removed macro, added prototype.
10642
10643 * linux-low.h (regset_func): Removed.
10644 (regset_fill_func, regset_store_func): New.
10645 (enum regset_type): New.
10646 (struct regset_info): Add type field. Use new operation types.
10647 (struct linux_target_ops): stop_pc renamed to get_pc.
10648 Add decr_pc_after_break and breakpoint_at.
10649 (get_process, get_thread_proess, get_process_thread)
10650 (strut process_info, all_processes, linux_attach_lwp)
10651 (thread_db_init): New.
10652
10653 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10654 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10655 (the_low_target): Add new members.
10656 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10657 (i386_store_fpxregset): Constify.
10658 (target_regsets): Add new kind identifier.
10659 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10660 (i386_set_pc): Add debugging.
10661 (i386_breakpoint_at): New function.
10662 (the_low_target): Add new members.
10663 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10664 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10665 (mips_breakpoint_at): New.
10666 (the_low_target): Add new members.
10667 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10668 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10669 (the_low_target): Add new members.
10670 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10671 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10672 (the_low_target): Add new members.
10673 * linux-x86-64-low.c (target_regsets): Add new kind
10674 identifier.
10675
106762002-05-15 Daniel Jacobowitz <drow@mvista.com>
10677
10678 From Martin Pool <mbp@samba.org>:
10679 * server.c (gdbserver_usage): New function.
10680 (main): Call it.
10681
106822002-05-14 Daniel Jacobowitz <drow@mvista.com>
10683
10684 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10685 stop_at -> stop_pc.
10686
106872002-05-04 Andrew Cagney <ac131313@redhat.com>
10688
10689 * Makefile.in: Remove obsolete code.
10690
106912002-04-24 Michal Ludvig <mludvig@suse.cz>
10692
10693 * linux-low.c (regsets_fetch_inferior_registers),
10694 (regsets_store_inferior_registers): Removed cast to int from
10695 ptrace() calls.
10696 * regcache.h: Added declaration of struct inferior_info.
10697
106982002-04-20 Daniel Jacobowitz <drow@mvista.com>
10699
10700 * inferiors.c (struct inferior_info): Add regcache_data.
10701 (add_inferior): Call create_register_cache.
10702 (clear_inferiors): Call free_register_cache.
10703 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10704 * regcache.c (struct inferior_regcache_data): New.
10705 (registers): Remove.
10706 (get_regcache): New function.
10707 (create_register_cache, free_register_cache): New functions.
10708 (set_register_cache): Don't initialize the register cache here.
10709 (registers_to_string, registers_from_string, register_data): Call
10710 get_regcache.
10711 * regcache.h: Add prototypes.
10712 * server.h: Likewise.
10713
107142002-04-20 Daniel Jacobowitz <drow@mvista.com>
10715
10716 * mem-break.c: New file.
10717 * mem-break.h: New file.
10718 * Makefile.in: Add mem-break.o rule; update server.h
10719 dependencies.
10720 * inferiors.c (struct inferior_info): Add target_data
10721 member.
10722 (clear_inferiors): Free target_data member if set.
10723 (inferior_target_data, set_inferior_target_data): New functions.
10724 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10725 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10726 * linux-low.c (linux_bp_reinsert): New variable.
10727 (struct inferior_linux_data): New.
10728 (linux_create_inferior): Use set_inferior_target_data.
10729 (linux_attach): Likewise. Call add_inferior.
10730 (linux_wait_for_one_inferior): New function.
10731 (linux_wait): Call it.
10732 (linux_write_memory): Add const.
10733 (initialize_low): Call set_breakpoint_data.
10734 * linux-low.h (struct linux_target_ops): Add breakpoint
10735 handling members.
10736 * server.c (attach_inferior): Remove extra add_inferior
10737 call.
10738 * server.h: Include mem-break.h. Update inferior.c
10739 prototypes.
10740 * target.c (read_inferior_memory)
10741 (write_inferior_memory): New functions.
10742 * target.h (read_inferior_memory)
10743 (write_inferior_memory): Change macros to prototypes.
10744 (struct target_ops): Update comments. Add const to write_memory
10745 definition.
10746
107472002-04-11 Daniel Jacobowitz <drow@mvista.com>
10748
10749 * linux-low.c (usr_store_inferior_registers): Support
10750 registers which are allowed to fail to store.
10751 * linux-low.h (linux_target_ops): Likewise.
10752 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10753 (ppc_cannot_store_register): FPSCR may not be storable.
10754
107552002-04-09 Daniel Jacobowitz <drow@mvista.com>
10756
10757 * server.h: Include <string.h> if HAVE_STRING_H.
10758 * ChangeLog: Correct paths in last ChangeLog entry.
10759
107602002-04-09 Daniel Jacobowitz <drow@mvista.com>
10761
10762 * linux-low.h: Remove obsolete prototypes.
10763 (struct linux_target_ops): New.
10764 (extern the_low_target): New.
10765 * linux-low.c (num_regs, regmap): Remove declarations.
10766 (register_addr): Use the_low_target explicitly.
10767 (fetch_register): Likewise.
10768 (usr_fetch_inferior_registers): Likewise.
10769 (usr_store_inferior_registers): Likewise.
10770 * linux-arm-low.c (num_regs): Remove.
10771 (arm_num_regs): Define.
10772 (arm_regmap): Renamed from regmap, made static.
10773 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10774 made static.
10775 (arm_cannot_store_register): Renamed from cannot_store_register,
10776 made static.
10777 (the_low_target): New.
10778 * linux-i386-low.c (num_regs): Remove.
10779 (i386_num_regs): Define.
10780 (i386_regmap): Renamed from regmap, made static.
10781 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10782 made static.
10783 (i386_cannot_store_register): Renamed from cannot_store_register,
10784 made static.
10785 (the_low_target): New.
10786 * linux-ia64-low.c (num_regs): Remove.
10787 (ia64_num_regs): Define.
10788 (ia64_regmap): Renamed from regmap, made static.
10789 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10790 made static.
10791 (ia64_cannot_store_register): Renamed from cannot_store_register,
10792 made static.
10793 (the_low_target): New.
10794 * linux-m68k-low.c (num_regs): Remove.
10795 (m68k_num_regs): Define.
10796 (m68k_regmap): Renamed from regmap, made static.
10797 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10798 made static.
10799 (m68k_cannot_store_register): Renamed from cannot_store_register,
10800 made static.
10801 (the_low_target): New.
10802 * linux-mips-low.c (num_regs): Remove.
10803 (mips_num_regs): Define.
10804 (mips_regmap): Renamed from regmap, made static.
10805 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10806 made static.
10807 (mips_cannot_store_register): Renamed from cannot_store_register,
10808 made static.
10809 (the_low_target): New.
10810 * linux-ppc-low.c (num_regs): Remove.
10811 (ppc_num_regs): Define.
10812 (ppc_regmap): Renamed from regmap, made static.
10813 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10814 made static.
10815 (ppc_cannot_store_register): Renamed from cannot_store_register,
10816 made static.
10817 (the_low_target): New.
10818 * linux-s390-low.c (num_regs): Remove.
10819 (s390_num_regs): Define.
10820 (s390_regmap): Renamed from regmap, made static.
10821 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10822 made static.
10823 (s390_cannot_store_register): Renamed from cannot_store_register,
10824 made static.
10825 (the_low_target): New.
10826 * linux-sh-low.c (num_regs): Remove.
10827 (sh_num_regs): Define.
10828 (sh_regmap): Renamed from regmap, made static.
10829 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10830 made static.
10831 (sh_cannot_store_register): Renamed from cannot_store_register,
10832 made static.
10833 (the_low_target): New.
10834 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10835 (the_low_target): New.
10836
108372002-04-09 Daniel Jacobowitz <drow@mvista.com>
10838
10839 * Makefile.in: Add stamp-h target.
10840 * configure.in: Create stamp-h.
10841 * configure: Regenerated.
10842
108432002-04-09 Daniel Jacobowitz <drow@mvista.com>
10844
10845 * inferiors.c: New file.
10846 * target.c: New file.
10847 * target.h: New file.
10848 * Makefile.in: Add target.o and inferiors.o. Update
10849 dependencies.
10850 * linux-low.c (inferior_pid): New static variable,
10851 moved from server.c.
10852 (linux_create_inferior): Renamed from create_inferior.
10853 Call add_inferior. Return 0 on success instead of a PID.
10854 (linux_attach): Renamed from myattach.
10855 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10856 (linux_thread_alive): Renamed from mythread_alive.
10857 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10858 child dies.
10859 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10860 (regsets_store_inferior_registers): Correct error message.
10861 Add missing ``return 0''.
10862 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10863 (linux_store_registers): Renamed from store_inferior_registers.
10864 (linux_read_memory): Renamed from read_inferior_memory.
10865 (linux_write_memory): Renamed from write_inferior_memory.
10866 (linux_target_ops): New structure.
10867 (initialize_low): Call set_target_ops ().
10868 * remote-utils.c (unhexify): New function.
10869 (hexify): New function.
10870 (input_interrupt): Send signals to ``signal_pid''.
10871 * server.c (inferior_pid): Remove.
10872 (start_inferior): Update create_inferior call.
10873 (attach_inferior): Call add_inferior.
10874 (handle_query): New function.
10875 (main): Call handle_query for `q' packets.
10876 * server.h: Include "target.h". Remove obsolete prototypes.
10877 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10878
108792002-04-09 Daniel Jacobowitz <drow@mvista.com>
10880
10881 * Makefile.in: Add WARN_CFLAGS. Update configury
10882 dependencies.
10883 * configure.in: Check for <string.h>
10884 * configure: Regenerate.
10885 * config.in: Regenerate.
10886 * gdbreplay.c: Include needed system headers.
10887 (remote_open): Remove strchr prototype.
10888 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10889 * regcache.c (supply_register): Change buf argument to const void *.
10890 (supply_register_by_name): Likewise.
10891 (collect_register): Change buf argument to void *.
10892 (collect_register_by_name): Likewise.
10893 * regcache.h: Add missing prototypes.
10894 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10895 * server.c (handle_query): New function.
10896 (attached): New static variable, moved out of main.
10897 (main): Quiet longjmp clobber warnings.
10898 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10899 * utils.c (error): Remove NORETURN.
10900 (fatal): Likewise.